5 rsa_set0_all_params, rsa_get0_all_params
6 - Internal routines for getting and setting data in an RSA object
10 #include "crypto/rsa.h"
12 int rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes,
13 STACK_OF(BIGNUM_const) *exps,
14 STACK_OF(BIGNUM_const) *coeffs);
15 int rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
16 const STACK_OF(BIGNUM) *exps,
17 const STACK_OF(BIGNUM) *coeffs);
21 rsa_set0_all_params() sets all primes, CRT exponents and CRT coefficients
22 in the B<RSA> object I<r> to the contents of the stacks of BIGNUMs I<primes>,
23 I<exps> and I<coeffs>. The B<RSA> object takes ownership of the BIGNUMs,
24 but not of the stacks.
26 rsa_get0_all_params() gets all primes, CRT exponents and CRT coefficients
27 in the B<RSA> object I<r> and pushes them on the stacks of constant BIGNUMs
28 I<primes>, I<exps> and I<coeffs>. The B<RSA> object retains ownership of the
29 BIGNUMs, but not of the stacks.
33 For RSA_set0_all_params() and RSA_get0_all_params():
39 the I<primes> stack contains I<p>, I<q>, and then the rest of the primes
40 if the B<RSA> object is a multi-prime RSA key.
44 the I<exps> stack contains I<dP>, I<dQ>, and then the rest of the exponents
45 if the B<RSA> object is a multi-prime RSA key.
49 the I<coeffs> stack contains I<qInv>, and then the rest of the coefficients
50 if the B<RSA> object is a multi-prime RSA key.
54 The number of primes must always be equal to the number of exponents, and
55 the number of coefficients must be one less than the number of primes.
59 rsa_get0_all_params() and rsa_set0_all_params() return 1 on success, or
64 L<RSA_set0_multi_prime_params(3)>
68 Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
70 Licensed under the Apache License 2.0 (the "License"). You may not use
71 this file except in compliance with the License. You can obtain a copy
72 in the file LICENSE in the source distribution or at
73 L<https://www.openssl.org/source/license.html>.