Rev 18 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18 | Rev 34 | ||
---|---|---|---|
1 | .\" Hey, EMACS: -*- nroff -*- |
1 | .\" Hey, EMACS: -*- nroff -*- |
2 | .\" First parameter, NAME, should be all caps |
2 | .\" First parameter, NAME, should be all caps |
3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
4 | .\" other parameters are allowed: see man(7), man(1) |
4 | .\" other parameters are allowed: see man(7), man(1) |
5 | .TH PKCS1\-CONV 1 "June 2007" "nettle 1.15" "Nettle tools" |
5 | .TH PKCS1\-CONV 1 "June 2007" "nettle 1.15" "Nettle tools" |
6 | .\" Please adjust this date whenever revising the manpage. |
6 | .\" Please adjust this date whenever revising the manpage. |
7 | .\" |
7 | .\" |
8 | .\" Some roff macros, for reference: |
8 | .\" Some roff macros, for reference: |
9 | .\" .nh disable hyphenation |
9 | .\" .nh disable hyphenation |
10 | .\" .hy enable hyphenation |
10 | .\" .hy enable hyphenation |
11 | .\" .ad l left justify |
11 | .\" .ad l left justify |
12 | .\" .ad b justify to both left and right margins |
12 | .\" .ad b justify to both left and right margins |
13 | .\" .nf disable filling |
13 | .\" .nf disable filling |
14 | .\" .fi enable filling |
14 | .\" .fi enable filling |
15 | .\" .br insert line break |
15 | .\" .br insert line break |
16 | .\" .sp <n> insert n+1 empty lines |
16 | .\" .sp <n> insert n+1 empty lines |
17 | .\" for manpage-specific macros, see man(7) |
17 | .\" for manpage-specific macros, see man(7) |
18 | .SH NAME |
18 | .SH NAME |
19 | pkcs1\-conv \- convert keys from PKCS#1 format to s-expression format |
19 | pkcs1\-conv \- convert keys from PKCS#1 format to s-expression format |
20 | .SH SYNOPSIS |
20 | .SH SYNOPSIS |
21 | .B pkcs1-conv |
21 | .B pkcs1-conv |
22 | .RB [{ \-\-private-rsa-key | \-\-public-rsa-key | \-\-public-key-info } |
22 | .RB [{ \-\-private-rsa-key | \-\-public-rsa-key | \-\-public-key-info } |
23 | .RB [ \-\-base-64 ]] |
23 | .RB [ \-\-base-64 ]] |
24 | .RI <\ FILE |
24 | .RI <\ FILE |
25 | .SH DESCRIPTION |
25 | .SH DESCRIPTION |
26 | This manual page documents briefly the |
26 | This manual page documents briefly the |
27 | .B pkcs1\-conv |
27 | .B pkcs1\-conv |
28 | command. |
28 | command. |
29 | This manual page was written for the Debian GNU/Linux distribution |
29 | This manual page was written for the Debian GNU/Linux distribution |
30 | because the original program does not have a manual page. |
30 | because the original program does not have a manual page. |
31 | .PP |
31 | .PP |
32 | .\" TeX users may be more comfortable with the \fB<whatever>\fP and |
32 | .\" TeX users may be more comfortable with the \fB<whatever>\fP and |
33 | .\" \fI<whatever>\fP escape sequences to invode bold face and italics, |
33 | .\" \fI<whatever>\fP escape sequences to invode bold face and italics, |
34 | .\" respectively. |
34 | .\" respectively. |
35 | \fBpkcs1\-conv\fP converts private and public RSA keys from PKCS #1 |
35 | \fBpkcs1\-conv\fP converts private and public RSA keys from PKCS #1 |
36 | format to sexp format. |
36 | format to sexp format. |
37 | .SH OPTIONS |
37 | .SH OPTIONS |
38 | This program follows the usual GNU command line syntax, with long |
38 | This program follows the usual GNU command line syntax, with long |
39 | options starting with two dashes (`\-'). |
39 | options starting with two dashes (`\-'). |
40 | .PP |
40 | .PP |
41 | By default pkcs1-conv expects a PEM-encapsulated RSA key on standard input, |
41 | By default pkcs1-conv expects a PEM-encapsulated RSA key on standard input, |
42 | and will determine its type from the Pre-Encapsulation Boundary. |
42 | and will determine its type from the Pre-Encapsulation Boundary. |
43 | To convert a DER-encoded (non PEM-encoded) key, one of the first three |
43 | To convert a DER-encoded (non PEM-encoded) key, one of the first three |
44 | options below must be used: |
44 | options below must be used: |
45 | .TP |
45 | .TP |
46 | .B \-\-private-rsa-key |
46 | .B \-\-private-rsa-key |
47 | Specify that a DER-encoded RSAPrivateKey, as defined by PKCS #1 (RFC 3447), |
47 | Specify that a DER-encoded RSAPrivateKey, as defined by PKCS #1 (RFC 3447), |
48 | and described in section A.1.2 of its appendix A, is to be expected as input. |
48 | and described in section A.1.2 of its appendix A, is to be expected as input. |
49 | .TP |
49 | .TP |
50 | .B \-\-public-rsa-key |
50 | .B \-\-public-rsa-key |
51 | Specify that a DER-encoded RSAPublicKey, as defined by PKCS #1 (RFC 3447), |
51 | Specify that a DER-encoded RSAPublicKey, as defined by PKCS #1 (RFC 3447), |
52 | and described in section A.1.1 of its appendix A, is to be expected as input. |
52 | and described in section A.1.1 of its appendix A, is to be expected as input. |
53 | .TP |
53 | .TP |
54 | .B \-\-public-key-info |
54 | .B \-\-public-key-info |
55 | Specify that a DER-encoded SubjectPublicKeyInfo, as defined by PKCS #6, |
55 | Specify that a DER-encoded SubjectPublicKeyInfo, as defined by PKCS #6, |
56 | and described in section A.1 of its appendix A, encapsulating an RSAPublicKey, |
56 | and described in section A.1 of its appendix A, encapsulating an RSAPublicKey, |
57 | is to be expected as input. |
57 | is to be expected as input. |
58 | .TP |
58 | .TP |
59 | .B \-\-base-64 |
59 | .B \-\-base-64 |
60 | Together with \-\-private-rsa-key, \-\-public-rsa-key, or \-\-public-key-info, |
60 | Together with \-\-private-rsa-key, \-\-public-rsa-key, or \-\-public-key-info, |
61 | specify that base64 encoding is applied on top of the DER encoding. |
61 | specify that base64 encoding is applied on top of the DER encoding. |
62 | .TP |
62 | .TP |
63 | .B \-?, \-\-help |
63 | .B \-?, \-\-help |
64 | Show summary of options (not implemented). |
64 | Show summary of options (not implemented). |
65 | .TP |
65 | .TP |
66 | .B \-V, \-\-version |
66 | .B \-V, \-\-version |
67 | Show version of program. |
67 | Show version of program. |
68 | .SH DIAGNOSTICS |
68 | .SH DIAGNOSTICS |
69 | pkcs1\-conv will complain and exit with a status of 1 |
69 | pkcs1\-conv will complain and exit with a status of 1 |
70 | if the input doesn't match expectations. In PEM mode |
70 | if the input doesn't match expectations. In PEM mode |
71 | (when no option is used), if no PEM block is found, pkcs1\-conv |
71 | (when no option is used), if no PEM block is found, pkcs1\-conv |
72 | will output nothing but exit with a zero status. |
72 | will output nothing but exit with a zero status. |
73 | .SH EXAMPLES |
73 | .SH EXAMPLES |
74 | .nf |
74 | .nf |
75 | $ openssl genrsa \-out privkey.pem |
75 | $ openssl genrsa \-out privkey.pem |
76 | $ pkcs1\-conv < privkey.pem > privkey.sexp |
76 | $ pkcs1\-conv < privkey.pem > privkey.sexp |
77 | $ openssl rsa \-in privkey.pem \-outform DER \-out privkey.der |
77 | $ openssl rsa \-in privkey.pem \-outform DER \-out privkey.der |
78 | $ openssl rsa \-in privkey.pem \-outform DER \-pubout \-out pubkey.der |
78 | $ openssl rsa \-in privkey.pem \-outform DER \-pubout \-out pubkey.der |
79 | $ pkcs1-conv \-\-rsa-private-key < privkey.der > privkey.sexp |
79 | $ pkcs1-conv \-\-rsa-private-key < privkey.der > privkey.sexp |
80 | $ pkcs1-conv \-\-public-key-info < pubkey.der > pubkey.sexp |
80 | $ pkcs1-conv \-\-public-key-info < pubkey.der > pubkey.sexp |
81 | .fi |
81 | .fi |
82 | .SH SEE ALSO |
82 | .SH SEE ALSO |
83 | .BR ssh\-conv (1), |
83 | .BR ssh\-conv (1), |
84 | .BR sexp\-conv (1), |
84 | .BR sexp\-conv (1), |
85 | .BR rsa (1SSL), |
85 | .BR rsa (1SSL), |
86 | .BR genrsa (1SSL), |
86 | .BR genrsa (1SSL), |
87 | RFC 3447. |
87 | RFC 3447. |
88 | .SH AUTHOR |
88 | .SH AUTHOR |
89 | This manual page was written by Magnus Holmgren <magnus@kibibyte.se>, |
89 | This manual page was written by Magnus Holmgren <holmgren@debian.org> |
90 | for the Debian GNU/Linux system (but may be used by others). |
90 | for the Debian GNU/Linux system (but may be used by others). |
- | 91 | .SH COPYRIGHT |
|
- | 92 | Copyright © 2007 Magnus Holmgren. |
|
- | 93 | .P |
|
- | 94 | Copying and distribution of this file, with or without modification, |
|
- | 95 | are permitted in any medium without royalty provided the copyright |
|
- | 96 | notice and this notice are preserved. |