RSA_PKCS1_OpenSSL (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
RSA_set_default_method, RSA_get_default_method, RSA_set_method, RSA_get_method, RSA_PKCS1_OpenSSL, RSA_flags, RSA_new_method - select RSA methodSYNOPSIS
#include <openssl/rsa.h> void RSA_set_default_method(const RSA_METHOD *meth); RSA_METHOD *RSA_get_default_method(void); int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); RSA_METHOD *RSA_get_method(const RSA *rsa); RSA_METHOD *RSA_PKCS1_OpenSSL(void); int RSA_flags(const RSA *rsa); RSA *RSA_new_method(ENGINE *engine);
DESCRIPTION
AnInitially, the default
RSA_set_default_method() makes meth the default method for all
RSA_get_default_method() returns a pointer to the current default
RSA_set_method() selects meth to perform all operations using the key rsa. This will replace the
RSA_get_method() returns a pointer to the
RSA_flags() returns the flags that are set for rsa's current
RSA_new_method() allocates and initializes an
RSA_flags() returns the flags that are set for rsa's current method.
RSA_new_method() allocates and initializes an
THE RSA_METHOD STRUCTURE
typedef struct rsa_meth_st { /* name of the implementation */ const char *name; /* encrypt */ int (*rsa_pub_enc)(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); /* verify arbitrary data */ int (*rsa_pub_dec)(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); /* sign arbitrary data */ int (*rsa_priv_enc)(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); /* decrypt */ int (*rsa_priv_dec)(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); /* compute r0 = r0 ^ I mod rsa->n (May be NULL for some implementations) */ int (*rsa_mod_exp)(BIGNUM *r0, BIGNUM *I, RSA *rsa); /* compute r = a ^ p mod m (May be NULL for some implementations) */ int (*bn_mod_exp)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); /* called at RSA_new */ int (*init)(RSA *rsa); /* called at RSA_free */ int (*finish)(RSA *rsa); /* RSA_FLAG_EXT_PKEY - rsa_mod_exp is called for private key * operations, even if p,q,dmp1,dmq1,iqmp * are NULL * RSA_METHOD_FLAG_NO_CHECK - don't check pub/private match */ int flags; char *app_data; /* ?? */ int (*rsa_sign)(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa); int (*rsa_verify)(int dtype, const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa); /* keygen. If NULL builtin RSA key generation will be used */ int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); } RSA_METHOD;
RETURN VALUES
RSA_PKCS1_OpenSSL(), RSA_PKCS1_null_method(), RSA_get_default_method() and RSA_get_method() return pointers to the respective RSA_METHODs.RSA_set_default_method() returns no value.
RSA_set_method() returns a pointer to the old
RSA_new_method() returns
BUGS
The behaviour of RSA_flags() is a mis-feature that is left as-is for now to avoid creating compatibility problems.SEE ALSO
RSA_new(3)HISTORY
The RSA_null_method(), which was a partial attempt to avoid patent issues, was replaced to always returnCOPYRIGHT
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.Licensed under the OpenSSL license (the ``License''). You may not use this file except in compliance with the License. You can obtain a copy in the file