summaryrefslogtreecommitdiff
path: root/PROTOCOL.certkeys
diff options
context:
space:
mode:
Diffstat (limited to 'PROTOCOL.certkeys')
-rw-r--r--PROTOCOL.certkeys106
1 files changed, 69 insertions, 37 deletions
diff --git a/PROTOCOL.certkeys b/PROTOCOL.certkeys
index 1ed9e2064..1d1be13da 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 wish 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.
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,25 @@ 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 160Options must be lexically ordered by "name" if they appear in the
146constraint-specific information (see below). All constraints are 161sequence.
147"critical", if an implementation does not recognise a constraint 162
163The name field identifies the option and the data field encodes
164option-specific information (see below). All options are
165"critical", if an implementation does not recognise a option
148then the validating party should refuse to accept the certificate. 166then the validating party should refuse to accept the certificate.
149 167
150The supported constraints and the contents and structure of their 168The supported options and the contents and structure of their
151data fields are: 169data fields are:
152 170
153Name Format Description 171Name Format Description
@@ -157,37 +175,51 @@ force-command string Specifies a command that is executed
157 ssh command-line) whenever this key is 175 ssh command-line) whenever this key is
158 used for authentication. 176 used for authentication.
159 177
178source-address string Comma-separated list of source addresses
179 from which this certificate is accepted
180 for authentication. Addresses are
181 specified in CIDR format (nn.nn.nn.nn/nn
182 or hhhh::hhhh/nn).
183 If this option is not present then
184 certificates may be presented from any
185 source address.
186
187Extensions
188----------
189
190The extensions section of the certificate specifies zero or more
191non-critical certificate extensions. The encoding and ordering of
192extensions in this field is identical to that of the critical options.
193If an implementation does not recognise an extension, then it should
194ignore it.
195
196The supported extensions and the contents and structure of their data
197fields are:
198
199Name Format Description
200-----------------------------------------------------------------------------
160permit-X11-forwarding empty Flag indicating that X11 forwarding 201permit-X11-forwarding empty Flag indicating that X11 forwarding
161 should be permitted. X11 forwarding will 202 should be permitted. X11 forwarding will
162 be refused if this constraint is absent. 203 be refused if this option is absent.
163 204
164permit-agent-forwarding empty Flag indicating that agent forwarding 205permit-agent-forwarding empty Flag indicating that agent forwarding
165 should be allowed. Agent forwarding 206 should be allowed. Agent forwarding
166 must not be permitted unless this 207 must not be permitted unless this
167 constraint is present. 208 option is present.
168 209
169permit-port-forwarding empty Flag indicating that port-forwarding 210permit-port-forwarding empty Flag indicating that port-forwarding
170 should be allowed. If this constraint is 211 should be allowed. If this option is
171 not present then no port forwarding will 212 not present then no port forwarding will
172 be allowed. 213 be allowed.
173 214
174permit-pty empty Flag indicating that PTY allocation 215permit-pty empty Flag indicating that PTY allocation
175 should be permitted. In the absence of 216 should be permitted. In the absence of
176 this constraint PTY allocation will be 217 this option PTY allocation will be
177 disabled. 218 disabled.
178 219
179permit-user-rc empty Flag indicating that execution of 220permit-user-rc empty Flag indicating that execution of
180 ~/.ssh/rc should be permitted. Execution 221 ~/.ssh/rc should be permitted. Execution
181 of this script will not be permitted if 222 of this script will not be permitted if
182 this constraint is not present. 223 this option is not present.
183
184source-address string Comma-separated list of source addresses
185 from which this certificate is accepted
186 for authentication. Addresses are
187 specified in CIDR format (nn.nn.nn.nn/nn
188 or hhhh::hhhh/nn).
189 If this constraint is not present then
190 certificates may be presented from any
191 source address.
192 224
193$OpenBSD: PROTOCOL.certkeys,v 1.3 2010/03/03 22:50:40 djm Exp $ 225$OpenBSD: PROTOCOL.certkeys,v 1.7 2010/08/04 05:40:39 djm Exp $