summaryrefslogtreecommitdiff
path: root/third_party/heimdal/doc/standardisation/draft-ietf-cat-kerberos-pk-init-24.txt
blob: 2aed744ce1c18fc78d1422d48e43960475ee33af (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621



NETWORK WORKING GROUP                                            B. Tung
Internet-Draft                        USC Information Sciences Institute
Expires: August 11, 2005                                          L. Zhu
                                                   Microsoft Corporation
                                                        February 7, 2005


     Public Key Cryptography for Initial Authentication in Kerberos
                    draft-ietf-cat-kerberos-pk-init

Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of Section 3 of RFC 3667.  By submitting this Internet-Draft, each
   author represents that any applicable patent or other IPR claims of
   which he or she is aware have been or will be disclosed, and any of
   which he or she become aware will be disclosed, in accordance with
   RFC 3668.

   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 Internet-Draft will expire on August 11, 2005.

Copyright Notice

   Copyright (C) The Internet Society (2005).

Abstract

   This document describes protocol extensions (hereafter called PKINIT)
   to the Kerberos protocol specification.  These extensions provide a
   method for integrating public key cryptography into the initial
   authentication exchange, by using asymmetric-key signature and/or
   encryption algorithms in pre-authentication data fields.



Tung & Zhu               Expires August 11, 2005                [Page 1]

Internet-Draft                   PKINIT                    February 2005


Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  3
   3.  Extensions . . . . . . . . . . . . . . . . . . . . . . . . . .  4
     3.1   Definitions, Requirements, and Constants . . . . . . . . .  4
       3.1.1   Required Algorithms  . . . . . . . . . . . . . . . . .  4
       3.1.2   Defined Message and Encryption Types . . . . . . . . .  5
       3.1.3   Algorithm Identifiers  . . . . . . . . . . . . . . . .  6
     3.2   PKINIT Pre-authentication Syntax and Use . . . . . . . . .  6
       3.2.1   Generation of Client Request . . . . . . . . . . . . .  6
       3.2.2   Receipt of Client Request  . . . . . . . . . . . . . . 10
       3.2.3   Generation of KDC Reply  . . . . . . . . . . . . . . . 13
       3.2.4   Receipt of KDC Reply . . . . . . . . . . . . . . . . . 18
     3.3   KDC Indication of PKINIT Support . . . . . . . . . . . . . 20
   4.  Security Considerations  . . . . . . . . . . . . . . . . . . . 20
   5.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 21
   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 22
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 22
     7.1   Normative References . . . . . . . . . . . . . . . . . . . 22
     7.2   Informative References . . . . . . . . . . . . . . . . . . 23
       Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 23
   A.  PKINIT ASN.1 Module  . . . . . . . . . . . . . . . . . . . . . 24
       Intellectual Property and Copyright Statements . . . . . . . . 29



























Tung & Zhu               Expires August 11, 2005                [Page 2]

Internet-Draft                   PKINIT                    February 2005


1.  Introduction

   A client typically authenticates itself to a service in Kerberos
   using three distinct though related exchanges.  First, the client
   requests a ticket-granting ticket (TGT) from the Kerberos
   authentication server (AS).  Then, it uses the TGT to request a
   service ticket from the Kerberos ticket-granting server (TGS).
   Usually, the AS and TGS are integrated in a single device known as a
   Kerberos Key Distribution Center, or KDC.  (In this document, we will
   refer to both the AS and the TGS as the KDC.)  Finally, the client
   uses the service ticket to authenticate itself to the service.

   The advantage afforded by the TGT is that the client exposes his
   long-term secrets only once.  The TGT and its associated session key
   can then be used for any subsequent service ticket requests.  One
   result of this is that all further authentication is independent of
   the method by which the initial authentication was performed.
   Consequently, initial authentication provides a convenient place to
   integrate public-key cryptography into Kerberos authentication.

   As defined in [CLAR], Kerberos authentication exchanges use
   symmetric-key cryptography, in part for performance.  One
   disadvantage of using symmetric-key cryptography is that the keys
   must be shared, so that before a client can authenticate itself, he
   must already be registered with the KDC.

   Conversely, public-key cryptography (in conjunction with an
   established Public Key Infrastructure) permits authentication without
   prior registration with a KDC.  Adding it to Kerberos allows the
   widespread use of Kerberized applications by clients without
   requiring them to register first with a KDC--a requirement that has
   no inherent security benefit.

   As noted above, a convenient and efficient place to introduce
   public-key cryptography into Kerberos is in the initial
   authentication exchange.  This document describes the methods and
   data formats for integrating public-key cryptography into Kerberos
   initial authentication.

2.  Conventions Used in This Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].







Tung & Zhu               Expires August 11, 2005                [Page 3]

Internet-Draft                   PKINIT                    February 2005


3.  Extensions

   This section describes extensions to [CLAR] for supporting the use of
   public-key cryptography in the initial request for a ticket.

   Briefly, this document defines the following extensions to [CLAR]:

   1.  The client indicates the use of public-key authentication by
      including a special preauthenticator in the initial request.  This
      preauthenticator contains the client's public-key data and a
      signature.

   2.  The KDC tests the client's request against its authentication
      policy and trusted Certification Authorities (CAs).

   3.  If the request passes the verification tests, the KDC replies as
      usual, but the reply is encrypted using either:

      a.  a key generated through a Diffie-Hellman (DH) key exchange
         [RFC2631][IEEE1363] with the client, signed using the KDC's
         signature key; or

      b.  a symmetric encryption key, signed using the KDC's signature
         key and encrypted using the client's public key.

      Any keying material required by the client to obtain the
      encryption key for decrypting the KDC reply is returned in a
      pre-authentication field accompanying the usual reply.

   4.  The client validates the KDC's signature, obtains the encryption
      key, decrypts the reply, and then proceeds as usual.

   Section 3.1 of this document enumerates the required algorithms and
   necessary extension message types.  Section 3.2 describes the
   extension messages in greater detail.

3.1  Definitions, Requirements, and Constants

3.1.1  Required Algorithms

   All PKINIT implementations MUST support the following algorithms:

   o  AS reply key: AES256-CTS-HMAC-SHA1-96 etype [KCRYPTO].

   o  Signature algorithm: sha-1WithRSAEncryption [RFC3279].

   o  KDC AS reply key delivery method: Diffie-Hellman key exchange
      [RFC2631].



Tung & Zhu               Expires August 11, 2005                [Page 4]



3.1.2  Defined Message and Encryption Types

   PKINIT makes use of the following new pre-authentication types:

       PA_PK_AS_REQ                             16
       PA_PK_AS_REP                             17

   PKINIT also makes use of the following new authorization data type:

       AD_INITIAL_VERIFIED_CAS                   9

   PKINIT introduces the following new error codes:

       KDC_ERR_CLIENT_NOT_TRUSTED                   62
       KDC_ERR_INVALID_SIG                          64
       KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED       65
       KDC_ERR_CANT_VERIFY_CERTIFICATE              70
       KDC_ERR_INVALID_CERTIFICATE                  71
       KDC_ERR_REVOKED_CERTIFICATE                  72
       KDC_ERR_REVOCATION_STATUS_UNKNOWN            73
       KDC_ERR_CLIENT_NAME_MISMATCH                 75
       KDC_ERR_INCONSISTENT_KEY_PURPOSE             76

   PKINIT uses the following typed data types for errors:

       TD_TRUSTED_CERTIFIERS                    104
       TD_INVLID_CERTIFICATES                   105
       TD_DH_PARAMETERS                         109

   PKINIT defines the following encryption types, for use in the AS-REQ
   message to indicate acceptance of the corresponding algorithms that
   can used by Cryptographic Message Syntax (CMS) [RFC3852] messages in
   the reply:

       dsaWithSHA1-CmsOID                         9
       md5WithRSAEncryption-CmsOID               10
       sha1WithRSAEncryption-CmsOID              11
       rc2CBC-EnvOID                             12
       rsaEncryption-EnvOID   (PKCS1 v1.5)       13
       rsaES-OAEP-EnvOID      (PKCS1 v2.0)       14
       des-ede3-cbc-EnvOID                       15

   The ASN.1 module for all structures defined in this document (plus
   IMPORT statements for all imported structures) is given in
   Appendix A.

   All structures defined in or imported into this document MUST be
   encoded using Distinguished Encoding Rules (DER) [X690] (unless
   otherwise noted).  All data structures carried in OCTET STRINGs must



Tung & Zhu               Expires August 11, 2005                [Page 5]

Internet-Draft                   PKINIT                    February 2005


   be encoded according to the rules specified in corresponding
   specifications.

   Interoperability note: Some implementations may not be able to decode
   wrapped CMS objects encoded with BER but not DER; specifically, they
   may not be able to decode infinite length encodings.  To maximize
   interoperability, implementers SHOULD encode CMS objects used in
   PKINIT with DER.

3.1.3  Algorithm Identifiers

   PKINIT does not define, but does make use of, the following algorithm
   identifiers.

   PKINIT uses the following algorithm identifiers for Diffie-Hellman
   key agreement [RFC3279]:

        dhpublicnumber (Diffie-Hellman modulo a prime p [RFC2631])
        id-ecPublicKey (Elliptic Curve Diffie-Hellman [IEEE1363])

   PKINIT uses the following signature algorithm identifiers [RFC3279]:

       sha-1WithRSAEncryption (RSA with SHA1)
       md5WithRSAEncryption   (RSA with MD5)
       id-dsa-with-sha1       (DSA with SHA1)

   PKINIT uses the following encryption algorithm identifiers [RFC3447]
   for encrypting the temporary key with a public key:

       rsaEncryption          (PKCS1 v1.5)
       id-RSAES-OAEP          (PKCS1 v2.0)

   PKINIT uses the following algorithm identifiers [RFC3370][RFC3565]
   for encrypting the reply key with the temporary key:

       des-ede3-cbc           (three-key 3DES, CBC mode)
       rc2-cbc                (RC2, CBC mode)
       id-aes256-CBC          (AES-256, CBC mode)


3.2  PKINIT Pre-authentication Syntax and Use

   This section defines the syntax and use of the various
   pre-authentication fields employed by PKINIT.

3.2.1  Generation of Client Request

   The initial authentication request (AS-REQ) is sent as per [CLAR]; in



Tung & Zhu               Expires August 11, 2005                [Page 6]

Internet-Draft                   PKINIT                    February 2005


   addition, a pre-authentication data element, whose padata-type is
   PA_PK_AS_REQ and whose padata-value contains the DER encoding of the
   type PA-PK-AS-REQ, is included.

       PA-PK-AS-REQ ::= SEQUENCE {
          signedAuthPack          [0] IMPLICIT OCTET STRING,
                   -- Contains a CMS type ContentInfo encoded
                   -- according to [RFC3852].
                   -- The contentType field of the type ContentInfo
                   -- is id-signedData (1.2.840.113549.1.7.2),
                   -- and the content field is a SignedData.
                   -- The eContentType field for the type SignedData is
                   -- id-pkauthdata (1.3.6.1.5.2.3.1), and the
                   -- eContent field contains the DER encoding of the
                   -- type AuthPack.
                   -- AuthPack is defined below.
          trustedCertifiers       [1] SEQUENCE OF TrustedCA OPTIONAL,
                   -- A list of CAs, trusted by the client, that can
                   -- be used as the trust anchor to validate the KDC's
                   -- signature.
                   -- Each TrustedCA identifies a CA or a CA
                   -- certificate (thereby its public key).
          kdcPkId                 [2] IMPLICIT OCTET STRING
                                      OPTIONAL,
                   -- Contains a CMS type SignerIdentifier encoded
                   -- according to [RFC3852].
                   -- Identifies, if present, a particular KDC
                   -- public key that the client already has.
          ...
       }

       DHNonce ::= OCTET STRING

       TrustedCA ::= CHOICE {
          caName                  [1] IMPLICIT OCTET STRING,
                   -- Contains a PKIX type Name encoded according to
                   -- [RFC3280].
                   -- Identifies a CA.
                   -- Prefer the sid field below if that is available.
          sid                     [2] IMPLICIT OCTET STRING,
                   -- Contains a CMS type SignerIdentifier encoded
                   -- according to [RFC3852].
                   -- Identifies the trusted CA's certificate (and
                   -- thereby the public key).
          ...
       }

       AuthPack ::= SEQUENCE {



Tung & Zhu               Expires August 11, 2005                [Page 7]

Internet-Draft                   PKINIT                    February 2005


          pkAuthenticator         [0] PKAuthenticator,
          clientPublicValue       [1] SubjectPublicKeyInfo OPTIONAL,
                   -- Defined in [RFC3280].
                   -- The pubic key value (the subjectPublicKey field
                   -- of the type SubjectPublicKeyInfo) MUST be encoded
                   -- according to [RFC3279].
                   -- Present only if the client wishes to use the
                   -- Diffie-Hellman key agreement method.
          supportedCMSTypes       [2] SEQUENCE OF AlgorithmIdentifier
                                      OPTIONAL,
                   -- List of CMS encryption types supported by
                   -- client in order of (decreasing) preference.
          clientDHNonce           [3] DHNonce OPTIONAL,
                   -- Present only if the client indicates that it
                   -- wishes to reuse DH keys or to allow the KDC to
                   -- do so (see Section 3.2.3.1).
          ...
       }

       PKAuthenticator ::= SEQUENCE {
          cusec                   [0] INTEGER (0..999999),
          ctime                   [1] KerberosTime,
                   -- cusec and ctime are used as in [CLAR], for replay
                   -- prevention.
          nonce                   [2] INTEGER (0..4294967295),
                   -- Chosen randomly;  This nonce does not need to
                   -- match with the nonce in the KDC-REQ-BODY.
          paChecksum              [3] OCTET STRING,
                   -- Contains the SHA1 checksum, performed over
                   -- KDC-REQ-BODY.
          ...
       }

   The ContentInfo [RFC3852] structure for the signedAuthPack field is
   filled out as follows:

   1.  The contentType field of the type ContentInfo is id-signedData
       (as defined in [RFC3852]), and the content field is a SignedData
       (as defined in [RFC3852]).

   2.  The eContentType field for the type SignedData is id-pkauthdata:
       { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
       pkinit(3) pkauthdata(1) }.

   3.  The eContent field for the type SignedData contains the DER
       encoding of the type AuthPack.





Tung & Zhu               Expires August 11, 2005                [Page 8]

Internet-Draft                   PKINIT                    February 2005


   4.  The signerInfos field of the type SignedData contains a single
       signerInfo, which contains the signature over the type AuthPack.

   5.  The certificates field of the type SignedData contains
       certificates intended to facilitate certification path
       construction, so that the KDC can verify the signature over the
       type AuthPack.  For path validation, these certificates SHOULD be
       sufficient to construct at least one certification path from the
       client certificate to one trust anchor acceptable by the KDC
       [CAPATH].  If the client sends all the X.509 certificates on a
       certification path to a trust anchor acceptable by the KDC and
       the KDC can not verify the client's public key otherwise, the KDC
       MUST process path validation for the client's X.509 certificate
       based on the certificates in the request.  The certificates field
       MUST NOT contain "root" CA certificates.

   6.  The client's Diffie-Hellman public value (clientPublicValue) is
       included if and only if the client wishes to use the
       Diffie-Hellman key agreement method.  For the Diffie-Hellman key
       agreement method, implementations MUST support Oakley 1024-bit
       MODP well-known group 2 [RFC2412] and SHOULD support Oakley
       2048-bit MODP well-known group 14 and Oakley 4096-bit MODP
       well-known group 16 [RFC3526].

       The Diffie-Hellman field size should be chosen so as to provide
       sufficient cryptographic security.  The following table, based on
       [LENSTRA], gives approximate comparable key sizes for symmetric-
       and asymmetric-key cryptosystems based on the best-known
       algorithms for attacking them.

                  Symmetric    |  ECC    |  DH/DSA/RSA
                  -------------+---------+------------
                     80        |  163    |  1024
                    112        |  233    |  2048
                    128        |  283    |  3072
                    192        |  409    |  7680
                    256        |  571    |  15360

                 Table 1: Comparable key sizes (in bits)

       When Diffie-Hellma modulo a prime p is used, the exponents should
       have at least twice as many bits as the symmetric keys that will
       be derived from them [ODL99].

   7.  The client may wish to reuse DH keys or to allow the KDC to do so
       (see Section 3.2.3.1).  If so, then the client includes the
       clientDHNonce field.  This nonce string needs to be as long as
       the longest key length of the symmetric key types that the client



Tung & Zhu               Expires August 11, 2005                [Page 9]

Internet-Draft                   PKINIT                    February 2005


       supports.  This nonce MUST be chosen randomly.


3.2.2  Receipt of Client Request

   Upon receiving the client's request, the KDC validates it.  This
   section describes the steps that the KDC MUST (unless otherwise
   noted) take in validating the request.

   The KDC verifies the client's signature in the signedAuthPack field
   according to [RFC3852].

   If, while validating the client's X.509 certificate [RFC3280], the
   KDC cannot build a certification path to validate the client's
   certificate, it sends back a KRB-ERROR [CLAR] message with the code
   KDC_ERR_CANT_VERIFY_CERTIFICATE.  The accompanying e-data for this
   error message is a TYPED-DATA (as defined in [CLAR]) that contains an
   element whose data-type is TD_TRUSTED_CERTIFIERS, and whose
   data-value contains the DER encoding of the type
   TD-TRUSTED-CERTIFIERS:

       TD-TRUSTED-CERTIFIERS ::= SEQUENCE OF TrustedCA
                   -- Identifies a list of CAs trusted by the KDC.
                   -- Each TrustedCA identifies a CA or a CA
                   -- certificate (thereby its public key).

   Upon receiving this error message, the client SHOULD retry only if it
   has a different set of certificates (from those of the previous
   requests) that form a certification path (or a partial path) from one
   of the trust anchors selected by the KDC to its own certificate.

   If, while processing the certification path, the KDC determines that
   the signature on one of the certificates in the signedAuthPack field
   is invalid, it returns a KRB-ERROR [CLAR] message with the code
   KDC_ERR_INVALID_CERTIFICATE.  The accompanying e-data for this error
   message is a TYPED-DATA that contains an element whose data-type is
   TD_INVALID_CERTIFICATES, and whose data-value contains the DER
   encoding of the type TD-INVALID-CERTIFICATES:

       TD-INVALID-CERTIFICATES ::= SEQUENCE OF OCTET STRING
                   -- Each OCTET STRING contains a CMS type
                   -- IssuerAndSerialNumber encoded according to
                   -- [RFC3852].
                   -- Each IssuerAndSerialNumber indentifies a
                   -- certificate (sent by the client) with an invalid
                   -- signature.

   If more than one X.509 certificate signature is invalid, the KDC MAY



Tung & Zhu               Expires August 11, 2005               [Page 10]

Internet-Draft                   PKINIT                    February 2005


   send one TYPED-DATA element per invalid signature.

   Based on local policy, the KDC may also check whether any X.509
   certificates in the certification path validating the client's
   certificate have been revoked.  If any of them have been revoked, the
   KDC MUST return an error message with the code
   KDC_ERR_REVOKED_CERTIFICATE; if the KDC attempts to determine the
   revocation status but is unable to do so, it SHOULD return an error
   message with the code KDC_ERR_REVOCATION_STATUS_UNKNOWN.  The
   certificate or certificates affected are identified exactly as for
   the error code KDC_ERR_INVALID_CERTIFICATE (see above).

   The client's public key is then used to verify the signature.  If the
   signature fails to verify, the KDC MUST return an error message with
   the code KDC_ERR_INVALID_SIG.  There is no accompanying e-data for
   this error message.

   In addition to validating the client's signature, the KDC MUST also
   check that the client's public key used to verify the client's
   signature is bound to the client's principal name as specified in the
   AS-REQ as follows:

   1.  If the KDC has its own binding between either the client's
      signature-verification public key or the client's certificate and
      the client's Kerberos principal name, it uses that binding.

   2.  Otherwise, if the client's X.509 certificate contains a
      SubjectAltName extension with a KRB5PrincipalName (defined below)
      in the otherName field, it binds the client's X.509 certificate to
      that name.

      The otherName field (of type AnotherName) in the SubjectAltName
      extension MUST contain KRB5PrincipalName as defined below.

      The type-id field of the type AnotherName is id-pksan:

       id-pksan OBJECT IDENTIFIER ::=
         { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
           x509-sanan (2) }

      The value field of the type AnotherName is the DER encoding of the
      following ASN.1 type:

       KRB5PrincipalName ::= SEQUENCE {
           realm                   [0] Realm,
           principalName           [1] PrincipalName
       }




Tung & Zhu               Expires August 11, 2005               [Page 11]

Internet-Draft                   PKINIT                    February 2005


   If the KDC does not have its own binding and there is no
   KRB5PrincipalName name present in the client's X.509 certificate, and
   if the Kerberos name in the request does not match the
   KRB5PrincipalName in the client's X.509 certificate (including the
   realm name), the KDC MUST return an error message with the code
   KDC_ERR_CLIENT_NAME_MISMATCH.  There is no accompanying e-data for
   this error message.

   The KDC MAY require the presence of an Extended Key Usage (EKU)
   KeyPurposeId [RFC3280] id-pkekuoid in the extensions field of the
   client's X.509 certificate:

       id-pkekuoid OBJECT IDENTIFIER ::=
         { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
           pkinit(3) pkekuoid(4) }
              -- PKINIT client authentication.
              -- Key usage bits that MUST be consistent:
              -- digitalSignature;
              -- Key usage bits that MAY be consistent:
              -- nonRepudiation, and (keyEncipherment or keyAgreement).

   If this EKU is required but is missing, the KDC MUST return an error
   message of the code KDC_ERR_INCONSISTENT_KEY_PURPOSE.  There is no
   accompanying e-data for this error message.  KDCs implementing this
   requirement SHOULD also accept the EKU KeyPurposeId id-ms-sc-logon
   (1.3.6.1.4.1.311.20.2.2) as meeting the requirement, as there are a
   large number of X.509 client certificates deployed for use with
   PKINIT which have this EKU.

   If for any other reasons, the client's public key is not accepted,
   the KDC MUST return an error message with the code
   KDC_ERR_CLIENT_NOT_TRUSTED.

   The KDC MUST check the timestamp to ensure that the request is not a
   replay, and that the time skew falls within acceptable limits.  The
   recommendations for clock skew times in [CLAR] apply here.  If the
   check fails, the KDC MUST return error code KRB_AP_ERR_REPEAT or
   KRB_AP_ERR_SKEW, respectively.

   If the clientPublicValue is filled in, indicating that the client
   wishes to use the Diffie-Hellman key agreement method, the KDC SHOULD
   check to see if the key parameters satisfy its policy.  If they do
   not, it MUST return an error message with the code
   KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED.  The accompanying e-data is a
   TYPED-DATA that contains an element whose data-type is
   TD_DH_PARAMETERS, and whose data-value contains the DER encoding of
   the type TD-DH-PARAMETERS:




Tung & Zhu               Expires August 11, 2005               [Page 12]

Internet-Draft                   PKINIT                    February 2005


       TD-DH-PARAMETERS ::= SEQUENCE OF DHDomainParameters
                   -- Contains a list of Diffie-Hellman domain
                   -- parameters in decreasing preference order.

       DHDomainParameters ::= CHOICE {
           modp                   [0] DomainParameters,
                   -- Type DomainParameters is defined in [RFC3279].
           ec                     [1] EcpkParameters,
                   -- Type EcpkParameters is defined in [RFC3279].
           ...
       }

   TD-DH-PARAMETERS contains a list of Diffie-Hellman domain parameters
   that the KDC supports in decreasing preference order, from which the
   client SHOULD pick one to retry the request.

   If the client included a kdcPkId field in the PA-PK-AS-REQ and the
   KDC does not have the corresponding key, the KDC MUST ignore the
   kdcPkId field as if the client did not include one.

   If the client included a trustedCertifiers field, and the KDC does
   not possesses the private key for any one of the listed certifiers,
   the KDC MUST ignore the trustedCertifiers field as if the client did
   not include one.

   If there is a supportedCMSTypes field in the AuthPack, the KDC must
   check to see if it supports any of the listed types.  If it supports
   more than one of the types, the KDC SHOULD use the one listed first.
   If it does not support any of them, it MUST return an error message
   with the code KDC_ERR_ETYPE_NOSUPP [CLAR].

3.2.3  Generation of KDC Reply

   Assuming that the client's request has been properly validated, the
   KDC proceeds as per [CLAR], except as follows.

   The KDC MUST set the initial flag and include an authorization data
   element of ad-type [CLAR] AD_INITIAL_VERIFIED_CAS in the issued
   ticket.  The ad-data [CLAR] field contains the DER encoding of the
   type AD-INITIAL-VERIFIED-CAS:

       AD-INITIAL-VERIFIED-CAS ::= SEQUENCE OF TrustedCA
                   -- Identifies the certification path based on which
                   -- the client certificate was validated.
                   -- Each TrustedCA identifies a CA or a CA
                   -- certificate (thereby its public key).

   The KDC MUST wrap any AD-INITIAL-VERIFIED-CAS data in AD-IF-RELEVANT



Tung & Zhu               Expires August 11, 2005               [Page 13]

Internet-Draft                   PKINIT                    February 2005


   containers.  Furthermore, any TGS MUST copy such authorization data
   from tickets used in a PA-TGS-REQ [CLAR] of the TGS-REQ to the
   resulting ticket.  Upon receipt of a service ticket carrying the
   AD-INITIAL-VERIFIED-CAS data, application servers MAY apply local
   policy to determine whether the authorization data is acceptable.

   The content of the AS-REP is otherwise unchanged from [CLAR].  The
   KDC encrypts the reply as usual, but not with the client's long-term
   key.  Instead, it encrypts it with either a shared key derived from a
   Diffie-Hellman exchange, or a generated encryption key.  The contents
   of the PA-PK-AS-REP indicate which key delivery method is used:

       PA-PK-AS-REP ::= CHOICE {
          dhInfo                  [0] DHRepInfo,
                   -- Selected when Diffie-Hellman key exchange is
                   -- used.
          encKeyPack              [1] IMPLICIT OCTET STRING,
                   -- Selected when public key encryption is used.
                   -- Contains a CMS type ContentInfo encoded
                   -- according to [RFC3852].
                   -- The contentType field of the type ContentInfo is
                   -- id-envelopedData (1.2.840.113549.1.7.3).
                   -- The content field is an EnvelopedData.
                   -- The contentType field for the type EnvelopedData
                   -- is id-signedData (1.2.840.113549.1.7.2).
                   -- The eContentType field for the inner type
                   -- SignedData (when unencrypted) is id-pkrkeydata
                   -- (1.2.840.113549.1.7.3) and the eContent field
                   -- contains the DER encoding of the type
                   -- ReplyKeyPack.
                   -- ReplyKeyPack is defined in Section 3.2.3.2.
          ...
       }

       DHRepInfo ::= SEQUENCE {
          dhSignedData            [0] IMPLICIT OCTET STRING,
                   -- Contains a CMS type ContentInfo encoded according
                   -- to [RFC3852].
                   -- The contentType field of the type ContentInfo is
                   -- id-signedData (1.2.840.113549.1.7.2), and the
                   -- content field is a SignedData.
                   -- The eContentType field for the type SignedData is
                   -- id-pkdhkeydata (1.3.6.1.5.2.3.2), and the
                   -- eContent field contains the DER encoding of the
                   -- type KDCDHKeyInfo.
                   -- KDCDHKeyInfo is defined below.
          serverDHNonce           [1] DHNonce OPTIONAL
                   -- Present if and only if dhKeyExpiration is



Tung & Zhu               Expires August 11, 2005               [Page 14]

Internet-Draft                   PKINIT                    February 2005


                   -- present in the KDCDHKeyInfo.
       }

       KDCDHKeyInfo ::= SEQUENCE {
          subjectPublicKey        [0] BIT STRING,
                   -- KDC's DH public key.
                   -- The DH pubic key value is mapped to a BIT STRING
                   -- according to [RFC3279].
          nonce                   [1] INTEGER (0..4294967295),
                   -- Contains the nonce in the PKAuthenticator of the
                   -- request if DH keys are NOT reused,
                   -- 0 otherwise.
          dhKeyExpiration         [2] KerberosTime OPTIONAL,
                   -- Expiration time for KDC's key pair,
                   -- present if and only if DH keys are reused. If
                   -- this field is omitted then the serverDHNonce
                   -- field MUST also be omitted. See Section 3.2.3.1.
          ...
       }


3.2.3.1  Using Diffie-Hellman Key Exchange

   In this case, the PA-PK-AS-REP contains a DHRepInfo structure.

   The ContentInfo [RFC3852] structure for the dhSignedData field is
   filled in as follows:

   1.  The contentType field of the type ContentInfo is id-signedData
       (as defined in [RFC3852]), and the content field is a SignedData
       (as defined in [RFC3852]).

   2.  The eContentType field for the type SignedData is the OID value
       for id-pkdhkeydata: { iso(1) org(3) dod(6) internet(1)
       security(5) kerberosv5(2) pkinit(3) pkdhkeydata(2) }.

   3.  The eContent field for the type SignedData contains the DER
       encoding of the type KDCDHKeyInfo.

   4.  The signerInfos field of the type SignedData contains a single
       signerInfo, which contains the signature over the type
       KDCDHKeyInfo.

   5.  The certificates field of the type SignedData contains
       certificates intended to facilitate certification path
       construction, so that the client can verify the KDC's signature
       over the type KDCDHKeyInfo.  This field may only be left empty if
       the KDC public key specified by the kdcPkId field in the



Tung & Zhu               Expires August 11, 2005               [Page 15]

Internet-Draft                   PKINIT                    February 2005


       PA-PK-AS-REQ was used for signing.  Otherwise, for path
       validation, these certificates SHOULD be sufficient to construct
       at least one certification path from the KDC certificate to one
       trust anchor acceptable by the client [CAPATH].  If the KDC sends
       all the X.509 certificates on a certification path to a trust
       anchor acceptable by the client and the client can not verify the
       KDC's public key otherwise, the client MUST process path
       validation for the KDC's X.509 certificate based on the
       certificates in the reply.  The certificates field MUST NOT
       contain "root" CA certificates.

   6.  If the client included the clientDHNonce field, then the KDC may
       choose to reuse its DH keys (see Section 3.2.3.1).  If the server
       reuses DH keys then it MUST include an expiration time in the
       dhKeyExperiation field.  Past the point of the expiration time,
       the signature over the type DHRepInfo is considered
       expired/invalid.  When the server reuses DH keys then it MUST
       include a serverDHNonce at least as long as the length of keys
       for the symmetric encryption system used to encrypt the AS reply.
       Note that including the serverDHNonce changes how the client and
       server calculate the key to use to encrypt the reply; see below
       for details.  The KDC SHOULD NOT reuse DH keys unless the
       clientDHNonce field is present in the request.

   The reply key for use to decrypt the KDC reply [CLAR] is derived as
   follows:

   1.  Both the KDC and the client calculate the shared secret value as
      follows:

      a) When Diffie-Hellman modulo a prime p ([RFC2631]) is used, let
         DHSharedSecret be the shared secret value.

      b) When Elliptic Curve Diffie-Hellman (ECDH) (with each party
         contributing one key pair) [IEEE1363] is used, let
         DHSharedSecret be the x-coordinate of the shared secret value
         (an elliptic curve point).

      DHSharedSecret is first padded with leading zeros such that the
      size of DHSharedSecret in octets is the same as that of the
      modulus, then represented as a string of octets in big-endian
      order.

      Implementation note: Both the client and the KDC can cache the
      triple (ya, yb, DHSharedSecret), where ya is the client's public
      key and yb is the KDC's public key.  If both ya and yb are the
      same in a later exchange, the cached DHSharedSecret can be used.




Tung & Zhu               Expires August 11, 2005               [Page 16]

Internet-Draft                   PKINIT                    February 2005


   2.  Let K be the key-generation seed length [KCRYPTO] of the reply
      key whose enctype is selected according to [CLAR].

   3.  Define the function octetstring2key() as follows:

           octetstring2key(x) == random-to-key(K-truncate(
                                    SHA1(0x00 | x) |
                                    SHA1(0x01 | x) |
                                    SHA1(0x02 | x) |
                                    ...
                                    ))

      where x is an octet string; | is the concatenation operator; 0x00,
      0x01, 0x02, etc., are each represented as a single octet;
      random-to-key() is an operation that generates a protocol key from
      a bitstring of length K; and K-truncate truncates its input to the
      first K bits.  Both K and random-to-key() are as defined in the
      kcrypto profile [KCRYPTO] for the enctype of the reply key.

   4.  When DH keys are reused, let n_c be the clientDHNonce, and n_k be
      the serverDHNonce; otherwise, let both n_c and n_k be empty octet
      strings.

   5.  The reply key k is:

           k = octetstring2key(DHSharedSecret | n_c | n_k)


3.2.3.2  Using Public Key Encryption

   In this case, the PA-PK-AS-REP contains a ContentInfo structure
   wrapped in an OCTET STRING.  The reply key for use to decrypt the KDC
   reply [CLAR] is encrypted in the encKeyPack field, which contains
   data of type ReplyKeyPack:

       ReplyKeyPack ::= SEQUENCE {
          replyKey                [0] EncryptionKey,
                   -- Contains the session key used to encrypt the
                   -- enc-part field in the AS-REP.
          nonce                   [1] INTEGER (0..4294967295),
                   -- Contains the nonce in the PKAuthenticator of the
                   -- request.
          ...
       }

   The ContentInfo [RFC3852] structure for the encKeyPack field is
   filled in as follows:




Tung & Zhu               Expires August 11, 2005               [Page 17]

Internet-Draft                   PKINIT                    February 2005


   1.  The contentType field of the type ContentInfo is id-envelopedData
       (as defined in [RFC3852]), and the content field is an
       EnvelopedData (as defined in [RFC3852]).

   2.  The contentType field for the type EnvelopedData is
       id-signedData: { iso (1) member-body (2) us (840) rsadsi (113549)
       pkcs (1) pkcs7 (7) signedData (2) }.

   3.  The eContentType field for the inner type SignedData (when
       decrypted from the encryptedContent field for the type
       EnvelopedData) is id-pkrkeydata: { iso(1) org(3) dod(6)
       internet(1) security(5) kerberosv5(2) pkinit(3) pkrkeydata(3) }.

   4.  The eContent field for the inner type SignedData contains the DER
       encoding of the type ReplyKeyPack.

   5.  The signerInfos field of the inner type SignedData contains a
       single signerInfo, which contains the signature over the type
       ReplyKeyPack.

   6.  The certificates field of the inner type SignedData contains
       certificates intended to facilitate certification path
       construction, so that the client can verify the KDC's signature
       over the type ReplyKeyPack.  This field may only be left empty if
       the KDC public key specified by the kdcPkId field in the
       PA-PK-AS-REQ was used for signing.  Otherwise, for path
       validation, these certificates SHOULD be sufficient to construct
       at least one certification path from the KDC certificate to one
       trust anchor acceptable by the client [CAPATH].  If the KDC sends
       all the X.509 certificates on a certification path to a trust
       anchor acceptable by the client and the client can not verify the
       KDC's public key otherwise, the client MUST process path
       validation for the KDC's X.509 certificate based on the
       certificates in the reply.  The certificates field MUST NOT
       contain "root" CA certificates.

   7.  The recipientInfos field of the type EnvelopedData is a SET which
       MUST contain exactly one member of type KeyTransRecipientInfo.
       The encryptedKey of this member contains the temporary key which
       is encrypted using the client's public key.

   8.  The unprotectedAttrs or originatorInfo fields of the type
       EnvelopedData MAY be present.

3.2.4  Receipt of KDC Reply

   Upon receipt of the KDC's reply, the client proceeds as follows.  If
   the PA-PK-AS-REP contains the dhSignedData field, the client derives



Tung & Zhu               Expires August 11, 2005               [Page 18]

Internet-Draft                   PKINIT                    February 2005


   the reply key using the same procedure used by the KDC as defined in
   Section 3.2.3.1.  Otherwise, the message contains the encKeyPack
   field, and the client decrypts and extracts the temporary key in the
   encryptedKey field of the member KeyTransRecipientInfo, and then uses
   that as the reply key.

   In either case, the client MUST verify the signature in the
   SignedData according to [RFC3852].  Unless the client can otherwise
   prove that the public key used to verify the KDC's signature is bound
   to the target KDC, it MUST verify the responder's identity as
   follows:

   1.  The KDC's X.509 certificate MUST contain the EKU KeyPurposeId
      [RFC3280] id-pkkdcekuoid:

       id-pkkdcekuoid OBJECT IDENTIFIER ::=
         { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
           pkinit(3) pkkdcekuoid(5) }
              -- Signing KDC responses.
              -- Key usage bits that MUST be consistent:
              -- digitalSignature.

   2.  The KDC's X.509 certificate MUST contain a Subject Alternative
      Name (SAN) extension [RFC3280] carrying an AnotherName whose
      type-id is id-pksan (as defined in Section 3.2.2) and whose value
      contains a KRB5PrincipalName name, and the realm name of that
      KRB5PrincipalName matches the realm name of the target KDC.  If no
      such SAN extension is present in the KDC's certificate, the client
      SHOULD accept the KDC's certificate as meeting this requirement if
      the KDC's X.509 certificate contains an SAN extension carrying a
      dNSName and that name value matches the domain style realm name
      [CLAR] of the target KDC.  The KDC's certificate SHOULD also be
      accepted if it contains an SAN extension carrying a dNSName or an
      iPAddress (if the KDC is specified by an IP address instead of a
      name) and that name value matches the hostname or the IP address
      of the KDC with which the client believes it is communicating.  If
      the KDC's hostname or IP address is used to match the dNSName
      value, it MUST have been obtained securely.  Matching rules used
      for the dNSName value are specified in [RFC3280].

      Implementation note: CAs issuing KDC certificates SHOULD place all
      "short" and "fully-qualified" realm names of the KDC (one per SAN
      id-pksan extension) into the KDC certificate to allow maximum
      flexibility.

   If all applicable checks are satisfied, the client then decrypts the
   enc-part of the KDC-REP in the AS-REP with the reply key, and then
   proceeds as described in [CLAR].



Tung & Zhu               Expires August 11, 2005               [Page 19]

Internet-Draft                   PKINIT                    February 2005


3.3  KDC Indication of PKINIT Support

   If pre-authentication is required, but was not present in the
   request, per [CLAR] an error message with the code
   KDC_ERR_PREAUTH_FAILED is returned and a METHOD-DATA object will be
   stored in the e-data field of the KRB-ERROR message to specify which
   pre-authentication mechanisms are acceptable.  The KDC can then
   indicate the support of PKINIT by including an element whose
   padata-type is PA_PK_AS_REQ in that METHOD-DATA object.

   Otherwise if it is required by the KDC's local policy that the client
   must be pre-authenticated using the pre-authentication mechanism
   specified in this document, but no PKINIT pre-authentication was
   present in the request, an error message with the code
   KDC_ERR_PREAUTH_FAILED SHOULD be returned.

   KDCs MUST leave the padata-value of PA_PK_AS_REQ entry in the
   KRB-ERROR's METHOD-DATA empty (i.e., send a zero-length OCTET
   STRING), and clients MUST ignore this and any other value.  Future
   extensions to this protocol may specify other data to send instead of
   an empty OCTET STRING.

4.  Security Considerations

   PKINIT raises certain security considerations beyond those that can
   be regulated strictly in protocol definitions.  We will address them
   in this section.

   Users of PKINIT must understand security policies and procedures
   appropriate to the use of Public Key Infrastructures [RFC3280].

   Standard Kerberos allows the possibility of interactions between
   cryptosystems of varying strengths; this document adds interactions
   with public-key cryptosystems to Kerberos.  Some administrative
   policies may allow the use of relatively weak public keys.  Using
   such keys to wrap data encrypted under stronger conventional
   cryptosystems may be inappropriate.

   PKINIT requires keys for symmetric cryptosystems to be generated.
   Some such systems contain "weak" keys.  For recommendations regarding
   these weak keys, see [CLAR].

   PKINIT allows the use of the same RSA key pair for encryption and
   signing when doing RSA encryption based key delivery.  This is not
   recommended usage of RSA keys [RFC3447], by using DH based key
   delivery this is avoided.

   Care should be taken in how certificates are chosen for the purposes



Tung & Zhu               Expires August 11, 2005               [Page 20]

Internet-Draft                   PKINIT                    February 2005


   of authentication using PKINIT.  Some local policies may require that
   key escrow be used for certain certificate types.  Deployers of
   PKINIT should be aware of the implications of using certificates that
   have escrowed keys for the purposes of authentication.  Because
   signing only certificates are normally not escrowed, by using DH
   based key delivery this is avoided.

   PKINIT does not provide for a "return routability" test to prevent
   attackers from mounting a denial-of-service attack on the KDC by
   causing it to perform unnecessary and expensive public-key
   operations.  Strictly speaking, this is also true of standard
   Kerberos, although the potential cost is not as great, because
   standard Kerberos does not make use of public-key cryptography.  By
   using DH based key delivery and reusing DH keys, the necessary crypto
   processing cost per request can be minimized.

   The syntax for the AD-INITIAL-VERIFIED-CAS authorization data does
   permit empty SEQUENCEs to be encoded.  Such empty sequences may only
   be used if the KDC itself vouches for the user's certificate.

5.  Acknowledgements

   The following people have made significant contributions to this
   draft: Paul Leach, Kristin Lauter, Sam Hartman, Love Hornquist
   Astrand, Ken Raeburn, Nicolas Williams, John Wray, Jonathan Trostle,
   Tom Yu, Jeffrey Hutzelman, David Cross, Dan Simon and Karthik
   Jaganathan.

   Special thanks to Clifford Neuman, Matthew Hur and Sasha Medvinsky
   who wrote earlier versions of this document.

   The authors are indebt to the Kerberos working group chair Jeffrey
   Hutzelman who kept track of various issues and was enormously helpful
   during the creation of this document.

   Some of the ideas on which this document is based arose during
   discussions over several years between members of the SAAG, the IETF
   CAT working group, and the PSRG, regarding integration of Kerberos
   and SPX.  Some ideas have also been drawn from the DASS system.
   These changes are by no means endorsed by these groups.  This is an
   attempt to revive some of the goals of those groups, and this
   document approaches those goals primarily from the Kerberos
   perspective.

   Lastly, comments from groups working on similar ideas in DCE have
   been invaluable.





Tung & Zhu               Expires August 11, 2005               [Page 21]

Internet-Draft                   PKINIT                    February 2005


6.  IANA Considerations

   This document has no actions for IANA.

7.  References

7.1  Normative References

   [CLAR]     RFC-Editor: To be replaced by RFC number for draft-ietf-
              krb-wg-kerberos-clarifications.  Work in Progress. 

   [IEEE1363] 
              IEEE, "Standard Specifications for Public Key 
              Cryptography", IEEE 1363, 2000.

   [KCRYPTO]  RFC-Editor: To be replaced by RFC number for draft-ietf-
              krb-wg-crypto.  Work in Progress. 

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2412]  Orman, H., "The OAKLEY Key Determination Protocol",
              RFC 2412, November 1998.

   [RFC2631]  Rescorla, E., "Diffie-Hellman Key Agreement Method",
              RFC 2631, June 1999.

   [RFC3279]  Bassham, L., Polk, W. and R. Housley, "Algorithms and
              Identifiers for the Internet X.509 Public Key
              Infrastructure Certificate and Certificate Revocation List
              (CRL) Profile", RFC 3279, April 2002.

   [RFC3280]  Housley, R., Polk, W., Ford, W. and D. Solo, "Internet
              X.509 Public Key Infrastructure Certificate and
              Certificate Revocation List (CRL) Profile", RFC 3280,
              April 2002.

   [RFC3370]  Housley, R., "Cryptographic Message Syntax (CMS)
              Algorithms", RFC 3370, August 2002.

   [RFC3447]  Jonsson, J. and B. Kaliski, "Public-Key Cryptography
              Standards (PKCS) #1: RSA Cryptography Specifications
              Version 2.1", RFC 3447, February 2003.

   [RFC3526]  Kivinen, T. and M. Kojo, "More Modular Exponential (MODP)
              Diffie-Hellman groups for Internet Key Exchange (IKE)",
              RFC 3526, May 2003.



Tung & Zhu               Expires August 11, 2005               [Page 22]

Internet-Draft                   PKINIT                    February 2005


   [RFC3565]  Schaad, J., "Use of the Advanced Encryption Standard (AES)
              Encryption Algorithm in Cryptographic Message Syntax
              (CMS)", RFC 3565, July 2003.

   [RFC3852]  Housley, R., "Cryptographic Message Syntax (CMS)",
              RFC 3852, July 2004.

   [X690]     ASN.1 encoding rules: Specification of Basic Encoding  
              Rules (BER), Canonical Encoding Rules (CER) and
              Distinguished Encoding Rules (DER), ITU-T Recommendation
              X.690 (1997) | ISO/IEC International Standard
              8825-1:1998.

7.2  Informative References

   [CAPATH]   RFC-Editor: To be replaced by RFC number for draft-ietf-
              pkix-certpathbuild.  Work in Progress. 

   [LENSTRA]  Lenstra, A. and E. Verheul, "Selecting Cryptographic Key 
              Sizes", Journal of Cryptology 14 (2001) 255-293.
              
   [ODL99]    Odlyzko, A., "Discrete logarithms: The past and the
              future, Designs, Codes, and Cryptography (1999)". 


Authors' Addresses

   Brian Tung
   USC Information Sciences Institute
   4676 Admiralty Way Suite 1001, Marina del Rey CA
   Marina del Rey, CA  90292
   US

   Email: brian@isi.edu


   Larry Zhu
   Microsoft Corporation
   One Microsoft Way
   Redmond, WA  98052
   US

   Email: lzhu@microsoft.com

Appendix A.  PKINIT ASN.1 Module



Tung & Zhu               Expires August 11, 2005               [Page 23]

Internet-Draft                   PKINIT                    February 2005


       KerberosV5-PK-INIT-SPEC {
               iso(1) identified-organization(3) dod(6) internet(1)
               security(5) kerberosV5(2) modules(4) pkinit(5)
       } DEFINITIONS EXPLICIT TAGS ::= BEGIN

       IMPORTS
           SubjectPublicKeyInfo, AlgorithmIdentifier
               FROM PKIX1Explicit88 { iso (1)
                 identified-organization (3) dod (6) internet (1)
                 security (5) mechanisms (5) pkix (7) id-mod (0)
                 id-pkix1-explicit (18) }
                 -- As defined in RFC 3280.

           DomainParameters, EcpkParameters
               FROM PKIX1Algorithms88 { iso(1)
                 identified-organization(3) dod(6)
                 internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
                 id-mod-pkix1-algorithms(17) }
                 -- As defined in RFC 3279.

           KerberosTime, TYPED-DATA, PrincipalName, Realm, EncryptionKey
               FROM KerberosV5Spec2 { iso(1) identified-organization(3)
                 dod(6) internet(1) security(5) kerberosV5(2)
                 modules(4) krb5spec2(2) } ;

       id-pkinit OBJECT IDENTIFIER ::=
         { iso (1) org (3) dod (6) internet (1) security (5)
           kerberosv5 (2) pkinit (3) }

       id-pkauthdata  OBJECT IDENTIFIER  ::= { id-pkinit 1 }
       id-pkdhkeydata OBJECT IDENTIFIER  ::= { id-pkinit 2 }
       id-pkrkeydata  OBJECT IDENTIFIER  ::= { id-pkinit 3 }
       id-pkekuoid    OBJECT IDENTIFIER  ::= { id-pkinit 4 }
       id-pkkdcekuoid OBJECT IDENTIFIER  ::= { id-pkinit 5 }

       pa-pk-as-req INTEGER ::=                 16
       pa-pk-as-rep INTEGER ::=                 17

       ad-initial-verified-cas INTEGER ::=       9

       td-trusted-certifiers INTEGER ::=        104
       td-invalid-certificates INTEGER ::=      105
       td-dh-parameters INTEGER ::=             109

       PA-PK-AS-REQ ::= SEQUENCE {
          signedAuthPack          [0] IMPLICIT OCTET STRING,
                   -- Contains a CMS type ContentInfo encoded
                   -- according to [RFC3852].



Tung & Zhu               Expires August 11, 2005               [Page 24]

Internet-Draft                   PKINIT                    February 2005


                   -- The contentType field of the type ContentInfo
                   -- is id-signedData (1.2.840.113549.1.7.2),
                   -- and the content field is a SignedData.
                   -- The eContentType field for the type SignedData is
                   -- id-pkauthdata (1.3.6.1.5.2.3.1), and the
                   -- eContent field contains the DER encoding of the
                   -- type AuthPack.
                   -- AuthPack is defined below.
          trustedCertifiers       [1] SEQUENCE OF TrustedCA OPTIONAL,
                   -- A list of CAs, trusted by the client, that can
                   -- be used as the trust anchor to validate the KDC's
                   -- signature.
                   -- Each TrustedCA identifies a CA or a CA
                   -- certificate (thereby its public key).
          kdcPkId                 [2] IMPLICIT OCTET STRING
                                      OPTIONAL,
                   -- Contains a CMS type SignerIdentifier encoded
                   -- according to [RFC3852].
                   -- Identifies, if present, a particular KDC
                   -- public key that the client already has.
          ...
       }

       DHNonce ::= OCTET STRING

       TrustedCA ::= CHOICE {
          caName                  [1] IMPLICIT OCTET STRING,
                   -- Contains a PKIX type Name encoded according to
                   -- [RFC3280].
                   -- Identifies a CA.
                   -- Prefer the sid field below if that is available.
          sid                     [2] IMPLICIT OCTET STRING,
                   -- Contains a CMS type SignerIdentifier encoded
                   -- according to [RFC3852].
                   -- Identifies the trusted CA's certificate (and
                   -- thereby the public key).
          ...
       }

       AuthPack ::= SEQUENCE {
          pkAuthenticator         [0] PKAuthenticator,
          clientPublicValue       [1] SubjectPublicKeyInfo OPTIONAL,
                   -- Defined in [RFC3280].
                   -- The pubic key value (the subjectPublicKey field
                   -- of the type SubjectPublicKeyInfo) MUST be encoded
                   -- according to [RFC3279].
                   -- Present only if the client wishes to use the
                   -- Diffie-Hellman key agreement method.



Tung & Zhu               Expires August 11, 2005               [Page 25]

Internet-Draft                   PKINIT                    February 2005


          supportedCMSTypes       [2] SEQUENCE OF AlgorithmIdentifier
                                      OPTIONAL,
                   -- List of CMS encryption types supported by
                   -- client in order of (decreasing) preference.
          clientDHNonce           [3] DHNonce OPTIONAL,
                   -- Present only if the client indicates that it
                   -- wishes to reuse DH keys or to allow the KDC to
                   -- do so.
          ...
       }

       PKAuthenticator ::= SEQUENCE {
          cusec                   [0] INTEGER (0..999999),
          ctime                   [1] KerberosTime,
                   -- cusec and ctime are used as in [CLAR], for replay
                   -- prevention.
          nonce                   [2] INTEGER (0..4294967295),
                   -- Chosen randomly;  This nonce does not need to
                   -- match with the nonce in the KDC-REQ-BODY.
          paChecksum              [3] OCTET STRING,
                   -- Contains the SHA1 checksum, performed over
                   -- KDC-REQ-BODY.
          ...
       }

       TD-TRUSTED-CERTIFIERS ::= SEQUENCE OF TrustedCA
                   -- Identifies a list of CAs trusted by the KDC.
                   -- Each TrustedCA identifies a CA or a CA
                   -- certificate (thereby its public key).

       TD-INVALID-CERTIFICATES ::= SEQUENCE OF OCTET STRING
                   -- Each OCTET STRING contains a CMS type
                   -- IssuerAndSerialNumber encoded according to
                   -- [RFC3852].
                   -- Each IssuerAndSerialNumber indentifies a
                   -- certificate (sent by the client) with an invalid
                   -- signature.

       KRB5PrincipalName ::= SEQUENCE {
           realm                   [0] Realm,
           principalName           [1] PrincipalName
       }

       AD-INITIAL-VERIFIED-CAS ::= SEQUENCE OF TrustedCA
                   -- Identifies the certification path based on which
                   -- the client certificate was validated.
                   -- Each TrustedCA identifies a CA or a CA
                   -- certificate (thereby its public key).



Tung & Zhu               Expires August 11, 2005               [Page 26]

Internet-Draft                   PKINIT                    February 2005


       PA-PK-AS-REP ::= CHOICE {
          dhInfo                  [0] DHRepInfo,
                   -- Selected when Diffie-Hellman key exchange is
                   -- used.
          encKeyPack              [1] IMPLICIT OCTET STRING,
                   -- Selected when public key encryption is used.
                   -- Contains a CMS type ContentInfo encoded
                   -- according to [RFC3852].
                   -- The contentType field of the type ContentInfo is
                   -- id-envelopedData (1.2.840.113549.1.7.3).
                   -- The content field is an EnvelopedData.
                   -- The contentType field for the type EnvelopedData
                   -- is id-signedData (1.2.840.113549.1.7.2).
                   -- The eContentType field for the inner type
                   -- SignedData (when unencrypted) is id-pkrkeydata
                   -- (1.2.840.113549.1.7.3) and the eContent field
                   -- contains the DER encoding of the type
                   -- ReplyKeyPack.
                   -- ReplyKeyPack is defined below.
          ...
       }

       DHRepInfo ::= SEQUENCE {
          dhSignedData            [0] IMPLICIT OCTET STRING,
                   -- Contains a CMS type ContentInfo encoded according
                   -- to [RFC3852].
                   -- The contentType field of the type ContentInfo is
                   -- id-signedData (1.2.840.113549.1.7.2), and the
                   -- content field is a SignedData.
                   -- The eContentType field for the type SignedData is
                   -- id-pkdhkeydata (1.3.6.1.5.2.3.2), and the
                   -- eContent field contains the DER encoding of the
                   -- type KDCDHKeyInfo.
                   -- KDCDHKeyInfo is defined below.
          serverDHNonce           [1] DHNonce OPTIONAL
                   -- Present if and only if dhKeyExpiration is
                   -- present.
       }

       KDCDHKeyInfo ::= SEQUENCE {
          subjectPublicKey        [0] BIT STRING,
                   -- KDC's DH public key.
                   -- The DH pubic key value is mapped to a BIT STRING
                   -- according to [RFC3279].
          nonce                   [1] INTEGER (0..4294967295),
                   -- Contains the nonce in the PKAuthenticator of the
                   -- request if DH keys are NOT reused,
                   -- 0 otherwise.



Tung & Zhu               Expires August 11, 2005               [Page 27]

Internet-Draft                   PKINIT                    February 2005


          dhKeyExpiration         [2] KerberosTime OPTIONAL,
                   -- Expiration time for KDC's key pair,
                   -- present if and only if DH keys are reused. If
                   -- this field is omitted then the serverDHNonce
                   -- field MUST also be omitted.
          ...
       }

       ReplyKeyPack ::= SEQUENCE {
          replyKey                [0] EncryptionKey,
                   -- Contains the session key used to encrypt the
                   -- enc-part field in the AS-REP.
          nonce                   [1] INTEGER (0..4294967295),
                   -- Contains the nonce in the PKAuthenticator of the
                   -- request.
          ...
       }

       TD-DH-PARAMETERS ::= SEQUENCE OF DHDomainParameters
                   -- Contains a list of Diffie-Hellman domain
                   -- parameters in decreasing preference order.

       DHDomainParameters ::= CHOICE {
           modp                   [0] DomainParameters,
                   -- Type DomainParameters is defined in [RFC3279].
           ec                     [1] EcpkParameters,
                   -- Type EcpkParameters is defined in [RFC3279].
           ...
       }
       END





















Tung & Zhu               Expires August 11, 2005               [Page 28]

Internet-Draft                   PKINIT                    February 2005


Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.


Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Copyright Statement

   Copyright (C) The Internet Society (2005).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.


Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.




Tung & Zhu               Expires August 11, 2005               [Page 29]