Go to the documentation of this file.
57 #ifndef OPENSSL_HEADER_RSA_H
58 #define OPENSSL_HEADER_RSA_H
66 #if defined(__cplusplus)
210 #define RSA_PKCS1_PADDING 1
213 #define RSA_NO_PADDING 3
216 #define RSA_PKCS1_OAEP_PADDING 4
221 #define RSA_PKCS1_PSS_PADDING 6
233 size_t max_out,
const uint8_t *
in,
size_t in_len,
252 size_t max_out,
const uint8_t *
in,
size_t in_len,
302 unsigned *out_len,
RSA *rsa);
321 size_t max_out,
const uint8_t *digest,
322 size_t digest_len,
const EVP_MD *
md,
323 const EVP_MD *mgf1_md,
int salt_len);
346 size_t in_len,
int padding);
364 size_t digest_len,
const uint8_t *sig,
365 size_t sig_len,
RSA *rsa);
383 size_t digest_len,
const EVP_MD *
md,
384 const EVP_MD *mgf1_md,
int salt_len,
385 const uint8_t *sig,
size_t sig_len);
407 size_t in_len,
int padding);
570 size_t *out_len,
const RSA *rsa);
590 #define RSA_FLAG_OPAQUE 1
598 #define RSA_FLAG_NO_BLINDING 8
601 #define RSA_FLAG_EXT_PKEY 0x20
607 #define RSA_F4 0x10001
612 #define RSA_METHOD_FLAG_NO_CHECK RSA_FLAG_OPAQUE
701 uint8_t *sigret,
unsigned int *siglen,
const RSA *rsa);
705 const uint8_t *
in,
size_t in_len,
int padding);
707 const uint8_t *
in,
size_t in_len,
int padding);
789 #if defined(__cplusplus)
805 #define RSA_R_BAD_ENCODING 100
806 #define RSA_R_BAD_E_VALUE 101
807 #define RSA_R_BAD_FIXED_HEADER_DECRYPT 102
808 #define RSA_R_BAD_PAD_BYTE_COUNT 103
809 #define RSA_R_BAD_RSA_PARAMETERS 104
810 #define RSA_R_BAD_SIGNATURE 105
811 #define RSA_R_BAD_VERSION 106
812 #define RSA_R_BLOCK_TYPE_IS_NOT_01 107
813 #define RSA_R_BN_NOT_INITIALIZED 108
814 #define RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY 109
815 #define RSA_R_CRT_PARAMS_ALREADY_GIVEN 110
816 #define RSA_R_CRT_VALUES_INCORRECT 111
817 #define RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN 112
818 #define RSA_R_DATA_TOO_LARGE 113
819 #define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 114
820 #define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 115
821 #define RSA_R_DATA_TOO_SMALL 116
822 #define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 117
823 #define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 118
824 #define RSA_R_D_E_NOT_CONGRUENT_TO_1 119
825 #define RSA_R_EMPTY_PUBLIC_KEY 120
826 #define RSA_R_ENCODE_ERROR 121
827 #define RSA_R_FIRST_OCTET_INVALID 122
828 #define RSA_R_INCONSISTENT_SET_OF_CRT_VALUES 123
829 #define RSA_R_INTERNAL_ERROR 124
830 #define RSA_R_INVALID_MESSAGE_LENGTH 125
831 #define RSA_R_KEY_SIZE_TOO_SMALL 126
832 #define RSA_R_LAST_OCTET_INVALID 127
833 #define RSA_R_MODULUS_TOO_LARGE 128
834 #define RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES 129
835 #define RSA_R_NO_PUBLIC_EXPONENT 130
836 #define RSA_R_NULL_BEFORE_BLOCK_MISSING 131
837 #define RSA_R_N_NOT_EQUAL_P_Q 132
838 #define RSA_R_OAEP_DECODING_ERROR 133
839 #define RSA_R_ONLY_ONE_OF_P_Q_GIVEN 134
840 #define RSA_R_OUTPUT_BUFFER_TOO_SMALL 135
841 #define RSA_R_PADDING_CHECK_FAILED 136
842 #define RSA_R_PKCS_DECODING_ERROR 137
843 #define RSA_R_SLEN_CHECK_FAILED 138
844 #define RSA_R_SLEN_RECOVERY_FAILED 139
845 #define RSA_R_TOO_LONG 140
846 #define RSA_R_TOO_MANY_ITERATIONS 141
847 #define RSA_R_UNKNOWN_ALGORITHM_TYPE 142
848 #define RSA_R_UNKNOWN_PADDING_TYPE 143
849 #define RSA_R_VALUE_MISSING 144
850 #define RSA_R_WRONG_SIGNATURE_LENGTH 145
851 #define RSA_R_PUBLIC_KEY_VALIDATION_FAILED 146
852 #define RSA_R_D_OUT_OF_RANGE 147
853 #define RSA_R_BLOCK_TYPE_IS_NOT_02 148
855 #endif // OPENSSL_HEADER_RSA_H
OPENSSL_EXPORT unsigned RSA_size(const RSA *rsa)
OPENSSL_EXPORT int RSA_flags(const RSA *rsa)
OPENSSL_EXPORT RSA * RSA_public_key_from_bytes(const uint8_t *in, size_t in_len)
OPENSSL_EXPORT RSA * RSA_parse_private_key(CBS *cbs)
const OPENSSL_EXPORT BIGNUM * RSA_get0_n(const RSA *rsa)
int(* sign)(int type, const uint8_t *m, unsigned int m_length, uint8_t *sigret, unsigned int *siglen, const RSA *rsa)
OPENSSL_EXPORT int RSA_marshal_private_key(CBB *cbb, const RSA *rsa)
OPENSSL_EXPORT int RSA_padding_add_PKCS1_OAEP_mgf1(uint8_t *to, size_t to_len, const uint8_t *from, size_t from_len, const uint8_t *param, size_t param_len, const EVP_MD *md, const EVP_MD *mgf1md)
OPENSSL_EXPORT RSA * RSAPublicKey_dup(const RSA *rsa)
int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, void **from_d, int index, long argl, void *argp)
OPENSSL_EXPORT int RSA_add_pkcs1_prefix(uint8_t **out_msg, size_t *out_msg_len, int *is_alloced, int hash_nid, const uint8_t *digest, size_t digest_len)
OPENSSL_EXPORT int RSA_marshal_public_key(CBB *cbb, const RSA *rsa)
OPENSSL_EXPORT int RSA_private_key_to_bytes(uint8_t **out_bytes, size_t *out_len, const RSA *rsa)
OPENSSL_EXPORT int RSA_set_ex_data(RSA *rsa, int idx, void *arg)
OPENSSL_EXPORT int RSA_padding_add_PKCS1_PSS_mgf1(const RSA *rsa, uint8_t *EM, const uint8_t *mHash, const EVP_MD *Hash, const EVP_MD *mgf1Hash, int sLen)
OPENSSL_EXPORT int RSA_blinding_on(RSA *rsa, BN_CTX *ctx)
OPENSSL_EXPORT void RSA_free(RSA *rsa)
OPENSSL_EXPORT RSA * RSA_parse_public_key(CBS *cbs)
OPENSSL_EXPORT int RSA_verify_pss_mgf1(RSA *rsa, const uint8_t *digest, size_t digest_len, const EVP_MD *md, const EVP_MD *mgf1_md, int salt_len, const uint8_t *sig, size_t sig_len)
OPENSSL_EXPORT RSA * RSA_generate_key(int bits, unsigned long e, void *callback, void *cb_arg)
OPENSSL_EXPORT int RSA_verify_PKCS1_PSS(const RSA *rsa, const uint8_t *mHash, const EVP_MD *Hash, const uint8_t *EM, int sLen)
OPENSSL_EXPORT int RSA_check_fips(RSA *key)
OPENSSL_EXPORT void * RSA_get_ex_data(const RSA *rsa, int idx)
OPENSSL_EXPORT int RSA_public_key_to_bytes(uint8_t **out_bytes, size_t *out_len, const RSA *rsa)
OPENSSL_EXPORT int RSA_verify_raw(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *in, size_t in_len, int padding)
OPENSSL_EXPORT void RSA_get0_factors(const RSA *rsa, const BIGNUM **out_p, const BIGNUM **out_q)
OPENSSL_EXPORT int i2d_RSAPublicKey(const RSA *in, uint8_t **outp)
OPENSSL_EXPORT int RSA_private_decrypt(size_t flen, const uint8_t *from, uint8_t *to, RSA *rsa, int padding)
OPENSSL_EXPORT RSA * d2i_RSAPublicKey(RSA **out, const uint8_t **inp, long len)
#define BORINGSSL_MAKE_UP_REF(type, up_ref_func)
OPENSSL_EXPORT int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused, CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func)
OPENSSL_EXPORT void RSA_get0_crt_params(const RSA *rsa, const BIGNUM **out_dmp1, const BIGNUM **out_dmq1, const BIGNUM **out_iqmp)
BIGNUM * inv_small_mod_large_mont
OPENSSL_EXPORT int RSA_verify_PKCS1_PSS_mgf1(const RSA *rsa, const uint8_t *mHash, const EVP_MD *Hash, const EVP_MD *mgf1Hash, const uint8_t *EM, int sLen)
OPENSSL_EXPORT int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d)
unsigned __int64 uint64_t
#define BSSL_NAMESPACE_END
OPENSSL_EXPORT ASN1_BIT_STRING * bits
int(* sign_raw)(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *in, size_t in_len, int padding)
OPENSSL_EXPORT int RSA_sign_raw(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *in, size_t in_len, int padding)
OPENSSL_EXPORT RSA * RSA_new_method(const ENGINE *engine)
OPENSSL_EXPORT int RSA_set0_crt_params(RSA *rsa, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
static void callback(void *arg, int status, int timeouts, struct hostent *host)
const OPENSSL_EXPORT BIGNUM * RSA_get0_dmp1(const RSA *rsa)
OPENSSL_EXPORT int RSA_padding_add_PKCS1_PSS(const RSA *rsa, uint8_t *EM, const uint8_t *mHash, const EVP_MD *Hash, int sLen)
OPENSSL_EXPORT int RSA_up_ref(RSA *rsa)
void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int index, long argl, void *argp)
OPENSSL_EXPORT int RSA_public_decrypt(size_t flen, const uint8_t *from, uint8_t *to, RSA *rsa, int padding)
const OPENSSL_EXPORT BIGNUM * RSA_get0_p(const RSA *rsa)
OPENSSL_EXPORT int RSA_generate_key_fips(RSA *rsa, int bits, BN_GENCB *cb)
OPENSSL_EXPORT int RSA_padding_add_PKCS1_OAEP(uint8_t *to, size_t to_len, const uint8_t *from, size_t from_len, const uint8_t *param, size_t param_len)
OPENSSL_EXPORT int RSA_print(BIO *bio, const RSA *rsa, int indent)
OPENSSL_EXPORT RSA * RSA_new(void)
OPENSSL_EXPORT RSA * d2i_RSAPrivateKey(RSA **out, const uint8_t **inp, long len)
unsigned char * blindings_inuse
OPENSSL_EXPORT int i2d_RSAPrivateKey(const RSA *in, uint8_t **outp)
const OPENSSL_EXPORT BIGNUM * RSA_get0_d(const RSA *rsa)
OPENSSL_EXPORT int RSA_sign_pss_mgf1(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *digest, size_t digest_len, const EVP_MD *md, const EVP_MD *mgf1_md, int salt_len)
OPENSSL_EXPORT int RSA_public_encrypt(size_t flen, const uint8_t *from, uint8_t *to, RSA *rsa, int padding)
const OPENSSL_EXPORT BIGNUM * RSA_get0_e(const RSA *rsa)
OPENSSL_EXPORT int RSA_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, BN_GENCB *cb)
uint64_t blinding_fork_generation
OPENSSL_EXPORT int RSA_sign(int hash_nid, const uint8_t *digest, unsigned digest_len, uint8_t *out, unsigned *out_len, RSA *rsa)
OPENSSL_EXPORT int RSA_set0_factors(RSA *rsa, BIGNUM *p, BIGNUM *q)
const OPENSSL_EXPORT BIGNUM * RSA_get0_q(const RSA *rsa)
OPENSSL_EXPORT void RSA_get0_key(const RSA *rsa, const BIGNUM **out_n, const BIGNUM **out_e, const BIGNUM **out_d)
OPENSSL_EXPORT RSA * RSAPrivateKey_dup(const RSA *rsa)
CRYPTO_refcount_t references
unsigned private_key_frozen
OPENSSL_EXPORT RSA * RSA_private_key_from_bytes(const uint8_t *in, size_t in_len)
#define BORINGSSL_MAKE_DELETER(type, deleter)
OPENSSL_EXPORT unsigned RSA_bits(const RSA *rsa)
const OPENSSL_EXPORT BIGNUM * RSA_get0_dmq1(const RSA *rsa)
OPENSSL_EXPORT int RSA_check_key(const RSA *rsa)
int(* private_transform)(RSA *rsa, uint8_t *out, const uint8_t *in, size_t len)
OPENSSL_EXPORT int RSA_verify(int hash_nid, const uint8_t *digest, size_t digest_len, const uint8_t *sig, size_t sig_len, RSA *rsa)
OPENSSL_EXPORT int RSA_decrypt(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *in, size_t in_len, int padding)
uint32_t CRYPTO_refcount_t
OPENSSL_EXPORT int RSA_private_encrypt(size_t flen, const uint8_t *from, uint8_t *to, RSA *rsa, int padding)
const OPENSSL_EXPORT BIGNUM * RSA_get0_iqmp(const RSA *rsa)
int(* decrypt)(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *in, size_t in_len, int padding)
OPENSSL_EXPORT int RSA_is_opaque(const RSA *rsa)
OPENSSL_EXPORT pem_password_cb * cb
OPENSSL_EXPORT int RSA_encrypt(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, const uint8_t *in, size_t in_len, int padding)
const OPENSSL_EXPORT RSA_PSS_PARAMS * RSA_get0_pss_params(const RSA *rsa)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:07