Searched refs:modulus_len (Results 1 – 8 of 8) sorted by relevance
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_pss_encode.c | 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() 132 *outlen = modulus_len; in pkcs_1_pss_encode() 153 *outlen = modulus_len; in pkcs_1_pss_encode() 157 zeromem(DB, modulus_len); in pkcs_1_pss_encode() 158 zeromem(mask, modulus_len); in pkcs_1_pss_encode() 159 zeromem(salt, modulus_len); in pkcs_1_pss_encode() [all …]
|
A D | pkcs_1_oaep_decode.c | 39 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_decode() local 58 if ((2*hLen >= (modulus_len - 2)) || (msglen != modulus_len)) { in pkcs_1_oaep_decode() 63 DB = XMALLOC(modulus_len); in pkcs_1_oaep_decode() 64 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() 126 x = modulus_len; in pkcs_1_oaep_decode() 154 if ((modulus_len - hLen - 1 - ++x) > *outlen) { in pkcs_1_oaep_decode() 160 *outlen = modulus_len - hLen - 1 - x; in pkcs_1_oaep_decode() 170 zeromem(DB, modulus_len); in pkcs_1_oaep_decode() [all …]
|
A D | pkcs_1_pss_decode.c | 37 unsigned long x, y, hLen, modulus_len; in pkcs_1_pss_decode() local 57 if ((saltlen > 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() 92 x += modulus_len - hLen - 1; in pkcs_1_pss_decode() 159 zeromem(DB, modulus_len); in pkcs_1_pss_decode() 160 zeromem(mask, modulus_len); in pkcs_1_pss_decode() 161 zeromem(salt, modulus_len); in pkcs_1_pss_decode() [all …]
|
A D | pkcs_1_oaep_encode.c | 40 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_encode() local 61 if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) { in pkcs_1_oaep_encode() 66 DB = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 67 mask = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 84 x = modulus_len; in pkcs_1_oaep_encode() 98 y = modulus_len - msglen - 2*hLen - 2; in pkcs_1_oaep_encode() 136 if (*outlen < modulus_len) { in pkcs_1_oaep_encode() 137 *outlen = modulus_len; in pkcs_1_oaep_encode() 148 x += modulus_len - hLen - 1; in pkcs_1_oaep_encode() 155 zeromem(DB, modulus_len); in pkcs_1_oaep_encode() [all …]
|
A D | pkcs_1_v1_5_decode.c | 39 unsigned long modulus_len, ps_len, i; in pkcs_1_v1_5_decode() local 45 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_v1_5_decode() 49 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) { in pkcs_1_v1_5_decode() 74 for (i = 2; i < modulus_len - 1; i++) { in pkcs_1_v1_5_decode()
|
A D | pkcs_1_v1_5_encode.c | 41 unsigned long modulus_len, ps_len, i; in pkcs_1_v1_5_encode() local 57 modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0); in pkcs_1_v1_5_encode() 60 if ((msglen + 11) > modulus_len) { in pkcs_1_v1_5_encode() 64 if (*outlen < modulus_len) { in pkcs_1_v1_5_encode() 65 *outlen = modulus_len; in pkcs_1_v1_5_encode() 72 ps_len = modulus_len - msglen - 3; in pkcs_1_v1_5_encode() 99 *outlen = modulus_len; in pkcs_1_v1_5_encode()
|
A D | pkcs_1_i2osp.c | 30 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out) in pkcs_1_i2osp() argument 36 if (size > modulus_len) { in pkcs_1_i2osp() 41 zeromem(out, modulus_len); in pkcs_1_i2osp() 42 return mp_to_unsigned_bin(n, out+(modulus_len-size)); in pkcs_1_i2osp()
|
/optee_os/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_pkcs.h | 34 int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out);
|
Completed in 10 milliseconds