Network Working Group L. Neukirchen Internet-Draft vuxu.org Intended status: Informational April 1, 2019 Expires: October 3, 2019 IP Account Numbers draft-neukirchen-ipan-00 Abstract We propose a new syntax for IPv6 addresses which has higher mass acceptance and additionally provides a checksum. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on October 3, 2019. Copyright Notice Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Neukirchen Expires October 3, 2019 [Page 1] Internet-Draft IP Account Numbers April 2019 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 2. Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. Considerations . . . . . . . . . . . . . . . . . . . . . . . 4 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5. Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . 4 6. Security Considerations . . . . . . . . . . . . . . . . . . . 4 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 7.1. Normative References . . . . . . . . . . . . . . . . . . 4 7.2. Informative References . . . . . . . . . . . . . . . . . 5 Appendix A. Reference Implementation . . . . . . . . . . . . . . 5 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 1. Introduction Since its introduction in [RFC1883], IPv6 has been criticized for its long addresses, whose textual syntax has been explained in [RFC4291] and [RFC5952]. We propose an alternative encoding of IPv6 addresses using a format many users are already familiar with---the IBAN (International Bank Account Number), as specified in [ISO13616]. The resulting format, the so-called IPAN, provides a short, fixed- length encoding in the familiar format. 1.1. Terminology The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this document, are to be interpreted as described in [RFC2119]. 2. Encoding All IPAN have a length of exactly 32 octets. An IPAN consists of a header, a checksum, and an address, which consists of seven chunks: Neukirchen Expires October 3, 2019 [Page 2] Internet-Draft IP Account Numbers April 2019 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Header | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 3 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 5 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 6 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk 7 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IPAN uses the yet-unassigned ISO 3166-1 alpha-2 code "IP", therefore the header is the fixed two-octet sequence 0x49 0x50 ("IP"). The checksum is computed (and verified) as specified in [EBS204]. The address is a 28-octet base-32 representation of the 128-bit little endian integer corresponding to the IPv6 address. Note that this uses a different encoding than [RFC4648]: the base-32 digits are 0 up to 9, followed by the upper-case letters A up to V. This is consistent with the integer conversion rules of [ISO7064]. Example: 42 -> 1A 1234 -> 16I 16152 -> FOO 340282366920938463463374607431768211455 -> 7VVVVVVVVVVVVVVVVVVVVVVVVV When displaying an IPAN, it is recommended to chunk them up in pieces of four octets, separated by spaces. You MUST NOT use colons between these chunks to avoid confusion with [RFC4291]. "chunk" MUST be used in all technical documents and specifications refering to IPAN address parts. These chunks SHOULD NOT be called hextets or quibbles. Neukirchen Expires October 3, 2019 [Page 3] Internet-Draft IP Account Numbers April 2019 3. Considerations A base-32 representation was chosen for two reasons: first, due to its short length (an IBAN is limited to at most 34 characters), and second, that a power of two results in commonly used IPv6 addresses having a lot of zeroes, which retains the IBAN user experience. The checksum of the IPAN helps detecting typos and (oral) transmission errors. No provisions are made to provide an encoding for (obsolete) IPv4 addresses, but the embedding of [RFC6052] can be used. 4. Examples Here are some example IPv6 addresses and their corresponding IPAN: ::1 IP28 0000 0000 0000 0000 0000 0000 0001 2001:1410:200:eea::1 IP38 0010 04A1 00G0 1RL0 0000 0000 0001 2001:0db8:85a3:0000:0000:8a2e:0370:7334 IP95 0010 046R H1D3 0000 004A 5O1N 0SPK 64:ff9b::127.0.0.1 IP15 0000 CJVP M000 0000 0000 01VG 0001 2001:db8::1:59dc:aafc:62bc IP44 0010 046R G000 0000 00AP RILF OOLS 5. Conclusions People seem to be fine typing in IBAN, so this should raise acceptance of IPv6. 6. Security Considerations Security issues are not discussed in this memo. 7. References 7.1. Normative References [EBS204] European Committee for Banking Standards, "EBS204 V3.2: IBAN: Standard Implementation Guidelines", 2003. Neukirchen Expires October 3, 2019 [Page 4] Internet-Draft IP Account Numbers April 2019 [ISO13616] International Organization for Standardization, "ISO 13616:2007 Financial services -- International bank account number (IBAN)", 2007. [ISO7064] International Organization for Standardization, "ISO/IEC 7064:2003 Information technology -- Security techniques -- Check character systems", 2003. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, DOI 10.17487/RFC4291, February 2006, . [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 Address Text Representation", RFC 5952, DOI 10.17487/RFC5952, August 2010, . 7.2. Informative References [RFC1883] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 1883, DOI 10.17487/RFC1883, December 1995, . [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, . [RFC6052] Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. Li, "IPv6 Addressing of IPv4/IPv6 Translators", RFC 6052, DOI 10.17487/RFC6052, October 2010, . Appendix A. Reference Implementation We provide a reference implementation of IPAN en- and decoding in Ruby. To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work. Neukirchen Expires October 3, 2019 [Page 5] Internet-Draft IP Account Numbers April 2019 require 'socket' require 'ipaddr' def cksum(ip) (ip[4..-1] + ip[0..3]).upcase.gsub(/[A-Z]/) { |c| (c.ord - 'A'.ord + 10).to_s }.to_i % 97 end addr = ARGV.first || '2001:db8::1:59dc:aafc:62bc' if addr =~ /^IP/ # decode abort "IPv6BAN does not have 32 digits" if addr.size != 32 warn "IPv6BAN has invalid check digits" if cksum(addr) != 1 puts addr.scan(/..../).join(" ") puts addr puts IPAddr.new(addr[4..-1].to_i(32), Socket::AF_INET6) else # encode ip = IPAddr.new(Socket.getaddrinfo(addr, nil, :INET6, :STREAM)[0][3]) puts ip ipan = "IP00" + ip.to_i.to_s(32).rjust(28, '0').upcase ipan[2..3] = "%02d" % (98 - cksum(ipan)) puts ipan puts ipan.scan(/..../).join(" ") end Author's Address Leah Neukirchen vuxu.org Email: leah@vuxu.org Neukirchen Expires October 3, 2019 [Page 6]