Constify CMS_get0_type input
[openssl.git] / doc / crypto / RSA_private_decrypt.pod
1 =pod
2
3 =head1 NAME
4
5 RSA_private_decrypt,
6 RSA_private_encrypt,
7 RSA_public_decrypt,
8 RSA_sign,
9 RSA_verify,
10 RSA_sign_ASN1_OCTET_STRING,
11 RSA_verify_ASN1_OCTET_STRING
12 - RSA public key cryptosystem
13
14 =head1 SYNOPSIS
15
16  #include <openssl/rsa.h>
17
18  int RSA_private_decrypt(int flen, unsigned char *from,
19     unsigned char *to, RSA *rsa, int padding);
20  int RSA_private_encrypt(int flen, unsigned char *from,
21     unsigned char *to, RSA *rsa,int padding);
22  int RSA_public_decrypt(int flen, unsigned char *from,
23     unsigned char *to, RSA *rsa,int padding);
24
25  int RSA_sign(int type, unsigned char *m, unsigned int m_len,
26     unsigned char *sigret, unsigned int *siglen, RSA *rsa);
27  int RSA_verify(int type, unsigned char *m, unsigned int m_len,
28     unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
29
30  int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
31     unsigned int m_len, unsigned char *sigret, unsigned int *siglen,
32     RSA *rsa);
33  int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
34     unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
35     RSA *rsa);
36
37 =head1 DESCRIPTION
38
39 These functions implement RSA public key encryption and signatures
40 as defined in PKCS #1 v2.0 [RFC 2437].
41
42 The B<RSA> structure represents public and private RSA keys.
43
44 Note that RSA keys may use non-standard B<RSA_METHOD> implementations,
45 either directly or by the use of B<ENGINE> modules. In some cases (eg. an
46 ENGINE providing support for hardware-embedded keys), these BIGNUM values
47 will not be used by the implementation or may be used for alternative data
48 storage. For this reason, applications should generally avoid using RSA
49 structure elements directly and instead use API functions to query or
50 modify keys.
51
52 =head1 CONFORMING TO
53
54 SSL, PKCS #1 v2.0
55
56 =head1 SEE ALSO
57
58 L<bn(3)>, L<dsa(3)>, L<dh(3)>,
59 L<rand(3)>, L<engine(3)>, L<RSA_new(3)>, L<RSA_set0_key(3)>
60 L<RSA_public_encrypt(3)>,
61 L<RSA_size(3)>,
62 L<RSA_generate_key(3)>,
63 L<RSA_check_key(3)>,
64 L<RSA_blinding_on(3)>,
65 L<RSA_set_method(3)>, L<RSA_print(3)>,
66 L<RSA_get_ex_new_index(3)>,
67 L<RSA_sign_ASN1_OCTET_STRING(3)>,
68 L<RSA_padding_add_PKCS1_type_1(3)>
69
70 =head1 COPYRIGHT
71
72 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
73
74 Licensed under the OpenSSL license (the "License").  You may not use
75 this file except in compliance with the License.  You can obtain a copy
76 in the file LICENSE in the source distribution or at
77 L<https://www.openssl.org/source/license.html>.
78
79 =cut