Deleted Added
full compact
RSA_check_key.pod (59191) RSA_check_key.pod (100936)
1=pod
2
3=head1 NAME
4
5RSA_check_key - validate private RSA keys
6
7=head1 SYNOPSIS
8

--- 4 unchanged lines hidden (view full) ---

13=head1 DESCRIPTION
14
15This function validates RSA keys. It checks that B<p> and B<q> are
16in fact prime, and that B<n = p*q>.
17
18It also checks that B<d*e = 1 mod (p-1*q-1)>,
19and that B<dmp1>, B<dmq1> and B<iqmp> are set correctly or are B<NULL>.
20
1=pod
2
3=head1 NAME
4
5RSA_check_key - validate private RSA keys
6
7=head1 SYNOPSIS
8

--- 4 unchanged lines hidden (view full) ---

13=head1 DESCRIPTION
14
15This function validates RSA keys. It checks that B<p> and B<q> are
16in fact prime, and that B<n = p*q>.
17
18It also checks that B<d*e = 1 mod (p-1*q-1)>,
19and that B<dmp1>, B<dmq1> and B<iqmp> are set correctly or are B<NULL>.
20
21The key's public components may not be B<NULL>.
21As such, this function can not be used with any arbitrary RSA key object,
22even if it is otherwise fit for regular RSA operation. See B<NOTES> for more
23information.
22
23=head1 RETURN VALUE
24
25RSA_check_key() returns 1 if B<rsa> is a valid RSA key, and 0 otherwise.
26-1 is returned if an error occurs while checking the key.
27
28If the key is invalid or an error occurred, the reason code can be
29obtained using L<ERR_get_error(3)|ERR_get_error(3)>.
30
24
25=head1 RETURN VALUE
26
27RSA_check_key() returns 1 if B<rsa> is a valid RSA key, and 0 otherwise.
28-1 is returned if an error occurs while checking the key.
29
30If the key is invalid or an error occurred, the reason code can be
31obtained using L<ERR_get_error(3)|ERR_get_error(3)>.
32
33=head1 NOTES
34
35This function does not work on RSA public keys that have only the modulus
36and public exponent elements populated. It performs integrity checks on all
37the RSA key material, so the RSA key structure must contain all the private
38key data too.
39
31=head1 SEE ALSO
32
33L<rsa(3)|rsa(3)>, L<err(3)|err(3)>
34
35=head1 HISTORY
36
37RSA_check() appeared in OpenSSL 0.9.4.
38
39=cut
40=head1 SEE ALSO
41
42L<rsa(3)|rsa(3)>, L<err(3)|err(3)>
43
44=head1 HISTORY
45
46RSA_check() appeared in OpenSSL 0.9.4.
47
48=cut