1RSA_SIGN_ASN1_OCTET_STRING(3) OpenSSL RSA_SIGN_ASN1_OCTET_STRING(3)
2
3
4
6 RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA
7 signatures
8
10 #include <openssl/rsa.h>
11
12 int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
13 unsigned int m_len, unsigned char *sigret,
14 unsigned int *siglen, RSA *rsa);
15
16 int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
17 unsigned int m_len, unsigned char *sigbuf,
18 unsigned int siglen, RSA *rsa);
19
21 RSA_sign_ASN1_OCTET_STRING() signs the octet string m of size m_len
22 using the private key rsa represented in DER using PKCS #1 padding. It
23 stores the signature in sigret and the signature size in siglen. sigret
24 must point to RSA_size(rsa) bytes of memory.
25
26 dummy is ignored.
27
28 The random number generator must be seeded when calling
29 RSA_sign_ASN1_OCTET_STRING(). If the automatic seeding or reseeding of
30 the OpenSSL CSPRNG fails due to external circumstances (see RAND(7)),
31 the operation will fail.
32
33 RSA_verify_ASN1_OCTET_STRING() verifies that the signature sigbuf of
34 size siglen is the DER representation of a given octet string m of size
35 m_len. dummy is ignored. rsa is the signer's public key.
36
38 RSA_sign_ASN1_OCTET_STRING() returns 1 on success, 0 otherwise.
39 RSA_verify_ASN1_OCTET_STRING() returns 1 on successful verification, 0
40 otherwise.
41
42 The error codes can be obtained by ERR_get_error(3).
43
45 These functions serve no recognizable purpose.
46
48 ERR_get_error(3), RAND_bytes(3), RSA_sign(3), RSA_verify(3), RAND(7)
49
51 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
52
53 Licensed under the OpenSSL license (the "License"). You may not use
54 this file except in compliance with the License. You can obtain a copy
55 in the file LICENSE in the source distribution or at
56 <https://www.openssl.org/source/license.html>.
57
58
59
601.1.1g 2020-04-23 RSA_SIGN_ASN1_OCTET_STRING(3)