Searched refs:modulus_len (Results 1 – 8 of 8) sorted by relevance
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_pss_encode.c | 53 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { in pkcs_1_pss_encode() 58 DB = XMALLOC(modulus_len); in pkcs_1_pss_encode() 59 mask = XMALLOC(modulus_len); in pkcs_1_pss_encode() 60 salt = XMALLOC(modulus_len); in pkcs_1_pss_encode() 61 hash = XMALLOC(modulus_len); in pkcs_1_pss_encode() 125 *outlen = modulus_len; in pkcs_1_pss_encode() 146 *outlen = modulus_len; in pkcs_1_pss_encode() 150 zeromem(DB, modulus_len); in pkcs_1_pss_encode() 151 zeromem(mask, modulus_len); in pkcs_1_pss_encode() 152 zeromem(salt, modulus_len); in pkcs_1_pss_encode() [all …]
|
A D | pkcs_1_oaep_decode.c | 32 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_decode() local 51 if ((2*hLen >= (modulus_len - 2)) || (msglen != modulus_len)) { in pkcs_1_oaep_decode() 56 DB = XMALLOC(modulus_len); in pkcs_1_oaep_decode() 57 mask = XMALLOC(modulus_len); in pkcs_1_oaep_decode() 93 XMEMCPY(DB, msg + x, modulus_len - hLen - 1); in pkcs_1_oaep_decode() 94 x += modulus_len - hLen - 1; in pkcs_1_oaep_decode() 119 x = modulus_len; in pkcs_1_oaep_decode() 147 if ((modulus_len - hLen - 1 - ++x) > *outlen) { in pkcs_1_oaep_decode() 153 *outlen = modulus_len - hLen - 1 - x; in pkcs_1_oaep_decode() 163 zeromem(DB, modulus_len); in pkcs_1_oaep_decode() [all …]
|
A D | pkcs_1_pss_decode.c | 31 unsigned long x, y, hLen, modulus_len; in pkcs_1_pss_decode() local 51 if ((saltlen > modulus_len) || in pkcs_1_pss_decode() 57 DB = XMALLOC(modulus_len); in pkcs_1_pss_decode() 58 mask = XMALLOC(modulus_len); in pkcs_1_pss_decode() 59 salt = XMALLOC(modulus_len); in pkcs_1_pss_decode() 60 hash = XMALLOC(modulus_len); in pkcs_1_pss_decode() 86 x += modulus_len - hLen - 1; in pkcs_1_pss_decode() 153 zeromem(DB, modulus_len); in pkcs_1_pss_decode() 154 zeromem(mask, modulus_len); in pkcs_1_pss_decode() 155 zeromem(salt, modulus_len); in pkcs_1_pss_decode() [all …]
|
A D | pkcs_1_oaep_encode.c | 33 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_encode() local 54 if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) { in pkcs_1_oaep_encode() 59 DB = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 60 mask = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 77 x = modulus_len; in pkcs_1_oaep_encode() 91 y = modulus_len - msglen - 2*hLen - 2; in pkcs_1_oaep_encode() 129 if (*outlen < modulus_len) { in pkcs_1_oaep_encode() 130 *outlen = modulus_len; in pkcs_1_oaep_encode() 141 x += modulus_len - hLen - 1; in pkcs_1_oaep_encode() 148 zeromem(DB, modulus_len); in pkcs_1_oaep_encode() [all …]
|
A D | pkcs_1_v1_5_decode.c | 32 unsigned long modulus_len, ps_len, i; in pkcs_1_v1_5_decode() local 38 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_v1_5_decode() 42 if ((msglen > modulus_len) || (modulus_len < 11)) { in pkcs_1_v1_5_decode() 55 for (i = 2; i < modulus_len; i++) { in pkcs_1_v1_5_decode() 61 if (i >= modulus_len) { in pkcs_1_v1_5_decode() 67 for (i = 2; i < modulus_len - 1; i++) { in pkcs_1_v1_5_decode()
|
A D | pkcs_1_v1_5_encode.c | 34 unsigned long modulus_len, ps_len, i; in pkcs_1_v1_5_encode() local 50 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_v1_5_encode() 53 if ((msglen + 11) > modulus_len) { in pkcs_1_v1_5_encode() 57 if (*outlen < modulus_len) { in pkcs_1_v1_5_encode() 58 *outlen = modulus_len; in pkcs_1_v1_5_encode() 65 ps_len = modulus_len - msglen - 3; in pkcs_1_v1_5_encode() 92 *outlen = modulus_len; in pkcs_1_v1_5_encode()
|
A D | pkcs_1_i2osp.c | 23 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out) in pkcs_1_i2osp() argument 29 if (size > modulus_len) { in pkcs_1_i2osp() 34 zeromem(out, modulus_len); in pkcs_1_i2osp() 35 return mp_to_unsigned_bin(n, out+(modulus_len-size)); in pkcs_1_i2osp()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_pkcs.h | 27 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out);
|
Completed in 8 milliseconds