idnits 2.17.1 draft-wouters-dane-otrfp-00.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 15, 2013) is 3931 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'TBD' is mentioned on line 285, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'OTRSPEC' -- Possible downref: Non-RFC (?) normative reference: ref. 'XMPP' -- Obsolete informational reference (is this intentional?): RFC 2822 (Obsoleted by RFC 5322) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Wouters 3 Internet-Draft Red Hat 4 Intended status: Standards Track July 15, 2013 5 Expires: January 16, 2014 7 Using DANE to Associate OTR public keys with email addresses 8 draft-wouters-dane-otrfp-00 10 Abstract 12 The Off-the-Record (OTR) protocol exchanges public keys in-band. 13 This document describes how to use DANE to securely associate an 14 Instant Message user identified by their email address with an OTR 15 public key. This association helps to authenticate users and protect 16 against MITM attacks. 18 Status of this Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on January 16, 2014. 35 Copyright Notice 37 Copyright (c) 2013 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. The OTRFP Resource Record . . . . . . . . . . . . . . . . . . 3 55 2.1. Location of the OTRFP record . . . . . . . . . . . . . . . 4 56 2.2. The OTRFP RDATA Format . . . . . . . . . . . . . . . . . . 4 57 3. Building the fingerprint data . . . . . . . . . . . . . . . . 6 58 3.1. Multiprecision Integers (MPI) . . . . . . . . . . . . . . 6 59 3.2. OTR public key representation . . . . . . . . . . . . . . 6 60 3.3. Calculating a DSA fingerprint . . . . . . . . . . . . . . 7 61 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 62 4.1. OTRFP DNS RRtype . . . . . . . . . . . . . . . . . . . . . 7 63 4.2. OTR Key Type Registry . . . . . . . . . . . . . . . . . . 7 64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 65 5.1. Email address information leak . . . . . . . . . . . . . . 8 66 5.2. UI presentation . . . . . . . . . . . . . . . . . . . . . 8 67 5.3. DNSSEC required . . . . . . . . . . . . . . . . . . . . . 8 68 6. Reference example . . . . . . . . . . . . . . . . . . . . . . 8 69 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 70 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 71 8.1. Normative References . . . . . . . . . . . . . . . . . . . 10 72 8.2. Informative References . . . . . . . . . . . . . . . . . . 10 73 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11 75 1. Introduction 77 Off-the-Record [OTRSPEC] is an encryption and authentication method 78 for two parties exchanging messages that works independantly of the 79 transport layer. There are OTR implementations for Instant Message 80 networks such as [XMPP], IRC [RFC2812], commercial IM networks, the 81 GSM SMS network and others. 83 OTR offers encryption, authentication, repudiation and perfect 84 forward secrecy. To authenticate the other party after an 85 unauthenticated Diffie-Hellman key exchange, a "long term" identity 86 keypair is used. It is up to both users to mutually verify each 87 other's OTR public key. One can make an out-of-band phone call, and 88 read out each other's public key fingerprint, assuming both parties 89 can recognise and trust each other's voice. Another option is to use 90 the shared secret. A third option is for both parties to ask each 91 other a question to which only the other party knows the answer. 93 None of the above listed methods allow a person to pre-publish their 94 OTR public key or finger print, or allow for a trusted third party or 95 PKI to vouch for OTR public keys. As a result, most users feel it is 96 too cumbersome to authenticate each other. As such, these users are 97 not protected against MITM attacks. 99 This document describes a mechanism to associate a user's OTR public 100 key with their email address, using a new DNS RRtype. This is 101 similar to the SSHFP [RFC4255] RRType, except that this method 102 associates keys with users, not hosts. Client implementations that 103 support this document will be able to protect their users against 104 MITM attacks, without requiring all users to manually verify each 105 other's identity. 107 1.1. Terminology 109 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 110 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 111 document are to be interpreted as described in RFC 2119 [RFC2119]. 113 This document also makes use of standard DNSSEC and DANE terminology. 114 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for 115 these terms. 117 2. The OTRFP Resource Record 119 The OTRFP DNS resource record (RR) is used to associate an end entity 120 OTR public key with an email address, thus forming a "OTRFP public 121 key association". 123 The type value allocated for the OTRFP RR type is [TBD]. The OTRFP 124 RR is class independent. The OTRFP RR has no special TTL 125 requirements. 127 2.1. Location of the OTRFP record 129 Domain names are prepared for requests in the following manner. 131 1. The user name (the "left-hand side" of the email address, called 132 the "local-part" in the mail message format definition [RFC2822] 133 and the "local part" in the specification for internationalized 134 email [RFC6530]), is encoded with Base32 [RFC4648], to become the 135 left-most label in the prepared domain name. This does not 136 include the "@" character that separates the left and right sides 137 of the email address. 139 2. The string "_otrfp" becomes the second left-most label in the 140 prepared domain name. 142 3. The domain name (the "right-hand side" of the email address, 143 called the "domain" in RFC 2822) is appended to the result of 144 step 2 to complete the prepared domain name. 146 For example, to request an OTRFP resource record for a user whose 147 address is "hugh@example.com", you would use 148 "d1qmeq0._otrfp.example.com" in the request. The corresponding RR in 149 the example.com zone might look like: 151 d1qmeq0._otrfp.example.com. IN OTRFP ( 152 3 0 1 5fdb8166f9089e253b90f95a91f48a8d2d2359ce ) 154 Design note: Encoding the user name with Base32 allows local parts 155 that have characters that would prevent their use in domain names. 156 For example, a period (".") is a valid character in a local part, but 157 would wreak havoc in a domain name. Similarly, RFC 6530 allows non- 158 ASCII characters in local parts, and encoding a local part with non- 159 ASCII characters with Base32 renders the name usable in the DNS. 161 2.2. The OTRFP RDATA Format 163 The RDATA for an OTRFP RR consists of an OTR protocol version, key 164 type, hash type and the fingerprint of the user's OTR public key. 166 1 2 3 167 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 168 +---------------+-------------------------------+---------------+ 169 ! protocol ! Key Type ! Hash Type | 170 +---------------+-------------------------------+---------------+ 171 ! ! 172 ~ Fingerprint data ~ 173 ! ! 174 +---------------------------------------------------------------+ 176 The fields have the following meaning and encoding: 178 Protocol: 180 One octet specifying the OTR protocol version. The following 181 values are assigned: 183 Value Protocol 184 ----- -------------- 185 0 reserved 186 1 reserved 187 2 version 2 (obsoleted) 188 3 version 3 190 Key Type: 192 Two octets specifying the OTR Key Type as defined in 193 [draft-individual-otr]. The following values are assigned: 195 Value Key Type 196 ----- -------------- 197 0 DSA 199 Hash Type: 201 One octet value specifying the hash algorithm used to compute 202 the fingerprint data. The following values are assigned: 204 Value Hash Type 205 ----- -------------- 206 0 reserved 207 1 SHA-1 209 Fingerprint data: 211 The actual fingerprint data in hexadecimal (see below) 213 3. Building the fingerprint data 215 OTR represents keys using multiprecision integers (also called MPIs) 216 which are unsigned integers used to hold large integer values such as 217 the ones used in cryptographic calculations. The OTR Public Key 218 representation depends on the Key Type and the fingerprint is a human 219 readable representation of the message-digest (hash) of the OTR 220 Public Key. 222 3.1. Multiprecision Integers (MPI) 224 An MPI consists of two pieces: a two-octet scalar that is the length 225 of the MPI in bits followed by a string of octets that contain the 226 actual integer. 228 These octets form a big-endian number; a big-endian number can be 229 made into an MPI by prefixing it with the appropriate length. 231 Examples (all numbers are in hexadecimal): 233 The string of octets [00 01 01] forms an MPI with the value 1. The 234 string [00 09 01 FF] forms an MPI with the value of 511. 236 Additional rules: 238 The size of an MPI is ((MPI.length + 7) / 8) + 2 octets. 240 The length field of an MPI describes the length starting from its 241 most significant non-zero bit. Thus, the MPI [00 02 01] is not 242 formed correctly. It should be [00 01 01]. 244 Unused bits of an MPI MUST be zero. 246 Also note that when an MPI is encrypted, the length refers to the 247 plaintext MPI. It may be ill-formed in its ciphertext. OTR does not 248 use encrypted MPIs. 250 3.2. OTR public key representation 252 An OTR Public Key is representated using a concatenation of its two 253 octet Key Type, followed by the MPI typed components that make up a 254 key. The number of components is dependant on the Key Type used. 256 A fingerprint is a hexadecimal representation of the message-digest 257 (hash) of an OTR Public Key. Currently, the only supported hash is 258 SHA-1. 260 There is an exception for backwards compatibility: if the OTR Key 261 Type is 0x0000 (DSA), then the two leading 0x00 octets are omitted 262 from the data to be hashed. 264 This encoding assures that, assuming the hash function itself has no 265 useful collisions, and DSA keys have a length of less than 524281 266 bits (500 times larger than most DSA keys), no two public keys will 267 have the same fingerprint. 269 3.3. Calculating a DSA fingerprint 271 For OTR Key Type 0x0000 (DSA), the public key is represented by its 272 Key Type (0x0000) concatenated with p(MPI) q(MPI) g(MPI) y(MPI) 274 This representation is hashed by the desired hashing function and 275 represented in hexadecimal to create the fingerprint data to be 276 included in the OTRFP RDATA section. 278 4. IANA Considerations 280 This specification requires IANA to create one new registry and one 281 new DNS RR type. 283 4.1. OTRFP DNS RRtype 285 This document uses a new DNS RR type, OTRFP, whose value [TBD] has 286 been allocated by IANA from the Resource Record (RR) TYPEs 287 subregistry of the Domain Name System (DNS) Parameters registry. 289 4.2. OTR Key Type Registry 291 This document requires IANA to create a new registry, "Off-the-Record 292 Public Key Type" (OTRpubkey), with a reference to this document. The 293 registry entries consist of a numeric value from 0 to 65535, 294 inclusive. The initial value for this registry is defined below. 295 Future assignments are to be made through Expert Review with 296 Specification Required [RFC5226]. 298 Key Type: 300 Two octets specifying the OTR Public Key Type 302 Value Key Type 303 ----- -------------- 304 0 DSA 306 5. Security Considerations 308 5.1. Email address information leak 310 DNS zones that are signed with DNSSEC using NSEC for denial of 311 existence are susceptible to zone-walking, a mechanism that allow 312 someone to enumerate all the names in the zone. Someone who wanted 313 to collect email addresses from a zone that uses OTRFP might use such 314 a mechanism. DNSSEC-signed zones using NSEC3 for denial of existence 315 are significantly less susceptible to zone-walking. Someone could 316 still attempt a dictionary attack on the zone to find OTRFP records, 317 just as they can use dictionary attacks on an SMTP server to see 318 which addresses are valid. 320 5.2. UI presentation 322 Client treatment of any information included in the OTRFP record is a 323 matter of local policy. Clients are strongly encouraged to not 324 visually equate a DANE verified fingerprint with a human-verified 325 fingerprint. Padlock icons are strongly discouraged as the 326 verification state of a public key is not a binary selection. 328 5.3. DNSSEC required 330 If an OTRFP resource record is received without DNSSEC protection, it 331 SHOULD NOT be used. If the DNS request returned an "indeterminate" 332 or "bogus" answer, the user SHOULD be warned that they might be under 333 attack. Bogus data MUST NOT be used. 335 6. Reference example 337 Given a textual representation of a DSA private key for 338 hugh@example.com of: 340 (dsa 341 (p #0085CAB74C71F78ACBAF92E3959E772050E8332D1262CF7989D1ACDFBB545E 342 16E757DBAAD3047E306E250C69CA4347CC7347F68070DE46B8EC4C4B41579F 343 1D57F00E76EBFDD7EF5494D6E726428BE17D7E4BEFE0ECE6BA661E7BE799B6 344 E5BF5EF8BB02CD1466A06114EF517CCBC21D68CC769F5A15D4FC473BA27482 345 AC4F42C667#) 346 (q #0086CBA0573319CFA3D3EBD8225651E58B316B22F5#) 347 (g #2CE973832A3B23A9E8E5BC324E16A9445C0EBB73C03ACBBE5EEC6504F640DB 348 A49C97A42282271BA6127F848EC70F1A4AB784BE0A712081DF721452C87EE6 349 9B5C4FA963E933C2E592AF9631C3FDF94A85593A1BF6170889DBB8DD55A0A2 350 BB19874EBDA2D96929A541576D7800BFEB467D6F991E437883F8BC7D6A3654 351 5C04BDFC#) 352 (y #30CCBADF74E0313E1E6274DB8CC08FA6DC5EB6FA4729BB573034D75EB564CB 353 1F3DBECA70DF6A7337BD2A9EFA63986C2F64B4D4B32CFDB9F3BF6719DC4A98 354 43E60319236D8EB936FFE845C5A6B856557F0E9A4CA769041FBA92CA2CCE88 355 E2E3441650437FF5FB315F4AFF5CA43BFF3539B520297EC1C5BAF3E437F829 356 3F9E2DA8#) 357 (x #4EB9993416934FAE476E4655B5A520373F1321CE#) 358 ) 360 The fingerprint is calculated (leaving out the 0x0000 Key Type for 361 DSA) by hashing: 363 SHA-1( p(MPI) | q(MPI) | g(MPI) | y(MPI) ) 365 which yields (in hexadecimal): 367 35b3c7c02cf9e74bd53f33a0bb815ccd39e60a8d 369 Resulting in the following OTRFP record: 371 d1qmeq0._otrfp.example.com. IN OTRFP ( 372 3 0 1 35b3c7c02cf9e74bd53f33a0bb815ccd39e60a8d ) 374 7. Acknowledgements 376 This document is based on RFC-4255 and draft-ietf-dane-smime whose 377 authors are Paul Hoffman, Jacob Schlyter and W. Griffin. The MPI 378 section has been taken verbatim from RFC-4880. 380 8. References 381 8.1. Normative References 383 [OTRSPEC] OTR Team, "Off-the-Record Messaging Protocol version 3", 384 . 386 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 387 Requirement Levels", BCP 14, RFC 2119, March 1997. 389 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 390 Rose, "DNS Security Introduction and Requirements", 391 RFC 4033, March 2005. 393 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 394 Rose, "Resource Records for the DNS Security Extensions", 395 RFC 4034, March 2005. 397 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 398 Rose, "Protocol Modifications for the DNS Security 399 Extensions", RFC 4035, March 2005. 401 [RFC4255] Schlyter, J. and W. Griffin, "Using DNS to Securely 402 Publish Secure Shell (SSH) Key Fingerprints", RFC 4255, 403 January 2006. 405 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 406 Encodings", RFC 4648, October 2006. 408 [XMPP] "XMPP Standards Foundation RFCs", 409 . 411 8.2. Informative References 413 [RFC2812] Kalt, C., "Internet Relay Chat: Client Protocol", 414 RFC 2812, April 2000. 416 [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, 417 April 2001. 419 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 420 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 421 May 2008. 423 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 424 Internationalized Email", RFC 6530, February 2012. 426 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 427 of Named Entities (DANE) Transport Layer Security (TLS) 428 Protocol: TLSA", RFC 6698, August 2012. 430 Author's Address 432 Paul Wouters 433 Red Hat 435 Email: pwouters@redhat.com