Lines Matching refs:RSA
56 #include <openssl/rsa.h>
79 OPENSSL_PUT_ERROR(RSA, RSA_R_KEY_SIZE_TOO_SMALL);
84 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
108 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_SMALL);
114 OPENSSL_PUT_ERROR(RSA, RSA_R_BLOCK_TYPE_IS_NOT_01);
127 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_FIXED_HEADER_DECRYPT);
135 OPENSSL_PUT_ERROR(RSA, RSA_R_NULL_BEFORE_BLOCK_MISSING);
140 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_PAD_BYTE_COUNT);
146 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE);
160 OPENSSL_PUT_ERROR(RSA, RSA_R_KEY_SIZE_TOO_SMALL);
165 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
199 OPENSSL_PUT_ERROR(RSA, RSA_R_EMPTY_PUBLIC_KEY);
203 /* PKCS#1 v1.5 decryption. See "PKCS #1 v2.2: RSA Cryptography
206 /* |from| is zero-padded to the size of the RSA modulus, a public value, so
208 OPENSSL_PUT_ERROR(RSA, RSA_R_KEY_SIZE_TOO_SMALL);
241 OPENSSL_PUT_ERROR(RSA, RSA_R_PKCS_DECODING_ERROR);
249 OPENSSL_PUT_ERROR(RSA, RSA_R_PKCS_DECODING_ERROR);
254 OPENSSL_PUT_ERROR(RSA, ERR_R_OVERFLOW);
265 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
270 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE);
341 OPENSSL_PUT_ERROR(RSA, RSA_R_KEY_SIZE_TOO_SMALL);
347 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
352 OPENSSL_PUT_ERROR(RSA, RSA_R_KEY_SIZE_TOO_SMALL);
372 OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);
425 OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);
473 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE);
485 OPENSSL_PUT_ERROR(RSA, RSA_R_OAEP_DECODING_ERROR);
493 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const uint8_t *mHash,
521 OPENSSL_PUT_ERROR(RSA, RSA_R_SLEN_CHECK_FAILED);
525 MSBits = (BN_num_bits(rsa->n) - 1) & 0x7;
526 emLen = RSA_size(rsa);
528 OPENSSL_PUT_ERROR(RSA, RSA_R_FIRST_OCTET_INVALID);
537 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE);
541 OPENSSL_PUT_ERROR(RSA, RSA_R_LAST_OCTET_INVALID);
548 OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);
564 OPENSSL_PUT_ERROR(RSA, RSA_R_SLEN_RECOVERY_FAILED);
568 OPENSSL_PUT_ERROR(RSA, RSA_R_SLEN_CHECK_FAILED);
585 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_SIGNATURE);
598 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
624 OPENSSL_PUT_ERROR(RSA, RSA_R_SLEN_CHECK_FAILED);
628 if (BN_is_zero(rsa->n)) {
629 OPENSSL_PUT_ERROR(RSA, RSA_R_EMPTY_PUBLIC_KEY);
633 MSBits = (BN_num_bits(rsa->n) - 1) & 0x7;
634 emLen = RSA_size(rsa);
642 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
647 OPENSSL_PUT_ERROR(RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
653 OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);