diff options
author | Richard Levitte <levitte@openssl.org> | 2019-10-17 18:40:47 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-18 15:06:47 +0200 |
commit | 5bd7865da004213dd978b65ef998a29a78916d21 (patch) | |
tree | 0523c358346028703960b00568078f95470c5b38 /doc/internal | |
parent | f5453462117e3deb4b077756e2d24edb2ff3b1af (diff) |
Doc for the added internal RSA functions
It was forgotten in the previous commit.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10206)
Diffstat (limited to 'doc/internal')
-rw-r--r-- | doc/internal/man3/rsa_get0_all_params.pod | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/doc/internal/man3/rsa_get0_all_params.pod b/doc/internal/man3/rsa_get0_all_params.pod new file mode 100644 index 0000000000..c71028c13e --- /dev/null +++ b/doc/internal/man3/rsa_get0_all_params.pod @@ -0,0 +1,75 @@ +=pod + +=head1 NAME + +rsa_set0_all_params, rsa_get0_all_params +- Internal routines for getting and setting data in an RSA object + +=head1 SYNOPSIS + + #include "crypto/rsa.h" + + int rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes, + STACK_OF(BIGNUM_const) *exps, + STACK_OF(BIGNUM_const) *coeffs); + int rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, + const STACK_OF(BIGNUM) *exps, + const STACK_OF(BIGNUM) *coeffs); + +=head1 DESCRIPTION + +rsa_set0_all_params() sets all primes, CRT exponents and CRT coefficients +in the B<RSA> object I<r> to the contents of the stacks of BIGNUMs I<primes>, +I<exps> and I<coeffs>. The B<RSA> object takes ownership of the BIGNUMs, +but not of the stacks. + +rsa_get0_all_params() gets all primes, CRT exponents and CRT coefficients +in the B<RSA> object I<r> and pushes them on the stacks of constant BIGNUMs +I<primes>, I<exps> and I<coeffs>. The B<RSA> object retains ownership of the +BIGNUMs, but not of the stacks. + +=head1 NOTES + +For RSA_set0_all_params() and RSA_get0_all_params(): + +=over 4 + +=item * + +the I<primes> stack contains I<p>, I<q>, and then the rest of the primes +if the B<RSA> object is a multi-prime RSA key. + +=item * + +the I<exps> stack contains I<dP>, I<dQ>, and then the rest of the exponents +if the B<RSA> object is a multi-prime RSA key. + +=item * + +the I<coeffs> stack contains I<qInv>, and then the rest of the coefficients +if the B<RSA> object is a multi-prime RSA key. + +=back + +The number of primes must always be equal to the number of exponents, and +the number of coefficients must be one less than the number of primes. + +=head1 RETURN VALUES + +rsa_get0_all_params() and rsa_set0_all_params() return 1 on success, or +0 on failure. + +=head1 SEE ALSO + +L<RSA_set0_multi_prime_params(3)> + +=head1 COPYRIGHT + +Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the Apache License 2.0 (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L<https://www.openssl.org/source/license.html>. + +=cut |