/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
D | pkcs_1_pss_encode.c | 40 unsigned long x, y, hLen, modulus_len; in pkcs_1_pss_encode() local 57 modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_pss_encode() 60 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { in pkcs_1_pss_encode() 65 DB = XMALLOC(modulus_len); in pkcs_1_pss_encode() 66 mask = XMALLOC(modulus_len); in pkcs_1_pss_encode() 67 salt = XMALLOC(modulus_len); in pkcs_1_pss_encode() 68 hash = XMALLOC(modulus_len); in pkcs_1_pss_encode() 114 XMEMSET(DB + x, 0, modulus_len - saltlen - hLen - 2); in pkcs_1_pss_encode() 115 x += modulus_len - saltlen - hLen - 2; in pkcs_1_pss_encode() 121 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_pss_encode() [all …]
|
D | pkcs_1_oaep_decode.c | 40 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_decode() local 56 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_oaep_decode() 59 if ((2*hLen >= (modulus_len - 2)) || (msglen != modulus_len)) { in pkcs_1_oaep_decode() 64 DB = XMALLOC(modulus_len); in pkcs_1_oaep_decode() 65 mask = XMALLOC(modulus_len); in pkcs_1_oaep_decode() 100 XMEMCPY(DB, msg + x, modulus_len - hLen - 1); in pkcs_1_oaep_decode() 101 x += modulus_len - hLen - 1; in pkcs_1_oaep_decode() 104 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_decode() 114 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_decode() 119 for (y = 0; y < (modulus_len - hLen - 1); y++) { in pkcs_1_oaep_decode() [all …]
|
D | pkcs_1_pss_decode.c | 38 unsigned long x, y, hLen, modulus_len; in pkcs_1_pss_decode() local 54 modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_pss_decode() 57 if ((saltlen > modulus_len) || in pkcs_1_pss_decode() 58 (modulus_len < hLen + saltlen + 2) || (siglen != modulus_len)) { in pkcs_1_pss_decode() 63 DB = XMALLOC(modulus_len); in pkcs_1_pss_decode() 64 mask = XMALLOC(modulus_len); in pkcs_1_pss_decode() 65 salt = XMALLOC(modulus_len); in pkcs_1_pss_decode() 66 hash = XMALLOC(modulus_len); in pkcs_1_pss_decode() 91 XMEMCPY(DB, sig + x, modulus_len - hLen - 1); in pkcs_1_pss_decode() 92 x += modulus_len - hLen - 1; in pkcs_1_pss_decode() [all …]
|
D | pkcs_1_oaep_encode.c | 41 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_encode() local 59 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_oaep_encode() 62 if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) { in pkcs_1_oaep_encode() 67 DB = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 68 mask = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 85 x = modulus_len; in pkcs_1_oaep_encode() 99 y = modulus_len - msglen - 2*hLen - 2; in pkcs_1_oaep_encode() 117 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_encode() 122 for (y = 0; y < (modulus_len - hLen - 1); y++) { in pkcs_1_oaep_encode() 127 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_encode() [all …]
|
D | pkcs_1_v1_5_decode.c | 40 unsigned long modulus_len, ps_len, i; in pkcs_1_v1_5_decode() local 46 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_v1_5_decode() 50 if ((msglen > modulus_len) || (modulus_len < 11)) { in pkcs_1_v1_5_decode() 62 for (i = 2; i < modulus_len; i++) { in pkcs_1_v1_5_decode() 68 if ((i >= modulus_len) || (ps_len < 8)) { in pkcs_1_v1_5_decode() 76 for (i = 2; i < modulus_len - 1; i++) { in pkcs_1_v1_5_decode()
|
D | pkcs_1_v1_5_encode.c | 42 unsigned long modulus_len, ps_len, i; in pkcs_1_v1_5_encode() local 58 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_v1_5_encode() 61 if ((msglen + 11) > modulus_len) { in pkcs_1_v1_5_encode() 65 if (*outlen < modulus_len) { in pkcs_1_v1_5_encode() 66 *outlen = modulus_len; in pkcs_1_v1_5_encode() 73 ps_len = modulus_len - msglen - 3; in pkcs_1_v1_5_encode() 100 *outlen = modulus_len; in pkcs_1_v1_5_encode()
|
D | pkcs_1_i2osp.c | 31 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out) in pkcs_1_i2osp() argument 37 if (size > modulus_len) { in pkcs_1_i2osp() 42 zeromem(out, modulus_len); in pkcs_1_i2osp() 43 return mp_to_unsigned_bin(n, out+(modulus_len-size)); in pkcs_1_i2osp()
|
/external/wpa_supplicant_8/src/crypto/ |
D | crypto_internal-modexp.c | 18 const u8 *modulus, size_t modulus_len, in crypto_mod_exp() argument 35 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0) in crypto_mod_exp()
|
D | crypto_gnutls.c | 156 const u8 *modulus, size_t modulus_len, in crypto_mod_exp() argument 167 gcry_mpi_scan(&bn_modulus, GCRYMPI_FMT_USG, modulus, modulus_len, in crypto_mod_exp() 170 bn_result = gcry_mpi_new(modulus_len * 8); in crypto_mod_exp()
|
D | crypto_nss.c | 172 const u8 *modulus, size_t modulus_len, in crypto_mod_exp() argument
|
D | crypto_libtomcrypt.c | 698 const u8 *modulus, size_t modulus_len, in crypto_mod_exp() argument 708 mp_read_unsigned_bin(m, (u8 *) modulus, modulus_len) != CRYPT_OK) in crypto_mod_exp()
|
D | crypto.h | 430 const u8 *modulus, size_t modulus_len,
|
D | crypto_openssl.c | 314 const u8 *modulus, size_t modulus_len, in crypto_mod_exp() argument 327 bn_modulus = BN_bin2bn(modulus, modulus_len, NULL); in crypto_mod_exp()
|
D | crypto_cryptoapi.c | 778 const u8 *modulus, size_t modulus_len, in crypto_mod_exp() argument
|
/external/dropbear/libtomcrypt/src/headers/ |
D | tomcrypt_pkcs.h | 23 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out);
|