forked from certnanny/sscep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-nourse-scep-11.txt
4734 lines (3676 loc) · 192 KB
/
draft-nourse-scep-11.txt
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
INTERNET DRAFT Xiaoyi Liu
draft-nourse-scep-11.txt Cheryl Madson
expires 11 Aug 2005 David McGrew
(revised 11 Feb 2005) Andrew Nourse
Cisco Systems
Category: Informational 11 Feb 2005
Cisco Systems' Simple Certificate Enrollment Protocol(SCEP):
Status of this Memo
This document is an Internet-Draft and is NOT offered in accordance
with Section 10 of RFC2026, and the author does not provide the IETF
with any rights other than to publish as an Internet-Draft
Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF), its areas, and its working groups. Note that other
groups may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet- Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
By submitting this Internet-Draft, I certify that any applicable patent
or other IPR claims of which I am aware have been disclosed, or will be
disclosed, and any of which I become aware will be disclosed, in accordance
with RFC 3668.
Abstract
This document specifies the Simple Certificate Enrollment Protocol,
a PKI communication protocol which leverages existing technology by
using PKCS#7 and PKCS#10. SCEP is the evolution of the enrollment
protocol developed by Verisign, Inc. for Cisco Systems, Inc.
It now enjoys wide support in both client and CA implementations.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 2
2. The Goal of SCEP . . . . . . . . . . . . . . . . . . . . . 3
2.1 SCEP Entity types . . . . . . . . . . . . . . . . . . . . 3
2.2 SCEP Operations Overview . . . . . . . . . . . . . . . . . 7
2.3 PKI Operation Transactional Behavior . . . . . . . . . . . 10
2.4 Security . . . . . . . . . . . . . . . . . . . . . . . . . 12
3. Transport Protocol . . . . . . . . . . . . . . . . . . . . 13
4. Secure Transportation: PKCS #7 . . . . . . . . . . . . . . 14
4.1 SCEP Message Format . . . . . . . . . . . . . . . . . . . 14
Liu/Madson/McGrew/Nourse [Page 2]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
4.2 Signed Transaction Attributes . . . . . . . . . . . . . . 15
5. SCEP Transaction Specification . . . . . . . . . . . . . . 16
5.1 Certificate Enrollment . . . . . . . . . . . . . . . . . . 16
5.2 Poll for Requester Initial Certificate . . . . . . . . . . 22
5.3 Certificate Access . . . . . . . . . . . . . . . . . . . . 26
5.4 CRL Access . . . . . . . . . . . . . . . . . . . . . . . 27
5.5 Get Certificate Authority Certificate . . . . . . . . . . 31
5.6 Get Certificate Authority Certificate Chain . . . . . . . 33
6. Security Considerations . . . . . . . . . . . . . . . . . 33
7. Intellectual Propoerty . . . . . . . . . . . . . . . . . . 33
8. References . . . . . . . . . . . . . . . . . . . . . . . . 33
Appendix A. Cisco Requester Subject Name Definition . . . . . . 34
Appendix B. IPSEC Client Enrollment Certificate Request . . . . 35
Appendix C. Private OID Definitions . . . . . . . . . . . . . 36
Appendix D. Obtaining CRL by LDAP Query . . . . . . . . . . . . 36
Appendix E. SCEP State Transitions . . . . . . . . . . . . . . 37
Appendix F. CA Capabilities . . . . . . . . . . . . . . . . . . 40
Appendix G. Certificate Renewal and CA Key Rollover . . . . . . 41
Appendix H. PKIOperation via HTTP POST Message. . . . . . . . . 42
Appendix Y. Author Contact Information. . . . . . . . . . . . . 43
Appendix Z. Copyright Section . . . . . . . . . . . . . . . . . 43
Section 1. Introduction
Public key technology is becoming more widely deployed and is becoming
the basis for standards based security, such as the Internet Engineering
Task Force's IPSEC and IKE protocols. With the use of public key
certificates in network security protocols comes the need for a
certificate management protocol that Public Key Infrastructure (PKI)
clients and Certificate Authority servers can use to support certificate
life cycle operations such as certificate enrollment and revocation, and
certificate and CRL access.
In the following, Section 2 gives an overview of the PKI operations,
and Section 2.4 describes the security goals of the protocol and the
mechanisms used to achieve them. The transport protocol and the
security protocol PKCS#7 are described at Section 3 and Section 4,
respectively. The last section, Section 5, specifies each PKI
operation in terms of the message formats and the data structures of
each operation.
The appendices provide detailed specifications and examples. Requester
subject names are specified in Appendix A, attribute OIDs are
specified in Appendix C , and the SCEP state transitions are described
in Appendix E. An example of a certificate enrollment request is
provided in Appendix B, and an example LDAP query URL encoding is
provided in Appendix D.
The authors would like to thank Peter William of ValiCert, Inc.
(formerly of Verisign, Inc) and Alex Deacon of Verisign, Inc. and
Christopher Welles of IRE, Inc. for their contributions to this protocol
and to this document.
Liu/Madson/McGrew/Nourse [Page 3]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
2.0 The Goal of SCEP
The goal of SCEP is to support the secure issuance of certificates to
network devices in a scalable manner, using existing technology whenever
possible. The protocol supports the following operations:
CA and RA public key distribution
Certificate enrollment
Certificate revocation
Certificate query
CRL query
Certificate and CRL access can be achieved by using the LDAP protocol
(as specified in Appendix D), or by using the query messages defined in
SCEP. The use of HTTP certificate and CRL access, and the support of
CDP as specified in RFC2459, will be specified in a future version of
this document. In Section 2.1, we first define PKI entity types as well
as the properties of each entity type. In Section 2.2, the PKI
operations are described at functional level. Section 2.3 describes the
transaction behavior of each PKI operations. The complete PKI messages
are covered in Section 5.
2.1 SCEP Entity types
The entity types defined in SCEP are the "requester" type (i.e., IPSEC
clients), the Certificate Authority (CA) entity type, and the
Registration Authority entity type (RA). A requester is sometimes
called a "SCEP client" in the following.
2.1.1 Requesters
A requester is an entity whose name is defined in a certificate
subject name field and optionally, in SubjectAltName, a X.509
certificate V3 extension. As a requester, a SCEP client is identified
by a subject name consisting of the following naming attributes:
Fully qualified domain name, for example, router.cisco.com
IP address, Serial number, and/or x.500 distinguished name
The fully qualified domain name is required for a requester that intends
to use the certificate for ISAKMP. The IP address, serial number, and
x.500 distinguished name are optional name attributes. In the
certificate enrollment request, the PKCS#10 subject field contains the
required and optional name attributes. The distinguished name, if any,
should be the subject name field, while any domain name, serial number,
or IP address supplied should be in the subjectAltName field. The
subject name field may be empty (if there is no distinguished name)
or the subjectAltName may be omitted, but not both.
It is important to note that a client named as Alice.cisco.com is
different than a client named as Alice.cisco.com plus the IP address
name attribute 117.96.1.219. From CA point of view, the Distinguished
names assigned in these two cases are distinct names.
Liu/Madson/McGrew/Nourse [Page 4]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
Entity names which are specified as in the IPSEC profile (i.e., FQDN, IP
address and User FQDN) must be presented in certificate's SubjectAltName
extension. Multiple IPSEC entity names, (if any) are encoded as multiple
values of a single SubjectAltName extension. The CA has the authority
to assign a distinguished name to a requester, whether or not one was
included in the request. The assigned DN should contain the SCEP client
names as the relative DN.
The attribute identifiers and an example of SCEP client subject name are
specified in Appendix A. Appendix B has an example from Cisco VPN Client
enrollment request.
2.1.1.1 Local Key/Certificate/CRL Storage and Certificate-name uniqueness
A requester is required to generate asymmetric key pairs and to provide
storage to store its private keys. If the requester does not have enough
permanent memory to save its certificate, then it should be able to query
its own certificate from the CA or an LDAP server, once the certificate
has been issued. The public key pairs can be generated with a specific
key usage. The key usage is conveyed to the CA through the certificate
enrollment request. All current SCEP client implementations expect that
there will be only one pair of keys for a given subject name
and key usage combination and CA, at any time. This property is called
the certificate-name uniqueness property, and it implies that a CA that
implements SCEP will enforce the unique mapping between a SCEP client
subject name and its key pairs with a given key usage. At any time, if
the subject name is changed, or if the key is updated, the existing
certificate would have to be revoked before a new one could be issued.
It is desirable that the CA enforce certificate-name uniqueness, but
it is not mandatory. However a CA that does not enforce uniqueness
must provide some other mechanism to prevent the re-transmission of an
enrollment request by a SCEP client from creating a second certificate
or certificate request, nor can the second request merely be rejected.
If a client times out from polling for a pending request it can
resynchronize by reissuing the original request with the original
subject name, key, and transaction ID. This should return the status of
the original transaction, including the certificate if it was granted.
It should not create a new transaction unless the original cert has been
revoked, or the transaction arrives more than halfway through the
validity time of the original certificate.
An enrollment request that occurs more than halfway through the validity
time of an existing certificate for the same subject name and key usage
MAY be interpreted as a re-enrollment or renewal request and accepted.
A new certificate with new validity dates may be issued, even though
the old one is still valid, if the CA policy permits, as described in
2.1.1.3. See also appendix G.
2.1.1.2 Requester authentication
As with every protocol that uses public-key cryptography, the
association between the public keys used in the protocol and the
identities with which they are associated must be authenticated in a
Liu/Madson/McGrew/Nourse [Page 5]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
cryptographically secure manner. This requirement is needed to
prevent a "man in the middle" attack, in which an adversary that can
manipulate the data as it travels between the protocol participants
can subvert the security of the protocol. To satisfy this
requirement, SCEP provides two authentication methods: manual
authentication, and authentication based on pre-shared secret. In the
manual mode, the requester is required to wait until its identity can
be verified by the CA operator using any reliable out-of-band
method. To prevent a "man-in-the-middle" attack, a SHA-1 or MD5
`fingerprint' generated on the PKCS#10 (before PKCS #7 enveloping and
signing) must be compared out-of-band between the server and the
requester. SCEP clients and CAs (or RAs, if appropriate) must display
this fingerprint to the operator to enable this verification if manual
mode is used. Failing to provide this information leaves the protocol
vulnerable to attack by sophisticated adversaries. When utilizing a
pre-shared secret scheme, the server should distribute a shared secret
to the requester which can uniquely associate the enrollment request
with the given end entity. The distribution of the secret must be
private: only the end entity should know this secret. The actual
binding mechanism between the requester and the secret is subject to
the server policy and implementation. When creating the enrollment
request, the requester is asked to provide a challenge password. When
using the pre-shared secret scheme, the requester must enter the
re-distributed secret as the password. In the manual authentication
case, the challenge password only used to authenticate a request for
the certificate's revokation. This challenge password is included as
a PKCS#10 attribute, and is sent to the server as encrypted data. The
PKCS#7 envelope protects the privacy of the challenge password with
DES encryption.
2.1.1.3 Requester Uses Existing CA-Issued or Self-Signed Certificates
In this protocol, the communication between the requester and the
certificate authority is secured by using PKCS#7 as the messaging
protocol. PKCS#7, however, is a protocol which assumes the
communicating entities already possess the peer's certificates and
requires both parties use the issuer names and issuer assigned
certificate serial numbers to identify the certificate in order to
verify the signature and decrypt the message. If the requesting
system already has a certificate issued by the CA, that certificate
may be presented as credentials for the renewal of that certificate if
the CA supports the "Renewal" capability and the CA policy permits the
certificate to be renewed. If the requester has no certificate issued
by the CA, or if the CA does not support and permit renewal, the
requestor must generate a self-signed certificate with the requester
subject name (the same name later used in the PKCS#10) as both issuer
and subject name. During the certificate enrollment, the requester
will first post itself as the signing authority by attaching the
self-signed certificate to the signed certificate request. When the
Certificate Authority makes the envelope on the issued certificate
using the public key included in the self-signed certificate, it
should use the same issuer name and serial number as conveyed in the
self-signed certificate to inform the end entity on which private key
should be used to open the envelope.
Liu/Madson/McGrew/Nourse [Page 6]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
Note that when a client enrolls for separate encryption and signature
certificates, it may use the signature certificate to sign both
requests, and then expect its signature key to be used to encrypt
both responses. In any case, the recipientinfo on the envelope should
reflect the key used to encrypt the request.
2.1.1.4 Trusted CA Store
To support interoperability between IPSEC peers whose certificates are
issued by different CA, SCEP allows the users to configure multiple
trusted certificates. Trusted certificates are have been configured as
such in the client, based on some out-of-band means such as a "fingerprint".
These trusted certificates are used to verify certificate chains that end
in those certificates.
2.1.2 Certificate Authority
A Certificate Authority(CA) is an entity whose name is defined in the
certificate issuer name field. Before any PKI operations can begin,
the CA generates its own public key pair and creates a self-signed CA
certificate, or causes another CA to issue a certificate to it.
Associated with the CA certificate is a fingerprint which will be used
by the requester to authenticate the received CA certificate if it is
self-signed. The fingerprint is created by calculating a SHA-1 or MD5
hash on the whole CA certificate. Before any requester can start its
enrollment, this CA certificate has to be configured at the entity
side securely. For IPSEC clients, the client certificates must have
SubjectAltName extension. To utilize LDAP as a CRL query protocol,
the certificates must have a CRL Distribution Point. Key usage is
optional. Without key usage, the public key is assumed as a general
purpose public key and it can be used for all the purposes.
A Certificate Authority may enforce certain name policy. When using
X.500 directory name as the subject name, all the name attributes
specified in the PKCS#10 request should be included as Relative DN. All
the name attributes as defined in RFC2459 should be specified in the
SubjectAltName. An example is provided in Appendix A.
If there is no LDAP query protocol support, the Certificate Authority
should answer certificate and CRL queries, and to this end it should be
online all the time.
The updating of the CA's public key is addressed in Appendix G.
2.1.3 Registration Authorities
In an environment where an RA is present, a requester performs
enrollment through the RA. In order to setup a secure channel with an RA
using PKCS#7, the RA certificate(s) have to be obtained by the client
in addition to the CA certificate(s).
In the following, the CA and RA are specified as one entity in the
context of PKI operation definitions.
Liu/Madson/McGrew/Nourse [Page 7]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
2.2 SCEP Operations Overview
In this section, we give a high level overview of the PKI operations as
defined in SCEP.
2.2.1 Requester Initialization
The requester initialization includes the key pair generation and the
configuring of the required information to communicate with the
certificate authority.
2.2.1.1 Key Pairs
Before a requester can start PKI transaction, it must have at least one
asymmetric key pair, using the selected algorithm (the RSA algorithm is
required in SCEP, and is the only algorithm in current implementations).
Key pairs may be intended for particular purposes, such as encryption only,
or signing only. The usage of any associated certificate can be restricted
by adding key usage and extended key usage attributes to the PKCS#10.
2.2.1.2 Required Information
A requester is required to have the following information configured
before starting any PKI operations:
1. the certificate authority IP address or fully-qualified domain name,
2. the certificate authority HTTP CGI script path, and
the HTTP proxy information in case there is no direct Internet
connection to the server,
3. If CRLs are being published by the CA to an LDAP directory server,
and there is a CRL Distribution Point containing only an X.500 directory
name, then the client will need to know the LDAP server fully-qualified
domain name or IP address. CRL Distribution Points are discussed in
more detail in RFC 2459.
2.2.2 CA/RA Certificate Distribution
Before any PKI operation can be started, the requester needs to get
the CA/RA certificates. At this time, since no public key has been
Liu/Madson/McGrew/Nourse [Page 8]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
exchanged between the requester and the CA/RA, the message to get the
CA/RA certificate can not be secured using PKCS#7 protocol. Instead, the
CA/RA certificate distribution is implemented as a clear HTTP Get
operation. After the requester gets the CA certificate, it has to
authenticate the CA certificate by comparing the finger print with the
CA/RA operator. Since the RA certificates are signed by the CA, there is
no need to authenticate the RA certificates.
This operation is defined as a transaction consisting of one HTTP Get
message and one HTTP Response message:
REQUESTER CA SERVER
Get CA/RA Cert: HTTP Get message
----------------------------->
CA/RA Cert download: HTTP Response message
<---------------------------------------
Compute finger print and
call CA operator.
Receive call and check finger print
If an RA is in use, a degenerated PKCS#7 with a certificate chain
consisting of both RA and CA certificates is sent back to the end
entity. Otherwise the CA certificate is directly sent back as the
HTTP response payload.
2.2.3 Certificate Enrollment
A requester starts an enrollment transaction by creating a certificate
request using PKCS#10 and sends it to the CA/RA enveloped using the
PKCS#7. After the CA/RA receives the request, it will either
automatically approve the request and send the certificate back, or it
will require the requester to wait until the operator can manually
authenticate the identity of the requester. Two attributes are
included in the PKCS#10 certificate request - a Challenge Password
attribute and an optional ExtensionReq attribute which will be a
sequence of extensions the requester would like to be included in its
V3 certificate extensions. The Challenge Password may be used to
authenticate either the enrollment request itself, or a verbal
revocation request for the issued certificate in the event of key
compromise or other reason.
In the automatic mode, the transaction consists of one PKCSReq PKI
Message, and one CertRep PKI message. In the manual mode, the requester
enters into polling mode by periodically sending a GetCertInitial PKI
message to the server, until the server operator completes the manual
authentication, after which the CA will respond to GetCertInitial by
returning the issued certificate. A CA MAY run in automatic mode for
preapproved requests, and manual mode for the rest. A request with a
non-null password is not necessarily a pre-approved request. It is up
to the CA server to decide. Polling mode is entered whenever the
server returns a PENDING response.
Liu/Madson/McGrew/Nourse [Page 9]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
The transaction in automatic mode:
REQUESTER CA SERVER
PKCSReq: PKI cert. enrollment msg
--------------------------------> CertRep: pkiStatus = SUCCESS
certificate attached
<------------------------------
Receive issued certificate.
The transaction in manual mode:
REQUESTER CA SERVER
PKCSReq: PKI cert. enrollment msg
--------------------------------> CertRep: pkiStatus = PENDING
<------------------------------
GetCertInitial: polling msg
--------------------------------> CertRep: pkiStatus = PENDING
<------------------------------
................. <manual identity authentication................
GetCertInitial: polling msg
--------------------------------> CertRep: pkiStatus = SUCCESS
certificate attached
<------------------------------
Receive issued certificate.
2.2.4 Requester Certificate Revocation
A requester should be able to revoke its own certificate. Currently
the revocation is implemented as a manual process. In order to revoke a
certificate, the requester makes a phone call to the CA server
operator. The operator will come back asking the ChallengePassword
(which has been sent to the server as an attribute of the PKCS#10
certificate request). If the ChallengePassword matches, the certificate
is revoked. The reason of the revocation is documented by CA/RA.
2.2.5 Certificate Access
There are two methods to query certificates. The first method is to use
LDAP as a query protocol. Using LDAP to query assumes the client
understand the LDAP scheme supported by the CA. The SCEP client assumes
that the subject DN name in the certificate is used as the URL to query the
certificate. The standard attributes (userCertificate and caCertificate)
are used as filter.
For the environment where LDAP is not available, a certificate query
message is defined to retrieve the certificates from the CA.
To query a certificate from the certificate authority, a requester
sends a request consisting of the certificate's issuer name and the
serial number. This assumes that the requester has saved the issuer
Liu/Madson/McGrew/Nourse [Page 10]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
name and the serial number of the issued certificate from the previous
enrollment transaction. The transaction to query a certificate consists
of one GetCert PKI message and one CertRep PKI message:
REQUESTER CA SERVER
GetCert: PKI cert query msg
-------------------------------> CertRep: pkiStatus = SUCCESS
certificate
attached
<-----------------------------
Receive the certificate.
2.2.6 CRL Distribution
The CA/RA will not "push" the CRL to the end entities. The query of the
CRL can only be initialized by the requester.
There are three methods to query CRL.
The CRL may be retrieved by a simple HTTP GET. If the CA supports this
method, it should encode the URL into a CRL Distribution Point extension
in the certificates it issues. Support for this method should be
incorporated in new and updated clients, but may not be in older
versions.
The second method is to query CRL using LDAP. This assumes the CA server
supports CRL LDAP publishing and issues the CRL Distribution Point in
the certificate. The CRL Distribution Point is encoded as a DN. Please
refer to Appendix D for the examples of CRL Distribution Point.
The third method is implemented for the CA which does not support LDAP
CRL publishing or does not implement the CRL Distribution Point. In this
case, a CRL query is composed by creating a message consists of the CA
issuer name and the CA's certificate serial number. This method is
deprecated because it does not scale well and requires the CA to be a
high-availability service.
The message is sent to the CA in the same way as the other SCEP
requests: The transaction to query CRL consists of one GetCRL PKI
message and one CertRep PKI message which have no certificates but CRL.
REQUESTER CA SERVER
GetCRL: PKI CRL query msg
----------------------------------> CertRep: CRL attached
<--------------------------------
2.3 PKI Operation Transactional Behavior
As described before, a PKI operation is a transaction consisting of the
messages exchanged between a requester and the CA/RA. This section
will specify the transaction behavior on both the requester and the
Liu/Madson/McGrew/Nourse [Page 11]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
certificate authority server. Because the protocol is basically a two
way communication protocol without a confirmation message from the
initiating side, state and state resynchronization rules have to be
defined, in case any error happens at either side. Before the state
transition can be defined, the notion of transaction identifier has to
be defined first.
2.3.1 Transaction Identifier
A transaction identifier is a string generated by the entity when
starting a transaction. Since all the PKI operations defined in this
protocol are initiated by the requester, it is the responsibility of
the requester to generate a unique string as the transaction
identifier. All the PKI messages exchanged for a given PKI transaction
must carry the same transaction identifier. The transaction identifier
is generated as a SHA-1 or MD5 hash on the public key value for which the
enrollment request is made. This allows the SCEP client to reuse the
same transaction identifier if it is reissuing a request for the same
certificate (i.e. a certificate with the same subject, issuer, and key).
The SCEP protocol requires that transaction identifiers be unique, so
that queries can be matched up with transactions. For this reason, in
those cases in which separate signing and encryption certificates are
issued to the same requester, the keys must be different.
2.3.2 State Transitions in Certificate Enrollment
The requester state transitions during enrollment operation are
indicated in the diagram below:
+-<------+
| |
GetCertInitial triggered by timeout or
| | manual authentication
| |
[CERT-NONEXISTANT] ------> [CERT-REQ-PENDING] ---> [CERT-ISSUED]
| PKCSReq | CertRep with SUCCESS
| |
| |
+--------<-------------------+
request rejected, timeout, or error
As described in the section 2.2.3, certificate enrollment starts at the
state CERT-NONEXISTANT. Sending PKCSReq changes the state to
CERT-REQ-PENDING. Receiving CertRep with SUCCESS status changes the
state to CERT-ISSUED. In the case the server sending back the response
with pending status, the requester will keep polling certificate
response by sending GetCertInitial to the server, until either a CertRep
with SUCCESS status is received, or the maximum polling number has been
exceeded.
If an error or timeout occurs in the CERT-REQ-PENDING state, the end
entity will transition to the CERT-NONEXISTANT state.
Liu/Madson/McGrew/Nourse [Page 12]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
The client administrator will, eventually, start up another enrollment
request. It is important to note that, as long as the requester does
not change its subject name or keys, the same transaction id will be
used in the "new" transaction. This is important because based on this
transaction id, the certificate authority server can recognize this as
an existing transaction instead of a new one.
2.3.3 Transaction Behavior of Certificate/CRL Access
There is no state maintained during certificate access and CRL access
transaction. When using the certificate query and CRL query messages
defined in this protocol, the transaction identifier is still required
so that the requester can match the response message with the
upstanding request message. When using LDAP to query the certificate and
the CRL, the behavior is specified by the LDAP protocol.
2.4 Security
The security goals of SCEP are that no adversary can:
o subvert the public key/identity binding from that intended,
o discover the identity information in the enrollment requests and
issued certificates,
o cause the revocation of certificates with any non-negligible
probability.
Here an adversary is any entity other than the requester and the CA
(and optionally the RA) participating in the protocol that is
computationally limited, but that can manipulate data during
transmission (that is, a man-in-the-middle). The precise meaning of
'computationally limited' depends on the implementer's choice of
cryptographic hash functions and ciphers. The required algorithms are
RSA, DES, and either SHA-1 or MD5, depending on the "SHA-1" CA Capability.
[See Appendix F].
The first and second goals are met through the use of PKCS#7 and PKCS#10
encryption and digital signatures using authenticated public keys. The
CA's public key is authenticated via the checking of the CA fingerprint,
as specified in Section 2.1.2, and the SCEP client's public key is
authenticated through the manual authentication or pre-shared secret
authentication, as specified in Section 2.1.1.2. The third goal is met
through the use of a Challenge Password for revocation, that is chosen
by the SCEP client and communicated to the CA protected by the PKCS#7
encryption, as specified in Section 2.2.4.
The motivation of the first security goal is straightforward. The
motivation for the second security goal is to protect the identity
information in the enrollment requests and certificates. For example,
two IPSEC hosts behind a firewall may need to exchange certificates, and
may need to enroll certificates with a CA that is outside of a firewall.
Most networks with firewalls seek to prevent IP addresses and DNS
Liu/Madson/McGrew/Nourse [Page 13]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
information from the trusted network leaving that network. The second
goal enables the hosts in this example to enroll with a CA outside the
firewall without revealing this information. The motivation for the
third security goal is to protect the SCEP clients from denial of
service attacks.
Section 3 Transport Protocol
In the SCEP protocol, HTTP is used as the transport protocol for the PKI
messages.
3.1 HTTP "GET" and "POST" Message Format
The following is the syntax definition of a HTTP GET message sent from
a requester to a certificate authority server:
Request = "GET " CGI-PATH CGI-PROG "?operation=" OPERATION "&message=" MESSAGE
where:
CGI-PATH defines the actual CGI path to invoke the CGI program which
parses the request.
CGI-PROG is set to be the string "pkiclient.exe". This is intended
to be the program that the CA will use to handle the SCEP transactions,
though the CA may ignore CGI-PROG and use only the CGI-PATH.
OPERATION is set to be the string "PKIOperation" when the GET message
carries a PKI message to request certificates or CRL; OPERATION is set
to be the string "GetCACaps", "GetCACert", "GetNextCACert" or
"GetCACertChain" when the GET operation is used to get CA capabilities,
CA/RA certificate, the replacement CA/RA certificates for when the
current ones expire, or the CA Cert chain (respectively).
When OPERATION is "PKIOperation", MESSAGE is a base64-encoded PKI message,
When OPERATION is GetCACert, MESSAGE is a CRL distribution
point in URI format, otherwise, MESSAGE is a string which represents
the certificate authority issuer identifier.
SCEP uses the HTTP "GET" and "POST" messages to request information from the CA.
Requests for CA certificates or capabilities are sent in the clear, using "GET",
with the OPERATION and MESSAGE fields identifying the requested data.
CRLs may also be requested in the clear if the CA supports it.
Other types of requests are sent using the PKCS#7 secure protocol.
These may be issued by means of a GET operation with
OPERATION and MESSAGE parameters in the Request-URL. OPERATION
identifies the type of GET operation, and MESSAGE is actually the PKCS#7
message Base64-Encoded.
For example. a requester may submit a message via HTTP to the server
as follows:
GET /cgi-bin/pkiclient.exe?operation=PKIOperation&message=MIAGCSqGSIb3D
QEHA6CAMIACAQAxgDCBzAIBADB2MGIxETAPBgNVBAcTCE ......AAAAAA==
Liu/Madson/McGrew/Nourse [Page 13a]
If supported by the CA, the message may also be sent via HTTP POST:
POST /cgi-bin/pkiclient.exe?operation=PKIOperation
This is further described in Appendix H.
To determine if the CA supports POST, use the GetCACaps message described
in Appendix F.
3.2 Response Message Format
For each GET operation, the CA/RA server will return a MIME object via
HTTP. For a GET operation with PKIOperation as its type, the response is
tagged as having a Content Type of application/x-pki-message. The body
of this message is a BER encoded binary PKI message. The following is an
example of the response:
"Content-Type:application/x-pki-message\n\n"<BER-encoded PKI msg>
In the case of GET operation with a type of GetCACert the MIME content
type returned will depend on whether or not an RA is in use. If there
is no RA, only the CA certificate is sent back in the response, and
the response has the content type tagged as
application/x-x509-ca-cert. the body of the response is a DER encoded
binary X.509 certificate. For example:
"Content-Type:application/x-x509-ca-cert\n\n"<BER-encoded X509>
If there is an RA, the RA certificates are sent back together with the
CA certificates, a certificate-only PKCS#7 SignedData is sent back in
the response where the SignerInfo is empty. Section 5 has the detailed
definition of the message format in this case. The content type is
application/x-x509-ca-ra-cert.
The response to GetNextCACert is always a certificates-only PKCS#7
SignedData with a content type of application/x-x509-ca-ra-cert.
If there is an RA, The signer is the current RA certificate. Otherwise,
the signer is the current CA certificate.
If the CA supports it, PKIOperation may also be done via an HTTP POST.
This is described in Appendix H.
Liu/Madson/McGrew/Nourse [Page 14]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
Section 4 Secure Transportation: PKCS#7
PKCS#7 is a general enveloping mechanism that enables both signed and
encrypted transmission of arbitrary data. It is widely implemented and
included in the RSA tool kit. In this section, the general PKCS#7
enveloped PKI message format is specified. The complete PKCS#7 message
format for each PKI transaction will be covered in Section 5.
4.1 SCEP Message Format
As a transaction message, a SCEP message has a set of transaction
specific attributes and an information portion. Employing PKCS#7
protocol, the transaction specific attributes are encoded as a set of
authenticated attributes of the SignedData. The information portion will
first be encrypted to become Enveloped Data, and then the digest of the
enveloped information portion is included as one of the message digest
attributes and being signed together with the other transaction specific
attributes.
By applying both enveloping and signing transformations, a SCEP message
is protected both for the integrity of its end-end-transition
information and the confidentiality of its information portion. The
advantage of this technique over the conventional transaction message
format is that, the signed transaction type information and the status
of the transaction can be determined prior to invoke security handling
procedures specific to the information portion being processed.
The following is an example of a SCEP message with its enveloped and
signed data portion represented by pkcsPKISigned and
pkcsPKIEnveloped. The out-most of any PKI message is a blob of
ContentInfo, with its content type set to SignedData and the actual
signed data as the content.
Liu/Madson/McGrew/Nourse [Page 15]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
pkiMessage ContentInfo ::= {
contentType {pkcs-7 signedData(2)}
content pkcsPKISigned
}
pkcsPKISigned SignedData ::= {
version 1
digestAlgorithm { iso(1) member-body(2) US(840) rsadsi(113549)
digestAlgorithm(2) 5}
contentInfo {
contentType {pkcs-7 1} -- data content identifier
content pkcsPKIEnvelope -- enveloped information portion
}
certificates -- signer certificate chain
signerInfo -- including signed transaction info and the digest
-- of the enveloped information portion as the
-- authenticated attributes
}
pkcsPKIEnveloped EnvelopedData ::= {
version 0
recipientInfos -- information required to open the envelop
encryptedContentInfo {
contentType {pkcs-7 1} -- data content identifier
contentEncryptionAlgorithm
encryptedContent -- encrypted information portion
}
}
4.2 Signed Transaction Attributes
The following transaction attributes are encoded as authenticated
attributes. Please refer to Appendix B for the OID definitions.
transactionID PrintableString -- Decimal value as a string
messageType PrintableString -- Decimal value as a string
pkiStatus PrintableString -- Decimal value as a string
failinfo PrintableString -- Decimal value as a string
senderNonce Octet String
recipientNonce Octet String
where:
The transactionID is an attribute which uniquely identify a
transaction. This attribute is required in all PKI messages.
The messageType attribute specify the type of operation performed by the
transaction. This attribute is required in all PKI
messages. Currently, the following message types are defined:
PKCSReq (19) -- Permits use of PKCS#10 certificate request
CertRep (3) -- Response to certificate or CRL request
GetCertInitial (20) -- Certificate polling in manual enrollment
GetCert (21) -- Retrieve a certificate
GetCRL (22) -- Retrieve a CRL
Liu/Madson/McGrew/Nourse [Page 16]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
All response message will include transaction status information which
is defined as pkiStatus attribute:
SUCCESS (0) -- request granted
FAILURE (2) -- request rejected
PENDING (3) -- request pending for manual approval.
If the status in the response is FAILURE, the failinfo attribute will
contain one of the following failure reasons:
badAlg (0) -- Unrecognized or unsupported algorithm ident
badMessageCheck (1) -- integrity check failed
badRequest (2) -- transaction not permitted or supported
badTime (3) -- Message time field was not sufficiently close
to the system time
badCertId (4) -- No certificate could be identified matching
the provided criteria
The attributes of senderNonce and recipientNonce are the 16 byte
random numbers generated for each transaction to prevent the replay
attack.
When a requester sends a PKI message to the server, a senderNonce is
included in the message. After the server processes the request, it will
send back the requester senderNonce as the recipientNonce and generates
another nonce as the senderNonce in the response message. Because the
proposed pki protocol is a two-way communication protocol, it is clear
that the nonce can only be used by the requester to prevent the
replay. The server has to employ extra state related information to
prevent a replay attack.
Section 5. SCEP Transaction Specification
In this section each SCEP transaction is specified in terms of the
complete messages exchanged during the transaction.
5.1 Certificate Enrollment
The certificate enrollment transaction consists of one PKCSReq message
sent to the certificate authority from a requester, and one CertRep
message sent back from the server. The pkiStatus returned in the
response message is either SUCCESS, or FAILURE, or PENDING. The
information portion of a PKCSReq message is a PKCS#10 certificate
request, which contains the subject Distinguished Name, the subject
public key, and two attributes, a ChallengePassword attribute to be used
for revocation, and an optional ExtensionReq attribute which will be a
sequence of extensions the requester expects to be included in its V3
certificate extensions. One of the extension attribute specifies the key
usage. If the request is granted, the pkiStatus is set to SUCCESS, and
the certificate is returned in CertRep; if the request is rejected, the
Liu/Madson/McGrew/Nourse [Page 17]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
pkiStatus is set to FAILURE; if the server requires manual approval of
the request, the pkiStatus is set to PENDING. The messages exchanged
in the manual authentication mode is further specified in Section 5.2.
Precondition:
Both the requester and the certificate authority have completed their
initialization process. The requester has already been configured
with the CA/RA certificate.
Postcondition:
Either the certificate is received by the requester, or the end
entity is notified to do the manual authentication, or the request
is rejected.
5.1.1 PKCSReq Message Format
A PKCSReq message is created by following the steps defined below:
1. Create a PKCS#10 certificate request which is signed by the end
entity's private key, corresponding to the public key included in
the PKCS#10 certificate request. This constitutes the information
portion of PKCSReq.
2. Encrypt the PKCS#10 certificate request using a randomly generated
content-encryption key. This content-encryption key is then
encrypted by the CA's* public key and included in the recipientInfo.
This step completes the "envelope" for the PKCS#10 certificate
request.
3. Generate a unique string as the transaction id.
4. Generate a 16 byte random number as senderNonce.
5. Generate message digest on the enveloped PKCS#10 certificate request
using the selected digest algorithm.
6. Create SignedData by adding the requester's self- or CA-certificate
as the signer's public key certificate. Include the message type,
transaction id, the senderNonce and the message digest as the
authenticated attributes and sign the attributes using the end
entity's private key. This completes the SignedData.
7. The SignedData is prepended with the ContenInfo blob which indicates
a SignedData object. This final step completes the create of a
complete PKCSReq PKI message.
In the following, the PKCSReq message is defined following the ASN.1
notation.
For readability, the values of a field is either represented by a quoted
string which specifies the intended value, or a constant when the value
is known.
Liu/Madson/McGrew/Nourse [Page 18]
Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005
-- PKCSReq information portion
pkcsCertReq CertificationRequest ::= { -- PKCS#10
version 0
subject "the requester's subject name"
subjectPublicKeyInfo {
algorithm {pkcs-1 1} -- rsa encryption