Home
last modified time | relevance | path

Searched refs:ltc_mp (Results 1 – 25 of 30) sorted by relevance

12

/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_math.h422 extern ltc_math_descriptor ltc_mp;
441 #define MP_DIGIT_BIT ltc_mp.bits_per_digit
444 #define mp_init(a) ltc_mp.init(a)
446 #define mp_clear(a) ltc_mp.deinit(a)
448 #define mp_init_copy(a, b) ltc_mp.init_copy(a, b)
450 #define mp_neg(a, b) ltc_mp.neg(a, b)
451 #define mp_copy(a, b) ltc_mp.copy(a, b)
453 #define mp_set(a, b) ltc_mp.set_int(a, b)
454 #define mp_set_int(a, b) ltc_mp.set_int(a, b)
455 #define mp_get_int(a) ltc_mp.get_int(a)
[all …]
/external/dropbear/libtomcrypt/src/pk/ecc/
Dltc_ecc_mulmod.c98 if ((err = ltc_mp.ecc_ptdbl(tG, M[0], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
99 if ((err = ltc_mp.ecc_ptdbl(M[0], M[0], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
100 if ((err = ltc_mp.ecc_ptdbl(M[0], M[0], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
104 if ((err = ltc_mp.ecc_ptadd(M[j-9], tG, M[j-8], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
123 bitcnt = (int) ltc_mp.bits_per_digit; in ltc_ecc_mulmod()
128 i = (buf >> (ltc_mp.bits_per_digit - 1)) & 1; in ltc_ecc_mulmod()
138 if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
159 if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
163 if ((err = ltc_mp.ecc_ptadd(R, M[bitbuf-8], R, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
177 if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
[all …]
Dltc_ecc_mul2add.c117 …if ((err = ltc_mp.ecc_ptdbl(precomp[1], precomp[2], modulus, mp)) != CRYPT_OK) … in ltc_ecc_mul2add()
118 …if ((err = ltc_mp.ecc_ptadd(precomp[1], precomp[2], precomp[3], modulus, mp)) != CRYPT_OK) … in ltc_ecc_mul2add()
121 …if ((err = ltc_mp.ecc_ptdbl(precomp[1<<2], precomp[2<<2], modulus, mp)) != CRYPT_OK) … in ltc_ecc_mul2add()
122 …if ((err = ltc_mp.ecc_ptadd(precomp[1<<2], precomp[2<<2], precomp[3<<2], modulus, mp)) != CRYPT_OK… in ltc_ecc_mul2add()
127 …if ((err = ltc_mp.ecc_ptadd(precomp[x], precomp[(y<<2)], precomp[x+(y<<2)], modulus, mp)) != CRYPT… in ltc_ecc_mul2add()
160 … if ((err = ltc_mp.ecc_ptdbl(C, C, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } in ltc_ecc_mul2add()
161 … if ((err = ltc_mp.ecc_ptdbl(C, C, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } in ltc_ecc_mul2add()
174 …if ((err = ltc_mp.ecc_ptadd(C, precomp[nA + (nB<<2)], C, modulus, mp)) != CRYPT_OK) { goto ERR_MU;… in ltc_ecc_mul2add()
Dltc_ecc_mulmod_timing.c94 if ((err = ltc_mp.ecc_ptdbl(tG, M[1], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
122 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
123 if ((err = ltc_mp.ecc_ptdbl(M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
130 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
131 if ((err = ltc_mp.ecc_ptdbl(M[1], M[2], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
135 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[i^1], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
136 if ((err = ltc_mp.ecc_ptdbl(M[i], M[i], modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
Decc_verify_hash.c124 if (ltc_mp.ecc_mul2add == NULL) { in ecc_verify_hash()
125 …if ((err = ltc_mp.ecc_ptmul(u1, mG, mG, m, 0)) != CRYPT_OK) … in ecc_verify_hash()
126 …if ((err = ltc_mp.ecc_ptmul(u2, mQ, mQ, m, 0)) != CRYPT_OK) … in ecc_verify_hash()
132 …if ((err = ltc_mp.ecc_ptadd(mQ, mG, mG, m, mp)) != CRYPT_OK) … in ecc_verify_hash()
135 …if ((err = ltc_mp.ecc_map(mG, m, mp)) != CRYPT_OK) … in ecc_verify_hash()
138 …if ((err = ltc_mp.ecc_mul2add(mG, u1, mQ, u2, mG, m)) != CRYPT_OK) … in ecc_verify_hash()
Decc_make_key.c59 LTC_ARGCHK(ltc_mp.name != NULL); in ecc_make_key_ex()
102 …if ((err = ltc_mp.ecc_ptmul(key->k, base, &key->pubkey, prime, 1)) != CRYPT_OK) { got… in ecc_make_key_ex()
Decc_shared_secret.c72 …if ((err = ltc_mp.ecc_ptmul(private_key->k, &public_key->pubkey, result, prime, 1)) != CRYPT_OK) … in ecc_shared_secret()
Decc_test.c76 …if ((err = ltc_mp.ecc_ptmul(order, G, GG, modulus, 1)) != CRYPT_OK) { goto done; } in ecc_test()
/external/dropbear/libtomcrypt/demos/
Dtiming.c10 ltc_mp = ltm_desc; in main()
12 ltc_mp = tfm_desc; in main()
14 ltc_mp = gmp_desc; in main()
17 ltc_mp = EXT_MATH_LIB; in main()
Dtest.c9 ltc_mp = ltm_desc; in main()
11 ltc_mp = tfm_desc; in main()
13 ltc_mp = gmp_desc; in main()
16 ltc_mp = EXT_MATH_LIB; in main()
Dtv_gen.c102 ltc_mp = ltm_desc; in reg_algs()
104 ltc_mp = tfm_desc; in reg_algs()
106 ltc_mp = gmp_desc; in reg_algs()
109 ltc_mp = EXT_MATH_LIB; in reg_algs()
687 ltc_mp.ecc_ptmul(k, G, R, modulus, 1); in ecc_gen()
/external/dropbear/libtomcrypt/testprof/
Decc_test.c70 DO(ltc_mp.ecc_ptmul(rA, G, A, modulus, 1)); in ecc_test_shamir()
73 DO(ltc_mp.ecc_ptmul(rB, G, B, modulus, 1)); in ecc_test_shamir()
82 DO(ltc_mp.ecc_ptmul(kA, A, C1, modulus, 0)); in ecc_test_shamir()
83 DO(ltc_mp.ecc_ptmul(kB, B, C2, modulus, 0)); in ecc_test_shamir()
84 DO(ltc_mp.ecc_ptadd(C1, C2, C1, modulus, mp)); in ecc_test_shamir()
85 DO(ltc_mp.ecc_map(C1, modulus, mp)); in ecc_test_shamir()
88 DO(ltc_mp.ecc_mul2add(A, kA, B, kB, C2, modulus)); in ecc_test_shamir()
/external/dropbear/libtomcrypt/src/misc/crypt/
Dcrypt_fsa.c28 XMEMCPY(&ltc_mp, mp, sizeof(ltc_mp)); in crypt_fsa()
Dcrypt_ltc_mp_descriptor.c13 ltc_math_descriptor ltc_mp; variable
/external/dropbear/libtomcrypt/src/math/fp/
Dltc_ecc_fp_mulmod.c711 …if ((err = ltc_mp.ecc_ptdbl(fp_cache[idx].LUT[1<<x], fp_cache[idx].LUT[1<<x], modulus, mp)) != CRY… in build_lut()
723 …if ((err = ltc_mp.ecc_ptadd(fp_cache[idx].LUT[lut_orders[y].terma], fp_cache[idx].LUT[lut_orders[y… in build_lut()
872 if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { in accel_fp_mul()
879 if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx].LUT[z], R, modulus, mp)) != CRYPT_OK) { in accel_fp_mul()
1060 if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { in accel_fp_mul2add()
1068 if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx1].LUT[zA], R, modulus, mp)) != CRYPT_OK) { in accel_fp_mul2add()
1073 if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, modulus, mp)) != CRYPT_OK) { in accel_fp_mul2add()
1086 … if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx2].LUT[zB], R, modulus, mp)) != CRYPT_OK) { in accel_fp_mul2add()
/external/wpa_supplicant_6/wpa_supplicant/src/crypto/
Dcrypto_libtomcrypt.c25 #define mp_unsigned_bin_size(a) ltc_mp.unsigned_size(a)
26 #define mp_to_unsigned_bin(a, b) ltc_mp.unsigned_write(a, b)
27 #define mp_read_unsigned_bin(a, b, c) ltc_mp.unsigned_read(a, b, c)
28 #define mp_exptmod(a,b,c,d) ltc_mp.exptmod(a,b,c,d)
678 ltc_mp = tfm_desc; in crypto_global_init()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_libtomcrypt.c18 #define mp_unsigned_bin_size(a) ltc_mp.unsigned_size(a)
19 #define mp_to_unsigned_bin(a, b) ltc_mp.unsigned_write(a, b)
20 #define mp_read_unsigned_bin(a, b, c) ltc_mp.unsigned_read(a, b, c)
21 #define mp_exptmod(a,b,c,d) ltc_mp.exptmod(a,b,c,d)
672 ltc_mp = tfm_desc; in crypto_global_init()
/external/dropbear/libtomcrypt/src/pk/rsa/
Drsa_encrypt_key.c95 return ltc_mp.rsa_me(out, x, out, outlen, PK_PUBLIC, key); in rsa_encrypt_key_ex()
Drsa_decrypt_key.c83 if ((err = ltc_mp.rsa_me(in, inlen, tmp, &x, PK_PRIVATE, key)) != CRYPT_OK) { in rsa_decrypt_key_ex()
Drsa_sign_hash.c127 return ltc_mp.rsa_me(out, x, out, outlen, PK_PRIVATE, key); in rsa_sign_hash_ex()
Drsa_verify_hash.c82 if ((err = ltc_mp.rsa_me(sig, siglen, tmpbuf, &x, PK_PUBLIC, key)) != CRYPT_OK) { in rsa_verify_hash_ex()
Drsa_import.c38 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_import()
/external/dropbear/libtomcrypt/src/pk/katja/
Dkatja_import.c34 LTC_ARGCHK(ltc_mp.name != NULL); in katja_import()
Dkatja_make_key.c34 LTC_ARGCHK(ltc_mp.name != NULL); in katja_make_key()
/external/dropbear/libtomcrypt/src/pk/dsa/
Ddsa_import.c34 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_import()

12