/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
pkcs_1_i2osp.c | 27 @param modulus_len The length of the RSA modulus 31 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out) 37 if (size > modulus_len) { 42 zeromem(out, modulus_len); 43 return mp_to_unsigned_bin(n, out+(modulus_len-size));
|
pkcs_1_v1_5_decode.c | 40 unsigned long modulus_len, ps_len, i; local 46 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); 50 if ((msglen > modulus_len) || (modulus_len < 11)) { 62 for (i = 2; i < modulus_len; i++) { 68 if ((i >= modulus_len) || (ps_len < 8)) { 76 for (i = 2; i < modulus_len - 1; i++) {
|
pkcs_1_oaep_encode.c | 41 unsigned long hLen, x, y, modulus_len; local 59 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); 62 if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) { 66 /* allocate ram for DB/mask/salt of size modulus_len */ 67 DB = XMALLOC(modulus_len); 68 mask = XMALLOC(modulus_len); 85 x = modulus_len; 99 y = modulus_len - msglen - 2*hLen - 2; 117 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) [all...] |
pkcs_1_pss_encode.c | 40 unsigned long x, y, hLen, modulus_len; local 57 modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0); 60 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { 64 /* allocate ram for DB/mask/salt/hash of size modulus_len */ 65 DB = XMALLOC(modulus_len); 66 mask = XMALLOC(modulus_len); 67 salt = XMALLOC(modulus_len); 68 hash = XMALLOC(modulus_len); 112 /* generate DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes * [all...] |
pkcs_1_oaep_decode.c | 40 unsigned long hLen, x, y, modulus_len; local 56 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); 59 if ((2*hLen >= (modulus_len - 2)) || (msglen != modulus_len)) { 63 /* allocate ram for DB/mask/salt of size modulus_len */ 64 DB = XMALLOC(modulus_len); 65 mask = XMALLOC(modulus_len); 84 1 || hLen || modulus_len - hLen - 1 100 XMEMCPY(DB, msg + x, modulus_len - hLen - 1); 101 x += modulus_len - hLen - 1 [all...] |
pkcs_1_pss_decode.c | 38 unsigned long x, y, hLen, modulus_len; local 54 modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0); 57 if ((saltlen > modulus_len) || 58 (modulus_len < hLen + saltlen + 2) || (siglen != modulus_len)) { 62 /* allocate ram for DB/mask/salt/hash of size modulus_len */ 63 DB = XMALLOC(modulus_len); 64 mask = XMALLOC(modulus_len); 65 salt = XMALLOC(modulus_len); 66 hash = XMALLOC(modulus_len); [all...] |
pkcs_1_v1_5_encode.c | 42 unsigned long modulus_len, ps_len, i; local 58 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); 61 if ((msglen + 11) > modulus_len) { 65 if (*outlen < modulus_len) { 66 *outlen = modulus_len; 73 ps_len = modulus_len - msglen - 3; 95 /* create string of length modulus_len */ 100 *outlen = modulus_len;
|
/external/wpa_supplicant_8/src/crypto/ |
crypto_internal-modexp.c | 24 const u8 *modulus, size_t modulus_len, 41 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0)
|
crypto_gnutls.c | 162 const u8 *modulus, size_t modulus_len, 173 gcry_mpi_scan(&bn_modulus, GCRYMPI_FMT_USG, modulus, modulus_len, 176 bn_result = gcry_mpi_new(modulus_len * 8);
|
crypto.h | 435 * @modulus_len: Length of modulus integer in bytes 450 const u8 *modulus, size_t modulus_len,
|
crypto_nss.c | 178 const u8 *modulus, size_t modulus_len,
|
crypto_libtomcrypt.c | 704 const u8 *modulus, size_t modulus_len, 714 mp_read_unsigned_bin(m, (u8 *) modulus, modulus_len) != CRYPT_OK)
|
crypto_openssl.c | 264 const u8 *modulus, size_t modulus_len, 277 bn_modulus = BN_bin2bn(modulus, modulus_len, NULL);
|
crypto_cryptoapi.c | 784 const u8 *modulus, size_t modulus_len,
|
/external/dropbear/libtomcrypt/src/headers/ |
tomcrypt_pkcs.h | 23 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out);
|
/external/wpa_supplicant_6/wpa_supplicant/src/crypto/ |
crypto_gnutls.c | 168 const u8 *modulus, size_t modulus_len, 179 gcry_mpi_scan(&bn_modulus, GCRYMPI_FMT_USG, modulus, modulus_len, 182 bn_result = gcry_mpi_new(modulus_len * 8);
|
crypto.h | 413 * @modulus_len: Length of modulus integer in bytes 428 const u8 *modulus, size_t modulus_len,
|
crypto_openssl.c | 214 const u8 *modulus, size_t modulus_len, 227 bn_modulus = BN_bin2bn(modulus, modulus_len, NULL);
|
crypto_libtomcrypt.c | 704 const u8 *modulus, size_t modulus_len, 714 mp_read_unsigned_bin(m, (u8 *) modulus, modulus_len) != CRYPT_OK)
|
crypto_internal.c | 800 const u8 *modulus, size_t modulus_len, 817 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0)
|
/external/wpa_supplicant/ |
crypto.h | 395 * @modulus_len: Length of modulus integer in bytes 410 const u8 *modulus, size_t modulus_len,
|
crypto_internal.c | 632 const u8 *modulus, size_t modulus_len, 649 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0)
|
crypto_libtomcrypt.c | 704 const u8 *modulus, size_t modulus_len, 714 mp_read_unsigned_bin(m, (u8 *) modulus, modulus_len) != CRYPT_OK)
|