Home
last modified time | relevance | path

Searched refs:R (Results 1 – 25 of 56) sorted by relevance

123

/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_projective_dbl_point.c53 LTC_ARGCHK(R != NULL); in ltc_ecc_projective_dbl_point()
61 if (P != R) { in ltc_ecc_projective_dbl_point()
76 if ((err = mp_mul(R->z, R->y, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
79 if ((err = mp_add(R->z, R->z, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
81 if ((err = mp_sub(R->z, modulus, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
137 if ((err = mp_add(R->y, R->y, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
139 if ((err = mp_sub(R->y, modulus, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
153 if ((err = mp_mul(R->y, R->x, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
160 if ((err = mp_sub(R->x, R->y, R->x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
165 if ((err = mp_sub(R->x, R->y, R->x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
[all …]
A Dltc_ecc_mulmod.c33 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map) in ltc_ecc_mulmod() argument
43 LTC_ARGCHK(R != NULL); in ltc_ecc_mulmod()
49 return ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_mulmod()
134 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
146 if ((err = ltc_ecc_copy_point(M[bitbuf-8], R)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
153 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
157 … if ((err = ltc_mp.ecc_ptadd(R, M[bitbuf-8], R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
171 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
178 if ((err = ltc_ecc_copy_point(tG, R)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
182 if ((err = ltc_mp.ecc_ptadd(R, tG, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
[all …]
A Dltc_ecc_projective_add_point.c30 int ltc_ecc_projective_add_point(const ecc_point *P, const ecc_point *Q, ecc_point *R, void *ma, vo… in ltc_ecc_projective_add_point() argument
37 LTC_ARGCHK(R != NULL); in ltc_ecc_projective_add_point()
48 err = ltc_ecc_copy_point(Q, R); in ltc_ecc_projective_add_point()
55 err = ltc_ecc_copy_point(P, R); in ltc_ecc_projective_add_point()
63 return ltc_ecc_projective_dbl_point(P, R, ma, modulus, mp); in ltc_ecc_projective_add_point()
68 err = ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_projective_add_point()
194 if ((err = mp_copy(x, R->x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
195 if ((err = mp_copy(y, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
196 if ((err = mp_copy(z, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
A Dltc_ecc_mulmod_timing.c32 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map) in ltc_ecc_mulmod() argument
42 LTC_ARGCHK(R != NULL); in ltc_ecc_mulmod()
48 return ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_mulmod()
136 if ((err = ltc_ecc_copy_point(M[0], R)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
140 err = ltc_ecc_map(R, modulus, mp); in ltc_ecc_mulmod()
/optee_os/core/lib/libtomcrypt/src/ciphers/
A Dcamellia.c442 ulong64 L, R; in camellia_ecb_encrypt() local
447 R ^= skey->camellia.kw[1]; in camellia_ecb_encrypt()
465 a = (ulong32)(R >> 32); in camellia_ecb_encrypt()
487 a = (ulong32)(R >> 32); in camellia_ecb_encrypt()
511 a = (ulong32)(R >> 32); in camellia_ecb_encrypt()
527 R ^= skey->camellia.kw[2]; in camellia_ecb_encrypt()
536 ulong64 L, R; in camellia_ecb_decrypt() local
541 R ^= skey->camellia.kw[2]; in camellia_ecb_decrypt()
561 a = (ulong32)(R >> 32); in camellia_ecb_decrypt()
585 a = (ulong32)(R >> 32); in camellia_ecb_decrypt()
[all …]
A Dcast5.c510 I = (Km + R); in FI()
518 I = (Km ^ R); in FII()
526 I = (Km - R); in FIII()
543 ulong32 R, L; in _cast5_ecb_encrypt() local
550 LOAD32H(R,&pt[4]); in _cast5_ecb_encrypt()
551 L ^= FI(R, skey->cast5.K[0], skey->cast5.K[16]); in _cast5_ecb_encrypt()
554 R ^= FI(L, skey->cast5.K[3], skey->cast5.K[19]); in _cast5_ecb_encrypt()
569 STORE32H(R,&ct[0]); in _cast5_ecb_encrypt()
596 ulong32 R, L; in _cast5_ecb_decrypt() local
602 LOAD32H(R,&ct[0]); in _cast5_ecb_decrypt()
[all …]
A Dblowfish.c395 ulong32 L, R; in _blowfish_ecb_encrypt() local
414 LOAD32H(R, &pt[4]); in _blowfish_ecb_encrypt()
419 R ^= skey->blowfish.K[r++]; L ^= F(R); in _blowfish_ecb_encrypt()
421 R ^= skey->blowfish.K[r++]; L ^= F(R); in _blowfish_ecb_encrypt()
425 R ^= skey->blowfish.K[17]; in _blowfish_ecb_encrypt()
429 STORE32H(R, &ct[0]); in _blowfish_ecb_encrypt()
457 ulong32 L, R; in _blowfish_ecb_decrypt() local
475 LOAD32H(R, &ct[0]); in _blowfish_ecb_decrypt()
484 L ^= F(R); R ^= skey->blowfish.K[r--]; in _blowfish_ecb_decrypt()
486 L ^= F(R); R ^= skey->blowfish.K[r--]; in _blowfish_ecb_decrypt()
[all …]
A Danubis.c891 int N, R, i, pos, r; in _anubis_setup() local
914 skey->anubis.R = R = 8 + N; in _anubis_setup()
934 for (r = 0; r <= R; r++) { in _anubis_setup()
982 if (r == R) { in _anubis_setup()
1005 for (r = 1; r < R; r++) { in _anubis_setup()
1007 v = skey->anubis.roundKeyEnc[R - r][i]; in _anubis_setup()
1052 for (r = 1; r < R; r++) { in anubis_crypt()
1091 roundKey[R][0]; in anubis_crypt()
1097 roundKey[R][1]; in anubis_crypt()
1103 roundKey[R][2]; in anubis_crypt()
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/sober128/
A Dsober128_stream.c51 #define STEP(R,z) \ argument
52R[OFF(z,0)] = R[OFF(z,15)] ^ R[OFF(z,4)] ^ (R[OFF(z,0)] << 8) ^ Multab[(R[OFF(z,0)] >> 24) & 0xFF];
59 STEP(R,0); in cycle()
60 t = R[0]; in cycle()
62 R[i-1] = R[i]; in cycle()
64 R[N-1] = t; in cycle()
71 t = st->R[OFF(z,0)] + st->R[OFF(z,16)]; \
74 t = ((t + st->R[OFF(z,1)]) ^ st->konst) + st->R[OFF(z,6)]; \
174 st->R[0] = 1; in sober128_stream_setup()
175 st->R[1] = 1; in sober128_stream_setup()
[all …]
/optee_os/
A DMAINTAINERS28 basis (R:).
64 R: [@OP-TEE/plat-sam]
111 R: [@OP-TEE/plat-hikey]
129 R: [@OP-TEE/plat-ls]
140 R: [@OP-TEE/plat-ls]
164 R: [@OP-TEE/plat-imx]
202 R: [@OP-TEE/rpi3]
208 R: [@OP-TEE/plat-rcar]
215 R: [@OP-TEE/plat-rzg]
251 R: [@OP-TEE/plat-stm]
[all …]
/optee_os/core/lib/libtomcrypt/src/math/
A Dtfm_desc.c465 fp_mul(R->z, R->y, R->z); in tfm_ecc_projective_dbl_point()
468 fp_add(R->z, R->z, R->z); in tfm_ecc_projective_dbl_point()
470 fp_sub(R->z, modulus, R->z); in tfm_ecc_projective_dbl_point()
526 fp_add(R->y, R->y, R->y); in tfm_ecc_projective_dbl_point()
531 fp_sqr(R->y, R->y); in tfm_ecc_projective_dbl_point()
542 fp_mul(R->y, R->x, R->y); in tfm_ecc_projective_dbl_point()
549 fp_sub(R->x, R->y, R->x); in tfm_ecc_projective_dbl_point()
554 fp_sub(R->x, R->y, R->x); in tfm_ecc_projective_dbl_point()
560 fp_sub(R->y, R->x, R->y); in tfm_ecc_projective_dbl_point()
565 fp_mul(R->y, &t1, R->y); in tfm_ecc_projective_dbl_point()
[all …]
A Dgmp_desc.c294 mpz_t t1, C, Q, S, Z, M, T, R, two; in sqrtmod_prime() local
311 mpz_init(T); mpz_init(R); mpz_init(two); in sqrtmod_prime()
356 mpz_powm(R, n, t1, prime); in sqrtmod_prime()
373 mpz_set(ret, R); in sqrtmod_prime()
386 mpz_mul(R, R, t1); in sqrtmod_prime()
387 mpz_mod(R, R, prime); in sqrtmod_prime()
399 mpz_clear(T); mpz_clear(R); mpz_clear(two); in sqrtmod_prime()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dsha1.c196 P( local.E, local.A, local.B, local.C, local.D, R(16) ); in mbedtls_internal_sha1_process()
197 P( local.D, local.E, local.A, local.B, local.C, R(17) ); in mbedtls_internal_sha1_process()
198 P( local.C, local.D, local.E, local.A, local.B, R(18) ); in mbedtls_internal_sha1_process()
199 P( local.B, local.C, local.D, local.E, local.A, R(19) ); in mbedtls_internal_sha1_process()
207 P( local.A, local.B, local.C, local.D, local.E, R(20) ); in mbedtls_internal_sha1_process()
208 P( local.E, local.A, local.B, local.C, local.D, R(21) ); in mbedtls_internal_sha1_process()
209 P( local.D, local.E, local.A, local.B, local.C, R(22) ); in mbedtls_internal_sha1_process()
210 P( local.C, local.D, local.E, local.A, local.B, R(23) ); in mbedtls_internal_sha1_process()
211 P( local.B, local.C, local.D, local.E, local.A, R(24) ); in mbedtls_internal_sha1_process()
212 P( local.A, local.B, local.C, local.D, local.E, R(25) ); in mbedtls_internal_sha1_process()
[all …]
A Decp.c2075 MBEDTLS_MPI_CHK( ecp_double_jac( grp, R, R ) ); in ecp_mul_comb_core()
2077 MBEDTLS_MPI_CHK( ecp_add_mixed( grp, R, R, &Txi ) ); in ecp_mul_comb_core()
2164 mbedtls_ecp_point *RR = R; in ecp_mul_comb_after_precomp()
2169 RR = &rs_ctx->rsm->R; in ecp_mul_comb_after_precomp()
2548 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mod( grp, &R->Z, &BB, &R->Z ) ); in ecp_double_add_mxz()
2549 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mod( grp, &R->Z, &E, &R->Z ) ); in ecp_double_add_mxz()
2598 mbedtls_mpi_free( &R->Y ); in ecp_mul_mxz()
2623 MBEDTLS_MPI_CHK( ecp_double_add_mxz( grp, R, &RP, R, &RP, &PX ) ); in ecp_mul_mxz()
2815 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &R->Y, &grp->P, &R->Y ) ); in mbedtls_ecp_mul_shortcuts()
2863 pR = &rs_ctx->ma->R; in mbedtls_ecp_muladd_restartable()
[all …]
A Ddhm.c155 static int dhm_random_below( mbedtls_mpi *R, const mbedtls_mpi *M, in dhm_random_below() argument
160 MBEDTLS_MPI_CHK( mbedtls_mpi_random( R, 3, M, f_rng, p_rng ) ); in dhm_random_below()
161 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( R, R, 1 ) ); in dhm_random_below()
340 mbedtls_mpi R; in dhm_update_blinding() local
342 mbedtls_mpi_init( &R ); in dhm_update_blinding()
382 MBEDTLS_MPI_CHK( dhm_random_below( &R, &ctx->P, f_rng, p_rng ) ); in dhm_update_blinding()
383 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->Vf, &ctx->Vi, &R ) ); in dhm_update_blinding()
386 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->Vf, &ctx->Vf, &R ) ); in dhm_update_blinding()
392 mbedtls_mpi_free( &R ); in dhm_update_blinding()
A Dsha256.c182 #define R(t) \ macro
219 R( i ); in mbedtls_internal_sha256_process()
257 local.A[5], local.A[6], local.A[7], R(i+0), K[i+0] ); in mbedtls_internal_sha256_process()
259 local.A[4], local.A[5], local.A[6], R(i+1), K[i+1] ); in mbedtls_internal_sha256_process()
261 local.A[3], local.A[4], local.A[5], R(i+2), K[i+2] ); in mbedtls_internal_sha256_process()
263 local.A[2], local.A[3], local.A[4], R(i+3), K[i+3] ); in mbedtls_internal_sha256_process()
265 local.A[1], local.A[2], local.A[3], R(i+4), K[i+4] ); in mbedtls_internal_sha256_process()
267 local.A[0], local.A[1], local.A[2], R(i+5), K[i+5] ); in mbedtls_internal_sha256_process()
269 local.A[7], local.A[0], local.A[1], R(i+6), K[i+6] ); in mbedtls_internal_sha256_process()
271 local.A[6], local.A[7], local.A[0], R(i+7), K[i+7] ); in mbedtls_internal_sha256_process()
A Decdsa.c262 mbedtls_ecp_point R; in ecdsa_sign_restartable() local
274 mbedtls_ecp_point_init( &R ); in ecdsa_sign_restartable()
330 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( pr, &R.X, &grp->N ) ); in ecdsa_sign_restartable()
378 mbedtls_ecp_point_free( &R ); in ecdsa_sign_restartable()
606 mbedtls_ecp_point R; in ecdsa_verify_restartable() local
609 mbedtls_ecp_point_init( &R ); in ecdsa_verify_restartable()
670 &R, pu1, &grp->G, pu2, Q, ECDSA_RS_ECP ) ); in ecdsa_verify_restartable()
672 if( mbedtls_ecp_is_zero( &R ) ) in ecdsa_verify_restartable()
682 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &R.X, &R.X, &grp->N ) ); in ecdsa_verify_restartable()
687 if( mbedtls_mpi_cmp_mpi( &R.X, r ) != 0 ) in ecdsa_verify_restartable()
[all …]
/optee_os/core/lib/libtomcrypt/src/math/fp/
A Dltc_ecc_fp_mulmod.c872 if ((err = ltc_mp.ecc_ptdbl(R, R, a, modulus, mp)) != CRYPT_OK) { in _accel_fp_mul()
879 if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx].LUT[z], R, a, modulus, mp)) != CRYPT_OK) { in _accel_fp_mul()
883 if ((mp_copy(fp_cache[idx].LUT[z]->x, R->x) != CRYPT_OK) || in _accel_fp_mul()
893 err = ltc_ecc_map(R, modulus, mp); in _accel_fp_mul()
1060 if ((err = ltc_mp.ecc_ptdbl(R, R, a, modulus, mp)) != CRYPT_OK) { in _accel_fp_mul2add()
1068 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx1].LUT[zA], R, a, modulus, mp)) != CRYPT_OK) { in _accel_fp_mul2add()
1073 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, a, modulus, mp)) != CRYPT_OK) { in _accel_fp_mul2add()
1086 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, a, modulus, mp)) != CRYPT_OK) { in _accel_fp_mul2add()
1099 return ltc_ecc_map(R, modulus, mp); in _accel_fp_mul2add()
1281 err = _accel_fp_mul(idx, k, R, a, modulus, mp, map); in ltc_ecc_fp_mulmod()
[all …]
/optee_os/lib/libmbedtls/core/
A Dsm2-dsa.c160 mbedtls_mpi R = { }; in sm2_mbedtls_dsa_verify() local
172 mbedtls_mpi_init(&R); in sm2_mbedtls_dsa_verify()
246 mres = mbedtls_mpi_add_mpi(&R, &eprime, &x1y1p.X); in sm2_mbedtls_dsa_verify()
249 mres = mbedtls_mpi_mod_mpi(&R, &R, &grp.N); in sm2_mbedtls_dsa_verify()
252 if (mbedtls_mpi_cmp_mpi(&R, &rprime)) { in sm2_mbedtls_dsa_verify()
265 mbedtls_mpi_free(&R); in sm2_mbedtls_dsa_verify()
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
A Decp_internal.h170 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
195 mbedtls_ecp_point *R, const mbedtls_ecp_point *P );
252 mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P,
/optee_os/out/arm/export-ta_arm64/include/mbedtls/
A Decp_internal.h170 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
195 mbedtls_ecp_point *R, const mbedtls_ecp_point *P );
252 mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P,
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/
A Decp_internal.h170 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
195 mbedtls_ecp_point *R, const mbedtls_ecp_point *P );
252 mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P,
/optee_os/out/arm/export-ta_arm32/include/mbedtls/
A Decp_internal.h170 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
195 mbedtls_ecp_point *R, const mbedtls_ecp_point *P );
252 mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P,
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/
A Decp_internal.h170 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
195 mbedtls_ecp_point *R, const mbedtls_ecp_point *P );
252 mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P,
/optee_os/core/lib/libtomcrypt/
A Dsm2-dsa.c153 void *R = NULL; in sm2_ltc_dsa_verify() local
159 ltc_res = mp_init_multi(&rprime, &sprime, &t, &mu, &ma, &eprime, &R, in sm2_ltc_dsa_verify()
236 ltc_res = mp_addmod(eprime, x1y1p->x, ltc_key.dp.order, R); in sm2_ltc_dsa_verify()
241 if (mp_cmp(R, rprime) != LTC_MP_EQ) in sm2_ltc_dsa_verify()
247 mp_clear_multi(rprime, sprime, t, mu, ma, eprime, R, NULL); in sm2_ltc_dsa_verify()

Completed in 53 milliseconds

123