summaryrefslogtreecommitdiff
path: root/doc/rfc/rfc3394.txt
blob: e8a2af7f030c8bdaf86f47973ee534b941a2cace (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
Network Working Group                                          J. Schaad
Request for Comments: 3394                       Soaring Hawk Consulting
Category: Informational                                       R. Housley
                                                        RSA Laboratories
                                                          September 2002


         Advanced Encryption Standard (AES) Key Wrap Algorithm

Status of this Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

Abstract

   The purpose of this document is to make the Advanced Encryption
   Standard (AES) Key Wrap algorithm conveniently available to the
   Internet community.  The United States of America has adopted AES as
   the new encryption standard.  The AES Key Wrap algorithm will
   probably be adopted by the USA for encryption of AES keys. The
   authors took most of the text in this document from the draft AES Key
   Wrap posted by NIST.

Table of Contents

   1. Introduction................................................  2
   2. Overview....................................................  2
   2.1 Notation and Definitions...................................  3
   2.2 Algorithms.................................................  4
   2.2.1 Key Wrap.................................................  4
   2.2.2 Key Unwrap...............................................  5
   2.2.3 Key Data Integrity -- the Initial Value..................  6
   2.2.3.1 Default Initial Value..................................  7
   2.2.3.2 Alternative Initial Values.............................  7
   3. Object Identifiers..........................................  8
   4. Test Vectors................................................  8
   4.1 Wrap 128 bits of Key Data with a 128-bit KEK...............  8
   4.2 Wrap 128 bits of Key Data with a 192-bit KEK............... 11
   4.3 Wrap 128 bits of Key Data with a 256-bit KEK............... 14
   4.4 Wrap 192 bits of Key Data with a 192-bit KEK............... 17
   4.5 Wrap 192 bits of Key Data with a 256-bit KEK............... 24
   4.6 Wrap 256 bits of Key Data with a 256-bit KEK............... 30



Schaad & Housley             Informational                      [Page 1]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   5. Security Considerations..................................... 39
   6. References.................................................. 39
   7. Acknowledgments............................................. 39
   8. Authors' Addresses.......................................... 39
   9. Full Copyright Statement.................................... 40

1. Introduction

   NOTE: Most of the following text is taken from [AES-WRAP], and the
   assertions regarding the security of the AES Key Wrap algorithm are
   made by the US Government, not by the authors of this document.

   This specification is intended to satisfy the National Institute of
   Standards and Technology (NIST) Key Wrap requirement to:  Design a
   cryptographic algorithm called a Key Wrap that uses the Advanced
   Encryption Standard (AES) as a primitive to securely encrypt
   plaintext key(s) with any associated integrity information and data,
   such that the combination could be longer than the width of the AES
   block size (128-bits).  Each ciphertext bit should be a highly non-
   linear function of each plaintext bit, and (when unwrapping) each
   plaintext bit should be a highly non-linear function of each
   ciphertext bit.  It is sufficient to approximate an ideal
   pseudorandom permutation to the degree that exploitation of
   undesirable phenomena is as unlikely as guessing the AES engine key.

   This key wrap algorithm needs to provide ample security to protect
   keys in the context of prudently designed key management
   architecture.

   Throughout this document, any data being wrapped will be referred to
   as the key data.  It makes no difference to the algorithm whether the
   data being wrapped is a key; in fact there is often good reason to
   include other data with the key, to wrap multiple keys together, or
   to wrap data that isn't strictly a key.  So, the term "key data" is
   used broadly to mean any data being wrapped, but particularly keys,
   since this is primarily a key wrap algorithm.  The key used to do the
   wrapping will be referred to as the key-encryption key (KEK).

   In this document a KEK can be any valid key supported by the AES
   codebook.  That is, a KEK can be a 128-bit key, a 192-bit key, or a
   256-bit key.

2. Overview

   The AES key wrap algorithm is designed to wrap or encrypt key data.
   The key wrap operates on blocks of 64 bits.  Before being wrapped,
   the key data is parsed into n blocks of 64 bits.




Schaad & Housley             Informational                      [Page 2]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   The only restriction the key wrap algorithm places on n is that n be
   at least two.  (For key data with length less than or equal to 64
   bits, the constant field used in this specification and the key data
   form a single 128-bit codebook input making this key wrap
   unnecessary.)  The key wrap algorithm accommodates all supported AES
   key sizes.  However, other cryptographic values often need to be
   wrapped.  One such value is the seed of the random number generator
   for DSS.  This seed value requires n to be greater than four.
   Undoubtedly other values require this type of protection. Therefore,
   no upper bound is imposed on n.

   The AES key wrap can be configured to use any of the three key sizes
   supported by the AES codebook.  The choice of a key size affects the
   overall security provided by the key wrap, but it does not alter the
   description of the key wrap algorithm.  Therefore, in the description
   that follows, the key wrap is described generically; no key size is
   specified for the KEK.

2.1 Notation and Definitions

   The following notation is used in the description of the key wrapping
   algorithms:

      AES(K, W)     Encrypt W using the AES codebook with key K
      AES-1(K, W)   Decrypt W using the AES codebook with key K
      MSB(j, W)     Return the most significant j bits of W
      LSB(j, W)     Return the least significant j bits of W
      B1 ^ B2       The bitwise exclusive or (XOR) of B1 and B2
      B1 | B2       Concatenate B1 and B2
      K             The key-encryption key K
      n             The number of 64-bit key data blocks
      s             The number of steps in the wrapping process, s = 6n
      P[i]          The ith plaintext key data block
      C[i]          The ith ciphertext data block
      A             The 64-bit integrity check register
      R[i]          An array of 64-bit registers where
                       i = 0, 1, 2, ..., n
      A[t], R[i][t] The contents of registers A and R[i] after encryption
                       step t.
      IV            The 64-bit initial value used during the wrapping
                       process.

   In the key wrap algorithm, the concatenation function will be used to
   concatenate 64-bit quantities to form the 128-bit input to the AES
   codebook.  The extraction functions will be used to split the 128-bit
   output from the AES codebook into two 64-bit quantities.





Schaad & Housley             Informational                      [Page 3]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


2.2 Algorithms

   The specification of the key wrap algorithm requires the use of the
   AES codebook [AES].  The next three sections will describe the key
   wrap algorithm, the key unwrap algorithm, and the inherent data
   integrity check.

2.2.1 Key Wrap

   The inputs to the key wrapping process are the KEK and the plaintext
   to be wrapped.  The plaintext consists of n 64-bit blocks, containing
   the key data being wrapped.  The key wrapping process is described
   below.

   Inputs:      Plaintext, n 64-bit values {P1, P2, ..., Pn}, and
                Key, K (the KEK).
   Outputs:     Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}.

   1) Initialize variables.

       Set A0 to an initial value (see 2.2.3)
       For i = 1 to n
            R[0][i] = P[i]

   2) Calculate intermediate values.

       For t = 1 to s, where s = 6n
           A[t] = MSB(64, AES(K, A[t-1] | R[t-1][1])) ^ t
           For i = 1 to n-1
               R[t][i] = R[t-1][i+1]
           R[t][n] = LSB(64, AES(K, A[t-1] | R[t-1][1]))

   3) Output the results.

       Set C[0] = A[t]
       For i = 1 to n
           C[i] = R[t][i]

   An alternative description of the key wrap algorithm involves
   indexing rather than shifting.  This approach allows one to calculate
   the wrapped key in place, avoiding the rotation in the previous
   description.  This produces identical results and is more easily
   implemented in software.








Schaad & Housley             Informational                      [Page 4]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   Inputs:  Plaintext, n 64-bit values {P1, P2, ..., Pn}, and
            Key, K (the KEK).
   Outputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}.

   1) Initialize variables.

       Set A = IV, an initial value (see 2.2.3)
       For i = 1 to n
           R[i] = P[i]

   2) Calculate intermediate values.

       For j = 0 to 5
           For i=1 to n
               B = AES(K, A | R[i])
               A = MSB(64, B) ^ t where t = (n*j)+i
               R[i] = LSB(64, B)

   3) Output the results.

       Set C[0] = A
       For i = 1 to n
           C[i] = R[i]

2.2.2 Key Unwrap

   The inputs to the unwrap process are the KEK and (n+1) 64-bit blocks
   of ciphertext consisting of previously wrapped key.  It returns n
   blocks of plaintext consisting of the n 64-bit blocks of the
   decrypted key data.

   Inputs:  Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}, and
           Key, K (the KEK).
   Outputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}.

   1) Initialize variables.

       Set A[s] = C[0] where s = 6n
       For i = 1 to n
           R[s][i] = C[i]

   2) Calculate the intermediate values.

       For t = s to 1
           A[t-1] = MSB(64, AES-1(K, ((A[t] ^ t) | R[t][n]))
           R[t-1][1] = LSB(64, AES-1(K, ((A[t]^t) | R[t][n]))
           For i = 2 to n
               R[t-1][i] = R[t][i-1]



Schaad & Housley             Informational                      [Page 5]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002



   3) Output the results.

       If A[0] is an appropriate initial value (see 2.2.3),
       Then
           For i = 1 to n
               P[i] = R[0][i]
       Else
           Return an error

   The unwrap algorithm can also be specified as an index based
   operation, allowing the calculations to be carried out in place.
   Again, this produces the same results as the register shifting
   approach.

   Inputs:  Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}, and
            Key, K (the KEK).
   Outputs: Plaintext, n 64-bit values {P0, P1, K, Pn}.

   1) Initialize variables.

       Set A = C[0]
       For i = 1 to n
           R[i] = C[i]

   2) Compute intermediate values.

       For j = 5 to 0
           For i = n to 1
               B = AES-1(K, (A ^ t) | R[i]) where t = n*j+i
               A = MSB(64, B)
               R[i] = LSB(64, B)

   3) Output results.

   If A is an appropriate initial value (see 2.2.3),
   Then
       For i = 1 to n
           P[i] = R[i]
   Else
       Return an error

2.2.3 Key Data Integrity -- the Initial Value

   The initial value (IV) refers to the value assigned to A[0] in the
   first step of the wrapping process.  This value is used to obtain an
   integrity check on the key data.  In the final step of the unwrapping
   process, the recovered value of A[0] is compared to the expected



Schaad & Housley             Informational                      [Page 6]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   value of A[0].  If there is a match, the key is accepted as valid,
   and the unwrapping algorithm returns it.  If there is not a match,
   then the key is rejected, and the unwrapping algorithm returns an
   error.

   The exact properties achieved by this integrity check depend on the
   definition of the initial value.  Different applications may call for
   somewhat different properties; for example, whether there is need to
   determine the integrity of key data throughout its lifecycle or just
   when it is unwrapped.  This specification defines a default initial
   value that supports integrity of the key data during the period it is
   wrapped (2.2.3.1).  Provision is also made to support alternative
   initial values (in 2.2.3.2).

2.2.3.1 Default Initial Value

   The default initial value (IV) is defined to be the hexadecimal
   constant:

       A[0] = IV = A6A6A6A6A6A6A6A6

   The use of a constant as the IV supports a strong integrity check on
   the key data during the period that it is wrapped.  If unwrapping
   produces A[0] = A6A6A6A6A6A6A6A6, then the chance that the key data
   is corrupt is 2^-64.  If unwrapping produces A[0] any other value,
   then the unwrap must return an error and not return any key data.

2.2.3.2 Alternative Initial Values

   When the key wrap is used as part of a larger key management protocol
   or system, the desired scope for data integrity may be more than just
   the key data or the desired duration for more than just the period
   that it is wrapped.  Also, if the key data is not just an AES key, it
   may not always be a multiple of 64 bits.  Alternative definitions of
   the initial value can be used to address such problems.  NIST will
   define alternative initial values in future key management
   publications as needed.  In order to accommodate a set of
   alternatives that may evolve over time, key wrap implementations that
   are not application-specific will require some flexibility in the way
   that the initial value is set and tested.











Schaad & Housley             Informational                      [Page 7]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


3. Object Identifiers

   NIST has assigned the following object identifiers to identify the
   key wrap algorithm with the default initial value specified in
   2.2.3.1.  One object identifier is assigned for use with each of the
   KEK AES key sizes.

       aes  OBJECT IDENTIFIER  ::=  { joint-iso-itu-t(2) country(16)

          us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) 1 }

       id-aes128-wrap  OBJECT IDENTIFIER  ::=  { aes 5 }
       id-aes192-wrap  OBJECT IDENTIFIER  ::=  { aes 25 }
       id-aes256-wrap  OBJECT IDENTIFIER  ::=  { aes 45 }

4. Test Vectors

   The examples in this section were generated using the index-based
   implementation of the key wrap algorithm.  The use of this approach
   allows a straightforward software implementation of the key wrap
   algorithm.

4.1 Wrap 128 bits of Key Data with a 128-bit KEK

   Input:
   KEK:            000102030405060708090A0B0C0D0E0F
   Key Data:       00112233445566778899AABBCCDDEEFF

   Wrap:

   Step t       A               R1               R2

   1
   In   A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
   Enc  F4740052E82A2251 74CE86FBD7B805E7 8899AABBCCDDEEFF
   XorT F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFF

   2
   In   F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFF
   Enc  06BA4EBDE7768D0B 74CE86FBD7B805E7 D132EE38147E76F8
   XorT 06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F8

   3
   In   06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F8
   Enc  FC967627BE937208 FE6E8D679C5D3460 D132EE38147E76F8
   XorT FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8





Schaad & Housley             Informational                      [Page 8]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   4
   In   FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8
   Enc  5896EA9028EE203B FE6E8D679C5D3460 07B2BD973E36A6FC
   XorT 5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FC

   5
   In   5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FC
   Enc  93AEA71B258D90C3 25F5A3ADC2195401 07B2BD973E36A6FC
   XorT 93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FC

   6
   In   93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FC
   Enc  E3EE986344D878F7 25F5A3ADC2195401 F14863BB1E9CA90A
   XorT E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90A

   7
   In   E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90A
   Enc  2BFC21B2C20E4006 B556D35ED8CEF052 F14863BB1E9CA90A
   XorT 2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90A

   8
   In   2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90A
   Enc  4BE8CE99C0A43A7D B556D35ED8CEF052 64BAE5818D0570BB
   XorT 4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BB

   9
   In   4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BB
   Enc  EBE1CE91067024F3 BE114B343EB00981 64BAE5818D0570BB
   XorT EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BB

   10
   In   EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BB
   Enc  5A9C7B1F5B1C3B46 BE114B343EB00981 4FD3D2B7D74FBB42
   XorT 5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB42

   11
   In   5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB42
   Enc  93B71967EED41FFC AEF34BD8FB5A7B82 4FD3D2B7D74FBB42
   XorT 93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB42

   12
   In   93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB42
   Enc  1FA68B0A8112B44B AEF34BD8FB5A7B82 9D3E862371D2CFE5
   XorT 1FA68B0A8112B447 AEF34BD8FB5A7B82 9D3E862371D2CFE5

   Output:
   Ciphertext:  1FA68B0A8112B447 AEF34BD8FB5A7B82 9D3E862371D2CFE5




Schaad & Housley             Informational                      [Page 9]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   Unwrap:

   Step t       A               R1               R2
   12
   In   1FA68B0A8112B447 AEF34BD8FB5A7B82 9D3E862371D2CFE5
   XorT 1FA68B0A8112B44B AEF34BD8FB5A7B82 9D3E862371D2CFE5
   Dec  93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB42

   11
   In   93B71967EED41FF7 AEF34BD8FB5A7B82 4FD3D2B7D74FBB42
   XorT 93B71967EED41FFC AEF34BD8FB5A7B82 4FD3D2B7D74FBB42
   Dec  5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB42

   10
   In   5A9C7B1F5B1C3B4C BE114B343EB00981 4FD3D2B7D74FBB42
   XorT 5A9C7B1F5B1C3B46 BE114B343EB00981 4FD3D2B7D74FBB42
   Dec  EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BB

   9
   In   EBE1CE91067024FA BE114B343EB00981 64BAE5818D0570BB
   XorT EBE1CE91067024F3 BE114B343EB00981 64BAE5818D0570BB
   Dec  4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BB

   8
   In   4BE8CE99C0A43A75 B556D35ED8CEF052 64BAE5818D0570BB
   XorT 4BE8CE99C0A43A7D B556D35ED8CEF052 64BAE5818D0570BB
   Dec  2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90A

   7
   In   2BFC21B2C20E4001 B556D35ED8CEF052 F14863BB1E9CA90A
   XorT 2BFC21B2C20E4006 B556D35ED8CEF052 F14863BB1E9CA90A
   Dec  E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90A

   6
   In   E3EE986344D878F1 25F5A3ADC2195401 F14863BB1E9CA90A
   XorT E3EE986344D878F7 25F5A3ADC2195401 F14863BB1E9CA90A
   Dec  93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FC

   5
   In   93AEA71B258D90C6 25F5A3ADC2195401 07B2BD973E36A6FC
   XorT 93AEA71B258D90C3 25F5A3ADC2195401 07B2BD973E36A6FC
   Dec  5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FC

   4
   In   5896EA9028EE203F FE6E8D679C5D3460 07B2BD973E36A6FC
   XorT 5896EA9028EE203B FE6E8D679C5D3460 07B2BD973E36A6FC
   Dec  FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8




Schaad & Housley             Informational                     [Page 10]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   3
   In   FC967627BE93720B FE6E8D679C5D3460 D132EE38147E76F8
   XorT FC967627BE937208 FE6E8D679C5D3460 D132EE38147E76F8
   Dec  06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F8

   2
   In   06BA4EBDE7768D09 74CE86FBD7B805E7 D132EE38147E76F8
   XorT 06BA4EBDE7768D0B 74CE86FBD7B805E7 D132EE38147E76F8
   Dec  F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFF

   1
   In   F4740052E82A2250 74CE86FBD7B805E7 8899AABBCCDDEEFF
   XorT F4740052E82A2251 74CE86FBD7B805E7 8899AABBCCDDEEFF
   Dec  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF

   Plaintext  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF

   Output:
   Key Data:  00112233445566778899AABBCCDDEEFF

4.2 Wrap 128 bits of Key Data with a 192-bit KEK

   Input:
   KEK:        000102030405060708090A0B0C0D0E0F1011121314151617
   Key Data:   00112233445566778899AABBCCDDEEFF

   Wrap:

   Step t       A               R1               R21
   In   A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
   Enc  DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFF
   XorT DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF

   2
   In   DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF
   Enc  9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2D
   XorT 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D

   3
   In   9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D
   Enc  7B8E343CA51CF8AB BC164F51E20CC983 51F22F3286758A2D
   XorT 7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2D

   4
   In   7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2D
   Enc  02A97C5897140595 BC164F51E20CC983 05FC2D8F8FF4B919
   XorT 02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919




Schaad & Housley             Informational                     [Page 11]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   5
   In   02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919
   Enc  15D4B63F66583817 429487269D3A0016 05FC2D8F8FF4B919
   XorT 15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B919

   6
   In   15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B919
   Enc  AE2D0B76A6951EEA 429487269D3A0016 05A2D8FB4DD5BD7A
   XorT AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7A

   7
   In   AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7A
   Enc  79F849444F4B8AA8 D40B091CDBAC0340 05A2D8FB4DD5BD7A
   XorT 79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7A

   8
   In   79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7A
   Enc  5933A9195B5F5E21 D40B091CDBAC0340 89F0D6C06F8CA9B4
   XorT 5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B4

   9
   In   5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B4
   Enc  57ADA800299C2E85 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4
   XorT 57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4

   10
   In   57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4
   Enc  BF17BD6A9BC80163 4D5B3DFE7C04ABBA EB24CCFA52EA9078
   XorT BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA9078

   11
   In   BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA9078
   Enc  B68BF270AE81544F F92B5B97C050AED2 EB24CCFA52EA9078
   XorT B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA9078

   12
   In   B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA9078
   Enc  96778B25AE6CA439 F92B5B97C050AED2 468AB8A17AD84E5D
   XorT 96778B25AE6CA435 F92B5B97C050AED2 468AB8A17AD84E5D

   Output:
   Ciphertext:  96778B25AE6CA435 F92B5B97C050AED2 468AB8A17AD84E5D









Schaad & Housley             Informational                     [Page 12]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   Unwrap:

   Step t       A               R1               R2

   12
   In   96778B25AE6CA435 F92B5B97C050AED2 468AB8A17AD84E5D
   XorT 96778B25AE6CA439 F92B5B97C050AED2 468AB8A17AD84E5D
   Dec  B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA9078

   11
   In   B68BF270AE815444 F92B5B97C050AED2 EB24CCFA52EA9078
   XorT B68BF270AE81544F F92B5B97C050AED2 EB24CCFA52EA9078
   Dec  BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA9078

   10
   In   BF17BD6A9BC80169 4D5B3DFE7C04ABBA EB24CCFA52EA9078
   XorT BF17BD6A9BC80163 4D5B3DFE7C04ABBA EB24CCFA52EA9078
   Dec  57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4

   9
   In   57ADA800299C2E8C 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4
   XorT 57ADA800299C2E85 4D5B3DFE7C04ABBA 89F0D6C06F8CA9B4
   Dec  5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B4

   8
   In   5933A9195B5F5E29 D40B091CDBAC0340 89F0D6C06F8CA9B4
   XorT 5933A9195B5F5E21 D40B091CDBAC0340 89F0D6C06F8CA9B4
   Dec  79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7A

   7
   In   79F849444F4B8AAF D40B091CDBAC0340 05A2D8FB4DD5BD7A
   XorT 79F849444F4B8AA8 D40B091CDBAC0340 05A2D8FB4DD5BD7A
   Dec  AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7A

   6
   In   AE2D0B76A6951EEC 429487269D3A0016 05A2D8FB4DD5BD7A
   XorT AE2D0B76A6951EEA 429487269D3A0016 05A2D8FB4DD5BD7A
   Dec  15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B919

   5
   In   15D4B63F66583812 429487269D3A0016 05FC2D8F8FF4B919
   XorT 15D4B63F66583817 429487269D3A0016 05FC2D8F8FF4B919
   Dec  02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919

   4
   In   02A97C5897140591 BC164F51E20CC983 05FC2D8F8FF4B919
   XorT 02A97C5897140595 BC164F51E20CC983 05FC2D8F8FF4B919
   Dec  7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2D



Schaad & Housley             Informational                     [Page 13]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002



   3
   In   7B8E343CA51CF8A8 BC164F51E20CC983 51F22F3286758A2D
   XorT 7B8E343CA51CF8AB BC164F51E20CC983 51F22F3286758A2D
   Dec  9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D

   2
   In   9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D
   XorT 9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2D
   Dec  DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF

   1
   In   DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF
   XorT DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFF
   Dec  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF

   Plaintext A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF

   Output:
   Key Data:  00112233445566778899AABBCCDDEEFF

4.3 Wrap 128 bits of Key Data with a 256-bit KEK

   Input:
   KEK:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
   Key Data:    00112233445566778899AABBCCDDEEFF

   Wrap:

   Step t       A               R1               R2
   1
   In   A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
   Enc  794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFF
   XorT 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF

   2
   In   794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
   Enc  D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8
   XorT D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8

   3
   In   D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
   Enc  85DBDF1879D5C0A5 5602001BFA07AD8B F60E0CDB7F429FE8
   XorT 85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8







Schaad & Housley             Informational                     [Page 14]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   4
   In   85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8
   Enc  738C291128B7226D 5602001BFA07AD8B 58924F777C3F678C
   XorT 738C291128B72269 5602001BFA07AD8B 58924F777C3F678C

   5
   In   738C291128B72269 5602001BFA07AD8B 58924F777C3F678C
   Enc  2656A02DFFF054DC F4DF378183E3D5B2 58924F777C3F678C
   XorT 2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678C

   6
   In   2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678C
   Enc  DDFD0C0E8B52A63A F4DF378183E3D5B2 91AC1D36A964F41B
   XorT DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41B

   7
   In   DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41B
   Enc  39AB00D4AE4399EA 5271D5CED80F34ED 91AC1D36A964F41B
   XorT 39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41B

   8
   In   39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41B
   Enc  4CE414878463EAAC 5271D5CED80F34ED 67D8ED899E7929B8
   XorT 4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B8

   9
   In   4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B8
   Enc  FBB44DB106AA0789 0DF7E50829123648 67D8ED899E7929B8
   XorT FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B8

   10
   In   FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B8
   Enc  877112A7308ADCC5 0DF7E50829123648 3472D5993D318FD2
   XorT 877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD2

   11
   In   877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD2
   Enc  78E40190807CC151 63E9777905818A2A 3472D5993D318FD2
   XorT 78E40190807CC15A 63E9777905818A2A 3472D5993D318FD2

   12
   In   78E40190807CC15A 63E9777905818A2A 3472D5993D318FD2
   Enc  64E8C3F9CE0F5BAE 63E9777905818A2A 93C8191E7D6E8AE7
   XorT 64E8C3F9CE0F5BA2 63E9777905818A2A 93C8191E7D6E8AE7

   Output:
   Ciphertext:  64E8C3F9CE0F5BA2 63E9777905818A2A 93C8191E7D6E8AE7




Schaad & Housley             Informational                     [Page 15]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   Unwrap:

   Step t       A               R1               R2
   12
   In   64E8C3F9CE0F5BA2 63E9777905818A2A 93C8191E7D6E8AE7
   XorT 64E8C3F9CE0F5BAE 63E9777905818A2A 93C8191E7D6E8AE7
   Dec  78E40190807CC15A 63E9777905818A2A 3472D5993D318FD2

   11
   In   78E40190807CC15A 63E9777905818A2A 3472D5993D318FD2
   XorT 78E40190807CC151 63E9777905818A2A 3472D5993D318FD2
   Dec  877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD2

   10
   In   877112A7308ADCCF 0DF7E50829123648 3472D5993D318FD2
   XorT 877112A7308ADCC5 0DF7E50829123648 3472D5993D318FD2
   Dec  FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B8

   9
   In   FBB44DB106AA0780 0DF7E50829123648 67D8ED899E7929B8
   XorT FBB44DB106AA0789 0DF7E50829123648 67D8ED899E7929B8
   Dec  4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B8

   8
   In   4CE414878463EAA4 5271D5CED80F34ED 67D8ED899E7929B8
   XorT 4CE414878463EAAC 5271D5CED80F34ED 67D8ED899E7929B8
   Dec  39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41B

   7
   In   39AB00D4AE4399ED 5271D5CED80F34ED 91AC1D36A964F41B
   XorT 39AB00D4AE4399EA 5271D5CED80F34ED 91AC1D36A964F41B
   Dec  DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41B

   6
   In   DDFD0C0E8B52A63C F4DF378183E3D5B2 91AC1D36A964F41B
   XorT DDFD0C0E8B52A63A F4DF378183E3D5B2 91AC1D36A964F41B
   Dec  2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678C

   5
   In   2656A02DFFF054D9 F4DF378183E3D5B2 58924F777C3F678C
   XorT 2656A02DFFF054DC F4DF378183E3D5B2 58924F777C3F678C
   Dec  738C291128B72269 5602001BFA07AD8B 58924F777C3F678C

   4
   In   738C291128B72269 5602001BFA07AD8B 58924F777C3F678C
   XorT 738C291128B7226D 5602001BFA07AD8B 58924F777C3F678C
   Dec  85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8




Schaad & Housley             Informational                     [Page 16]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   3
   In   85DBDF1879D5C0A6 5602001BFA07AD8B F60E0CDB7F429FE8
   XorT 85DBDF1879D5C0A5 5602001BFA07AD8B F60E0CDB7F429FE8
   Dec  D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8

   2
   In   D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
   XorT D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8
   Dec  794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF

   1
   In   794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
   XorT 794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFF
   Dec  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF

   Plaintext A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF

   Output:
   Key Data:  00112233445566778899AABBCCDDEEFF

4.4 Wrap 192 bits of Key Data with a 192-bit KEK

   Input:
   KEK:       000102030405060708090A0B0C0D0E0F1011121314151617
   Key Data:  00112233445566778899AABBCCDDEEFF0001020304050607

   Wrap:

   Step t     A/R3             R1               R2

   1
   In   A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
        0001020304050607
   Enc  DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFF
        0001020304050607
   XorT DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF
        0001020304050607

   2
   In   DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF
        0001020304050607
   Enc  9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2D
        0001020304050607
   XorT 9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D
        0001020304050607






Schaad & Housley             Informational                     [Page 17]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   3
   In   9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D
        0001020304050607
   Enc  2C8E19A519025B7C 351D385096CCFB29 51F22F3286758A2D
        FF540E514DE120A3
   XorT 2C8E19A519025B7F 351D385096CCFB29 51F22F3286758A2D
        FF540E514DE120A3

   4
   In   2C8E19A519025B7F 351D385096CCFB29 51F22F3286758A2D
        FF540E514DE120A3
   Enc  E727C7BDF822602E A08DAA041D17BBBA 51F22F3286758A2D
        FF540E514DE120A3
   XorT E727C7BDF822602A A08DAA041D17BBBA 51F22F3286758A2D
        FF540E514DE120A3

   5
   In   E727C7BDF822602A A08DAA041D17BBBA 51F22F3286758A2D
        FF540E514DE120A3
   Enc  15B61F7B25D51700 A08DAA041D17BBBA AE82BC1118A5DEA4
        FF540E514DE120A3
   XorT 15B61F7B25D51705 A08DAA041D17BBBA AE82BC1118A5DEA4
        FF540E514DE120A3

   6
   In   15B61F7B25D51705 A08DAA041D17BBBA AE82BC1118A5DEA4
        FF540E514DE120A3
   Enc  A187755AEA64719C A08DAA041D17BBBA AE82BC1118A5DEA4
        D1E708FD13778787
   XorT A187755AEA64719A A08DAA041D17BBBA AE82BC1118A5DEA4
        D1E708FD13778787

   7
   In   A187755AEA64719A A08DAA041D17BBBA AE82BC1118A5DEA4
        D1E708FD13778787
   Enc  5A994895D81644B7 926ED65A9E853FD9 AE82BC1118A5DEA4
        D1E708FD13778787
   XorT 5A994895D81644B0 926ED65A9E853FD9 AE82BC1118A5DEA4
        D1E708FD13778787

   8
   In   5A994895D81644B0 926ED65A9E853FD9 AE82BC1118A5DEA4
        D1E708FD13778787
   Enc  864F408C8AB8CDCF 926ED65A9E853FD9 552A09E141D08AE3
        D1E708FD13778787
   XorT 864F408C8AB8CDC7 926ED65A9E853FD9 552A09E141D08AE3
        D1E708FD13778787




Schaad & Housley             Informational                     [Page 18]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   9
   In   864F408C8AB8CDC7 926ED65A9E853FD9 552A09E141D08AE3
        D1E708FD13778787
   Enc  53F4373F575EB7A4 926ED65A9E853FD9 552A09E141D08AE3
        ED5E8456E61BD295
   XorT 53F4373F575EB7AD 926ED65A9E853FD9 552A09E141D08AE3
        ED5E8456E61BD295

   10
   In   53F4373F575EB7AD 926ED65A9E853FD9 552A09E141D08AE3
        ED5E8456E61BD295
   Enc  9EAA4CDA0B1BA5FF 98883EDC6B080FB5 552A09E141D08AE3
        ED5E8456E61BD295
   XorT 9EAA4CDA0B1BA5F5 98883EDC6B080FB5 552A09E141D08AE3
        ED5E8456E61BD295

   11
   In   9EAA4CDA0B1BA5F5 98883EDC6B080FB5 552A09E141D08AE3
        ED5E8456E61BD295
   Enc  B1B9902C68E0EB52 98883EDC6B080FB5 63F6D88A0663FEF9
        ED5E8456E61BD295
   XorT B1B9902C68E0EB59 98883EDC6B080FB5 63F6D88A0663FEF9
        ED5E8456E61BD295

   12
   In   B1B9902C68E0EB59 98883EDC6B080FB5 63F6D88A0663FEF9
        ED5E8456E61BD295
   Enc  FCE591D77709A6E0 98883EDC6B080FB5 63F6D88A0663FEF9
        463437433A93EFE5
   XorT FCE591D77709A6EC 98883EDC6B080FB5 63F6D88A0663FEF9
        463437433A93EFE5

   13
   In   FCE591D77709A6EC 98883EDC6B080FB5 63F6D88A0663FEF9
        463437433A93EFE5
   Enc  428428D2BD88CF58 C46965F34EFB2261 63F6D88A0663FEF9
        463437433A93EFE5
   XorT 428428D2BD88CF55 C46965F34EFB2261 63F6D88A0663FEF9
        463437433A93EFE5

   14
   In   428428D2BD88CF55 C46965F34EFB2261 63F6D88A0663FEF9
        463437433A93EFE5
   Enc  6AC861AB961DA578 C46965F34EFB2261 56E3CEE892BBEFC4
        463437433A93EFE5
   XorT 6AC861AB961DA576 C46965F34EFB2261 56E3CEE892BBEFC4
        463437433A93EFE5




Schaad & Housley             Informational                     [Page 19]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   15
   In   6AC861AB961DA576 C46965F34EFB2261 56E3CEE892BBEFC4
        463437433A93EFE5
   Enc  E80DB49CC9A1EA61 C46965F34EFB2261 56E3CEE892BBEFC4
        84943C8C67FCFD53
   XorT E80DB49CC9A1EA6E C46965F34EFB2261 56E3CEE892BBEFC4
        84943C8C67FCFD53

   16
   In   E80DB49CC9A1EA6E C46965F34EFB2261 56E3CEE892BBEFC4
        84943C8C67FCFD53
   Enc  ABEE3534AC465C2C 68F24EC260743EDC 56E3CEE892BBEFC4
        84943C8C67FCFD53
   XorT ABEE3534AC465C3C 68F24EC260743EDC 56E3CEE892BBEFC4
        84943C8C67FCFD53

   17
   In   ABEE3534AC465C3C 68F24EC260743EDC 56E3CEE892BBEFC4
        84943C8C67FCFD53
   Enc  E7CC8D8CEDE62BF7 68F24EC260743EDC E1C6C7DDEE725A93
        84943C8C67FCFD53
   XorT E7CC8D8CEDE62BE6 68F24EC260743EDC E1C6C7DDEE725A93
        84943C8C67FCFD53

   18
   In   E7CC8D8CEDE62BE6 68F24EC260743EDC E1C6C7DDEE725A93
        84943C8C67FCFD53
   Enc  031D33264E15D320 68F24EC260743EDC E1C6C7DDEE725A93
        6BA814915C6762D2
   XorT 031D33264E15D332 68F24EC260743EDC E1C6C7DDEE725A93
        6BA814915C6762D2

   Output:
   Ciphertext  031D33264E15D332 68F24EC260743EDC E1C6C7DDEE725A93
               6BA814915C6762D2

   Unwrap:

   Step t     A/R3             R1               R2

   18
   In   031D33264E15D332 68F24EC260743EDC E1C6C7DDEE725A93
        6BA814915C6762D2
   XorT 031D33264E15D320 68F24EC260743EDC E1C6C7DDEE725A93
        6BA814915C6762D2
   Dec  E7CC8D8CEDE62BE6 68F24EC260743EDC E1C6C7DDEE725A93
        84943C8C67FCFD53




Schaad & Housley             Informational                     [Page 20]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   17
   In   E7CC8D8CEDE62BE6 68F24EC260743EDC E1C6C7DDEE725A93
        84943C8C67FCFD53
   XorT E7CC8D8CEDE62BF7 68F24EC260743EDC E1C6C7DDEE725A93
        84943C8C67FCFD53
   Dec  ABEE3534AC465C3C 68F24EC260743EDC 56E3CEE892BBEFC4
        84943C8C67FCFD53

   16
   In   ABEE3534AC465C3C 68F24EC260743EDC 56E3CEE892BBEFC4
        84943C8C67FCFD53
   XorT ABEE3534AC465C2C 68F24EC260743EDC 56E3CEE892BBEFC4
        84943C8C67FCFD53
   Dec  E80DB49CC9A1EA6E C46965F34EFB2261 56E3CEE892BBEFC4
        84943C8C67FCFD53

   15
   In   E80DB49CC9A1EA6E C46965F34EFB2261 56E3CEE892BBEFC4
        84943C8C67FCFD53
   XorT E80DB49CC9A1EA61 C46965F34EFB2261 56E3CEE892BBEFC4
        84943C8C67FCFD53
   Dec  6AC861AB961DA576 C46965F34EFB2261 56E3CEE892BBEFC4
        463437433A93EFE5

   14
   In   6AC861AB961DA576 C46965F34EFB2261 56E3CEE892BBEFC4
        463437433A93EFE5
   XorT 6AC861AB961DA578 C46965F34EFB2261 56E3CEE892BBEFC4
        463437433A93EFE5
   Dec  428428D2BD88CF55 C46965F34EFB2261 63F6D88A0663FEF9
        463437433A93EFE5

   13
   In   428428D2BD88CF55 C46965F34EFB2261 63F6D88A0663FEF9
        463437433A93EFE5
   XorT 428428D2BD88CF58 C46965F34EFB2261 63F6D88A0663FEF9
        463437433A93EFE5
   Dec  FCE591D77709A6EC 98883EDC6B080FB5 63F6D88A0663FEF9
        463437433A93EFE5

   12
   In   FCE591D77709A6EC 98883EDC6B080FB5 63F6D88A0663FEF9
        463437433A93EFE5
   XorT FCE591D77709A6E0 98883EDC6B080FB5 63F6D88A0663FEF9
        463437433A93EFE5
   Dec  B1B9902C68E0EB59 98883EDC6B080FB5 63F6D88A0663FEF9
        ED5E8456E61BD295




Schaad & Housley             Informational                     [Page 21]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   11
   In   B1B9902C68E0EB59 98883EDC6B080FB5 63F6D88A0663FEF9
        ED5E8456E61BD295
   XorT B1B9902C68E0EB52 98883EDC6B080FB5 63F6D88A0663FEF9
        ED5E8456E61BD295
   Dec  9EAA4CDA0B1BA5F5 98883EDC6B080FB5 552A09E141D08AE3
        ED5E8456E61BD295

   10
   In   9EAA4CDA0B1BA5F5 98883EDC6B080FB5 552A09E141D08AE3
        ED5E8456E61BD295
   XorT 9EAA4CDA0B1BA5FF 98883EDC6B080FB5 552A09E141D08AE3
        ED5E8456E61BD295
   Dec  53F4373F575EB7AD 926ED65A9E853FD9 552A09E141D08AE3
        ED5E8456E61BD295

   9
   In   53F4373F575EB7AD 926ED65A9E853FD9 552A09E141D08AE3
        ED5E8456E61BD295
   XorT 53F4373F575EB7A4 926ED65A9E853FD9 552A09E141D08AE3
        ED5E8456E61BD295
   Dec  864F408C8AB8CDC7 926ED65A9E853FD9 552A09E141D08AE3
        D1E708FD13778787

   8
   In   864F408C8AB8CDC7 926ED65A9E853FD9 552A09E141D08AE3
        D1E708FD13778787
   XorT 864F408C8AB8CDCF 926ED65A9E853FD9 552A09E141D08AE3
        D1E708FD13778787
   Dec  5A994895D81644B0 926ED65A9E853FD9 AE82BC1118A5DEA4
        D1E708FD13778787

   7
   In   5A994895D81644B0 926ED65A9E853FD9 AE82BC1118A5DEA4
        D1E708FD13778787
   XorT 5A994895D81644B7 926ED65A9E853FD9 AE82BC1118A5DEA4
        D1E708FD13778787
   Dec  A187755AEA64719A A08DAA041D17BBBA AE82BC1118A5DEA4
        D1E708FD13778787

   6
   In   A187755AEA64719A A08DAA041D17BBBA AE82BC1118A5DEA4
        D1E708FD13778787
   XorT A187755AEA64719C A08DAA041D17BBBA AE82BC1118A5DEA4
        D1E708FD13778787
   Dec  15B61F7B25D51705 A08DAA041D17BBBA AE82BC1118A5DEA4
        FF540E514DE120A3




Schaad & Housley             Informational                     [Page 22]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   5
   In   15B61F7B25D51705 A08DAA041D17BBBA AE82BC1118A5DEA4
        FF540E514DE120A3
   XorT 15B61F7B25D51700 A08DAA041D17BBBA AE82BC1118A5DEA4
        FF540E514DE120A3
   Dec  E727C7BDF822602A A08DAA041D17BBBA 51F22F3286758A2D
        FF540E514DE120A3

   4
   In   E727C7BDF822602A A08DAA041D17BBBA 51F22F3286758A2D
        FF540E514DE120A3
   XorT E727C7BDF822602E A08DAA041D17BBBA 51F22F3286758A2D
        FF540E514DE120A3
   Dec  2C8E19A519025B7F 351D385096CCFB29 51F22F3286758A2D
        FF540E514DE120A3

   3
   In   2C8E19A519025B7F 351D385096CCFB29 51F22F3286758A2D
        FF540E514DE120A3
   XorT 2C8E19A519025B7C 351D385096CCFB29 51F22F3286758A2D
        FF540E514DE120A3
   Dec  9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D
        0001020304050607

   2
   In   9D9B32B9ED742E00 351D385096CCFB29 51F22F3286758A2D
        0001020304050607
   XorT 9D9B32B9ED742E02 351D385096CCFB29 51F22F3286758A2D
        0001020304050607
   Dec  DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF
        0001020304050607

   1
   In   DFE8FD5D1A3786A6 351D385096CCFB29 8899AABBCCDDEEFF
        0001020304050607
   XorT DFE8FD5D1A3786A7 351D385096CCFB29 8899AABBCCDDEEFF
        0001020304050607
   Dec  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
        0001020304050607

   Plaintext  A6A6A6A6A6A6A6A6 0011223344556677
              8899AABBCCDDEEFF 0001020304050607
   Output:
   Key Data:  00112233445566778899AABBCCDDEEFF0001020304050607







Schaad & Housley             Informational                     [Page 23]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


4.5 Wrap 192 bits of Key Data with a 256-bit KEK

   Input:
   KEK:
     000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
   Key Data:    00112233445566778899AABBCCDDEEFF0001020304050607

   Wrap:

   Step t     A/R3             R1               R2

   1
   In   A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
        0001020304050607
   Enc  794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607
   XorT 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607

   2
   In   794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607
   Enc  D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607
   XorT D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607

   3
   In   D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607
   Enc  9DF8F5405FBC00C1 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154
   XorT 9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154

   4
   In   9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154
   Enc  F1D28EA6295891EC 0CC86A4D9B9C6A31 F60E0CDB7F429FE8
        6CA405593A3B5154
   XorT F1D28EA6295891E8 0CC86A4D9B9C6A31 F60E0CDB7F429FE8
        6CA405593A3B5154









Schaad & Housley             Informational                     [Page 24]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   5
   In   F1D28EA6295891E8 0CC86A4D9B9C6A31 F60E0CDB7F429FE8
        6CA405593A3B5154
   Enc  BF213BFD04E8A24F 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        6CA405593A3B5154
   XorT BF213BFD04E8A24A 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        6CA405593A3B5154

   6
   In   BF213BFD04E8A24A 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        6CA405593A3B5154
   Enc  6F85BFBDB7E880E3 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   XorT 6F85BFBDB7E880E5 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B

   7
   In   6F85BFBDB7E880E5 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   Enc  D532789E4E79D819 444F92BF78E77BB1 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   XorT D532789E4E79D81E 444F92BF78E77BB1 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B

   8
   In   D532789E4E79D81E 444F92BF78E77BB1 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   Enc  2A5FFCEF1F1916D8 444F92BF78E77BB1 C6874607903270CD
        39EBC1A1A53FF55B
   XorT 2A5FFCEF1F1916D0 444F92BF78E77BB1 C6874607903270CD
        39EBC1A1A53FF55B

   9
   In   2A5FFCEF1F1916D0 444F92BF78E77BB1 C6874607903270CD
        39EBC1A1A53FF55B
   Enc  01271BA91D9804F6 444F92BF78E77BB1 C6874607903270CD
        740A273461ED82C6
   XorT 01271BA91D9804FF 444F92BF78E77BB1 C6874607903270CD
        740A273461ED82C6

   10
   In   01271BA91D9804FF 444F92BF78E77BB1 C6874607903270CD
        740A273461ED82C6
   Enc  A3223BD7237F7033 FB1611A83BEB567F C6874607903270CD
        740A273461ED82C6
   XorT A3223BD7237F7039 FB1611A83BEB567F C6874607903270CD
        740A273461ED82C6




Schaad & Housley             Informational                     [Page 25]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   11
   In   A3223BD7237F7039 FB1611A83BEB567F C6874607903270CD
        740A273461ED82C6
   Enc  B50C330616E7B1C7 FB1611A83BEB567F 73EDC8CB9322C34E
        740A273461ED82C6
   XorT B50C330616E7B1CC FB1611A83BEB567F 73EDC8CB9322C34E
        740A273461ED82C6

   12
   In   B50C330616E7B1CC FB1611A83BEB567F 73EDC8CB9322C34E
        740A273461ED82C6
   Enc  FB8AFF3F083E12CE FB1611A83BEB567F 73EDC8CB9322C34E
        0B08CFDF48020F0D
   XorT FB8AFF3F083E12C2 FB1611A83BEB567F 73EDC8CB9322C34E
        0B08CFDF48020F0D

   13
   In   FB8AFF3F083E12C2 FB1611A83BEB567F 73EDC8CB9322C34E
        0B08CFDF48020F0D
   Enc  82F597607784A33C FB1F2965FCE1E783 73EDC8CB9322C34E
        0B08CFDF48020F0D
   XorT 82F597607784A331 FB1F2965FCE1E783 73EDC8CB9322C34E
        0B08CFDF48020F0D

   14
   In   82F597607784A331 FB1F2965FCE1E783 73EDC8CB9322C34E
        0B08CFDF48020F0D
   Enc  D48E5E83B7C906DB FB1F2965FCE1E783 D36F4FFBA2C82ED9
        0B08CFDF48020F0D
   XorT D48E5E83B7C906D5 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        0B08CFDF48020F0D

   15
   In   D48E5E83B7C906D5 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        0B08CFDF48020F0D
   Enc  1BF2B1CD947311B6 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        C490C33642717146
   XorT 1BF2B1CD947311B9 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        C490C33642717146

   16
   In   1BF2B1CD947311B9 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        C490C33642717146
   Enc  C9F5F26A378011DE F6E6F4FBE30E71E4 D36F4FFBA2C82ED9
        C490C33642717146
   XorT C9F5F26A378011CE F6E6F4FBE30E71E4 D36F4FFBA2C82ED9
        C490C33642717146




Schaad & Housley             Informational                     [Page 26]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   17
   In   C9F5F26A378011CE F6E6F4FBE30E71E4 D36F4FFBA2C82ED9
        C490C33642717146
   Enc  39128CE5E435F3A0 F6E6F4FBE30E71E4 769C8B80A32CB895
        C490C33642717146
   XorT 39128CE5E4325F3B1 F6E6F4FBE30E71E4 769C8B80A32CB895
        C490C33642717146

   18
   In   39128CE5E435F3B1 F6E6F4FBE30E71E4 769C8B80A32CB895
        C490C33642717146
   Enc  A8F9BC1612C68B2D F6E6F4FBE30E71E4 769C8B80A32CB895
        8CD5D17D6B254DA1
   XorT A8F9BC1612C68B3F F6E6F4FBE30E71E4 769C8B80A32CB895
        8CD5D17D6B254DA1

   Ciphertext   A8F9BC1612C68B3F F6E6F4FBE30E71E4
                769C8B80A32CB895 8CD5D17D6B254DA1

   Unwrap:

   Step t     A/R3             R1               R2

   18
   In   A8F9BC1612C68B3F F6E6F4FBE30E71E4 769C8B80A32CB895
        8CD5D17D6B254DA1
   XorT A8F9BC1612C68B2D F6E6F4FBE30E71E4 769C8B80A32CB895
        8CD5D17D6B254DA1
   Dec  39128CE5E435F3B1 F6E6F4FBE30E71E4 769C8B80A32CB895
        C490C33642717146

   17
   In   39128CE5E435F3B1 F6E6F4FBE30E71E4 769C8B80A32CB895
        C490C33642717146
   XorT 39128CE5E435F3A0 F6E6F4FBE30E71E4 769C8B80A32CB895
        C490C33642717146
   Dec  C9F5F26A378011CE F6E6F4FBE30E71E4 D36F4FFBA2C82ED9
        C490C33642717146

   16
   In   C9F5F26A378011CE F6E6F4FBE30E71E4 D36F4FFBA2C82ED9
        C490C33642717146
   XorT C9F5F26A378011DE F6E6F4FBE30E71E4 D36F4FFBA2C82ED9
        C490C33642717146
   Dec  1BF2B1CD947311B9 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        C490C33642717146





Schaad & Housley             Informational                     [Page 27]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   15
   In   1BF2B1CD947311B9 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        C490C33642717146
   XorT 1BF2B1CD947311B6 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        C490C33642717146
   Dec  D48E5E83B7C906D5 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        0B08CFDF48020F0D

   14
   In   D48E5E83B7C906D5 FB1F2965FCE1E783 D36F4FFBA2C82ED9
        0B08CFDF48020F0D
   XorT D48E5E83B7C906DB FB1F2965FCE1E783 D36F4FFBA2C82ED9
        0B08CFDF48020F0D
   Dec  82F597607784A331 FB1F2965FCE1E783 73EDC8CB9322C34E
        0B08CFDF48020F0D

   13
   In   82F597607784A331 FB1F2965FCE1E783 73EDC8CB9322C34E
        0B08CFDF48020F0D
   XorT 82F597607784A33C FB1F2965FCE1E783 73EDC8CB9322C34E
        0B08CFDF48020F0D
   Dec  FB8AFF3F083E12C2 FB1611A83BEB567F 73EDC8CB9322C34E
        0B08CFDF48020F0D

   12
   In   FB8AFF3F083E12C2 FB1611A83BEB567F 73EDC8CB9322C34E
        0B08CFDF48020F0D
   XorT FB8AFF3F083E12CE FB1611A83BEB567F 73EDC8CB9322C34E
        0B08CFDF48020F0D
   Dec  B50C330616E7B1CC FB1611A83BEB567F 73EDC8CB9322C34E
        740A273461ED82C6

   11
   In   B50C330616E7B1CC FB1611A83BEB567F 73EDC8CB9322C34E
        740A273461ED82C6
   XorT B50C330616E7B1C7 FB1611A83BEB567F 73EDC8CB9322C34E
        740A273461ED82C6
   Dec  A3223BD7237F7039 FB1611A83BEB567F C6874607903270CD
        740A273461ED82C6

   10
   In   A3223BD7237F7039 FB1611A83BEB567F C6874607903270CD
        740A273461ED82C6
   XorT A3223BD7237F7033 FB1611A83BEB567F C6874607903270CD
        740A273461ED82C6
   Dec  01271BA91D9804FF 444F92BF78E77BB1 C6874607903270CD
        740A273461ED82C6




Schaad & Housley             Informational                     [Page 28]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   9
   In   01271BA91D9804FF 444F92BF78E77BB1 C6874607903270CD
        740A273461ED82C6
   XorT 01271BA91D9804F6 444F92BF78E77BB1 C6874607903270CD
        740A273461ED82C6
   Dec  2A5FFCEF1F1916D0 444F92BF78E77BB1 C6874607903270CD
        39EBC1A1A53FF55B

   8
   In   2A5FFCEF1F1916D0 444F92BF78E77BB1 C6874607903270CD
        39EBC1A1A53FF55B
   XorT 2A5FFCEF1F1916D8 444F92BF78E77BB1 C6874607903270CD
        39EBC1A1A53FF55B
   Dec  D532789E4E79D81E 444F92BF78E77BB1 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B

   7
   In   D532789E4E79D81E 444F92BF78E77BB1 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   XorT D532789E4E79D819 444F92BF78E77BB1 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   Dec  6F85BFBDB7E880E5 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B

   6
   In   6F85BFBDB7E880E5 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   XorT 6F85BFBDB7E880E3 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        39EBC1A1A53FF55B
   Dec  BF213BFD04E8A24A 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        6CA405593A3B5154

   5
   In   BF213BFD04E8A24A 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        6CA405593A3B5154
   XorT BF213BFD04E8A24F 0CC86A4D9B9C6A31 AEBE2D5C8BF747A9
        6CA405593A3B5154
   Dec  F1D28EA6295891E8 0CC86A4D9B9C6A31 F60E0CDB7F429FE8
        6CA405593A3B5154

   4
   In   F1D28EA6295891E8 0CC86A4D9B9C6A31 F60E0CDB7F429FE8
        6CA405593A3B5154
   XorT F1D28EA6295891EC 0CC86A4D9B9C6A31 F60E0CDB7F429FE8
        6CA405593A3B5154
   Dec  9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154




Schaad & Housley             Informational                     [Page 29]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   3
   In   9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154
   XorT 9DF8F5405FBC00C1 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154
   Dec  D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607

   2
   In   D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607
   XorT D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607
   Dec  794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607

   1
   In   794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607
   XorT 794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607
   Dec  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
        0001020304050607

   Plaintext  A6A6A6A6A6A6A6A6 0011223344556677
              8899AABBCCDDEEFF 0001020304050607

   Output:
   Key Data:  00112233445566778899AABBCCDDEEFF0001020304050607

4.6 Wrap 256 bits of Key Data with a 256-bit KEK

   Input:
   KEK:
     000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
   Key Data:
     00112233445566778899AABBCCDDEEFF000102030405060708090A0B0C0D0E0F














Schaad & Housley             Informational                     [Page 30]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   Wrap:

   Step t     A/R3             R1/R4            R2

   1
   In   A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F
   Enc  794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F
   XorT 794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F

   2
   In   794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F
   Enc  D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607 08090A0B0C0D0E0F
   XorT D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607 08090A0B0C0D0E0F

   3
   In   D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607 08090A0B0C0D0E0F
   Enc  9DF8F5405FBC00C1 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 08090A0B0C0D0E0F
   XorT 9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 08090A0B0C0D0E0F

   4
   In   9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 08090A0B0C0D0E0F
   Enc  564408FDD0DD2EA4 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   XorT 564408FDD0DD2EA0 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC

   5
   In   564408FDD0DD2EA0 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   Enc  4EF02EDD3146AFBB E7D1194D853E53F8 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   XorT 4EF02EDD3146AFBE E7D1194D853E53F8 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC








Schaad & Housley             Informational                     [Page 31]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   6
   In   4EF02EDD3146AFBE E7D1194D853E53F8 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   Enc  963AAFFD96B223EC E7D1194D853E53F8 EFD48BA304945576
        6CA405593A3B5154 E5923CB9FDB56FBC
   XorT 963AAFFD96B223EA E7D1194D853E53F8 EFD48BA304945576
        6CA405593A3B5154 E5923CB9FDB56FBC

   7
   In   963AAFFD96B223EA E7D1194D853E53F8 EFD48BA304945576
        6CA405593A3B5154 E5923CB9FDB56FBC
   Enc  66D7A8ADD086B9DD E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 E5923CB9FDB56FBC
   XorT 66D7A8ADD086B9DA E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 E5923CB9FDB56FBC

   8
   In   66D7A8ADD086B9DA E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 E5923CB9FDB56FBC
   Enc  C58B9D3AC6D5B94E E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   XorT C58B9D3AC6D5B946 E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74

   9
   In   C58B9D3AC6D5B946 E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   Enc  1A681354E84C41F8 D6AE29ECE7192D43 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   XorT 1A681354E84C41F1 D6AE29ECE7192D43 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74

   10
   In   1A681354E84C41F1 D6AE29ECE7192D43 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   Enc  DBA417FB51F9E3CB D6AE29ECE7192D43 FBEC169FA5C0F6BA
        C365B66943E2D760 73E3B6CBE5D05D74
   XorT DBA417FB51F9E3C1 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        C365B66943E2D760 73E3B6CBE5D05D74

   11
   In   DBA417FB51F9E3C1 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        C365B66943E2D760 73E3B6CBE5D05D74
   Enc  0629EB29A42E4FD9 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 73E3B6CBE5D05D74
   XorT 0629EB29A42E4FD2 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 73E3B6CBE5D05D74




Schaad & Housley             Informational                     [Page 32]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   12
   In   0629EB29A42E4FD2 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 73E3B6CBE5D05D74
   Enc  F9ED8A1429515665 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   XorT F9ED8A1429515669 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9

   13
   In   F9ED8A1429515669 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   Enc  2E8E2B6BB2016696 4745856AF333F01F FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   XorT 2E8E2B6BB201669B 4745856AF333F01F FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9

   14
   In   2E8E2B6BB201669B 4745856AF333F01F FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   Enc  15342443CB95ADB1 4745856AF333F01F BCA418BBF7DCE60B
        F56701DAF0388216 3CF149E90E8C04D9
   XorT 15342443CB95ADBF 4745856AF333F01F BCA418BBF7DCE60B
        F56701DAF0388216 3CF149E90E8C04D9

   15
   In   15342443CB95ADBF 4745856AF333F01F BCA418BBF7DCE60B
        F56701DAF0388216 3CF149E90E8C04D9
   Enc  33FE29365885C4B7 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 3CF149E90E8C04D9
   XorT 33FE29365885C4B8 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 3CF149E90E8C04D9

   16
   In   33FE29365885C4B8 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 3CF149E90E8C04D9
   Enc  5075496800978B4A 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   XorT 5075496800978B5A 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C

   17
   In   5075496800978B5A 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   Enc  A5382A26B47551F1 1BB8C765A84195E7 BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   XorT A5382A26B47551E0 1BB8C765A84195E7 BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C




Schaad & Housley             Informational                     [Page 33]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   18
   In   A5382A26B47551E0 1BB8C765A84195E7 BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   Enc  F19D80D437EFE8F9 1BB8C765A84195E7 F7EDAD518C960D36
        C272E9466AAE98F9 40F68C91DB49702C
   XorT F19D80D437EFE8EB 1BB8C765A84195E7 F7EDAD518C960D36
        C272E9466AAE98F9 40F68C91DB49702C

   19
   In   F19D80D437EFE8EB 1BB8C765A84195E7 F7EDAD518C960D36
        C272E9466AAE98F9 40F68C91DB49702C
   Enc  B422B444B87A190B 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 40F68C91DB49702C
   XorT B422B444B87A1918 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 40F68C91DB49702C

   20
   In   B422B444B87A1918 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 40F68C91DB49702C
   Enc  D058823360F88A37 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   XorT D058823360F88A23 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73

   21
   In   D058823360F88A23 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   Enc  C89A96CA7B163ECC CBCCB35CFB87F826 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   XorT C89A96CA7B163ED9 CBCCB35CFB87F826 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73

   22
   In   C89A96CA7B163ED9 CBCCB35CFB87F826 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   Enc  39D02FE7435870ED CBCCB35CFB87F826 3F5786E2D80ED326
        1CFBF6B4C24CB982 07DFE775B9687E73
   XorT 39D02FE7435870FB CBCCB35CFB87F826 3F5786E2D80ED326
        1CFBF6B4C24CB982 07DFE775B9687E73

   23
   In   39D02FE7435870FB CBCCB35CFB87F826 3F5786E2D80ED326
        1CFBF6B4C24CB982 07DFE775B9687E73
   Enc  0AEB82AE3146A91B CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B 07DFE775B9687E73
   XorT 0AEB82AE3146A90C CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B 07DFE775B9687E73




Schaad & Housley             Informational                     [Page 34]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   24
   In   0AEB82AE3146A90C CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B 07DFE775B9687E73
   Enc  28C9F404C4B810EC CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B FB988B9B7A02DD21
   XorT 28C9F404C4B810F4 CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B FB988B9B7A02DD21

   Output:
   Ciphertext  28C9F404C4B810F4 CBCCB35CFB87F826 3F5786E2D80ED326
               CBC7F0E71A99F43B FB988B9B7A02DD21

   Unwrap:

   Step t     A/R3             R1/R4            R2

   24
   In   28C9F404C4B810F4 CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B FB988B9B7A02DD21
   XorT 28C9F404C4B810EC CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B FB988B9B7A02DD21
   Dec  0AEB82AE3146A90C CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B 07DFE775B9687E73

   23
   In   0AEB82AE3146A90C CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B 07DFE775B9687E73
   XorT 0AEB82AE3146A91B CBCCB35CFB87F826 3F5786E2D80ED326
        CBC7F0E71A99F43B 07DFE775B9687E73
   Dec  39D02FE7435870FB CBCCB35CFB87F826 3F5786E2D80ED326
        1CFBF6B4C24CB982 07DFE775B9687E73

   22
   In   39D02FE7435870FB CBCCB35CFB87F826 3F5786E2D80ED326
        1CFBF6B4C24CB982 07DFE775B9687E73
   XorT 39D02FE7435870ED CBCCB35CFB87F826 3F5786E2D80ED326
        1CFBF6B4C24CB982 07DFE775B9687E73
   Dec  C89A96CA7B163ED9 CBCCB35CFB87F826 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73

   21
   In   C89A96CA7B163ED9 CBCCB35CFB87F826 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   XorT C89A96CA7B163ECC CBCCB35CFB87F826 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   Dec  D058823360F88A23 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73




Schaad & Housley             Informational                     [Page 35]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   20
   In   D058823360F88A23 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   XorT D058823360F88A37 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 07DFE775B9687E73
   Dec  B422B444B87A1918 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 40F68C91DB49702C

   19
   In   B422B444B87A1918 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 40F68C91DB49702C
   XorT B422B444B87A190B 1BB8C765A84195E7 F7EDAD518C960D36
        1CFBF6B4C24CB982 40F68C91DB49702C
   Dec  F19D80D437EFE8EB 1BB8C765A84195E7 F7EDAD518C960D36
        C272E9466AAE98F9 40F68C91DB49702C

   18
   In   F19D80D437EFE8EB 1BB8C765A84195E7 F7EDAD518C960D36
        C272E9466AAE98F9 40F68C91DB49702C
   XorT F19D80D437EFE8F9 1BB8C765A84195E7 F7EDAD518C960D36
        C272E9466AAE98F9 40F68C91DB49702C
   Dec  A5382A26B47551E0 1BB8C765A84195E7 BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C

   17
   In   A5382A26B47551E0 1BB8C765A84195E7 BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   XorT A5382A26B47551F1 1BB8C765A84195E7 BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   Dec  5075496800978B5A 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C

   16
   In   5075496800978B5A 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   XorT 5075496800978B4A 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 40F68C91DB49702C
   Dec  33FE29365885C4B8 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 3CF149E90E8C04D9

   15
   In   33FE29365885C4B8 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 3CF149E90E8C04D9
   XorT 33FE29365885C4B7 4745856AF333F01F BCA418BBF7DCE60B
        C272E9466AAE98F9 3CF149E90E8C04D9
   Dec  15342443CB95ADBF 4745856AF333F01F BCA418BBF7DCE60B
        F56701DAF0388216 3CF149E90E8C04D9




Schaad & Housley             Informational                     [Page 36]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


   14
   In   15342443CB95ADBF 4745856AF333F01F BCA418BBF7DCE60B
        F56701DAF0388216 3CF149E90E8C04D9
   XorT 15342443CB95ADB1 4745856AF333F01F BCA418BBF7DCE60B
        F56701DAF0388216 3CF149E90E8C04D9
   Dec  2E8E2B6BB201669B 4745856AF333F01F FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9

   13
   In   2E8E2B6BB201669B 4745856AF333F01F FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   XorT 2E8E2B6BB2016696 4745856AF333F01F FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   Dec  F9ED8A1429515669 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9

   12
   In   F9ED8A1429515669 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   XorT F9ED8A1429515665 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 3CF149E90E8C04D9
   Dec  0629EB29A42E4FD2 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 73E3B6CBE5D05D74

   11
   In   0629EB29A42E4FD2 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        F56701DAF0388216 73E3B6CBE5D05D74
   XorT 0629EB29A42E4FD9 D6AE29ECE7192D43 FBEC169FA5C0F6BA

        F56701DAF0388216 73E3B6CBE5D05D74
   Dec  DBA417FB51F9E3C1 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        C365B66943E2D760 73E3B6CBE5D05D74

   10
   In   DBA417FB51F9E3C1 D6AE29ECE7192D43 FBEC169FA5C0F6BA
        C365B66943E2D760 73E3B6CBE5D05D74
   XorT DBA417FB51F9E3CB D6AE29ECE7192D43 FBEC169FA5C0F6BA
        C365B66943E2D760 73E3B6CBE5D05D74
   Dec  1A681354E84C41F1 D6AE29ECE7192D43 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74

   9
   In   1A681354E84C41F1 D6AE29ECE7192D43 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   XorT 1A681354E84C41F8 D6AE29ECE7192D43 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   Dec  C58B9D3AC6D5B946 E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74



Schaad & Housley             Informational                     [Page 37]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002



   8
   In   C58B9D3AC6D5B946 E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   XorT C58B9D3AC6D5B94E E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 73E3B6CBE5D05D74
   Dec  66D7A8ADD086B9DA E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 E5923CB9FDB56FBC

   7
   In   66D7A8ADD086B9DA E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 E5923CB9FDB56FBC
   XorT 66D7A8ADD086B9DD E7D1194D853E53F8 EFD48BA304945576
        C365B66943E2D760 E5923CB9FDB56FBC
   Dec  963AAFFD96B223EA E7D1194D853E53F8 EFD48BA304945576
        6CA405593A3B5154 E5923CB9FDB56FBC

   6
   In   963AAFFD96B223EA E7D1194D853E53F8 EFD48BA304945576
        6CA405593A3B5154 E5923CB9FDB56FBC
   XorT 963AAFFD96B223EC E7D1194D853E53F8 EFD48BA304945576
        6CA405593A3B5154 E5923CB9FDB56FBC
   Dec  4EF02EDD3146AFBE E7D1194D853E53F8 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC

   5
   In   4EF02EDD3146AFBE E7D1194D853E53F8 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   XorT 4EF02EDD3146AFBB E7D1194D853E53F8 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   Dec  564408FDD0DD2EA0 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC

   4
   In   564408FDD0DD2EA0 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   XorT 564408FDD0DD2EA4 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 E5923CB9FDB56FBC
   Dec  9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 08090A0B0C0D0E0F

   3
   In   9DF8F5405FBC00C2 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 08090A0B0C0D0E0F
   XorT 9DF8F5405FBC00C1 F661BD9F31FBFA31 F60E0CDB7F429FE8
        6CA405593A3B5154 08090A0B0C0D0E0F
   Dec  D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607 08090A0B0C0D0E0F



Schaad & Housley             Informational                     [Page 38]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002



   2
   In   D450EA5C5BBCB563 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607 08090A0B0C0D0E0F
   XorT D450EA5C5BBCB561 F661BD9F31FBFA31 F60E0CDB7F429FE8
        0001020304050607 08090A0B0C0D0E0F
   Dec  794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F

   1
   In   794314D454E3FDE0 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F
   XorT 794314D454E3FDE1 F661BD9F31FBFA31 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F
   Dec  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
        0001020304050607 08090A0B0C0D0E0F

   Plaintext  A6A6A6A6A6A6A6A6 0011223344556677 8899AABBCCDDEEFF
              0001020304050607 08090A0B0C0D0E0F

   Output:
   Key Data:
        00112233445566778899AABBCCDDEEFF000102030405060708090A0B0C0D0E0F

5. Security Considerations

   The key wrap algorithm includes a strong integrity check on the key
   data.  If unwrapping produces the expected check value in A[0], then
   the chance that the key data is corrupt is 2^-64.  If unwrapping
   produces an unexpected value, then the algorithm implementation MUST
   return an error, and it MUST NOT return any key data.

   Implementations must protect the KEK from disclosure.  Compromise of
   the KEK may result in the disclosure of all key data protected with
   that KEK.

6. References

   AES       National Institute of Standards and Technology. FIPS Pub
             197: Advanced Encryption Standard (AES). 26 November 2001.

   AES-WRAP  National Institute of Standards and Technology. AES Key
             Wrap Specification. 17 November 2001.
             [http://csrc.nist.gov/encryption/kms/key-wrap.pdf]







Schaad & Housley             Informational                     [Page 39]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


7. Acknowledgments

   Most of the text in this document is taken from [AES-WRAP].  The
   authors of that document are responsible for the development of the
   AES key wrap algorithm.

8. Authors' Addresses

   Jim Schaad
   Soaring Hawk Consulting

   EMail: jimsch@exmsft.com


   Russell Housley
   RSA Laboratories
   918 Spring Knoll Drive
   Herndon, VA 20170
   USA

   EMail: rhousley@rsasecurity.com






























Schaad & Housley             Informational                     [Page 40]
^L
RFC 3394                AES Key Wrap Algorithm            September 2002


9. Full Copyright Statement

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others provided that the above copyright notice and this paragraph
   are included on all such copies.  However, this document itself may
   not be modified in any way, such as by removing the copyright notice
   or references to the Internet Society or other Internet
   organizations, except as required to translate it into languages
   other than English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS 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.

Acknowledgement

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

























Schaad & Housley             Informational                     [Page 41]
^L