summaryrefslogtreecommitdiff
path: root/PROTOCOL.certkeys
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-04-16 15:56:21 +1000
committerDamien Miller <djm@mindrot.org>2010-04-16 15:56:21 +1000
commit4e270b05dd9d850fb9e2e0ac43f33cb4090d3ebc (patch)
tree4fc84942b5966e9f38f18a1257ac43ddbed336be /PROTOCOL.certkeys
parent031c9100dfe3ee65a29084ebbd61965a76b3ad26 (diff)
- djm@cvs.openbsd.org 2010/04/16 01:47:26
[PROTOCOL.certkeys auth-options.c auth-options.h auth-rsa.c] [auth2-pubkey.c authfd.c key.c key.h myproposal.h ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.1 ssh-keygen.c ssh-rsa.c] [sshconnect.c sshconnect2.c sshd.c] revised certificate format ssh-{dss,rsa}-cert-v01@openssh.com with the following changes: move the nonce field to the beginning of the certificate where it can better protect against chosen-prefix attacks on the signature hash Rename "constraints" field to "critical options" Add a new non-critical "extensions" field Add a serial number The older format is still support for authentication and cert generation (use "ssh-keygen -t v00 -s ca_key ..." to generate a v00 certificate) ok markus@
Diffstat (limited to 'PROTOCOL.certkeys')
-rw-r--r--PROTOCOL.certkeys73
1 files changed, 44 insertions, 29 deletions
diff --git a/PROTOCOL.certkeys b/PROTOCOL.certkeys
index 1ed9e2064..a2069f547 100644
--- a/PROTOCOL.certkeys
+++ b/PROTOCOL.certkeys
@@ -16,7 +16,7 @@ These protocol extensions build on the simple public key authentication
16system already in SSH to allow certificate-based authentication. 16system already in SSH to allow certificate-based authentication.
17The certificates used are not traditional X.509 certificates, with 17The certificates used are not traditional X.509 certificates, with
18numerous options and complex encoding rules, but something rather 18numerous options and complex encoding rules, but something rather
19more minimal: a key, some identity information and usage constraints 19more minimal: a key, some identity information and usage options
20that have been signed with some other trusted key. 20that have been signed with some other trusted key.
21 21
22A sshd server may be configured to allow authentication via certified 22A sshd server may be configured to allow authentication via certified
@@ -27,7 +27,7 @@ of acceptance of certified host keys, by adding a similar ability
27to specify CA keys in ~/.ssh/known_hosts. 27to specify CA keys in ~/.ssh/known_hosts.
28 28
29Certified keys are represented using two new key types: 29Certified keys are represented using two new key types:
30ssh-rsa-cert-v00@openssh.com and ssh-dss-cert-v00@openssh.com that 30ssh-rsa-cert-v01@openssh.com and ssh-dss-cert-v01@openssh.com that
31include certification information along with the public key that is used 31include certification information along with the public key that is used
32to sign challenges. ssh-keygen performs the CA signing operation. 32to sign challenges. ssh-keygen performs the CA signing operation.
33 33
@@ -47,7 +47,7 @@ in RFC4252 section 7.
47New public key formats 47New public key formats
48---------------------- 48----------------------
49 49
50The ssh-rsa-cert-v00@openssh.com and ssh-dss-cert-v00@openssh.com key 50The ssh-rsa-cert-v01@openssh.com and ssh-dss-cert-v01@openssh.com key
51types take a similar high-level format (note: data types and 51types take a similar high-level format (note: data types and
52encoding are as per RFC4251 section 5). The serialised wire encoding of 52encoding are as per RFC4251 section 5). The serialised wire encoding of
53these certificates is also used for storing them on disk. 53these certificates is also used for storing them on disk.
@@ -57,42 +57,55 @@ these certificates is also used for storing them on disk.
57 57
58RSA certificate 58RSA certificate
59 59
60 string "ssh-rsa-cert-v00@openssh.com" 60 string "ssh-rsa-cert-v01@openssh.com"
61 string nonce
61 mpint e 62 mpint e
62 mpint n 63 mpint n
64 uint64 serial
63 uint32 type 65 uint32 type
64 string key id 66 string key id
65 string valid principals 67 string valid principals
66 uint64 valid after 68 uint64 valid after
67 uint64 valid before 69 uint64 valid before
68 string constraints 70 string critical options
69 string nonce 71 string extensions
70 string reserved 72 string reserved
71 string signature key 73 string signature key
72 string signature 74 string signature
73 75
74DSA certificate 76DSA certificate
75 77
76 string "ssh-dss-cert-v00@openssh.com" 78 string "ssh-dss-cert-v01@openssh.com"
79 string nonce
77 mpint p 80 mpint p
78 mpint q 81 mpint q
79 mpint g 82 mpint g
80 mpint y 83 mpint y
84 uint64 serial
81 uint32 type 85 uint32 type
82 string key id 86 string key id
83 string valid principals 87 string valid principals
84 uint64 valid after 88 uint64 valid after
85 uint64 valid before 89 uint64 valid before
86 string constraints 90 string critical options
87 string nonce 91 string extensions
88 string reserved 92 string reserved
89 string signature key 93 string signature key
90 string signature 94 string signature
91 95
96The nonce field is a CA-provided random bitstring of arbitrary length
97(but typically 16 or 32 bytes) included to make attacks that depend on
98inducing collisions in the signature hash infeasible.
99
92e and n are the RSA exponent and public modulus respectively. 100e and n are the RSA exponent and public modulus respectively.
93 101
94p, q, g, y are the DSA parameters as described in FIPS-186-2. 102p, q, g, y are the DSA parameters as described in FIPS-186-2.
95 103
104serial is an optional certificate serial number set by the CA to
105provide an abbreviated way to refer to certificates from that CA.
106If a CA does not with to number its certificates it must set this
107field to zero.
108
96type specifies whether this certificate is for identification of a user 109type specifies whether this certificate is for identification of a user
97or a host using a SSH_CERT_TYPE_... value. 110or a host using a SSH_CERT_TYPE_... value.
98 111
@@ -112,13 +125,15 @@ certificate. Each represents a time in seconds since 1970-01-01
11200:00:00. A certificate is considered valid if: 12500:00:00. A certificate is considered valid if:
113 valid after <= current time < valid before 126 valid after <= current time < valid before
114 127
115constraints is a set of zero or more key constraints encoded as below. 128criticial options is a set of zero or more key options encoded as
129below. All such options are "critical" in the sense that an implementation
130must refuse to authorise a key that has an unrecognised option.
116 131
117The nonce field is a CA-provided random bitstring of arbitrary length 132extensions is a set of zero or more optional extensions. These extensions
118(but typically 16 or 32 bytes) included to make attacks that depend on 133are not critical, and an implementation that encounters one that it does
119inducing collisions in the signature hash infeasible. 134not recognise may safely ignore it. No extensions are defined at present.
120 135
121The reserved field is current unused and is ignored in this version of 136The reserved field is currently unused and is ignored in this version of
122the protocol. 137the protocol.
123 138
124signature key contains the CA key used to sign the certificate. 139signature key contains the CA key used to sign the certificate.
@@ -132,22 +147,22 @@ up to, and including the signature key. Signatures are computed and
132encoded according to the rules defined for the CA's public key algorithm 147encoded according to the rules defined for the CA's public key algorithm
133(RFC4253 section 6.6 for ssh-rsa and ssh-dss). 148(RFC4253 section 6.6 for ssh-rsa and ssh-dss).
134 149
135Constraints 150Critical options
136----------- 151----------------
137 152
138The constraints section of the certificate specifies zero or more 153The critical options section of the certificate specifies zero or more
139constraints on the certificates validity. The format of this field 154options on the certificates validity. The format of this field
140is a sequence of zero or more tuples: 155is a sequence of zero or more tuples:
141 156
142 string name 157 string name
143 string data 158 string data
144 159
145The name field identifies the constraint and the data field encodes 160The name field identifies the option and the data field encodes
146constraint-specific information (see below). All constraints are 161option-specific information (see below). All options are
147"critical", if an implementation does not recognise a constraint 162"critical", if an implementation does not recognise a option
148then the validating party should refuse to accept the certificate. 163then the validating party should refuse to accept the certificate.
149 164
150The supported constraints and the contents and structure of their 165The supported options and the contents and structure of their
151data fields are: 166data fields are:
152 167
153Name Format Description 168Name Format Description
@@ -159,35 +174,35 @@ force-command string Specifies a command that is executed
159 174
160permit-X11-forwarding empty Flag indicating that X11 forwarding 175permit-X11-forwarding empty Flag indicating that X11 forwarding
161 should be permitted. X11 forwarding will 176 should be permitted. X11 forwarding will
162 be refused if this constraint is absent. 177 be refused if this option is absent.
163 178
164permit-agent-forwarding empty Flag indicating that agent forwarding 179permit-agent-forwarding empty Flag indicating that agent forwarding
165 should be allowed. Agent forwarding 180 should be allowed. Agent forwarding
166 must not be permitted unless this 181 must not be permitted unless this
167 constraint is present. 182 option is present.
168 183
169permit-port-forwarding empty Flag indicating that port-forwarding 184permit-port-forwarding empty Flag indicating that port-forwarding
170 should be allowed. If this constraint is 185 should be allowed. If this option is
171 not present then no port forwarding will 186 not present then no port forwarding will
172 be allowed. 187 be allowed.
173 188
174permit-pty empty Flag indicating that PTY allocation 189permit-pty empty Flag indicating that PTY allocation
175 should be permitted. In the absence of 190 should be permitted. In the absence of
176 this constraint PTY allocation will be 191 this option PTY allocation will be
177 disabled. 192 disabled.
178 193
179permit-user-rc empty Flag indicating that execution of 194permit-user-rc empty Flag indicating that execution of
180 ~/.ssh/rc should be permitted. Execution 195 ~/.ssh/rc should be permitted. Execution
181 of this script will not be permitted if 196 of this script will not be permitted if
182 this constraint is not present. 197 this option is not present.
183 198
184source-address string Comma-separated list of source addresses 199source-address string Comma-separated list of source addresses
185 from which this certificate is accepted 200 from which this certificate is accepted
186 for authentication. Addresses are 201 for authentication. Addresses are
187 specified in CIDR format (nn.nn.nn.nn/nn 202 specified in CIDR format (nn.nn.nn.nn/nn
188 or hhhh::hhhh/nn). 203 or hhhh::hhhh/nn).
189 If this constraint is not present then 204 If this option is not present then
190 certificates may be presented from any 205 certificates may be presented from any
191 source address. 206 source address.
192 207
193$OpenBSD: PROTOCOL.certkeys,v 1.3 2010/03/03 22:50:40 djm Exp $ 208$OpenBSD: PROTOCOL.certkeys,v 1.4 2010/04/16 01:47:25 djm Exp $