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 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517
|
<pre>Network Working Group C. Adams
Request for Comments: 2025 Bell-Northern Research
Category: Standards Track October 1996
<span class="h1">The Simple Public-Key GSS-API Mechanism (SPKM)</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This specification defines protocols, procedures, and conventions to
be employed by peers implementing the Generic Security Service
Application Program Interface (as specified in RFCs 1508 and 1509)
when using the Simple Public-Key Mechanism.
Background
Although the Kerberos Version 5 GSS-API mechanism [KRB5] is becoming
well-established in many environments, it is important in some
applications to have a GSS-API mechanism which is based on a public-
key, rather than a symmetric-key, infrastructure. The mechanism
described in this document has been proposed to meet this need and to
provide the following features.
1) The SPKM allows both unilateral and mutual authentication
to be accomplished without the use of secure timestamps. This
enables environments which do not have access to secure time
to nevertheless have access to secure authentication.
2) The SPKM uses Algorithm Identifiers to specify various
algorithms to be used by the communicating peers. This allows
maximum flexibility for a variety of environments, for future
enhancements, and for alternative algorithms.
3) The SPKM allows the option of a true, asymmetric algorithm-
based, digital signature in the gss_sign() and gss_seal()
operations (now called gss_getMIC() and gss_wrap() in
[GSSv2]), rather than an integrity checksum based on a MAC
computed with a symmetric algorithm (e.g., DES). For some
environments, the availability of true digital signatures
supporting non-repudiation is a necessity.
<span class="grey">Adams Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
4) SPKM data formats and procedures are designed to be as similar
to those of the Kerberos mechanism as is practical. This is
done for ease of implementation in those environments where
Kerberos has already been implemented.
For the above reasons, it is felt that the SPKM will offer
flexibility and functionality, without undue complexity or overhead.
Key Management
The key management employed in SPKM is intended to be as compatible
as possible with both X.509 [X.509] and PEM [<a href="./rfc1422">RFC-1422</a>], since these
represent large communities of interest and show relative maturity in
standards.
Acknowledgments
Much of the material in this document is based on the Kerberos
Version 5 GSS-API mechanism [KRB5], and is intended to be as
compatible with it as possible. This document also owes a great debt
to Warwick Ford and Paul Van Oorschot of Bell-Northern Research for
many fruitful discussions, to Kelvin Desplanque for implementation-
related clarifications, to John Linn of OpenVision Technologies for
helpful comments, and to Bancroft Scott of OSS for ASN.1 assistance.
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Overview</span>
The goal of the Generic Security Service Application Program
Interface (GSS-API) is stated in the abstract of [<a href="./rfc1508">RFC-1508</a>] as
follows:
"This Generic Security Service Application Program Interface (GSS-
API) definition provides security services to callers in a generic
fashion, supportable with a range of underlying mechanisms and
technologies and hence allowing source-level portability of
applications to different environments. This specification defines
GSS-API services and primitives at a level independent of
underlying mechanism and programming language environment, and is
to be complemented by other, related specifications:
- documents defining specific parameter bindings for particular
language environments;
- documents defining token formats, protocols, and procedures to
be implemented in order to realize GSS-API services atop
particular security mechanisms."
<span class="grey">Adams Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
The SPKM is an instance of the latter type of document and is
therefore termed a "GSS-API Mechanism". This mechanism provides
authentication, key establishment, data integrity, and data
confidentiality in an on-line distributed application environment
using a public-key infrastructure. Because it conforms to the
interface defined by [<a href="./rfc1508">RFC-1508</a>], SPKM can be used as a drop-in
replacement by any application which makes use of security services
through GSS-API calls (for example, any application which already
uses the Kerberos GSS-API for security). The use of a public-key
infrastructure allows digital signatures supporting non-repudiation
to be employed for message exchanges, and provides other benefits
such as scalability to large user populations.
The tokens defined in SPKM are intended to be used by application
programs according to the GSS API "operational paradigm" (see [RFC-
1508] for further details):
The operational paradigm in which GSS-API operates is as follows.
A typical GSS-API caller is itself a communications protocol [or is
an application program which uses a communications protocol],
calling on GSS-API in order to protect its communications with
authentication, integrity, and/or confidentiality security
services. A GSS-API caller accepts tokens provided to it by its
local GSS-API implementation [i.e., its GSS-API mechanism] and
transfers the tokens to a peer on a remote system; that peer passes
the received tokens to its local GSS-API implementation for
processing.
This document defines two separate GSS-API mechanisms, SPKM-1 and
SPKM-2, whose primary difference is that SPKM-2 requires the
presence of secure timestamps for the purpose of replay detection
during context establishment and SPKM-1 does not. This allows
greater flexibility for applications since secure timestamps cannot
always be guaranteed to be available in a given environment.
<span class="grey">Adams Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Algorithms</span>
A number of algorithm types are employed in SPKM. Each type, along
with its purpose and a set of specific examples, is described in this
section. In order to ensure at least a minimum level of
interoperability among various implementations of SPKM, one of the
integrity algorithms is specified as MANDATORY; all remaining
examples (and any other algorithms) may optionally be supported by a
given SPKM implementation (note that a GSS-conformant mechanism need
not support confidentiality). Making a confidentiality algorithm
mandatory may preclude exportability of the mechanism implementation;
this document therefore specifies certain algorithms as RECOMMENDED
(that is, interoperability will be enhanced if these algorithms are
included in all SPKM implementations for which exportability is not a
concern).
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a> Integrity Algorithm (I-ALG):</span>
Purpose:
This algorithm is used to ensure that a message has not been
altered in any way after being constructed by the legitimate
sender. Depending on the algorithm used, the application of
this algorithm may also provide authenticity and support non-
repudiation for the message.
Examples:
md5WithRSAEncryption OBJECT IDENTIFIER ::= {
iso(1) member-body(2) US(840) rsadsi(113549) pkcs(1)
pkcs-1(1) 4 -- imported from [PKCS1]
}
This algorithm (MANDATORY) provides data integrity and
authenticity and supports non-repudiation by computing an
RSA signature on the MD5 hash of that data. This is
essentially equivalent to md5WithRSA {1 3 14 3 2 3},
which is defined by OIW (the Open Systems Environment
Implementors' Workshop).
Note that since this is the only integrity/authenticity
algorithm specified to be mandatory at this time, for
interoperability reasons it is also stipulated that
md5WithRSA be the algorithm used to sign all context
establishment tokens which are signed rather than MACed --
see <a href="#section-3.1.1">Section 3.1.1</a> for details. In future versions of this
document, alternate or additional algorithms may be
specified to be mandatory and so this stipulation on the
<span class="grey">Adams Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
context establishment tokens may be removed.
DES-MAC OBJECT IDENTIFIER ::= {
iso(1) identified-organization(3) oiw(14) secsig(3)
algorithm(2) 10 -- carries length in bits of the MAC as
} -- an INTEGER parameter, constrained to
-- multiples of eight from 16 to 64
This algorithm (RECOMMENDED) provides integrity by computing
a DES MAC (as specified by [FIPS-113]) on that data.
md5-DES-CBC OBJECT IDENTIFIER ::= {
iso(1) identified-organization(3) dod(6) internet(1)
security(5) integrity(3) md5-DES-CBC(1)
}
This algorithm provides data integrity by encrypting, using
DES CBC, the "confounded" MD5 hash of that data (see <a href="#section-3.2.2.1">Section</a>
<a href="#section-3.2.2.1">3.2.2.1</a> for the definition and purpose of confounding).
This will typically be faster in practice than computing a
DES MAC unless the input data is extremely short (e.g., a
few bytes). Note that without the confounder the strength
of this integrity mechanism is (at most) equal to the
strength of DES under a known-plaintext attack.
sum64-DES-CBC OBJECT IDENTIFIER ::= {
iso(1) identified-organization(3) dod(6) internet(1)
security(5) integrity(3) sum64-DES-CBC(2)
}
This algorithm provides data integrity by encrypting, using
DES CBC, the concatenation of the confounded data and the
sum of all the input data blocks (the sum computed using
addition modulo 2**64 - 1). Thus, in this algorithm,
encryption is a requirement for the integrity to be secure.
For comments regarding the security of this integrity
algorithm, see [Juen84, Davi89].
<span class="grey">Adams Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a> Confidentiality Algorithm (C-ALG):</span>
Purpose:
This symmetric algorithm is used to generate the encrypted
data for gss_seal() / gss_wrap().
Example:
DES-CBC OBJECT IDENTIFIER ::= {
iso(1) identified-organization(3) oiw(14) secsig(3)
algorithm(2) 7 -- carries IV (OCTET STRING) as a parameter;
} -- this (optional) parameter is unused in
-- SPKM due to the use of confounding
This algorithm is RECOMMENDED.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a> Key Establishment Algorithm (K-ALG):</span>
Purpose:
This algorithm is used to establish a symmetric key for use
by both the initiator and the target over the established
context. The keys used for C-ALG and any keyed I-ALGs (for
example, DES-MAC) are derived from this context key. As will
be seen in <a href="#section-3.1">Section 3.1</a>, key establishment is done within the
X.509 authentication exchange and so the resulting shared
symmetric key is authenticated.
Examples:
RSAEncryption OBJECT IDENTIFIER ::= {
iso(1) member-body(2) US(840) rsadsi(113549) pkcs(1)
pkcs-1(1) 1 -- imported from [PKCS1] and [<a href="./rfc1423">RFC-1423</a>]
}
In this algorithm (MANDATORY), the context key is generated
by the initiator, encrypted with the RSA public key of the
target, and sent to the target. The target need not respond
to the initiator for the key to be established.
id-rsa-key-transport OBJECT IDENTIFIER ::= {
iso(1) identified-organization(3) oiw(14) secsig(3)
algorithm(2) 22 -- imported from [X9.44]
}
Similar to RSAEncryption, but source authenticating info.
is also encrypted with the target's RSA public key.
<span class="grey">Adams Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
dhKeyAgreement OBJECT IDENTIFIER ::= {
iso(1) member-body(2) US(840) rsadsi(113549) pkcs(1)
pkcs-3(3) 1
}
In this algorithm, the context key is generated jointly by
the initiator and the target using the Diffie-Hellman key
establishment algorithm. The target must therefore respond
to the initiator for the key to be established (so this
K-ALG cannot be used with unilateral authentication in
SPKM-2 (see <a href="#section-3.1">Section 3.1</a>)).
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a> One-Way Function (O-ALG) for Subkey Derivation Algorithm:</span>
Purpose:
Having established a context key using the negotiated K-ALG,
both initiator and target must be able to derive a set of
subkeys for the various C-ALGs and keyed I-ALGs supported over
the context. Let the (ordered) list of agreed C-ALGs be
numbered consecutively, so that the first algorithm (the
"default") is numbered "0", the next is numbered "1", and so
on. Let the numbering for the (ordered) list of agreed I-ALGs
be identical. Finally, let the context key be a binary string
of arbitrary length "M", subject to the following constraint:
L <= M <= U (where the lower limit "L" is the bit length of
the longest key needed by any agreed C-ALG or keyed I-ALG, and
the upper limit "U" is the largest bit size which will fit
within the K-ALG parameters).
For example, if DES and two-key-triple-DES are the negotiated
confidentiality algorithms and DES-MAC is the negotiated keyed
integrity algorithm (note that digital signatures do not use a
context key), then the context key must be at least 112 bits
long. If 512-bit RSAEncryption is the K-ALG in use then the
originator can randomly generate a context key of any greater
length up to 424 bits (the longest allowable RSA input
specified in [PKCS-1]) -- the target can determine the length
which was chosen by removing the padding bytes during the RSA
decryption operation. On the other hand, if dhKeyAgreement is
the K-ALG in use then the context key is the result of the
Diffie-Hellman computation (with the exception of the high-
order byte, which is discarded for security reasons), so that
its length is that of the Diffie-Hellman modulus, p, minus 8
bits.
<span class="grey">Adams Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
The derivation algorithm for a k-bit subkey is specified as
follows:
rightmost_k_bits (OWF(context_key || x || n || s || context_key))
where
- "x" is the ASCII character "C" (0x43) if the subkey is
for a confidentiality algorithm or the ASCII character "I"
(0x49) if the subkey is for a keyed integrity algorithm;
- "n" is the number of the algorithm in the appropriate agreed
list for the context (the ASCII character "0" (0x30), "1"
(0x31), and so on);
- "s" is the "stage" of processing -- always the ASCII
character "0" (0x30), unless "k" is greater than the output
size of OWF, in which case the OWF is computed repeatedly
with increasing ASCII values of "stage" (each OWF output
being concatenated to the end of previous OWF outputs),
until "k" bits have been generated;
- "||" is the concatenation operation; and
- "OWF" is any appropriate One-Way Function.
Examples:
MD5 OBJECT IDENTIFIER ::= {
iso(1) member-body(2) US(840) rsadsi(113549)
digestAlgorithm(2) 5
}
This algorithm is MANDATORY.
SHA OBJECT IDENTIFIER ::= {
iso(1) identified-organization(3) oiw(14) secsig(3)
algorithm(2) 18
}
It is recognized that existing hash functions may not satisfy
all required properties of OWFs. This is the reason for
allowing negotiation of the O-ALG OWF during the context
establishment process (see <a href="#section-2.5">Section 2.5</a>), since in this way
future improvements in OWF design can easily be accommodated.
For example, in some environments a preferred OWF technique
might be an encryption algorithm which encrypts the input
specified above using the context_key as the encryption key.
<span class="grey">Adams Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a> Negotiation:</span>
During context establishment in SPKM, the initiator offers a set of
possible confidentiality algorithms and a set of possible integrity
algorithms to the target (note that the term "integrity algorithms"
includes digital signature algorithms). The confidentiality
algorithms selected by the target become ones that may be used for
C-ALG over the established context, and the integrity algorithms
selected by the target become ones that may be used for I-ALG over
the established context (the target "selects" algorithms by
returning, in the same relative order, the subset of each offered
list that it supports). Note that any C-ALG and I-ALG may be used
for any message over the context and that the first confidentiality
algorithm and the first integrity algorithm in the agreed sets become
the default algorithms for that context.
The agreed confidentiality and integrity algorithms for a specific
context define the valid values of the Quality of Protection (QOP)
parameter used in the gss_getMIC() and gss_wrap() calls -- see
<a href="#section-5.2">Section 5.2</a> for further details. If no response is expected from the
target (unilateral authentication in SPKM-2) then the algorithms
offered by the initiator are the ones that may be used over the
context (if this is unacceptable to the target then a delete token
must be sent to the initiator so that the context is never
established).
Furthermore, in the first context establishment token the initiator
offers a set of possible K-ALGs, along with the key (or key half)
corresponding to the first algorithm in the set (its preferred
algorithm). If this K-ALG is unacceptable to the target then the
target must choose one of the other K-ALGs in the set and send this
choice along with the key (or key half) corresponding to this choice
in its response (otherwise a delete token must be sent so that the
context is never established). If necessary (that is, if the target
chooses a 2-pass K-ALG such as dhKeyAgreement), the initiator will
send its key half in a response to the target.
Finally, in the first context establishment token the initiator
offers a set of possible O-ALGs (only a single O-ALG if no response
is expected). The (single) O-ALG chosen by the target becomes the
subkey derivation algorithm OWF to be used over the context.
In future versions of SPKM, other algorithms may be specified for any
or all of I-ALG, C-ALG, K-ALG, and O-ALG.
<span class="grey">Adams Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Token Formats</span>
This section discusses protocol-visible characteristics of the SPKM;
it defines elements of protocol for interoperability and is
independent of language bindings per [<a href="./rfc1509">RFC-1509</a>].
The SPKM GSS-API mechanism will be identified by an Object Identifier
representing "SPKM-1" or "SPKM-2", having the value {spkm spkm-1(1)}
or {spkm spkm-2(2)}, where spkm has the value {iso(1) identified-
organization(3) dod(6) internet(1) security(5) mechanisms(5)
spkm(1)}. SPKM-1 uses random numbers for replay detection during
context establishment and SPKM-2 uses timestamps (note that for both
mechanisms, sequence numbers are used to provide replay and out-of-
sequence detection during the context, if this has been requested by
the application).
Tokens transferred between GSS-API peers (for security context
management and per-message protection purposes) are defined.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Context Establishment Tokens</span>
Three classes of tokens are defined in this section: "Initiator"
tokens, emitted by calls to gss_init_sec_context() and consumed by
calls to gss_accept_sec_context(); "Target" tokens, emitted by calls
to gss_accept_sec_context() and consumed by calls to
gss_init_sec_context(); and "Error" tokens, potentially emitted by
calls to gss_init_sec_context() or gss_accept_sec_context(), and
potentially consumed by calls to gss_init_sec_context() or
gss_accept_sec_context().
Per <a href="./rfc1508#appendix-B">RFC-1508, Appendix B</a>, the initial context establishment token
will be enclosed within framing as follows:
InitialContextToken ::= [APPLICATION 0] IMPLICIT SEQUENCE {
thisMech MechType,
-- MechType is OBJECT IDENTIFIER
-- representing "SPKM-1" or "SPKM-2"
innerContextToken ANY DEFINED BY thisMech
} -- contents mechanism-specific
<span class="grey">Adams Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
When thisMech is SPKM-1 or SPKM-2, innerContextToken is defined as
follows:
SPKMInnerContextToken ::= CHOICE {
req [0] SPKM-REQ,
rep-ti [1] SPKM-REP-TI,
rep-it [2] SPKM-REP-IT,
error [3] SPKM-ERROR,
mic [4] SPKM-MIC,
wrap [5] SPKM-WRAP,
del [6] SPKM-DEL
}
The above GSS-API framing shall be applied to all tokens emitted by
the SPKM GSS-API mechanism, including SPKM-REP-TI (the response from
the Target to the Initiator), SPKM-REP-IT (the response from the
Initiator to the Target), SPKM-ERROR, context-deletion, and per-
message tokens, not just to the initial token in a context
establishment exchange. While not required by <a href="./rfc1508">RFC-1508</a>, this enables
implementations to perform enhanced error-checking. The tag values
provided in SPKMInnerContextToken ("[0]" through "[6]") specify a
token-id for each token; similar information is contained in each
token's tok-id field. While seemingly redundant, the tag value and
tok-id actually perform different tasks: the tag ensures that
InitialContextToken can be properly decoded; tok-id ensures, among
other things, that data associated with the per-message tokens is
cryptographically linked to the intended token type. Every
innerContextToken also includes a context-id field; see <a href="#section-6">Section 6</a> for
a discussion of both token-id and context-id information and their
use in an SPKM support function).
The innerContextToken field of context establishment tokens for the
SPKM GSS-API mechanism will contain one of the following messages:
SPKM-REQ; SPKM-REP-TI; SPKM-REP-IT; and SPKM-ERROR. Furthermore, all
innerContextTokens are encoded using ASN.1 BER (constrained, in the
interests of parsing simplicity, to the DER subset defined in
[X.509], clause 8.7).
The SPKM context establishment tokens are defined according to
[X.509] <a href="#section-10">Section 10</a> and are compatible with [9798]. SPKM-1 (random
numbers) uses <a href="#section-10.3">Section 10.3</a>, "Two-way Authentication", when performing
unilateral authentication of the target to the initiator and uses
<a href="#section-10.4">Section 10.4</a>, "Three-way Authentication", when mutual authentication
is requested by the initiator. SPKM-2 (timestamps) uses <a href="#section-10.2">Section</a>
<a href="#section-10.2">10.2</a>, "One-way Authentication", when performing unilateral
authentication of the initiator to the target and uses <a href="#section-10.3">Section 10.3</a>,
"Two-way Authentication", when mutual authentication is requested by
the initiator.
<span class="grey">Adams Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
The implication of the previous paragraph is that for SPKM-2
unilateral authentication no negotiation of K-ALG can be done (the
target either accepts the K-ALG and context key given by the
initiator or disallows the context). For SPKM-2 mutual or SPKM-1
unilateral authentication some negotiation is possible, but the
target can only choose among the one-pass K-ALGs offered by the
initiator (or disallow the context). Alternatively, the initiator
can request that the target generate and transmit the context key.
For SPKM-1 mutual authentication the target can choose any one- or
two-pass K-ALG offered by the initiator and, again, can be requested
to generate and transmit the context key.
It is envisioned that typical use of SPKM-1 or SPKM-2 will involve
mutual authentication. Although unilateral authentication is
available for both mechanisms, its use is not generally recommended.
<span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a>. Context Establishment Tokens - Initiator (first token)</span>
In order to accomplish context establishment, it may be necessary
that both the initiator and the target have access to the other
partys public-key certificate(s). In some environments the initiator
may choose to acquire all certificates and send the relevant ones to
the target in the first token. In other environments the initiator
may request that the target send certificate data in its response
token, or each side may individually obtain the certificate data it
needs. In any case, however, the SPKM implementation must have the
ability to obtain certificates which correspond to a supplied Name.
The actual mechanism to be used to achieve this is a local
implementation matter and is therefore outside the scope of this
specification.
Relevant SPKM-REQ syntax is as follows (note that imports from other
documents are given in <a href="#appendix-A">Appendix A</a>):
SPKM-REQ ::= SEQUENCE {
requestToken REQ-TOKEN,
certif-data [0] CertificationData OPTIONAL,
auth-data [1] AuthorizationData OPTIONAL
-- see [<a href="./rfc1510">RFC-1510</a>] for a discussion of auth-data
}
CertificationData ::= SEQUENCE {
certificationPath [0] CertificationPath OPTIONAL,
certificateRevocationList [1] CertificateList OPTIONAL
} -- at least one of the above shall be present
<span class="grey">Adams Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
CertificationPath ::= SEQUENCE {
userKeyId [0] OCTET STRING OPTIONAL,
-- identifier for user's public key
userCertif [1] Certificate OPTIONAL,
-- certificate containing user's public key
verifKeyId [2] OCTET STRING OPTIONAL,
-- identifier for user's public verification key
userVerifCertif [3] Certificate OPTIONAL,
-- certificate containing user's public verification key
theCACertificates [4] SEQUENCE OF CertificatePair OPTIONAL
} -- certification path from target to source
Having separate verification fields allows different key pairs
(possibly corresponding to different algorithms) to be used for
encryption/decryption and signing/verification. Presence of [0] or
[1] and absence of [2] and [3] implies that the same key pair is to
be used for enc/dec and verif/signing (note that this practice is not
typically recommended). Presence of [2] or [3] implies that a
separate key pair is to be used for verif/signing, and so [0] or [1]
must also be present. Presence of [4] implies that at least one of
[0], [1], [2], and [3] must also be present.
REQ-TOKEN ::= SEQUENCE {
req-contents Req-contents,
algId AlgorithmIdentifier,
req-integrity Integrity -- "token" is Req-contents
}
Integrity ::= BIT STRING
-- If corresponding algId specifies a signing algorithm,
-- "Integrity" holds the result of applying the signing procedure
-- specified in algId to the BER-encoded octet string which results
-- from applying the hashing procedure (also specified in algId) to
-- the DER-encoded octets of "token".
-- Alternatively, if corresponding algId specifies a MACing
-- algorithm, "Integrity" holds the result of applying the MACing
-- procedure specified in algId to the DER-encoded octets of
-- "token" (note that for MAC, algId must be one of the integrity
-- algorithms offered by the initiator with the appropriate subkey
-- derived from the context key (see <a href="#section-2.4">Section 2.4</a>) used as the key
-- input)
It is envisioned that typical use of the Integrity field for each of
REQ-TOKEN, REP-TI-TOKEN, and REP-IT-TOKEN will be a true digital
signature, providing unilateral or mutual authentication along with
replay protection, as required. However, there are situations in
which the MAC choice will be appropriate. One example is the case in
which the initiator wishes to remain anonymous (so that the first, or
<span class="grey">Adams Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
first and third, token(s) will be MACed and the second token will be
signed). Another example is the case in which a previously
authenticated, established, and cached context is being re-
established at some later time (here all exchanged tokens will be
MACed).
The primary advantage of the MAC choice is that it reduces processing
overhead for cases in which either authentication is not required
(e.g., anonymity) or authentication is established by some other
means (e.g., ability to form the correct MAC on a "fresh" token in
context re-establishment).
Req-contents ::= SEQUENCE {
tok-id INTEGER (256), -- shall contain 0100(hex)
context-id Random-Integer, -- see <a href="#section-6.3">Section 6.3</a>
pvno BIT STRING, -- protocol version number
timestamp UTCTime OPTIONAL, -- mandatory for SPKM-2
randSrc Random-Integer,
targ-name Name,
src-name [0] Name OPTIONAL,
-- must be supplied unless originator is "anonymous"
req-data Context-Data,
validity [1] Validity OPTIONAL,
-- validity interval for key (may be used in the
-- computation of security context lifetime)
key-estb-set Key-Estb-Algs,
-- specifies set of key establishment algorithms
key-estb-req BIT STRING OPTIONAL,
-- key estb. parameter corresponding to first K-ALG in set
-- (not used if initiator is unable or unwilling to
-- generate and securely transmit key material to target).
-- Established key must satisfy the key length constraints
-- specified in <a href="#section-2.4">Section 2.4</a>.
key-src-bind OCTET STRING OPTIONAL
-- Used to bind the source name to the symmetric key.
-- This field must be present for the case of SPKM-2
-- unilateral authen. if the K-ALG in use does not provide
-- such a binding (but is optional for all other cases).
-- The octet string holds the result of applying the
-- mandatory hashing procedure MD5 (in MANDATORY I-ALG;
-- see <a href="#section-2.1">Section 2.1</a>) as follows: MD5(src || context_key),
-- where "src" is the DER-encoded octets of src-name,
-- "context-key" is the symmetric key (i.e., the
-- unprotected version of what is transmitted in
-- key-estb-req), and "||" is the concatenation operation.
}
<span class="grey">Adams Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
-- The protocol version number (pvno) parameter is a BIT STRING which
-- uses as many bits as necessary to specify all the SPKM protocol
-- versions supported by the initiator (one bit per protocol
-- version). The protocol specified by this document is version 0.
-- Bit 0 of pvno is therefore set if this version is supported;
-- similarly, bit 1 is set if version 1 (if defined in the future) is
-- supported, and so on. Note that for unilateral authentication
-- using SPKM-2, no response token is expected during context
-- establishment, so no protocol negotiation can take place; in this
-- case, the initiator must set exactly one bit of pvno. The version
-- of REQ-TOKEN must correspond to the highest bit set in pvno.
-- The "validity" parameter above is the only way within SPKM for
-- the initiator to transmit desired context lifetime to the target.
-- Since it cannot be guaranteed that the initiator and target have
-- synchronized time, the span of time specified by "validity" is to
-- be taken as definitive (rather than the actual times given in this
-- parameter).
Random-Integer ::= BIT STRING
-- Each SPKM implementation is responsible for generating a "fresh"
-- random number for the purpose of context establishment; that is,
-- one which (with high probability) has not been used previously.
-- There are no cryptographic requirements on this random number
-- (i.e., it need not be unpredictable, it simply needs to be fresh).
Context-Data ::= SEQUENCE {
channelId ChannelId OPTIONAL, -- channel bindings
seq-number INTEGER OPTIONAL, -- sequence number
options Options,
conf-alg Conf-Algs, -- confidentiality. algs.
intg-alg Intg-Algs, -- integrity algorithm
owf-alg OWF-Algs -- for subkey derivation
}
ChannelId ::= OCTET STRING
Options ::= BIT STRING {
delegation-state (0),
mutual-state (1),
replay-det-state (2), -- used for replay det. during context
sequence-state (3), -- used for sequencing during context
conf-avail (4),
integ-avail (5),
target-certif-data-required (6)
-- used to request targ's certif. data
}
<span class="grey">Adams Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Conf-Algs ::= CHOICE {
algs [0] SEQUENCE OF AlgorithmIdentifier,
null [1] NULL
-- used when conf. is not available over context
} -- for C-ALG (see <a href="#section-5.2">Section 5.2</a> for discussion of QOP)
Intg-Algs ::= SEQUENCE OF AlgorithmIdentifier
-- for I-ALG (see <a href="#section-5.2">Section 5.2</a> for discussion of QOP)
OWF-Algs ::= SEQUENCE OF AlgorithmIdentifier
-- Contains exactly one algorithm in REQ-TOKEN for SPKM-2
-- unilateral, and contains at least one algorithm otherwise.
-- Always contains exactly one algorithm in REP-TOKEN.
Key-Estb-Algs ::= SEQUENCE OF AlgorithmIdentifier
-- to allow negotiation of K-ALG
A context establishment sequence based on the SPKM will perform
unilateral authentication if the mutual-req bit is not set in the
application's call to gss_init_sec_context(). SPKM-2 accomplishes
this using only SPKM-REQ (thereby authenticating the initiator to the
target), while SPKM-1 accomplishes this using both SPKM-REQ and
SPKM-REP-TI (thereby authenticating the target to the initiator).
Applications requiring authentication of both peers (initiator as
well as target) must request mutual authentication, resulting in
"mutual-state" being set within SPKM-REQ Options. In response to
such a request, the context target will reply to the initiator with
an SPKM-REP-TI token. If mechanism SPKM-2 has been chosen, this
completes the (timestamp-based) mutual authentication context
establishment exchange. If mechanism SPKM-1 has been chosen and
SPKM-REP-TI is sent, the initiator will then reply to the target with
an SPKM-REP-IT token, completing the (random-number-based) mutual
authentication context establishment exchange.
Other bits in the Options field of Context-Data are explained in
<a href="./rfc1508">RFC-1508</a>, with the exception of target-certif-data-required, which
the initiator sets to TRUE to request that the target return its
certification data in the SPKM-REP-TI token. For unilateral
authentication in SPKM-2 (in which no SPKM-REP-TI token is
constructed), this option bit is ignored by both initiator and
target.
<span class="grey">Adams Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h4"><a class="selflink" id="section-3.1.2" href="#section-3.1.2">3.1.2</a>. Context Establishment Tokens - Target</span>
SPKM-REP-TI ::= SEQUENCE {
responseToken REP-TI-TOKEN,
certif-data CertificationData OPTIONAL
-- included if target-certif-data-required option was
-- set to TRUE in SPKM-REQ
}
REP-TI-TOKEN ::= SEQUENCE {
rep-ti-contents Rep-ti-contents,
algId AlgorithmIdentifier,
rep-ti-integ Integrity -- "token" is Rep-ti-contents
}
Rep-ti-contents ::= SEQUENCE {
tok-id INTEGER (512), -- shall contain 0200 (hex)
context-id Random-Integer, -- see <a href="#section-6.3">Section 6.3</a>
pvno [0] BIT STRING OPTIONAL, -- prot. version number
timestamp UTCTime OPTIONAL, -- mandatory for SPKM-2
randTarg Random-Integer,
src-name [1] Name OPTIONAL,
-- must contain whatever value was supplied in REQ-TOKEN
targ-name Name,
randSrc Random-Integer,
rep-data Context-Data,
validity [2] Validity OPTIONAL,
-- validity interval for key (used if the target can only
-- support a shorter context lifetime than was offered in
-- REQ-TOKEN)
key-estb-id AlgorithmIdentifier OPTIONAL,
-- used if target is changing key estb. algorithm (must be
-- a member of initiators key-estb-set)
key-estb-str BIT STRING OPTIONAL
-- contains (1) the response to the initiators
-- key-estb-req (if init. used a 2-pass K-ALG), or (2) the
-- key-estb-req corresponding to the K-ALG supplied in
-- above key-estb-id, or (3) the key-estb-req corresponding
-- to the first K-ALG supplied in initiator's key-estb-id,
-- if initiator's (OPTIONAL) key-estb-req was not used
-- (target's key-estb-str must be present in this case).
-- Established key must satisfy the key length constraints
-- specified in <a href="#section-2.4">Section 2.4</a>.
}
<span class="grey">Adams Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
The protocol version number (pvno) parameter is a BIT STRING which
uses as many bits as necessary to specify a single SPKM protocol
version offered by the initiator which is supported by the target
(one bit per protocol version); that is, the target sets exactly one
bit of pvno. If none of the versions offered by the initiator are
supported by the target, a delete token must be returned so that the
context is never established. If the initiator's pvno has only one
bit set and the target happens to support this protocol version, then
this version is used over the context and the pvno parameter of REP-
TOKEN can be omitted. Finally, if the initiator and target do have
one or more versions in common but the version of the REQ-TOKEN
received is not supported by the target, a REP-TOKEN must be sent
with a desired version bit set in pvno (and dummy values used for all
subsequent token fields). The initiator can then respond with a new
REQ-TOKEN of the proper version (essentially starting context
establishment anew).
<span class="h4"><a class="selflink" id="section-3.1.3" href="#section-3.1.3">3.1.3</a>. Context Establishment Tokens - Initiator (second token)</span>
Relevant SPKM-REP-IT syntax is as follows:
SPKM-REP-IT ::= SEQUENCE {
responseToken REP-IT-TOKEN,
algId AlgorithmIdentifier,
rep-it-integ Integrity -- "token" is REP-IT-TOKEN
}
REP-IT-TOKEN ::= SEQUENCE {
tok-id INTEGER (768), -- shall contain 0300 (hex)
context-id Random-Integer,
randSrc Random-Integer,
randTarg Random-Integer,
targ-name Name, -- the targ-name specified in REP-TI
src-name Name OPTIONAL,
-- must contain whatever value was supplied in REQ-TOKEN
key-estb-rep BIT STRING OPTIONAL
-- contains the response to targets key-estb-str
-- (if target selected a 2-pass K-ALG)
}
<span class="h4"><a class="selflink" id="section-3.1.4" href="#section-3.1.4">3.1.4</a>. Error Token</span>
The syntax of SPKM-ERROR is as follows:
SPKM-ERROR ::= SEQUENCE {
error-token ERROR-TOKEN,
algId AlgorithmIdentifier,
integrity Integrity -- "token" is ERROR-TOKEN
<span class="grey">Adams Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
}
ERROR-TOKRN ::= SEQUENCE {
tok-id INTEGER (1024), -- shall contain 0400 (hex)
context-id Random-Integer
}
The SPKM-ERROR token is used only during the context establishment
process. If an SPKM-REQ or SPKM-REP-TI token is received in error,
the receiving function (either gss_init_sec_context() or
gss_accept_sec_context()) will generate an SPKM-ERROR token to be
sent to the peer (if the peer is still in the context establishment
process) and will return GSS_S_CONTINUE_NEEDED. If, on the other
hand, no context establishment response is expected from the peer
(i.e., the peer has completed context establishment), the function
will return the appropriate major status code (e.g., GSS_S_BAD_SIG)
along with a minor status of GSS_SPKM_S_SG_CONTEXT_ESTB_ABORT and all
context-relevant information will be deleted. The output token will
not be an SPKM-ERROR token but will instead be an SPKM-DEL token
which will be processed by the peer's gss_process_context_token().
If gss_init_sec_context() receives an error token (whether valid or
invalid), it will regenerate SPKM-REQ as its output token and return
a major status code of GSS_S_CONTINUE_NEEDED. (Note that if the
peer's gss_accept_sec_context() receives SPKM-REQ token when it is
expecting a SPKM-REP-IT token, it will ignore SPKM-REQ and return a
zero-length output token with a major status of
GSS_S_CONTINUE_NEEDED.)
Similarly, if gss_accept_sec_context() receives an error token
(whether valid or invalid), it will regenerate SPKM-REP-TI as its
output token and return a major status code of GSS_S_CONTINUE_NEEDED.
md5WithRsa is currently stipulated for the signing of context
establishment tokens. Discrepancies involving modulus bitlength can
be resolved through judicious use of the SPKM-ERROR token. The
context initiator signs REQ-TOKEN using the strongest RSA it supports
(e.g., 1024 bits). If the target is unable to verify signatures of
this length, it sends SPKM-ERROR signed with the strongest RSA that
it supports (e.g. 512).
At the completion of this exchange, both sides know what RSA
bitlength the other supports, since the size of the signature is
equal to the size of the modulus. Further exchanges can be made
(using successively smaller supported bitlengths) until either an
agreement is reached or context establishment is aborted because no
agreement is possible.
<span class="grey">Adams Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Per-Message and Context Deletion Tokens</span>
Three classes of tokens are defined in this section: "MIC" tokens,
emitted by calls to gss_getMIC() and consumed by calls to
gss_verifyMIC(); "Wrap" tokens, emitted by calls to gss_wrap() and
consumed by calls to gss_unwrap(); and context deletion tokens,
emitted by calls to gss_init_sec_context(), gss_accept_sec_context(),
or gss_delete_sec_context() and consumed by calls to
gss_process_context_token().
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. Per-message Tokens - Sign / MIC</span>
Use of the gss_sign() / gss_getMIC() call yields a token, separate
from the user data being protected, which can be used to verify the
integrity of that data as received. The token and the data may be
sent separately by the sending application and it is the receiving
application's responsibility to associate the received data with the
received token.
The SPKM-MIC token has the following format:
SPKM-MIC ::= SEQUENCE {
mic-header Mic-Header,
int-cksum BIT STRING
-- Checksum over header and data,
-- calculated according to algorithm
-- specified in int-alg field.
}
Mic-Header ::= SEQUENCE {
tok-id INTEGER (257),
-- shall contain 0101 (hex)
context-id Random-Integer,
int-alg [0] AlgorithmIdentifier OPTIONAL,
-- Integrity algorithm indicator (must
-- be one of the agreed integrity
-- algorithms for this context).
-- field not present = default id.
snd-seq [1] SeqNum OPTIONAL -- sequence number field.
}
SeqNum ::= SEQUENCE {
num INTEGER, -- the sequence number itself
dir-ind BOOLEAN -- a direction indicator
}
<span class="grey">Adams Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h5"><a class="selflink" id="section-3.2.1.1" href="#section-3.2.1.1">3.2.1.1</a>. Checksum</span>
Checksum calculation procedure (common to all algorithms -- note that
for SPKM the term "checksum" includes digital signatures as well as
hashes and MACs): Checksums are calculated over the data field,
logically prepended by the bytes of the plaintext token header (mic-
header). The result binds the data to the entire plaintext header,
so as to minimize the possibility of malicious splicing.
For example, if the int-alg specifies the md5WithRSA algorithm, then
the checksum is formed by computing an MD5 [<a href="./rfc1321">RFC-1321</a>] hash over the
plaintext data (prepended by the header), and then computing an RSA
signature [PKCS1] on the 16-byte MD5 result. The signature is
computed using the RSA private key retrieved from the credentials
structure and the result (whose length is implied by the "modulus"
parameter in the private key) is stored in the int-cksum field.
If the int-alg specifies a keyed hashing algorithm (for example,
DES-MAC or md5-DES-CBC), then the key to be used is the appropriate
subkey derived from the context key (see <a href="#section-2.4">Section 2.4</a>). Again, the
result (whose length is implied by int-alg) is stored in the int-
cksum field.
<span class="h5"><a class="selflink" id="section-3.2.1.2" href="#section-3.2.1.2">3.2.1.2</a>. Sequence Number</span>
It is assumed that the underlying transport layers (of whatever
protocol stack is being used by the application) will provide
adequate communications reliability (that is, non-malicious loss,
re-ordering, etc., of data packets will be handled correctly).
Therefore, sequence numbers are used in SPKM purely for security, as
opposed to reliability, reasons (that is, to avoid malicious loss,
replay, or re-ordering of SPKM tokens) -- it is therefore recommended
that applications request sequencing and replay detection over all
contexts. Note that sequence numbers are used so that there is no
requirement for secure timestamps in the message tokens. The
initiator's initial sequence number for the current context may be
explicitly given in the Context-Data field of SPKM-REQ and the
target's initial sequence number may be explicitly given in the
Context-Data field of SPKM-REP-TI; if either of these is not given
then the default value of 00 is to be used.
Sequence number field: The sequence number field is formed from the
sender's four-byte sequence number and a Boolean direction-indicator
(FALSE - sender is the context initiator, TRUE - sender is the
context acceptor). After constructing a gss_sign/getMIC() or
gss_seal/wrap() token, the sender's seq. number is incremented by 1.
<span class="grey">Adams Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h5"><a class="selflink" id="section-3.2.1.3" href="#section-3.2.1.3">3.2.1.3</a>. Sequence Number Processing</span>
The receiver of the token will verify the sequence number field by
comparing the sequence number with the expected sequence number and
the direction indicator with the expected direction indicator. If
the sequence number in the token is higher than the expected number,
then the expected sequence number is adjusted and GSS_S_GAP_TOKEN is
returned. If the token sequence number is lower than the expected
number, then the expected sequence number is not adjusted and
GSS_S_DUPLICATE_TOKEN, GSS_S_UNSEQ_TOKEN, or GSS_S_OLD_TOKEN is
returned, whichever is appropriate. If the direction indicator is
wrong, then the expected sequence number is not adjusted and
GSS_S_UNSEQ_TOKEN is returned.
Since the sequence number is used as part of the input to the
integrity checksum, sequence numbers need not be encrypted, and
attempts to splice a checksum and sequence number from different
messages will be detected. The direction indicator will detect
tokens which have been maliciously reflected.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. Per-message Tokens - Seal / Wrap</span>
Use of the gss_seal() / gss_wrap() call yields a token which
encapsulates the input user data (optionally encrypted) along with
associated integrity check quantities. The token emitted by
gss_seal() / gss_wrap() consists of an integrity header followed by a
body portion that contains either the plaintext data (if conf-alg =
NULL) or encrypted data (using the appropriate subkey specified in
<a href="#section-2.4">Section 2.4</a> for one of the agreed C-ALGs for this context).
The SPKM-WRAP token has the following format:
SPKM-WRAP ::= SEQUENCE {
wrap-header Wrap-Header,
wrap-body Wrap-Body
}
Wrap-Header ::= SEQUENCE {
tok-id INTEGER (513),
-- shall contain 0201 (hex)
context-id Random-Integer,
int-alg [0] AlgorithmIdentifier OPTIONAL,
-- Integrity algorithm indicator (must
-- be one of the agreed integrity
-- algorithms for this context).
-- field not present = default id.
<span class="grey">Adams Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
conf-alg [1] Conf-Alg OPTIONAL,
-- Confidentiality algorithm indicator
-- (must be NULL or one of the agreed
-- confidentiality algorithms for this
-- context).
-- field not present = default id.
-- NULL = none (no conf. applied).
snd-seq [2] SeqNum OPTIONAL
-- sequence number field.
}
Wrap-Body ::= SEQUENCE {
int-cksum BIT STRING,
-- Checksum of header and data,
-- calculated according to algorithm
-- specified in int-alg field.
data BIT STRING
-- encrypted or plaintext data.
}
Conf-Alg ::= CHOICE {
algId [0] AlgorithmIdentifier,
null [1] NULL
}
3.2.2.1: Confounding
As in [KRB5], an 8-byte random confounder is prepended to the data to
compensate for the fact that an IV of zero is used for encryption.
The result is referred to as the "confounded" data field.
<span class="h5"><a class="selflink" id="section-3.2.2.2" href="#section-3.2.2.2">3.2.2.2</a>. Checksum</span>
Checksum calculation procedure (common to all algorithms): Checksums
are calculated over the plaintext data field, logically prepended by
the bytes of the plaintext token header (wrap-header). As with
gss_sign() / gss_getMIC(), the result binds the data to the entire
plaintext header, so as to minimize the possibility of malicious
splicing.
The examples for md5WithRSA and DES-MAC are exactly as specified in
3.2.1.1.
If int-alg specifies md5-DES-CBC and conf-alg specifies anything
other than DES-CBC, then the checksum is computed according to
<span class="grey">Adams Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
3.2.1.1 and the result is stored in int-cksum. However, if conf-alg
specifies DES-CBC then the encryption and the integrity are done as
follows. An MD5 [<a href="./rfc1321">RFC-1321</a>] hash is computed over the plaintext data
(prepended by the header). This 16-byte value is appended to the
concatenation of the "confounded" data and 1-8 padding bytes (the
padding is as specified in [KRB5] for DES-CBC). The result is then
CBC encrypted using the DES-CBC subkey (see <a href="#section-2.4">Section 2.4</a>) and placed
in the "data" field of Wrap-Body. The final two blocks of ciphertext
(i.e., the encrypted MD5 hash) are also placed in the int-cksum field
of Wrap-Body as the integrity checksum.
If int-alg specifies sum64-DES-CBC then conf-alg must specify DES-CBC
(i.e., confidentiality must be requested by the calling application
or SPKM will return an error). Encryption and integrity are done in
a single pass using the DES-CBC subkey as follows. The sum (modulo
2**64 - 1) of all plaintext data blocks (prepended by the header) is
computed. This 8-byte value is appended to the concatenation of the
"confounded" data and 1-8 padding bytes (the padding is as specified
in [KRB5] for DES-CBC). As above, the result is then CBC encrypted
and placed in the "data" field of Wrap-Body. The final block of
ciphertext (i.e., the encrypted sum) is also placed in the int-cksum
field of Wrap-Body as the integrity checksum.
<span class="h5"><a class="selflink" id="section-3.2.2.3" href="#section-3.2.2.3">3.2.2.3</a> Sequence Number</span>
Sequence numbers are computed and processed for gss_wrap() exactly as
specified in 3.2.1.2 and 3.2.1.3.
3.2.2.4: Data Encryption
The following procedure is followed unless (a) conf-alg is NULL (no
encryption), or (b) conf-alg is DES-CBC and int-alg is md5-DES-CBC
(encryption as specified in 3.2.2.2), or (c) int-alg is sum64-DES-CBC
(encryption as specified in 3.2.2.2):
The "confounded" data is padded and encrypted according to the
algorithm specified in the conf-alg field. The data is encrypted
using CBC with an IV of zero. The key used is the appropriate subkey
derived from the established context key using the subkey derivation
algorithm described in <a href="#section-2.4">Section 2.4</a> (this ensures that the subkey used
for encryption and the subkey used for a separate, keyed integrity
algorithm -- for example DES-MAC, but not sum64-DES-CBC -- are
different).
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a>. Context deletion token</span>
The token emitted by gss_delete_sec_context() is based on the format
for tokens emitted by gss_sign() / gss_getMIC().
<span class="grey">Adams Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
The SPKM-DEL token has the following format:
SPKM-DEL ::= SEQUENCE {
del-header Del-Header,
int-cksum BIT STRING
-- Checksum of header, calculated
-- according to algorithm specified
-- in int-alg field.
}
Del-Header ::= SEQUENCE {
tok-id INTEGER (769),
-- shall contain 0301 (hex)
context-id Random-Integer,
int-alg [0] AlgorithmIdentifier OPTIONAL,
-- Integrity algorithm indicator (must
-- be one of the agreed integrity
-- algorithms for this context).
-- field not present = default id.
snd-seq [1] SeqNum OPTIONAL
-- sequence number field.
}
The field snd-seq will be calculated as for tokens emitted by
gss_sign() / gss_getMIC(). The field int-cksum will be calculated as
for tokens emitted by gss_sign() / gss_getMIC(), except that the
user-data component of the checksum data will be a zero-length
string.
If a valid delete token is received, then the SPKM implementation
will delete the context and gss_process_context_token() will return a
major status of GSS_S_COMPLETE and a minor status of
GSS_SPKM_S_SG_CONTEXT_DELETED. If, on the other hand, the delete
token is invalid, the context will not be deleted and
gss_process_context_token() will return the appropriate major status
(GSS_S_BAD_SIG, for example) and a minor status of
GSS_SPKM_S_SG_BAD_DELETE_TOKEN_RECD. The application may wish to
take some action at this point to check the context status (such as
sending a sealed/wrapped test message to its peer and waiting for a
sealed/wrapped response).
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Name Types and Object Identifiers</span>
No mandatory name forms have yet been defined for SPKM. This section
is for further study.
<span class="grey">Adams Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Optional Name Forms</span>
This section discusses name forms which may optionally be supported
by implementations of the SPKM GSS-API mechanism. It is recognized
that OS-specific functions outside GSS-API are likely to exist in
order to perform translations among these forms, and that GSS-API
implementations supporting these forms may themselves be layered atop
such OS-specific functions. Inclusion of this support within GSS-API
implementations is intended as a convenience to applications.
<span class="h4"><a class="selflink" id="section-4.1.1" href="#section-4.1.1">4.1.1</a>. User Name Form</span>
This name form shall be represented by the Object Identifier {iso(1)
member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
generic(1) user_name(1)}. The recommended symbolic name for this
type is "GSS_SPKM_NT_USER_NAME".
This name type is used to indicate a named user on a local system.
Its interpretation is OS-specific. This name form is constructed as:
username
<span class="h4"><a class="selflink" id="section-4.1.2" href="#section-4.1.2">4.1.2</a>. Machine UID Form</span>
This name form shall be represented by the Object Identifier {iso(1)
member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
generic(1) machine_uid_name(2)}. The recommended symbolic name for
this type is "GSS_SPKM_NT_MACHINE_UID_NAME".
This name type is used to indicate a numeric user identifier
corresponding to a user on a local system. Its interpretation is
OS-specific. The gss_buffer_desc representing a name of this type
should contain a locally-significant uid_t, represented in host byte
order. The gss_import_name() operation resolves this uid into a
username, which is then treated as the User Name Form.
<span class="h4"><a class="selflink" id="section-4.1.3" href="#section-4.1.3">4.1.3</a>. String UID Form</span>
This name form shall be represented by the Object Identifier {iso(1)
member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
generic(1) string_uid_name(3)}. The recommended symbolic name for
this type is "GSS_SPKM_NT_STRING_UID_NAME".
This name type is used to indicate a string of digits representing
the numeric user identifier of a user on a local system. Its
interpretation is OS-specific. This name type is similar to the
Machine UID Form, except that the buffer contains a string
representing the uid_t.
<span class="grey">Adams Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Parameter Definitions</span>
This section defines parameter values used by the SPKM GSS-API
mechanism. It defines interface elements in support of portability.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Minor Status Codes</span>
This section recommends common symbolic names for minor_status values
to be returned by the SPKM GSS-API mechanism. Use of these
definitions will enable independent implementors to enhance
application portability across different implementations of the
mechanism defined in this specification. (In all cases,
implementations of gss_display_status() will enable callers to
convert minor_status indicators to text representations.) Each
implementation must make available, through include files or other
means, a facility to translate these symbolic names into the concrete
values which a particular GSS-API implementation uses to represent
the minor_status values specified in this section. It is recognized
that this list may grow over time, and that the need for additional
minor_status codes specific to particular implementations may arise.
<span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a>. Non-SPKM-specific codes (Minor Status Code MSB, bit 31, SET)</span>
<span class="h5"><a class="selflink" id="section-5.1.1.1" href="#section-5.1.1.1">5.1.1.1</a>. GSS-Related codes (Minor Status Code bit 30 SET)</span>
GSS_S_G_VALIDATE_FAILED
/* "Validation error" */
GSS_S_G_BUFFER_ALLOC
/* "Couldn't allocate gss_buffer_t data" */
GSS_S_G_BAD_MSG_CTX
/* "Message context invalid" */
GSS_S_G_WRONG_SIZE
/* "Buffer is the wrong size" */
GSS_S_G_BAD_USAGE
/* "Credential usage type is unknown" */
GSS_S_G_UNAVAIL_QOP
/* "Unavailable quality of protection specified" */
<span class="h5"><a class="selflink" id="section-5.1.1.2" href="#section-5.1.1.2">5.1.1.2</a>. Implementation-Related codes (Minor Status Code bit 30 OFF)</span>
GSS_S_G_MEMORY_ALLOC
/* "Couldn't perform requested memory allocation" */
<span class="h4"><a class="selflink" id="section-5.1.2" href="#section-5.1.2">5.1.2</a>. SPKM-specific-codes (Minor Status Code MSB, bit 31, OFF)</span>
GSS_SPKM_S_SG_CONTEXT_ESTABLISHED
/* "Context is already fully established" */
GSS_SPKM_S_SG_BAD_INT_ALG_TYPE
<span class="grey">Adams Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
/* "Unknown integrity algorithm type in token" */
GSS_SPKM_S_SG_BAD_CONF_ALG_TYPE
/* "Unknown confidentiality algorithm type in token" */
GSS_SPKM_S_SG_BAD_KEY_ESTB_ALG_TYPE
/* "Unknown key establishment algorithm type in token" */
GSS_SPKM_S_SG_CTX_INCOMPLETE
/* "Attempt to use incomplete security context" */
GSS_SPKM_S_SG_BAD_INT_ALG_SET
/* "No integrity algorithm in common from offered set" */
GSS_SPKM_S_SG_BAD_CONF_ALG_SET
/* "No confidentiality algorithm in common from offered set" */
GSS_SPKM_S_SG_BAD_KEY_ESTB_ALG_SET
/* "No key establishment algorithm in common from offered set" */
GSS_SPKM_S_SG_NO_PVNO_IN_COMMON
/* "No protocol version number in common from offered set" */
GSS_SPKM_S_SG_INVALID_TOKEN_DATA
/* "Data is improperly formatted: cannot encode into token" */
GSS_SPKM_S_SG_INVALID_TOKEN_FORMAT
/* "Received token is improperly formatted: cannot decode" */
GSS_SPKM_S_SG_CONTEXT_DELETED
/* "Context deleted at peer's request" */
GSS_SPKM_S_SG_BAD_DELETE_TOKEN_RECD
/* "Invalid delete token received -- context not deleted" */
GSS_SPKM_S_SG_CONTEXT_ESTB_ABORT
/* "Unrecoverable context establishment error. Context deleted" */
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Quality of Protection Values</span>
The Quality of Protection (QOP) parameter is used in the SPKM GSS-API
mechanism as input to gss_sign() and gss_seal() (gss_getMIC() and
gss_wrap()) to select among alternate confidentiality and integrity-
checking algorithms. Once these sets of algorithms have been agreed
upon by the context initiator and target, the QOP parameter simply
selects from these ordered sets.
More specifically, the SPKM-REQ token sends an ordered sequence of
Alg. IDs specifying integrity-checking algorithms supported by the
initiator and an ordered sequence of Alg. IDs specifying
confidentiality algorithms supported by the initiator. The target
returns the subset of the offered integrity-checking Alg. IDs which
it supports and the subset of the offered confidentiality Alg. IDs
which it supports in the SPKM-REP-TI token (in the same relative
orders as those given by the initiator). Thus, the initiator and
target each know the algorithms which they themselves support and the
algorithms which both sides support (the latter are defined to be
those supported over the established context). The QOP parameter has
meaning and validity with reference to this knowledge. For example,
an application may request integrity algorithm number 3 as defined by
<span class="grey">Adams Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
the mechanism specification. If this algorithm is supported over
this context then it is used; otherwise, GSS_S_FAILURE and an
appropriate minor status code are returned.
If the SPKM-REP-TI token is not used (unilateral authentication using
SPKM-2), then the "agreed" sets of Alg. IDs are simply taken to be
the initiator's sets (if this is unacceptable to the target then it
must return an error token so that the context is never established).
Note that, in the interest of interoperability, the initiator is not
required to offer every algorithm it supports; rather, it may offer
only the mandated/recommended SPKM algorithms since these are likely
to be supported by the target.
The QOP parameter for SPKM is defined to be a 32-bit unsigned integer
(an OM_uint32) with the following bit-field assignments:
Confidentiality Integrity
31 (MSB) 16 15 (LSB) 0
------------------------------------|-----------------------------------
| TS (5) | U(3) | IA (4) | MA (4) | TS (5) | U(3) | IA (4) | MA(4) |
------------------------------------|-----------------------------------
where
TS is a 5-bit Type Specifier (a semantic qualifier whose value
specifies the type of algorithm which may be used to protect the
corresponding token -- see below for details);
U is a 3-bit Unspecified field (available for future
use/expansion);
IA is a 4-bit field enumerating Implementation-specific
Algorithms; and
MA is a 4-bit field enumerating Mechanism-defined Algorithms.
The interpretation of the QOP parameter is as follows (note that the
same procedure is used for both the confidentiality and the integrity
halves of the parameter). The MA field is examined first. If it is
non-zero then the algorithm used to protect the token is the
mechanism-specified algorithm corresponding to that integer value.
If MA is zero then IA is examined. If this field value is non-zero
then the algorithm used to protect the token is the implementation-
specified algorithm corresponding to that integer value (if this
algorithm is available over the established context). Note that use
of this field may hinder portability since a particular value may
specify one algorithm in one implementation of the mechanism and may
<span class="grey">Adams Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
not be supported or may specify a completely different algorithm in
another implementation of the mechanism.
Finally, if both MA and IA are zero then TS is examined. A value of
zero for TS specifies the default algorithm for the established
context, which is defined to be the first algorithm on the
initiator's list of offered algorithms (confidentiality or integrity,
depending on which half of QOP is being examined) which is supported
over the context. A non-zero value for TS corresponds to a
particular algorithm qualifier and selects the first algorithm
supported over the context which satisfies that qualifier.
The following TS values (i.e., algorithm qualifiers) are specified;
other values may be added in the future.
For the Confidentiality TS field:
00001 (1) = SPKM_SYM_ALG_STRENGTH_STRONG
00010 (2) = SPKM_SYM_ALG_STRENGTH_MEDIUM
00011 (3) = SPKM_SYM_ALG_STRENGTH_WEAK
For the Integrity TS field:
00001 (1) = SPKM_INT_ALG_NON_REP_SUPPORT
00010 (2) = SPKM_INT_ALG_REPUDIABLE
Clearly, qualifiers such as strong, medium, and weak are debatable
and likely to change with time, but for the purposes of this version
of the specification we define these terms as follows. A
confidentiality algorithm is "weak" if the effective key length of
the cipher is 40 bits or less; it is "medium-strength" if the
effective key length is strictly between 40 and 80 bits; and it is
"strong" if the effective key length is 80 bits or greater. (Note
that "effective key length" describes the computational effort
required to break a cipher using the best-known cryptanalytic attack
against that cipher.)
A five-bit TS field allows up to 31 qualifiers for each of
confidentiality and integrity (since "0" is reserved for "default").
This document specifies three for confidentiality and two for
integrity, leaving a lot of room for future specification.
Suggestions of qualifiers such as "fast", "medium-speed", and "slow"
have been made, but such terms are difficult to quantify (and in any
case are platform- and processor-dependent), and so have been left
out of this initial specification. The intention is that the TS
terms be quantitative, environment-independent qualifiers of
algorithms, as much as this is possible.
<span class="grey">Adams Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Use of the QOP structure as defined above is ultimately meant to be
as follows.
- TS values are specified at the GSS-API level and are therefore
portable across mechanisms. Applications which know nothing about
algorithms are still able to choose "quality" of protection for
their message tokens.
- MA values are specified at the mechanism level and are therefore
portable across implementations of a mechanism. For example, all
implementations of the Kerberos V5 GSS mechanism must support
GSS_KRB5_INTEG_C_QOP_MD5 (value: 1)
GSS_KRB5_INTEG_C_QOP_DES_MD5 (value: 2)
GSS_KRB5_INTEG_C_QOP_DES_MAC (value: 3).
(Note that these Kerberos-specified integrity QOP values do not
conflict with the QOP structure defined above.)
- IA values are specified at the implementation level (in user
documentation, for example) and are therefore typically non-
portable. An application which is aware of its own mechanism
implementation and the mechanism implementation of its peer,
however, is free to use these values since they will be perfectly
valid and meaningful over that context and between those peers.
The receiver of a token must pass back to its calling application a
QOP parameter with all relevant fields set. For example, if triple-
DES has been specified by a mechanism as algorithm 8, then a receiver
of a triple-DES-protected token must pass to its application (QOP
Confidentiality TS=1, IA=0, MA=8). In this way, the application is
free to read whatever part of the QOP it understands (TS or IA/MA).
To aid in implementation and interoperability, the following
stipulation is made. The set of integrity Alg. IDs sent by the
initiator must contain at least one specifying an algorithm which
computes a digital signature supporting non-repudiation, and must
contain at least one specifying any other (repudiable) integrity
algorithm. The subset of integrity Alg. IDs returned by the target
must also contain at least one specifying an algorithm which computes
a digital signature supporting non-repudiation, and at least one
specifying a repudiable integrity algorithm.
The reason for this stipulation is to ensure that every SPKM
implementation will provide an integrity service which supports non-
repudiation and one which does not support non-repudiation. An
application with no knowledge of underlying algorithms can choose one
or the other by passing (QOP Integrity TS=1, IA=MA=0) or (QOP
<span class="grey">Adams Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Integrity TS=2, IA=MA=0). Although an initiator who wishes to remain
anonymous will never actually use the non-repudiable digital
signature, this integrity service must be available over the context
so that the target can use it if desired.
Finally, in accordance with the MANDATORY and RECOMMENDED algorithms
given in <a href="#section-2">Section 2</a>, the following QOP values are specified for SPKM.
For the Confidentiality MA field:
0001 (1) = DES-CBC
For the Integrity MA field:
0001 (1) = md5WithRSA
0010 (2) = DES-MAC
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Support Functions</span>
This section describes a mandatory support function for SPKM-
conformant implementations which may, in fact, be of value in all
GSS-API mechanisms. It makes use of the token-id and context-id
information which is included in SPKM context-establishment, error,
context-deletion, and per-message tokens. The function is defined in
the following section.
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. SPKM_Parse_token call</span>
Inputs:
o input_token OCTET STRING
Outputs:
o major_status INTEGER,
o minor_status INTEGER,
o mech_type OBJECT IDENTIFIER,
o token_type INTEGER,
o context_handle CONTEXT HANDLE,
<span class="grey">Adams Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Return major_status codes:
o GSS_S_COMPLETE indicates that the input_token could be parsed for
all relevant fields. The resulting values are stored in
mech_type, token_type and context_handle, respectively (with NULLs
in any parameters which are not relevant).
o GSS_S_DEFECTIVE_TOKEN indicates that either the token-id or the
context-id (if it was expected) information could not be parsed.
A non-NULL return value in token_type indicates that the latter
situation occurred.
o GSS_S_NO_TYPE indicates that the token-id information could be
parsed, but it did not correspond to any valid token_type.
(Note that this major status code has not been defined for GSS in
<a href="./rfc1508">RFC-1508</a>. Until such a definition is made (if ever), SPKM
implementations should instead return GSS_S_DEFECTIVE_TOKEN with
both token_type and context_handle set to NULL. This essentially
implies that unrecognized token-id information is considered to be
equivalent to token-id information which could not be parsed.)
o GSS_S_NO_CONTEXT indicates that the context-id could be parsed,
but it did not correspond to any valid context_handle.
o GSS_S_FAILURE indicates that the mechanism type could not be
parsed (for example, the token may be corrupted).
SPKM_Parse_token() is used to return to an application the mechanism
type, token type, and context handle which correspond to a given
input token. Since GSS-API tokens are meant to be opaque to the
calling application, this function allows the application to
determine information about the token without having to violate the
opaqueness intention of GSS. Of primary importance is the token
type, which the application can then use to decide which GSS function
to call in order to have the token processed.
If all tokens are framed as suggested in <a href="./rfc1508#appendix-B">RFC-1508, Appendix B</a>
(specified both in the Kerberos V5 GSS mechanism [KRB5] and in this
document), then any mechanism implementation should be able to return
at least the mech_type parameter (the other parameters being NULL)
for any uncorrupted input token. If the mechanism implementation
whose SPKM_Parse_token() function is being called does recognize the
token, it can return token_type so that the application can
subsequently call the correct GSS function. Finally, if the
mechanism provides a context-id field in its tokens (as SPKM does),
then an implementation can map the context-id to a context_handle and
return this to the application. This is necessary for the situation
<span class="grey">Adams Standards Track [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
where an application has multiple contexts open simultaneously, all
using the same mechanism. When an incoming token arrives, the
application can use this function to determine not only which GSS
function to call, but also which context_handle to use for the call.
Note that this function does no cryptographic processing to determine
the validity of tokens; it simply attempts to parse the mech_type,
token_type, and context-id fields of any token it is given. Thus, it
is conceivable, for example, that an arbitrary buffer of data might
start with random values which look like a valid mech_type and that
SPKM_Parse_token() would return incorrect information if given this
buffer. While conceivable, however, such a situation is unlikely.
The SPKM_Parse_token() function is mandatory for SPKM-conformant
implementations, but it is optional for applications. That is, if an
application has only one context open and can guess which GSS
function to call (or is willing to put up with some error codes),
then it need never call SPKM_Parse_token(). Furthermore, if this
function ever migrates up to the GSS-API level, then
SPKM_Parse_token() will be deprecated at that time in favour of
GSS_Parse_token(), or whatever the new name and function
specification might be. Note finally that no minor status return
codes have been defined for this function at this time.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. The token_type Output Parameter</span>
The following token types are defined:
GSS_INIT_TOKEN = 1
GSS_ACCEPT_TOKEN = 2
GSS_ERROR_TOKEN = 3
GSS_SIGN_TOKEN = GSS_GETMIC_TOKEN = 4
GSS_SEAL_TOKEN = GSS_WRAP_TOKEN = 5
GSS_DELETE_TOKEN = 6
All SPKM mechanisms shall be able to perform the mapping from the
token-id information which is included in every token (through the
tag values in SPKMInnerContextToken or through the tok-id field) to
one of the above token types. Applications should be able to decide,
on the basis of token_type, which GSS function to call (for example,
if the token is a GSS_INIT_TOKEN then the application will call
gss_accept_sec_context(), and if the token is a GSS_WRAP_TOKEN then
the application will call gss_unwrap()).
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. The context_handle Output Parameter</span>
The SPKM mechanism implementation is responsible for maintaining a
mapping between the context-id value which is included in every token
and a context_handle, thus associating an individual token with its
<span class="grey">Adams Standards Track [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
proper context. Clearly the value of context_handle may be locally
determined and may, in fact, be associated with memory containing
sensitive data on the local system, and so having the context-id
actually be set equal to a computed context_handle will not work in
general. Conversely, having the context_handle actually be set equal
to a computed context-id will not work in general either, because
context_handle must be returned to the application by the first call
to gss_init_sec_context() or gss_accept_sec_context(), whereas
uniqueness of the context-id (over all contexts at both ends) may
require that both initiator and target be involved in the
computation. Consequently, context_handle and context-id must be
computed separately and the mechanism implementation must be able to
map from one to the other by the completion of context establishment
at the latest.
Computation of context-id during context establishment is
accomplished as follows. Each SPKM implementation is responsible for
generating a "fresh" random number; that is, one which (with high
probability) has not been used previously. Note that there are no
cryptographic requirements on this random number (i.e., it need not
be unpredictable, it simply needs to be fresh). The initiator passes
its random number to the target in the context-id field of the SPKM-
REQ token. If no further context establishment tokens are expected
(as for unilateral authentication in SPKM-2), then this value is
taken to be the context-id (if this is unacceptable to the target
then an error token must be generated). Otherwise, the target
generates its random number and concatenates it to the end of the
initiator's random number. This concatenated value is then taken to
be the context-id and is used in SPKM-REP-TI and in all subsequent
tokens over that context.
Having both peers contribute to the context-id assures each peer of
freshness and therefore precludes replay attacks between contexts
(where a token from an old context between two peers is maliciously
injected into a new context between the same or different peers).
Such assurance is not available to the target in the case of
unilateral authentication using SPKM-2, simply because it has not
contributed to the freshness of the computed context-id (instead, it
must trust the freshness of the initiator's random number, or reject
the context). The key-src-bind field in SPKM-REQ is required to be
present for the case of SPKM-2 unilateral authentication precisely to
assist the target in trusting the freshness of this token (and its
proposed context key).
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
Security issues are discussed throughout this memo.
<span class="grey">Adams Standards Track [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
[Davi89]: D. W. Davies and W. L. Price, "Security for Computer
Networks", Second Edition, John Wiley and Sons, New York, 1989.
[FIPS-113]: National Bureau of Standards, Federal Information
Processing Standard 113, "Computer Data Authentication", May 1985.
[GSSv2]: Linn, J., "Generic Security Service Application Program
Interface Version 2", Work in Progress.
[Juen84]: R. R. Jueneman, C. H. Meyer and S. M. Matyas, Message
Authentication with Manipulation Detection Codes, in Proceedings of
the 1983 IEEE Symposium on Security and Privacy, IEEE Computer
Society Press, 1984, pp.33-54.
[KRB5]: Linn, J., "The Kerberos Version 5 GSS-API Mechanism",
<a href="./rfc1964">RFC 1964</a>, June 1996.
[PKCS1]: RSA Encryption Standard, Version 1.5, RSA Data Security,
Inc., Nov. 1993.
[PKCS3]: Diffie-Hellman Key-Agreement Standard, Version 1.4, RSA
Data Security, Inc., Nov. 1993.
[<a href="./rfc1321">RFC-1321</a>]: Rivest, R., "The MD5 Message-Digest Algorithm", <a href="./rfc1321">RFC 1321</a>.
[<a href="./rfc1422">RFC-1422</a>]: Kent, S., "Privacy Enhancement for Internet Electronic
Mail: Part II: Certificate-Based Key Management", <a href="./rfc1422">RFC 1422</a>.
[<a href="./rfc1423">RFC-1423</a>]: Balenson, D., "Privacy Enhancement for Internet
Elecronic Mail: Part III: Algorithms, Modes, and Identifiers",
<a href="./rfc1423">RFC 1423</a>.
[<a href="./rfc1508">RFC-1508</a>]: Linn, J., "Generic Security Service Application Program
Interface", <a href="./rfc1508">RFC 1508</a>.
[<a href="./rfc1509">RFC-1509</a>]: Wray, J., "Generic Security Service Application Program
Interface: C-bindings", <a href="./rfc1509">RFC 1509</a>.
[<a href="./rfc1510">RFC-1510</a>]: Kohl J., and C. Neuman, "The Kerberos Network
Authentication Service (V5)", <a href="./rfc1510">RFC 1510</a>.
[9798]: ISO/IEC 9798-3, "Information technology - Security
Techniques - Entity authentication mechanisms - Part 3: Entitiy
authentication using a public key algorithm", ISO/IEC, 1993.
<span class="grey">Adams Standards Track [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
[X.501]: ISO/IEC 9594-2, "Information Technology - Open Systems
Interconnection - The Directory: Models", CCITT/ITU Recommendation
X.501, 1993.
[X.509]: ISO/IEC 9594-8, "Information Technology - Open Systems
Interconnection - The Directory: Authentication Framework",
CCITT/ITU Recommendation X.509, 1993.
[X9.44]: ANSI, "Public Key Cryptography Using Reversible
Algorithms for the Financial Services Industry: Transport of
Symmetric Algorithm Keys Using RSA", X9.44-1993.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Author's Address</span>
Carlisle Adams
Bell-Northern Research
P.O.Box 3511, Station C
Ottawa, Ontario, CANADA K1Y 4H7
Phone: +1 613.763.9008
EMail: cadams@bnr.ca
<span class="grey">Adams Standards Track [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Appendix A: ASN.1 Module Definition
SpkmGssTokens {iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) spkm(1) spkmGssTokens(10)}
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- EXPORTS ALL --
IMPORTS
Name
FROM InformationFramework {joint-iso-ccitt(2) ds(5) module(1)
informationFramework(1) 2}
Certificate, CertificateList, CertificatePair, AlgorithmIdentifier,
Validity
FROM AuthenticationFramework {joint-iso-ccitt(2) ds(5) module(1)
authenticationFramework(7) 2} ;
-- types --
SPKM-REQ ::= SEQUENCE {
requestToken REQ-TOKEN,
certif-data [0] CertificationData OPTIONAL,
auth-data [1] AuthorizationData OPTIONAL
}
CertificationData ::= SEQUENCE {
certificationPath [0] CertificationPath OPTIONAL,
certificateRevocationList [1] CertificateList OPTIONAL
} -- at least one of the above shall be present
CertificationPath ::= SEQUENCE {
userKeyId [0] OCTET STRING OPTIONAL,
userCertif [1] Certificate OPTIONAL,
verifKeyId [2] OCTET STRING OPTIONAL,
userVerifCertif [3] Certificate OPTIONAL,
theCACertificates [4] SEQUENCE OF CertificatePair OPTIONAL
} -- Presence of [2] or [3] implies that [0] or [1] must also be
<span class="grey">Adams Standards Track [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
-- present. Presence of [4] implies that at least one of [0], [1],
-- [2], and [3] must also be present.
REQ-TOKEN ::= SEQUENCE {
req-contents Req-contents,
algId AlgorithmIdentifier,
req-integrity Integrity -- "token" is Req-contents
}
Integrity ::= BIT STRING
-- If corresponding algId specifies a signing algorithm,
-- "Integrity" holds the result of applying the signing procedure
-- specified in algId to the BER-encoded octet string which results
-- from applying the hashing procedure (also specified in algId) to
-- the DER-encoded octets of "token".
-- Alternatively, if corresponding algId specifies a MACing
-- algorithm, "Integrity" holds the result of applying the MACing
-- procedure specified in algId to the DER-encoded octets of
-- "token"
Req-contents ::= SEQUENCE {
tok-id INTEGER (256), -- shall contain 0100 (hex)
context-id Random-Integer,
pvno BIT STRING,
timestamp UTCTime OPTIONAL, -- mandatory for SPKM-2
randSrc Random-Integer,
targ-name Name,
src-name [0] Name OPTIONAL,
req-data Context-Data,
validity [1] Validity OPTIONAL,
key-estb-set Key-Estb-Algs,
key-estb-req BIT STRING OPTIONAL,
key-src-bind OCTET STRING OPTIONAL
-- This field must be present for the case of SPKM-2
-- unilateral authen. if the K-ALG in use does not provide
-- such a binding (but is optional for all other cases).
-- The octet string holds the result of applying the
-- mandatory hashing procedure (in MANDATORY I-ALG;
-- see <a href="#section-2.1">Section 2.1</a>) as follows: MD5(src || context_key),
-- where "src" is the DER-encoded octets of src-name,
-- "context-key" is the symmetric key (i.e., the
-- unprotected version of what is transmitted in
-- key-estb-req), and "||" is the concatenation operation.
}
Random-Integer ::= BIT STRING
<span class="grey">Adams Standards Track [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Context-Data ::= SEQUENCE {
channelId ChannelId OPTIONAL,
seq-number INTEGER OPTIONAL,
options Options,
conf-alg Conf-Algs,
intg-alg Intg-Algs,
owf-alg OWF-Algs
}
ChannelId ::= OCTET STRING
Options ::= BIT STRING {
delegation-state (0),
mutual-state (1),
replay-det-state (2),
sequence-state (3),
conf-avail (4),
integ-avail (5),
target-certif-data-required (6)
}
Conf-Algs ::= CHOICE {
algs [0] SEQUENCE OF AlgorithmIdentifier,
null [1] NULL
}
Intg-Algs ::= SEQUENCE OF AlgorithmIdentifier
OWF-Algs ::= SEQUENCE OF AlgorithmIdentifier
Key-Estb-Algs ::= SEQUENCE OF AlgorithmIdentifier
SPKM-REP-TI ::= SEQUENCE {
responseToken REP-TI-TOKEN,
certif-data CertificationData OPTIONAL
-- present if target-certif-data-required option was
} -- set to TRUE in SPKM-REQ
REP-TI-TOKEN ::= SEQUENCE {
rep-ti-contents Rep-ti-contents,
algId AlgorithmIdentifier,
rep-ti-integ Integrity -- "token" is Rep-ti-contents
}
Rep-ti-contents ::= SEQUENCE {
tok-id INTEGER (512), -- shall contain 0200 (hex)
context-id Random-Integer,
<span class="grey">Adams Standards Track [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
pvno [0] BIT STRING OPTIONAL,
timestamp UTCTime OPTIONAL, -- mandatory for SPKM-2
randTarg Random-Integer,
src-name [1] Name OPTIONAL,
targ-name Name,
randSrc Random-Integer,
rep-data Context-Data,
validity [2] Validity OPTIONAL,
key-estb-id AlgorithmIdentifier OPTIONAL,
key-estb-str BIT STRING OPTIONAL
}
SPKM-REP-IT ::= SEQUENCE {
responseToken REP-IT-TOKEN,
algId AlgorithmIdentifier,
rep-it-integ Integrity -- "token" is REP-IT-TOKEN
}
REP-IT-TOKEN ::= SEQUENCE {
tok-id INTEGER (768), -- shall contain 0300 (hex)
context-id Random-Integer,
randSrc Random-Integer,
randTarg Random-Integer,
targ-name Name,
src-name Name OPTIONAL,
key-estb-rep BIT STRING OPTIONAL
}
SPKM-ERROR ::= SEQUENCE {
errorToken ERROR-TOKEN,
algId AlgorithmIdentifier,
integrity Integrity -- "token" is ERROR-TOKEN
}
ERROR-TOKEN ::= SEQUENCE {
tok-id INTEGER (1024), -- shall contain 0400 (hex)
context-id Random-Integer
}
SPKM-MIC ::= SEQUENCE {
mic-header Mic-Header,
int-cksum BIT STRING
}
Mic-Header ::= SEQUENCE {
tok-id INTEGER (257), -- shall contain 0101 (hex)
context-id Random-Integer,
<span class="grey">Adams Standards Track [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
int-alg [0] AlgorithmIdentifier OPTIONAL,
snd-seq [1] SeqNum OPTIONAL
}
SeqNum ::= SEQUENCE {
num INTEGER,
dir-ind BOOLEAN
}
SPKM-WRAP ::= SEQUENCE {
wrap-header Wrap-Header,
wrap-body Wrap-Body
}
Wrap-Header ::= SEQUENCE {
tok-id INTEGER (513), -- shall contain 0201 (hex)
context-id Random-Integer,
int-alg [0] AlgorithmIdentifier OPTIONAL,
conf-alg [1] Conf-Alg OPTIONAL,
snd-seq [2] SeqNum OPTIONAL
}
Wrap-Body ::= SEQUENCE {
int-cksum BIT STRING,
data BIT STRING
}
Conf-Alg ::= CHOICE {
algId [0] AlgorithmIdentifier,
null [1] NULL
}
SPKM-DEL ::= SEQUENCE {
del-header Del-Header,
int-cksum BIT STRING
}
Del-Header ::= SEQUENCE {
tok-id INTEGER (769), -- shall contain 0301 (hex)
context-id Random-Integer,
int-alg [0] AlgorithmIdentifier OPTIONAL,
snd-seq [1] SeqNum OPTIONAL
}
-- other types --
<span class="grey">Adams Standards Track [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
-- from [<a href="./rfc1508">RFC-1508</a>] --
MechType ::= OBJECT IDENTIFIER
InitialContextToken ::= [APPLICATION 0] IMPLICIT SEQUENCE {
thisMech MechType,
innerContextToken SPKMInnerContextToken
} -- when thisMech is SPKM-1 or SPKM-2
SPKMInnerContextToken ::= CHOICE {
req [0] SPKM-REQ,
rep-ti [1] SPKM-REP-TI,
rep-it [2] SPKM-REP-IT,
error [3] SPKM-ERROR,
mic [4] SPKM-MIC,
wrap [5] SPKM-WRAP,
del [6] SPKM-DEL
}
-- from [<a href="./rfc1510">RFC-1510</a>] --
AuthorizationData ::= SEQUENCE OF SEQUENCE {
ad-type INTEGER,
ad-data OCTET STRING
}
-- object identifier assignments --
md5-DES-CBC OBJECT IDENTIFIER ::=
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
integrity(3) md5-DES-CBC(1)}
sum64-DES-CBC OBJECT IDENTIFIER ::=
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
integrity(3) sum64-DES-CBC(2)}
spkm-1 OBJECT IDENTIFIER ::=
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) spkm(1) spkm-1(1)}
spkm-2 OBJECT IDENTIFIER ::=
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) spkm(1) spkm-2(2)}
END
<span class="grey">Adams Standards Track [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
Appendix B: Imported Types
This appendix contains, for completeness, the relevant ASN.1 types
imported from InformationFramework (1993), AuthenticationFramework
(1993), and [PKCS3].
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY
AttributeValueAssertion ::= SEQUENCE {AttributeType,AttributeValue}
RelativeDistinguishedName ::= SET OF AttributeValueAssertion
-- note that the 1993 InformationFramework module uses
-- different syntax for the above constructs
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
DistinguishedName ::= RDNSequence
Name ::= CHOICE { -- only one for now
rdnSequence RDNSequence
}
Certificate ::= SEQUENCE {
certContents CertContents,
algID AlgorithmIdentifier,
sig BIT STRING
} -- sig holds the result of applying the signing procedure
-- specified in algId to the BER-encoded octet string which
-- results from applying the hashing procedure (also specified in
-- algId) to the DER-encoded octets of CertContents
CertContents ::= SEQUENCE {
version [0] Version DEFAULT v1,
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUID [1] IMPLICIT UID OPTIONAL, -- used in v2 only
subjectUID [2] IMPLICIT UID OPTIONAL -- used in v2 only
}
Version ::= INTEGER {v1(0), v2(1)}
CertificateSerialNumber ::= INTEGER
UID ::= BIT STRING
Validity ::= SEQUENCE {
notBefore UTCTime,
notAfter UTCTime
}
<span class="grey">Adams Standards Track [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc2025">RFC 2025</a> SPKM October 1996</span>
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING
}
CertificatePair ::= SEQUENCE {
forward [0] Certificate OPTIONAL,
reverse [1] Certificate OPTIONAL
} -- at least one of the pair shall be present
CertificateList ::= SEQUENCE {
certListContents CertListContents,
algId AlgorithmIdentifier,
sig BIT STRING
} -- sig holds the result of applying the signing procedure
-- specified in algId to the BER-encoded octet string which
-- results from applying the hashing procedure (also specified in
-- algId) to the DER-encoded octets of CertListContents
CertListContents ::= SEQUENCE {
signature AlgorithmIdentifier,
issuer Name,
thisUpdate UTCTime,
nextUpdate UTCTime OPTIONAL,
revokedCertificates SEQUENCE OF SEQUENCE {
userCertificate CertificateSerialNumber,
revocationDate UTCTime } OPTIONAL
}
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameter ANY DEFINED BY algorithm OPTIONAL
} -- note that the 1993 AuthenticationFramework module uses
-- different syntax for this construct
--from [PKCS3] (the parameter to be used with dhKeyAgreement) --
DHParameter ::= SEQUENCE {
prime INTEGER, -- p
base INTEGER, -- g
privateValueLength INTEGER OPTIONAL
}
Adams Standards Track [Page 45]
</pre>
|