summaryrefslogtreecommitdiffstats
path: root/ipsec-tools/src/racoon/plainrsa-gen.8
blob: 377de2dc55d2e1165b4cd5c4e2c903a3a6a49fa8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
.\"	$NetBSD: plainrsa-gen.8,v 1.13 2006/09/19 18:54:39 wiz Exp $
.\"
.\" Id: plainrsa-gen.8,v 1.4 2005/04/18 11:07:55 manubsd Exp
.\"
.\" Copyright (C) 2004 SuSE Linux AG, Nuernberg, Germany.
.\" Contributed by: Michal Ludvig <mludvig@suse.cz>, SUSE Labs
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the project nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd June 14, 2004
.Dt PLAINRSA-GEN 8
.Os
.\"
.Sh NAME
.Nm plainrsa-gen
.Nd generator for Plain RSA keys
.\"
.Sh SYNOPSIS
.Nm plainrsa-gen
.Bk -words
.Op Fl b Ar bits
.Op Fl e Ar pubexp
.Op Fl f Ar outfile
.Op Fl h
.Ek
.\"
.Sh DESCRIPTION
.Nm
can be used to generate
.Li Plain RSA keys
for authentication purposes.
Using
.Li Plain RSA keys
is optional.
Other possibilities are
.Li Pre-shared keys
or
.Li X.509 certificates .
.\"
.Bl -tag -width Ds
.It Fl b Ar bits
bit length of the key.
Default is
.Li 1024 ,
recommended length is
.Li 2048
or even
.Li 4096
bits.
Note that generating longer keys takes longer time.
.It Fl e Ar pubexp
value of RSA public exponent.
Default is
.Li 0x3 .
Don't change this unless you really know what you are doing!
.It Fl f Ar outfile
.Ar outfile
instead of
.Li stdout .
If the file already exists it won't be overwritten.
You wouldn't like to lose your private key by accident, would you?
.El
.\"
.Sh OUTPUT FILE FORMAT
This is the secret
.Li private key
that should
.Ic never
leave your computer:
.Bd -literal
: RSA	{
	# RSA 1024 bits
	# pubkey=0sAQOrWlcwbAIdNSMhDt...
	Modulus: 0xab5a57306c021d3523...
	PublicExponent: 0x03
	PrivateExponent: 0x723c3a2048...
	Prime1: 0xd309b30e6adf9d85c01...
	Prime2: 0xcfdc2a8aa5b2b3c90e3...
	Exponent1: 0x8cb122099c9513ae...
	Exponent2: 0x8a92c7071921cd30...
	Coefficient: 0x722751305eafe9...
  }
.Ed
.Pp
The line
.Li pubkey=0sAQOrW...
of the
.Li private key
contains a
.Li public key
that should be stored in the other peer's configuration in this format:
.Bd -literal
: PUB 0sAQOrWlcwbAIdNSMhDt...
.Ed
.\"
.Pp
You can also specify
.Li from
and
.Li to
addresses for which the key is valid:
.Bd -literal
0.0.0.0/0 10.20.30.0/24 : PUB 0sAQOrWlcwbAIdNSMhDt...
.Ed
.\"
.Sh SEE ALSO
.Xr racoon.conf 5 ,
.Xr racoon 8
.\"
.Sh HISTORY
.Nm
was written by
.An Michal Ludvig Aq michal@logix.cz
and first appeared in
.Ic ipsec-tools 0.4 .