Home
last modified time | relevance | path

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

12

/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_projective_dbl_point.c46 LTC_ARGCHK(R != NULL); in ltc_ecc_projective_dbl_point()
54 if (P != R) { in ltc_ecc_projective_dbl_point()
69 if ((err = mp_mul(R->z, R->y, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
72 if ((err = mp_add(R->z, R->z, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
74 if ((err = mp_sub(R->z, modulus, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
130 if ((err = mp_add(R->y, R->y, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
132 if ((err = mp_sub(R->y, modulus, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
146 if ((err = mp_mul(R->y, R->x, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
153 if ((err = mp_sub(R->x, R->y, R->x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
158 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.c26 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map) in ltc_ecc_mulmod() argument
36 LTC_ARGCHK(R != NULL); in ltc_ecc_mulmod()
42 return ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_mulmod()
127 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
139 if ((err = ltc_ecc_copy_point(M[bitbuf-8], R)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
146 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
150 … if ((err = ltc_mp.ecc_ptadd(R, M[bitbuf-8], R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
164 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
171 if ((err = ltc_ecc_copy_point(tG, R)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
175 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.c23 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
30 LTC_ARGCHK(R != NULL); in ltc_ecc_projective_add_point()
41 err = ltc_ecc_copy_point(Q, R); in ltc_ecc_projective_add_point()
48 err = ltc_ecc_copy_point(P, R); in ltc_ecc_projective_add_point()
56 return ltc_ecc_projective_dbl_point(P, R, ma, modulus, mp); in ltc_ecc_projective_add_point()
61 err = ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_projective_add_point()
187 if ((err = mp_copy(x, R->x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
188 if ((err = mp_copy(y, R->y)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
189 if ((err = mp_copy(z, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
A Dltc_ecc_mulmod_timing.c25 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map) in ltc_ecc_mulmod() argument
35 LTC_ARGCHK(R != NULL); in ltc_ecc_mulmod()
41 return ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_mulmod()
129 if ((err = ltc_ecc_copy_point(M[0], R)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
133 err = ltc_ecc_map(R, modulus, mp); in ltc_ecc_mulmod()
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/sober128/
A Dsober128_stream.c44 #define STEP(R,z) \ argument
45R[OFF(z,0)] = R[OFF(z,15)] ^ R[OFF(z,4)] ^ (R[OFF(z,0)] << 8) ^ Multab[(R[OFF(z,0)] >> 24) & 0xFF];
52 STEP(R,0); in cycle()
53 t = R[0]; in cycle()
55 R[i-1] = R[i]; in cycle()
57 R[N-1] = t; in cycle()
64 t = st->R[OFF(z,0)] + st->R[OFF(z,16)]; \
67 t = ((t + st->R[OFF(z,1)]) ^ st->konst) + st->R[OFF(z,6)]; \
167 st->R[0] = 1; in sober128_stream_setup()
168 st->R[1] = 1; in sober128_stream_setup()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/
A Dcamellia.c435 ulong64 L, R; in camellia_ecb_encrypt() local
440 R ^= skey->camellia.kw[1]; in camellia_ecb_encrypt()
458 a = (ulong32)(R >> 32); in camellia_ecb_encrypt()
480 a = (ulong32)(R >> 32); in camellia_ecb_encrypt()
504 a = (ulong32)(R >> 32); in camellia_ecb_encrypt()
520 R ^= skey->camellia.kw[2]; in camellia_ecb_encrypt()
529 ulong64 L, R; in camellia_ecb_decrypt() local
534 R ^= skey->camellia.kw[2]; in camellia_ecb_decrypt()
554 a = (ulong32)(R >> 32); in camellia_ecb_decrypt()
578 a = (ulong32)(R >> 32); in camellia_ecb_decrypt()
[all …]
A Dcast5.c497 I = (Km + R); in FI()
505 I = (Km ^ R); in FII()
513 I = (Km - R); in FIII()
530 ulong32 R, L; in s_cast5_ecb_encrypt() local
537 LOAD32H(R,&pt[4]); in s_cast5_ecb_encrypt()
538 L ^= FI(R, skey->cast5.K[0], skey->cast5.K[16]); in s_cast5_ecb_encrypt()
541 R ^= FI(L, skey->cast5.K[3], skey->cast5.K[19]); in s_cast5_ecb_encrypt()
556 STORE32H(R,&ct[0]); in s_cast5_ecb_encrypt()
583 ulong32 R, L; in s_cast5_ecb_decrypt() local
589 LOAD32H(R,&ct[0]); in s_cast5_ecb_decrypt()
[all …]
A Danubis.c884 int N, R, i, pos, r; in s_anubis_setup() local
907 skey->anubis.R = R = 8 + N; in s_anubis_setup()
927 for (r = 0; r <= R; r++) { in s_anubis_setup()
975 if (r == R) { in s_anubis_setup()
998 for (r = 1; r < R; r++) { in s_anubis_setup()
1084 roundKey[R][0]; in anubis_crypt()
1090 roundKey[R][1]; in anubis_crypt()
1096 roundKey[R][2]; in anubis_crypt()
1102 roundKey[R][3]; in anubis_crypt()
1129 if (skey->anubis.R < 12 || skey->anubis.R > 18) { in anubis_ecb_encrypt()
[all …]
A Dblowfish.c313 r = *R; in s_blowfish_encipher()
328 *R = l; in s_blowfish_encipher()
480 ulong32 L, R; in s_blowfish_ecb_encrypt() local
488 LOAD32H(R, &pt[4]); in s_blowfish_ecb_encrypt()
494 STORE32H(R, &ct[4]); in s_blowfish_ecb_encrypt()
521 ulong32 L, R; in s_blowfish_ecb_decrypt() local
539 LOAD32H(R, &ct[0]); in s_blowfish_ecb_decrypt()
543 R ^= skey->blowfish.K[17]; in s_blowfish_ecb_decrypt()
548 L ^= F(R); R ^= skey->blowfish.K[r--]; in s_blowfish_ecb_decrypt()
550 L ^= F(R); R ^= skey->blowfish.K[r--]; in s_blowfish_ecb_decrypt()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/
A Dtfm_desc.c458 fp_mul(R->z, R->y, R->z); in tfm_ecc_projective_dbl_point()
461 fp_add(R->z, R->z, R->z); in tfm_ecc_projective_dbl_point()
463 fp_sub(R->z, modulus, R->z); in tfm_ecc_projective_dbl_point()
519 fp_add(R->y, R->y, R->y); in tfm_ecc_projective_dbl_point()
524 fp_sqr(R->y, R->y); in tfm_ecc_projective_dbl_point()
535 fp_mul(R->y, R->x, R->y); in tfm_ecc_projective_dbl_point()
542 fp_sub(R->x, R->y, R->x); in tfm_ecc_projective_dbl_point()
547 fp_sub(R->x, R->y, R->x); in tfm_ecc_projective_dbl_point()
553 fp_sub(R->y, R->x, R->y); in tfm_ecc_projective_dbl_point()
558 fp_mul(R->y, &t1, R->y); in tfm_ecc_projective_dbl_point()
[all …]
A Dgmp_desc.c287 mpz_t t1, C, Q, S, Z, M, T, R, two; in sqrtmod_prime() local
304 mpz_init(T); mpz_init(R); mpz_init(two); in sqrtmod_prime()
349 mpz_powm(R, n, t1, prime); in sqrtmod_prime()
366 mpz_set(ret, R); in sqrtmod_prime()
379 mpz_mul(R, R, t1); in sqrtmod_prime()
380 mpz_mod(R, R, prime); in sqrtmod_prime()
392 mpz_clear(T); mpz_clear(R); mpz_clear(two); in sqrtmod_prime()
/optee_os-3.20.0/
A DMAINTAINERS28 basis (R:).
76 R: Jorge Ramirez <jorge@foundries.io> [@ldts]
81 R: Jorge Ramirez <jorge@foundries.io> [@ldts]
146 R: Tao Lu <taolu@marvell.com> [@taovcu]
176 R: Peng Fan <peng.fan@nxp.com> [@MrVan]
198 R: Peng Fan <peng.fan@nxp.com> [@MrVan]
237 R: Rockchip <op-tee@rock-chips.com>
248 R: [@96boards-akebi96/optee]
270 R: Andrew Davis <afd@ti.com> [@glneo]
276 R: Yan Yan <yan.yan@windriver.com>
[all …]
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/
A Dsha1.c173 P( local.E, local.A, local.B, local.C, local.D, R(16) ); in mbedtls_internal_sha1_process()
174 P( local.D, local.E, local.A, local.B, local.C, R(17) ); in mbedtls_internal_sha1_process()
175 P( local.C, local.D, local.E, local.A, local.B, R(18) ); in mbedtls_internal_sha1_process()
176 P( local.B, local.C, local.D, local.E, local.A, R(19) ); in mbedtls_internal_sha1_process()
184 P( local.A, local.B, local.C, local.D, local.E, R(20) ); in mbedtls_internal_sha1_process()
185 P( local.E, local.A, local.B, local.C, local.D, R(21) ); in mbedtls_internal_sha1_process()
186 P( local.D, local.E, local.A, local.B, local.C, R(22) ); in mbedtls_internal_sha1_process()
187 P( local.C, local.D, local.E, local.A, local.B, R(23) ); in mbedtls_internal_sha1_process()
188 P( local.B, local.C, local.D, local.E, local.A, R(24) ); in mbedtls_internal_sha1_process()
189 P( local.A, local.B, local.C, local.D, local.E, R(25) ); in mbedtls_internal_sha1_process()
[all …]
A Decp.c2074 MBEDTLS_MPI_CHK( ecp_double_jac( grp, R, R ) ); in ecp_mul_comb_core()
2076 MBEDTLS_MPI_CHK( ecp_add_mixed( grp, R, R, &Txi ) ); in ecp_mul_comb_core()
2163 mbedtls_ecp_point *RR = R; in ecp_mul_comb_after_precomp()
2168 RR = &rs_ctx->rsm->R; in ecp_mul_comb_after_precomp()
2547 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mod( grp, &R->Z, &BB, &R->Z ) ); in ecp_double_add_mxz()
2548 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mod( grp, &R->Z, &E, &R->Z ) ); in ecp_double_add_mxz()
2597 mbedtls_mpi_free( &R->Y ); in ecp_mul_mxz()
2622 MBEDTLS_MPI_CHK( ecp_double_add_mxz( grp, R, &RP, R, &RP, &PX ) ); in ecp_mul_mxz()
2814 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &R->Y, &grp->P, &R->Y ) ); in mbedtls_ecp_mul_shortcuts()
2862 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.c159 #define R(t) \ macro
196 R( i ); in mbedtls_internal_sha256_process()
234 local.A[5], local.A[6], local.A[7], R(i+0), K[i+0] ); in mbedtls_internal_sha256_process()
236 local.A[4], local.A[5], local.A[6], R(i+1), K[i+1] ); in mbedtls_internal_sha256_process()
238 local.A[3], local.A[4], local.A[5], R(i+2), K[i+2] ); in mbedtls_internal_sha256_process()
240 local.A[2], local.A[3], local.A[4], R(i+3), K[i+3] ); in mbedtls_internal_sha256_process()
242 local.A[1], local.A[2], local.A[3], R(i+4), K[i+4] ); in mbedtls_internal_sha256_process()
244 local.A[0], local.A[1], local.A[2], R(i+5), K[i+5] ); in mbedtls_internal_sha256_process()
246 local.A[7], local.A[0], local.A[1], R(i+6), K[i+6] ); in mbedtls_internal_sha256_process()
248 local.A[6], local.A[7], local.A[0], R(i+7), K[i+7] ); in mbedtls_internal_sha256_process()
A Dnist_kw.c294 unsigned char *R = NULL; in unwrap() local
304 R = output + ( semiblocks - 2 ) * KW_SEMIBLOCK_LENGTH; in unwrap()
312 memcpy( inbuff + KW_SEMIBLOCK_LENGTH, R, KW_SEMIBLOCK_LENGTH ); in unwrap()
322 memcpy( R, outbuff + KW_SEMIBLOCK_LENGTH, KW_SEMIBLOCK_LENGTH ); in unwrap()
324 if( R == output ) in unwrap()
325 R = output + ( semiblocks - 2 ) * KW_SEMIBLOCK_LENGTH; in unwrap()
327 R -= KW_SEMIBLOCK_LENGTH; in unwrap()
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-3.20.0/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-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/math/fp/
A Dltc_ecc_fp_mulmod.c865 if ((err = ltc_mp.ecc_ptdbl(R, R, a, modulus, mp)) != CRYPT_OK) { in s_accel_fp_mul()
872 if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx].LUT[z], R, a, modulus, mp)) != CRYPT_OK) { in s_accel_fp_mul()
876 if ((mp_copy(fp_cache[idx].LUT[z]->x, R->x) != CRYPT_OK) || in s_accel_fp_mul()
886 err = ltc_ecc_map(R, modulus, mp); in s_accel_fp_mul()
1053 if ((err = ltc_mp.ecc_ptdbl(R, R, a, modulus, mp)) != CRYPT_OK) { in ss_accel_fp_mul2add()
1061 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx1].LUT[zA], R, a, modulus, mp)) != CRYPT_OK) { in ss_accel_fp_mul2add()
1066 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, a, modulus, mp)) != CRYPT_OK) { in ss_accel_fp_mul2add()
1079 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, a, modulus, mp)) != CRYPT_OK) { in ss_accel_fp_mul2add()
1092 return ltc_ecc_map(R, modulus, mp); in ss_accel_fp_mul2add()
1274 err = s_accel_fp_mul(idx, k, R, a, modulus, mp, map); in ltc_ecc_fp_mulmod()
[all …]
/optee_os-3.20.0/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()
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ocb/
A Docb_init.c81 ocb->R[x] = ocb->L[x] ^ nonce[x]; in ocb_init()
83 if ((err = cipher_descriptor[cipher]->ecb_encrypt(ocb->R, ocb->R, &ocb->key)) != CRYPT_OK) { in ocb_init()
A Docb_shift_xor.c23 Z[x] = ocb->Li[x] ^ ocb->R[x]; in ocb_shift_xor()
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_math.h386 ecc_point *R,
402 ecc_point *R,
416 ecc_point *R,

Completed in 53 milliseconds

12