/external/dropbear/libtomcrypt/src/headers/ |
D | tomcrypt_math.h | 422 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/ |
D | ltc_ecc_mulmod.c | 98 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 …]
|
D | ltc_ecc_mul2add.c | 117 …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()
|
D | ltc_ecc_mulmod_timing.c | 94 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()
|
D | ecc_verify_hash.c | 124 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()
|
D | ecc_make_key.c | 59 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()
|
D | ecc_shared_secret.c | 72 …if ((err = ltc_mp.ecc_ptmul(private_key->k, &public_key->pubkey, result, prime, 1)) != CRYPT_OK) … in ecc_shared_secret()
|
D | ecc_test.c | 76 …if ((err = ltc_mp.ecc_ptmul(order, G, GG, modulus, 1)) != CRYPT_OK) { goto done; } in ecc_test()
|
/external/dropbear/libtomcrypt/demos/ |
D | timing.c | 10 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()
|
D | test.c | 9 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()
|
D | tv_gen.c | 102 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/ |
D | ecc_test.c | 70 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/ |
D | crypt_fsa.c | 28 XMEMCPY(<c_mp, mp, sizeof(ltc_mp)); in crypt_fsa()
|
D | crypt_ltc_mp_descriptor.c | 13 ltc_math_descriptor ltc_mp; variable
|
/external/dropbear/libtomcrypt/src/math/fp/ |
D | ltc_ecc_fp_mulmod.c | 711 …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/ |
D | crypto_libtomcrypt.c | 25 #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/ |
D | crypto_libtomcrypt.c | 18 #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/ |
D | rsa_encrypt_key.c | 95 return ltc_mp.rsa_me(out, x, out, outlen, PK_PUBLIC, key); in rsa_encrypt_key_ex()
|
D | rsa_decrypt_key.c | 83 if ((err = ltc_mp.rsa_me(in, inlen, tmp, &x, PK_PRIVATE, key)) != CRYPT_OK) { in rsa_decrypt_key_ex()
|
D | rsa_sign_hash.c | 127 return ltc_mp.rsa_me(out, x, out, outlen, PK_PRIVATE, key); in rsa_sign_hash_ex()
|
D | rsa_verify_hash.c | 82 if ((err = ltc_mp.rsa_me(sig, siglen, tmpbuf, &x, PK_PUBLIC, key)) != CRYPT_OK) { in rsa_verify_hash_ex()
|
D | rsa_import.c | 38 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_import()
|
/external/dropbear/libtomcrypt/src/pk/katja/ |
D | katja_import.c | 34 LTC_ARGCHK(ltc_mp.name != NULL); in katja_import()
|
D | katja_make_key.c | 34 LTC_ARGCHK(ltc_mp.name != NULL); in katja_make_key()
|
/external/dropbear/libtomcrypt/src/pk/dsa/ |
D | dsa_import.c | 34 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_import()
|