Remove mention of link between message digests and public key algorithms.
[openssl.git] / doc / man3 / RSA_meth_new.pod
index e46b3984f6df9338879e9225c8010f92fa004b25..fde1a41e64250b4200c4d8a75d4da6cf89a15566 100644 (file)
@@ -12,7 +12,8 @@ RSA_meth_set_priv_dec, RSA_meth_get_mod_exp, RSA_meth_set_mod_exp,
 RSA_meth_get_bn_mod_exp, RSA_meth_set_bn_mod_exp, RSA_meth_get_init,
 RSA_meth_set_init, RSA_meth_get_finish, RSA_meth_set_finish,
 RSA_meth_get_sign, RSA_meth_set_sign, RSA_meth_get_verify,
-RSA_meth_set_verify, RSA_meth_get_keygen, RSA_meth_set_keygen
+RSA_meth_set_verify, RSA_meth_get_keygen, RSA_meth_set_keygen,
+RSA_meth_get_multi_prime_keygen, RSA_meth_set_multi_prime_keygen
 - Routines to build up RSA methods
 
 =head1 SYNOPSIS
@@ -21,93 +22,109 @@ RSA_meth_set_verify, RSA_meth_get_keygen, RSA_meth_set_keygen
 
  RSA_METHOD *RSA_meth_new(const char *name, int flags);
  void RSA_meth_free(RSA_METHOD *meth);
+
  RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
+
  const char *RSA_meth_get0_name(const RSA_METHOD *meth);
  int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
+
  int RSA_meth_get_flags(RSA_METHOD *meth);
  int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
+
  void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
  int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data);
- int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))
    (int flen, const unsigned char *from,
-      unsigned char *to, RSA *rsa, int padding);
+
int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from,
+                                                     unsigned char *to, RSA *rsa, int padding);
  int RSA_meth_set_pub_enc(RSA_METHOD *rsa,
-                          int (*pub_enc) (int flen, const unsigned char *from,
-                                          unsigned char *to, RSA *rsa,
-                                          int padding));
+                          int (*pub_enc)(int flen, const unsigned char *from,
+                                         unsigned char *to, RSA *rsa,
+                                         int padding));
+
  int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))
      (int flen, const unsigned char *from,
       unsigned char *to, RSA *rsa, int padding);
  int RSA_meth_set_pub_dec(RSA_METHOD *rsa,
-                          int (*pub_dec) (int flen, const unsigned char *from,
-                                          unsigned char *to, RSA *rsa,
-                                          int padding));
- int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))
-     (int flen, const unsigned char *from,
-      unsigned char *to, RSA *rsa, int padding);
+                          int (*pub_dec)(int flen, const unsigned char *from,
+                                         unsigned char *to, RSA *rsa,
+                                         int padding));
+
+ int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from,
+                                                      unsigned char *to, RSA *rsa,
+                                                      int padding);
  int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
-                           int (*priv_enc) (int flen, const unsigned char *from,
-                                            unsigned char *to, RSA *rsa,
-                                            int padding));
- int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))
-     (int flen, const unsigned char *from,
-      unsigned char *to, RSA *rsa, int padding);
+                           int (*priv_enc)(int flen, const unsigned char *from,
+                                           unsigned char *to, RSA *rsa, int padding));
+
+ int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, const unsigned char *from,
+                                                      unsigned char *to, RSA *rsa,
+                                                      int padding);
  int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
-                           int (*priv_dec) (int flen, const unsigned char *from,
-                                            unsigned char *to, RSA *rsa,
-                                            int padding));
    /* Can be null */
- int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))
-     (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
+                           int (*priv_dec)(int flen, const unsigned char *from,
+                                           unsigned char *to, RSA *rsa, int padding));
+
+ /* Can be null */
+ int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *I,
+                                                     RSA *rsa, BN_CTX *ctx);
  int RSA_meth_set_mod_exp(RSA_METHOD *rsa,
-                          int (*mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa,
-                                          BN_CTX *ctx));
-     /* Can be null */
- int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))
-     (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-      const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
+                          int (*mod_exp)(BIGNUM *r0, const BIGNUM *I, RSA *rsa,
+                                         BN_CTX *ctx));
+
+ /* Can be null */
+ int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r, const BIGNUM *a,
+                                                        const BIGNUM *p, const BIGNUM *m,
+                                                        BN_CTX *ctx, BN_MONT_CTX *m_ctx);
  int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa,
-                             int (*bn_mod_exp) (BIGNUM *r,
-                                                const BIGNUM *a,
-                                                const BIGNUM *p,
-                                                const BIGNUM *m,
-                                                BN_CTX *ctx,
-                                                BN_MONT_CTX *m_ctx));
-     /* called at new */
- int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa);
- int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa));
-     /* called at free */
- int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa);
- int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa));
- int (*RSA_meth_get_sign(const RSA_METHOD *meth))
-     (int type,
-      const unsigned char *m, unsigned int m_length,
-      unsigned char *sigret, unsigned int *siglen,
-      const RSA *rsa);
+                             int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a,
+                                               const BIGNUM *p, const BIGNUM *m,
+                                               BN_CTX *ctx, BN_MONT_CTX *m_ctx));
+
+ /* called at new */
+ int (*RSA_meth_get_init(const RSA_METHOD *meth) (RSA *rsa);
+ int RSA_meth_set_init(RSA_METHOD *rsa, int (*init (RSA *rsa));
+
+ /* called at free */
+ int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
+ int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish)(RSA *rsa));
+
+ int (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type, const unsigned char *m,
+                                                  unsigned int m_length,
+                                                  unsigned char *sigret,
+                                                  unsigned int *siglen, const RSA *rsa);
  int RSA_meth_set_sign(RSA_METHOD *rsa,
-                       int (*sign) (int type, const unsigned char *m,
-                                    unsigned int m_length,
-                                    unsigned char *sigret, unsigned int *siglen,
-                                    const RSA *rsa));
- int (*RSA_meth_get_verify(const RSA_METHOD *meth))
-     (int dtype, const unsigned char *m,
-      unsigned int m_length, const unsigned char *sigbuf,
-      unsigned int siglen, const RSA *rsa);
+                       int (*sign)(int type, const unsigned char *m,
+                                   unsigned int m_length, unsigned char *sigret,
+                                   unsigned int *siglen, const RSA *rsa));
+
+ int (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype, const unsigned char *m,
+                                                    unsigned int m_length,
+                                                    const unsigned char *sigbuf,
+                                                    unsigned int siglen, const RSA *rsa);
  int RSA_meth_set_verify(RSA_METHOD *rsa,
-                         int (*verify) (int dtype, const unsigned char *m,
-                                        unsigned int m_length,
-                                        const unsigned char *sigbuf,
-                                        unsigned int siglen, const RSA *rsa));
- int (*RSA_meth_get_keygen(const RSA_METHOD *meth))
-     (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
+                         int (*verify)(int dtype, const unsigned char *m,
+                                       unsigned int m_length,
+                                       const unsigned char *sigbuf,
+                                       unsigned int siglen, const RSA *rsa));
+
+ int (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e,
+                                                    BN_GENCB *cb);
  int RSA_meth_set_keygen(RSA_METHOD *rsa,
-                         int (*keygen) (RSA *rsa, int bits, BIGNUM *e,
-                                        BN_GENCB *cb));
+                         int (*keygen)(RSA *rsa, int bits, BIGNUM *e,
+                                       BN_GENCB *cb));
+
+ int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits,
+                                                                int primes, BIGNUM *e,
+                                                                BN_GENCB *cb);
+
+ int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth,
+                                     int (*keygen) (RSA *rsa, int bits,
+                                                    int primes, BIGNUM *e,
+                                                    BN_GENCB *cb));
 
 =head1 DESCRIPTION
 
 The B<RSA_METHOD> type is a structure used for the provision of custom
-RSA implementations. It provides a set of of functions used by OpenSSL
+RSA implementations. It provides a set of functions used by OpenSSL
 for the implementation of the various RSA capabilities. See the L<rsa>
 page for more information.
 
@@ -186,8 +203,14 @@ by this function. This function may be NULL.
 RSA_meth_get_keygen() and RSA_meth_set_keygen() get and set the
 function used for generating a new RSA key pair respectively. This
 function will be called in response to the application calling
-RSA_generate_key(). The parameter for the function has the same
-meaning as for RSA_generate_key().
+RSA_generate_key_ex(). The parameter for the function has the same
+meaning as for RSA_generate_key_ex().
+
+RSA_meth_get_multi_prime_keygen() and RSA_meth_set_multi_prime_keygen() get
+and set the function used for generating a new multi-prime RSA key pair
+respectively. This function will be called in response to the application calling
+RSA_generate_multi_prime_key(). The parameter for the function has the same
+meaning as for RSA_generate_multi_prime_key().
 
 RSA_meth_get_pub_enc(), RSA_meth_set_pub_enc(),
 RSA_meth_get_pub_dec(), RSA_meth_set_pub_dec(),
@@ -216,16 +239,20 @@ success or 0 on failure.
 
 =head1 SEE ALSO
 
-L<RSA_new(3)>, L<RSA_generate_key(3)>, L<RSA_sign(3)>,
-L<RSA_set_method(3)>, L<RSA_size(3)>, L<RSA_get0_key(3)>
+L<RSA_new(3)>, L<RSA_generate_key_ex(3)>, L<RSA_sign(3)>,
+L<RSA_set_method(3)>, L<RSA_size(3)>, L<RSA_get0_key(3)>,
+L<RSA_generate_multi_prime_key(3)>
 
 =head1 HISTORY
 
-The functions described here were added in OpenSSL version 1.1.0.
+RSA_meth_get_multi_prime_keygen() and RSA_meth_set_multi_prime_keygen() were
+added in OpenSSL 1.1.1.
+
+Other functions described here were added in OpenSSL 1.1.0.
 
 =head1 COPYRIGHT
 
-Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2016-2017 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