Lines Matching refs:RSA

10  * apply to all code found in this distribution, be it the RC4, RSA,
71 /* rsa.h contains functions for handling encryption and signature using RSA. */
76 /* RSA_new returns a new, empty RSA object or NULL on error. */
77 OPENSSL_EXPORT RSA *RSA_new(void);
80 OPENSSL_EXPORT RSA *RSA_new_method(const ENGINE *engine);
84 OPENSSL_EXPORT void RSA_free(RSA *rsa);
87 OPENSSL_EXPORT int RSA_up_ref(RSA *rsa);
95 OPENSSL_EXPORT void RSA_get0_key(const RSA *rsa, const BIGNUM **out_n,
101 OPENSSL_EXPORT void RSA_get0_factors(const RSA *rsa, const BIGNUM **out_p,
109 OPENSSL_EXPORT void RSA_get0_crt_params(const RSA *rsa, const BIGNUM **out_dmp1,
116 /* RSA_generate_key_ex generates a new RSA key where the modulus has size
124 OPENSSL_EXPORT int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
128 * generate an RSA private key with more than two primes. */
129 OPENSSL_EXPORT int RSA_generate_multi_prime_key(RSA *rsa, int bits,
152 OPENSSL_EXPORT int RSA_encrypt(RSA *rsa, size_t *out_len, uint8_t *out,
169 * on the RSA Encryption Standard PKCS #1", Daniel Bleichenbacher, Advances in
171 OPENSSL_EXPORT int RSA_decrypt(RSA *rsa, size_t *out_len, uint8_t *out,
185 uint8_t *to, RSA *rsa, int padding);
198 uint8_t *to, RSA *rsa, int padding);
215 unsigned int *out_len, RSA *rsa);
226 OPENSSL_EXPORT int RSA_sign_raw(RSA *rsa, size_t *out_len, uint8_t *out,
242 const uint8_t *sig, size_t sig_len, RSA *rsa);
254 OPENSSL_EXPORT int RSA_verify_raw(RSA *rsa, size_t *out_len, uint8_t *out,
269 uint8_t *to, RSA *rsa, int padding);
282 uint8_t *to, RSA *rsa, int padding);
289 OPENSSL_EXPORT unsigned RSA_size(const RSA *rsa);
293 OPENSSL_EXPORT int RSA_is_opaque(const RSA *rsa);
297 OPENSSL_EXPORT int RSA_supports_digest(const RSA *rsa, const EVP_MD *md);
299 /* RSAPublicKey_dup allocates a fresh |RSA| and copies the public key from
300 * |rsa| into it. It returns the fresh |RSA| object, or NULL on error. */
301 OPENSSL_EXPORT RSA *RSAPublicKey_dup(const RSA *rsa);
303 /* RSAPrivateKey_dup allocates a fresh |RSA| and copies the private key from
304 * |rsa| into it. It returns the fresh |RSA| object, or NULL on error. */
305 OPENSSL_EXPORT RSA *RSAPrivateKey_dup(const RSA *rsa);
310 OPENSSL_EXPORT int RSA_check_key(const RSA *rsa);
317 OPENSSL_EXPORT int RSA_recover_crt_params(RSA *rsa);
330 OPENSSL_EXPORT int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const uint8_t *mHash,
344 OPENSSL_EXPORT int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, uint8_t *EM,
373 * from |cbs| and advances |cbs|. It returns a newly-allocated |RSA| or NULL on
375 OPENSSL_EXPORT RSA *RSA_parse_public_key(CBS *cbs);
379 OPENSSL_EXPORT RSA *RSA_parse_public_key_buggy(CBS *cbs);
382 * (RFC 3447). It returns a newly-allocated |RSA| or NULL on error. */
383 OPENSSL_EXPORT RSA *RSA_public_key_from_bytes(const uint8_t *in, size_t in_len);
388 OPENSSL_EXPORT int RSA_marshal_public_key(CBB *cbb, const RSA *rsa);
395 const RSA *rsa);
398 * from |cbs| and advances |cbs|. It returns a newly-allocated |RSA| or NULL on
400 OPENSSL_EXPORT RSA *RSA_parse_private_key(CBS *cbs);
403 * structure (RFC 3447). It returns a newly-allocated |RSA| or NULL on error. */
404 OPENSSL_EXPORT RSA *RSA_private_key_from_bytes(const uint8_t *in,
410 OPENSSL_EXPORT int RSA_marshal_private_key(CBB *cbb, const RSA *rsa);
417 size_t *out_len, const RSA *rsa);
428 OPENSSL_EXPORT int RSA_set_ex_data(RSA *r, int idx, void *arg);
429 OPENSSL_EXPORT void *RSA_get_ex_data(const RSA *r, int idx);
461 /* RSA public exponent values. */
470 OPENSSL_EXPORT int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
473 * should use instead. It returns NULL on error, or a newly-allocated |RSA| on
476 OPENSSL_EXPORT RSA *RSA_generate_key(int bits, unsigned long e, void *callback,
479 /* d2i_RSAPublicKey parses an ASN.1, DER-encoded, RSA public key from |len|
482 * will not be written to. Rather, a fresh |RSA| is allocated and the previous
485 OPENSSL_EXPORT RSA *d2i_RSAPublicKey(RSA **out, const uint8_t **inp, long len);
491 OPENSSL_EXPORT int i2d_RSAPublicKey(const RSA *in, uint8_t **outp);
493 /* d2i_RSAPrivateKey parses an ASN.1, DER-encoded, RSA private key from |len|
496 * will not be written to. Rather, a fresh |RSA| is allocated and the previous
499 OPENSSL_EXPORT RSA *d2i_RSAPrivateKey(RSA **out, const uint8_t **inp, long len);
505 OPENSSL_EXPORT int i2d_RSAPrivateKey(const RSA *in, uint8_t **outp);
509 OPENSSL_EXPORT int RSA_padding_add_PKCS1_PSS(RSA *rsa, uint8_t *EM,
515 OPENSSL_EXPORT int RSA_verify_PKCS1_PSS(RSA *rsa, const uint8_t *mHash,
534 int (*init)(RSA *rsa);
535 int (*finish)(RSA *rsa);
537 /* size returns the size of the RSA modulus in bytes. */
538 size_t (*size)(const RSA *rsa);
541 uint8_t *sigret, unsigned int *siglen, const RSA *rsa);
545 const uint8_t *sigbuf, unsigned int siglen, const RSA *rsa);
549 int (*encrypt)(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out,
551 int (*sign_raw)(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out,
554 int (*decrypt)(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out,
557 int (*verify_raw)(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out,
561 * d'th power of it, modulo the RSA modulus and writes the result as a
569 * RSA decrypt and sign operations will call this, thus an ENGINE might wish
572 int (*private_transform)(RSA *rsa, uint8_t *out, const uint8_t *in,
576 int (*mod_exp)(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
585 int (*keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
587 int (*multi_prime_keygen)(RSA *rsa, int bits, int num_primes, BIGNUM *e,
592 int (*supports_digest)(const RSA *rsa, const EVP_MD *md);
614 /* be careful using this if the RSA structure is shared */
646 BORINGSSL_MAKE_DELETER(RSA, RSA_free)