idnits 2.17.1 draft-howard-gss-sanon-14.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 410 has weird spacing: '...ret key b0 d...' -- The document date (April 30, 2020) is 1457 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'APPLICATION 0' is mentioned on line 169, but not defined Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group L. Howard 3 Internet-Draft PADL 4 Intended status: Informational April 30, 2020 5 Expires: November 1, 2020 7 A Simple Anonymous GSS-API Mechanism 8 draft-howard-gss-sanon-14 10 Abstract 12 This document defines protocols, procedures and conventions for a 13 Generic Security Service Application Program Interface (GSS-API) 14 security mechanism that provides key agreement without authentication 15 of either party. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on November 1, 2020. 34 Copyright Notice 36 Copyright (c) 2020 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Requirements notation . . . . . . . . . . . . . . . . . . . . 2 53 3. Discovery and Negotiation . . . . . . . . . . . . . . . . . . 3 54 4. Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 4.1. Mechanism Names . . . . . . . . . . . . . . . . . . . . . . 3 56 4.2. Display Name Format . . . . . . . . . . . . . . . . . . . . 3 57 4.3. Exported Name Format . . . . . . . . . . . . . . . . . . . 3 58 5. Definitions and Token Formats . . . . . . . . . . . . . . . . 4 59 5.1. Context Establishment Tokens . . . . . . . . . . . . . . . 4 60 5.1.1. Initial context token . . . . . . . . . . . . . . . . . . 4 61 5.1.2. Acceptor context token . . . . . . . . . . . . . . . . . 5 62 5.1.3. Initiator context completion . . . . . . . . . . . . . . 5 63 5.2. Per-Message Tokens . . . . . . . . . . . . . . . . . . . . 6 64 5.3. Context Deletion Tokens . . . . . . . . . . . . . . . . . . 6 65 6. Key derivation . . . . . . . . . . . . . . . . . . . . . . . 6 66 7. Pseudo-Random Function . . . . . . . . . . . . . . . . . . . 7 67 8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 68 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 69 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 70 10.1. Normative References . . . . . . . . . . . . . . . . . . . 8 71 10.2. Informative References . . . . . . . . . . . . . . . . . . 8 72 Appendix A. Test Vectors . . . . . . . . . . . . . . . . . . . . 9 73 Appendix B. Mechanism Attributes . . . . . . . . . . . . . . . . 10 74 Appendix C. NegoEx . . . . . . . . . . . . . . . . . . . . . . . 10 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 11 77 1. Introduction 79 The Generic Security Service Application Program Interface (GSS-API) 80 [RFC2743] provides a framework for authentication and message 81 protection services through a common programming interface. 83 The Simple Anonymous mechanism (hereafter SAnon) described in this 84 document is a simple protocol based on the X25519 elliptic curve 85 Diffie-Hellman (ECDH) key agreement scheme defined in [RFC7748]. No 86 authentication of initiator or acceptor is provided. A potential use 87 of SAnon is to provide a degree of privacy when bootstrapping unkeyed 88 entities. 90 2. Requirements notation 92 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 93 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 94 document are to be interpreted as described in [RFC2119]. 96 3. Discovery and Negotiation 98 The SAnon mechanism is identified by the following OID: 100 sanon-x25519 OBJECT IDENTIFIER ::= 101 {iso(1)identified-organization(3)dod(6)internet(1) 102 private(4)enterprise(1)padl(5322)gss-sanon(26) 103 mechanisms(1)sanon-x25519(110)} 105 The means of discovering GSS-API peers and their supported mechanisms 106 is out of this specification's scope. To avoid multiple layers of 107 negotiation, SAnon is not crypto-agile; a future variant using a 108 different algorithm would be assigned a different OID. 110 If anonymity is not desired then SAnon MUST NOT be used. Either 111 party can test for anon_state (GSS_C_ANON_FLAG) to check if anonymous 112 authentication was performed. 114 4. Naming 116 4.1. Mechanism Names 118 A SAnon mechanism name is abstractly a boolean indicating whether it 119 represents an anonymous identity. Anonymous identities are names 120 imported with the GSS_C_NT_ANONYMOUS name type. Implementations MAY 121 map other names to anonymous identities according to local policy. 122 Names representing non-anonymous identities MUST be importable so 123 that initiators with non-default credentials can engage SAnon by 124 setting anon_req_flag (GSS_C_ANON_FLAG). 126 4.2. Display Name Format 128 When GSS_Display_name() is called on a mechanism name representing an 129 anonymous identity, the display string is WELLKNOWN/ 130 ANONYMOUS@WELLKNOWN:ANONYMOUS [RFC8062] and the name type is 131 GSS_C_NT_ANONYMOUS. This is always the name observed by a SAnon 132 peer. All context APIs that return peer names MUST return this name 133 for both parties if the context is established. 135 4.3. Exported Name Format 137 SAnon uses the mechanism-independent exported name object format 138 defined in [RFC2743] Section 3.2. All lengths are encoded as big- 139 endian integers. The export of non-anonymous mechanism names MUST 140 fail with GSS_S_BAD_NAME. 142 +--------------+--------------+---------------------------------+ 143 | Length | Name | Description | 144 +--------------+--------------+---------------------------------+ 145 | 2 | TOK_ID | 04 01 | 146 | | | | 147 | 2 | MECH_OID_LEN | Length of the mechanism OID | 148 | | | | 149 | MECH_OID_LEN | MECH_OID | The SAnon mechanism OID, in DER | 150 | | | | 151 | 4 | NAME_LEN | 00 00 00 01 | 152 | | | | 153 | 1 | NAME | 01 | 154 +--------------+--------------+---------------------------------+ 156 5. Definitions and Token Formats 158 5.1. Context Establishment Tokens 160 5.1.1. Initial context token 162 The initial context token is framed per Section 1 of [RFC2743]: 164 GSS-API DEFINITIONS ::= 165 BEGIN 167 MechType ::= OBJECT IDENTIFIER -- 1.3.6.1.4.1.5322.26.1.110 168 GSSAPI-Token ::= 169 [APPLICATION 0] IMPLICIT SEQUENCE { 170 thisMech MechType, 171 innerToken ANY DEFINED BY thisMech 172 -- 32 byte initiator public key 173 -- 8 byte protocol flags (optional) 174 } 175 END 177 On the first call to GSS_Init_sec_context(), the mechanism checks if 178 one or more of the following are true: 180 The caller set anon_req_flag (GSS_C_ANON_FLAG) 182 The claimant credential identity is anonymous (see Section 4.1) 184 The claimant credential is the default one and target identity is 185 anonymous 187 If none of these are the case, the call MUST fail with 188 GSS_S_UNAVAILABLE. 190 If proceeding, the initiator generates a fresh secret and public key 191 pair per [RFC7748] Section 6.1 and returns GSS_S_CONTINUE_NEEDED, 192 indicating that a subsequent context token from the acceptor is 193 expected. The innerToken field of the output_token contains the 194 initiator's 32 byte public key, optionally concatenated with a 64-bit 195 big-endian integer containing flags that are not optional and the 196 acceptor would be otherwise be unable to infer (such as those defined 197 in [RFC4757] Section 7.1). 199 Portable initiators are RECOMMENDED to use default credentials 200 whenever possible and request anonymity only through anon_req_flag 201 (see [RFC8062] Section 6). 203 5.1.2. Acceptor context token 205 Upon receiving a context token from the initiator, the acceptor 206 validates that the token is well formed. The acceptor generates a 207 fresh secret and public key pair. The context session key is 208 computed as specified in Section 6. 210 The acceptor constructs an output_token by concatenating its public 211 key with the token emitted by calling GSS_GetMIC() with the default 212 QOP and zero-length octet string. The output token is sent to the 213 initiator without additional framing. 215 The acceptor then returns GSS_S_COMPLETE, setting src_name to the 216 canonical anonymous name. The reply_det_state (GSS_C_REPLAY_FLAG), 217 sequence_state (GSS_C_SEQUENCE_FLAG), conf_avail (GSS_C_CONF_FLAG), 218 integ_avail (GSS_C_INTEG_FLAG) and anon_state (GSS_C_ANON_FLAG) 219 security context flags are set, along with any additional flags 220 received from the initiator. The context is ready to use. 222 5.1.3. Initiator context completion 224 Upon receiving the acceptor context token and verifying it is well 225 formed, the initiator extracts the acceptor's public key (being the 226 first 32 bytes of the input token) and computes the context session 227 key per Section 6. 229 The initiator calls GSS_VerifyMIC() with the MIC extracted from the 230 context token and the zero-length octet string. If successful, the 231 initiator returns GSS_S_COMPLETE to the caller, to indicate the 232 initiator is authenticated and the context is ready for use. No 233 output token is emitted. The security context flags are set as for 234 the acceptor, including any additional flags sent in the initial 235 context token. 237 5.2. Per-Message Tokens 239 The per-message tokens definitions are imported from [RFC4121] 240 Section 4.2. The base key used to derive specific keys for signing 241 and sealing messages is defined in Section 6. The [RFC3961] 242 encryption and checksum algorithms use the aes128-cts-hmac-sha256-128 243 encryption type defined in [RFC8009]. The AcceptorSubkey flag as 244 defined in [RFC4121] Section 4.2.2 MUST be set. 246 5.3. Context Deletion Tokens 248 Context deletion tokens are empty in this mechanism. The behavior of 249 GSS_Delete_sec_context() [RFC2743] is as specified in [RFC4121] 250 Section 4.3. 252 6. Key derivation 254 The context session key is known as the base key, and is computed 255 using a key derivation function from [SP800-108] Section 5.1 (using 256 HMAC as the PRF): 258 base key = HMAC-SHA-256(K1, i | label | 0x00 | context | L) 260 where: 262 K1 the output of X25519(local secret key, peer public key) 263 as specified in [RFC7748] Section 6.1 265 i the constant 0x00000001, representing the iteration 266 count expressed in big-endian binary representation of 267 4 bytes 269 label the string "sanon-x25519" (without quotation marks) 271 context initiator public key | acceptor public key | flags | 272 channel binding application data (if present) 274 L the constant 0x00000080, being length in bits of the 275 key to be outputted expressed in big-endian binary 276 representation of 4 bytes 278 The flags input to the context contains any flags sent by the 279 initiator, defaulting to zero if none were sent, expressed in big- 280 endian binary representation of 8 bytes. 282 The inclusion of channel bindings in the key derivation function 283 means that the acceptor cannot ignore initiator channel bindings; 284 this differs from some other mechanisms. Being the only variable 285 length input to the key derivation function, the length is not 286 included. 288 The base key provides the acceptor-asserted subkey defined in 289 [RFC4121] Section 2 and is used to generate keys for per-message 290 tokens and the GSS-API PRF. Its encryption type is aes128-cts-hmac- 291 sha256-128 per [RFC8009]. The [RFC3961] algorithm protocol 292 parameters are as given in [RFC8009] Section 5. 294 7. Pseudo-Random Function 296 The [RFC4401] GSS-API pseudo-random function for this mechanism 297 imports the definitions from [RFC8009], using the base key for both 298 GSS_C_PRF_KEY_FULL and GSS_C_PRF_KEY_PARTIAL usages. 300 8. Security Considerations 302 This document defines a GSS-API security mechanism, and therefore 303 deals in security and has security considerations text embedded 304 throughout. This section only addresses security considerations 305 associated with the SAnon mechanism described in this document. It 306 does not address security considerations associated with the GSS-API 307 itself. 309 This mechanism provides only for key agreement. It does not 310 authenticate the identity of either party. It MUST NOT be selected 311 if either party requires identification of its peer. 313 SAnon mechanism names are not unary: there may be many real 314 identities that map to either the anonymous or non-anonymous 315 mechanism name. As such, implementations MUST ensure that 316 GSS_Compare_name() always sets name_equal to FALSE when comparing 317 mechanism names. 319 9. Acknowledgements 321 AuriStor, Inc funded the design of this protocol, along with an 322 implementation for the Heimdal GSS-API library. 324 Jeffrey Altman, Greg Hudson, Simon Josefsson, and Nicolas Williams 325 provided valuable feedback on this document. 327 10. References 328 10.1. Normative References 330 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 331 Requirement Levels", BCP 14, RFC 2119, 332 DOI 10.17487/RFC2119, March 1997, 333 . 335 [RFC2743] Linn, J., "Generic Security Service Application Program 336 Interface Version 2, Update 1", RFC 2743, 337 DOI 10.17487/RFC2743, January 2000, 338 . 340 [RFC3961] Raeburn, K., "Encryption and Checksum Specifications for 341 Kerberos 5", RFC 3961, DOI 10.17487/RFC3961, February 342 2005, . 344 [RFC4121] Zhu, L., Jaganathan, K., and S. Hartman, "The Kerberos 345 Version 5 Generic Security Service Application Program 346 Interface (GSS-API) Mechanism: Version 2", RFC 4121, 347 DOI 10.17487/RFC4121, July 2005, 348 . 350 [RFC4401] Williams, N., "A Pseudo-Random Function (PRF) API 351 Extension for the Generic Security Service Application 352 Program Interface (GSS-API)", RFC 4401, 353 DOI 10.17487/RFC4401, February 2006, 354 . 356 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 357 for Security", RFC 7748, DOI 10.17487/RFC7748, January 358 2016, . 360 [RFC8009] Jenkins, M., Peck, M., and K. Burgin, "AES Encryption with 361 HMAC-SHA2 for Kerberos 5", RFC 8009, DOI 10.17487/RFC8009, 362 October 2016, . 364 10.2. Informative References 366 [I-D.zhu-negoex] 367 Short, M., Zhu, L., Damour, K., and D. McPherson, "SPNEGO 368 Extended Negotiation (NEGOEX) Security Mechanism", draft- 369 zhu-negoex-04 (work in progress), January 2011. 371 [RFC4178] Zhu, L., Leach, P., Jaganathan, K., and W. Ingersoll, "The 372 Simple and Protected Generic Security Service Application 373 Program Interface (GSS-API) Negotiation Mechanism", 374 RFC 4178, DOI 10.17487/RFC4178, October 2005, 375 . 377 [RFC4757] Jaganathan, K., Zhu, L., and J. Brezak, "The RC4-HMAC 378 Kerberos Encryption Types Used by Microsoft Windows", 379 RFC 4757, DOI 10.17487/RFC4757, December 2006, 380 . 382 [RFC5587] Williams, N., "Extended Generic Security Service Mechanism 383 Inquiry APIs", RFC 5587, DOI 10.17487/RFC5587, July 2009, 384 . 386 [RFC8062] Zhu, L., Leach, P., Hartman, S., and S. Emery, Ed., 387 "Anonymity Support for Kerberos", RFC 8062, 388 DOI 10.17487/RFC8062, February 2017, 389 . 391 [SP800-108] 392 Chen, L., "Recommendation for Key Derivation Using 393 Pseudorandom Functions (Revised)", October 2009. 395 Appendix A. Test Vectors 397 The example exchange below contains no additional flags or channel 398 binding information. 400 initiator secret key 83 33 f2 ea 2a 22 eb aa 05 39 c6 06 1d 6a 99 05 401 84 24 49 9e 2c 16 c1 b1 34 d9 22 27 f3 f4 5e bd 403 initiator public key 5f 40 66 22 5a 3c fd 72 57 23 c1 8f ae 71 3e 8c 404 ab 32 a7 2c 93 b9 76 66 04 4b 8f e4 a0 c9 69 19 406 initiator token 60 2c 06 0a 2b 06 01 04 01 a9 4a 1a 01 6e 5f 40 407 66 22 5a 3c fd 72 57 23 c1 8f ae 71 3e 8c ab 32 408 a7 2c 93 b9 76 66 04 4b 8f e4 a0 c9 69 19 410 acceptor secret key b0 db 16 32 39 0a dd 93 1e f7 62 bc d3 c9 1d 03 411 e8 d9 59 52 48 eb e2 f2 b5 f7 d8 06 ec dd 50 60 413 acceptor public key 2f 81 51 9f a8 9c 07 f8 eb b2 95 6c 0c c3 22 77 414 ae a1 0e 62 0c 79 33 81 ef 9a c5 b2 f0 d9 1e 06 416 base key 80 76 2c 43 32 6a 95 f5 be 30 6d ea 10 ba f3 d0 418 acceptor token 2f 81 51 9f a8 9c 07 f8 eb b2 95 6c 0c c3 22 77 419 ae a1 0e 62 0c 79 33 81 ef 9a c5 b2 f0 d9 1e 06 420 04 04 05 ff ff ff ff ff 00 00 00 00 00 00 00 00 421 4d 5e a9 e0 e1 9c 7a 61 c2 6a 9a c5 e8 17 5f 04 423 initiator negoex key 2a c8 f9 d0 31 87 40 42 cb d4 50 07 ce db c2 c2 424 acceptor negoex key 73 9f 4d a2 f1 2d f7 f7 d7 ea e4 9d a4 08 62 5b 426 Appendix B. Mechanism Attributes 428 The [RFC5587] mechanism attributes for this mechanism are: 430 GSS_C_MA_MECH_CONCRETE 432 GSS_C_MA_ITOK_FRAMED 434 GSS_C_MA_AUTH_INIT_ANON 436 GSS_C_MA_AUTH_TARG_ANON 438 GSS_C_MA_INTEG_PROT 440 GSS_C_MA_CONF_PROT 442 GSS_C_MA_MIC 444 GSS_C_MA_WRAP 446 GSS_C_MA_REPLAY_DET 448 GSS_C_MA_OOS_DET 450 GSS_C_MA_CBINDINGS 452 GSS_C_MA_PFS 454 GSS_C_MA_CTX_TRANS 456 Appendix C. NegoEx 458 When SAnon is negotiated by [I-D.zhu-negoex], the authentication 459 scheme identifier is DEE384FF-1086-4E86-BE78-B94170BFD376. 461 The initiator and acceptor keys for NegoEx checksum generation and 462 verification are derived using the GSS-API PRF (see Section 7), with 463 the input data "sanon-x25519-initiator-negoex-key" and "sanon-x25519- 464 acceptor-negoex-key" respectively (without quotation marks). No 465 metadata is defined and any, if present, SHOULD be ignored. 467 It is RECOMMENDED that GSS-API implementations supporting both SPNEGO 468 [RFC4178] and NegoEx advertise SAnon under both to maximise 469 interoperability. 471 Author's Address 473 Luke Howard 474 PADL Software Pty Ltd 475 PO Box 59 476 Central Park, VIC 3145 477 Australia 479 Email: lukeh@padl.com