Network Working Group S. Guthery Internet Draft S. Marks Document: draft-guthery-tcp7816-00.txt Mobile-Mind Expires: July, 2001 January, 2001 Category: Experimental IP/TCP/UDP Header Compression for ISO 7816 Links Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. 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." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. Abstract This document describes the transport of TCP and UDP packets over the IP layer of ISO 7816 integrated circuit ("smart") cards with particular attention to header compression. Guthery Experimental - Expires July 2001 1 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links Table of Contents Status of this Memo................................................1 Abstract...........................................................1 Table of Contents..................................................2 Overview...........................................................2 Conventions Used in this Document..................................2 Motivation.........................................................2 Header Compression on the Handset Link Layers......................3 RObust Header Compression (ROHC)...................................4 Van Jacobson Header Compression....................................5 Packet Type Indication.............................................5 Security Considerations............................................5 References.........................................................5 Author's Addresses.................................................8 Full Copyright Statement...........................................8 Overview The Internet Draft "IP and ARP over ISO 7816" [7] describes the transport of IP datagrams over the asynchronous, half-duplex link layer protocols found on ISO 7816 compliant integrated circuit cards (ICCs). This document describes the transport of TCP and UDP packets on this network layer with particular attention to header compression. For the purpose of this document, a terminal together with all the ICCs physically connected to it is taken to be a connected network [3] wherein the terminal acts as the gateway router. A 3GPP mobile telephone terminal with its ICC identity modules is an example of such a connected network. Conventions Used in this Document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119 [1]. A session is an interval of time that starts when the ICC is reset and ends when either power is removed from the ICC or it is reset again. For example, a session might be from when a mobile phone is turned on and when is subsequently turned off or the time between when a card is inserted into an ATM machine and it is subsequently removed. Motivation Smart cards are tamper-resistant hardware security modules, usually used for storing secret keys and performing cryptographic Guthery Experimental - Expires July 2001 2 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links computations. Recently, there is a trend toward smart cards becoming application platforms, thus turning them into trusted computing bases. Communication with smart cards today is based upon link layer protocols such as T=0 [4] and T=1 [5] and the construction of commands called Application Data Processing Units (APDUs) [6] for accessing the services of the card. The ISO 7816 communication channel is very efficiency sensitive. For contact cards it is a low data rate channel and for contactless cards is open for only a short period of time. In both situations transaction time is a critical design metric. Of particular interest are the smart cards in mobile telephones called subscriber identity modules or SIMs. While they vary slightly across mobile telephone technologies -- SIM for GSM, USIM for 3GPP, R-UIM for 3GPP2 ū they are essentially identical with respect to available hardware resources and therefore design considerations for supporting an Internet protocol stack. Much work has been and continues to be devoted to the use of Internet protocols on low-speed, error-prone channels such as those found in mobile and wireless networks [8]. A key consideration of this work is economical use of the transmission channel through header compression [9-17]. The various header compression schemes proposed over the years for various Internet protocols have been synthesized in the RObust Header Compression (ROHC) effort [18]. Most of the work on mobile and wireless networks regards the handset as the end-point of the mobile communication path. Because the handset has ample computational resources (cycles and memory) is typically willing to trade these resources for bandwidth efficiency. An IP stack on the SIM has far fewer computational resources to work with compared to the handset. As a result the code size and running time of the compressors and decompressors are of as much interest as the amount of bandwidth they save. Furthermore, the SIM is dealing with a different physical link than the handset and perhaps a different profile of Internet protocol usage. Header Compression on the Handset Link Layers The data link layer on the handset between the IP protocol stack and the network will be PPP [25] for cdma2000, LLC [26] for 3GPP GPRS, and PDCP [27] for UMTS. All of these standards call for header compression to a greater or lesser degree of specificity. PDCP mandates RFC 2507 [12] as one of the available options. On one hand, one is motivated to use the same header compression scheme(s) on the network link as on the SIM link. This would reduce the amount of code on the handset and perhaps save decompression and recompression steps for packets headed for the SIM. On the other hand, the physical and traffic properties of the wireless channel are vastly different than the same properties on the SIM channel so Guthery Experimental - Expires July 2001 3 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links a wholly different header compression scheme on the SIM link is justified. RObust Header Compression (ROHC) The requirements ROHC itself are listed in [19] and link layer requirements imposed by ROHC are listed in [20]. From [20], the link layer requirements are: 1. Lower layers MUST provide error detection for at least ROHC headers. 2. It is RECOMMENDED that erroneous headers are passed up to the decompressor instead of being discarded before the decompressor, but in that case an indication that the header has errors MUST be included to the decompressor together with the erroneous header. 3. Information about the received packet (with the compressed header) length MUST be provided by the link layer. 4. The link layer MUST in some manner support varying header sizes from 40 bytes (full RTP/UDP/IPv4 header) or 60 bytes (full RTP/UDP/IPv6) down to 1 byte for the minimal compressed header. 5. The lower layers supporting ROHC MUST include mechanisms for negotiating header compression parameters such as, CID usage and/or header compression profiles. It is RECOMMENDED that the lower layer have mechanisms that support re-negotiations of these parameters. 6. It is RECOMMENDED that demultiplexing be done in the lower layers supporting robust header compression. 7. If ROHC is used together with header compression schemes requiring packet type identification at the link layer, e.g. [RFC2507, RFC2508], or if ROHC is used on top of link layers where packet type identifiers already are present, it is RECOMMENDED that one (1) ROHC packet type identifier is supported on lower layers. 8. ROHC can handle packet duplication before the compressor but it is RECOMMENDED that such packet duplications are avoided. Lower layers MUST NOT duplicate packets on the path between ROHC compressor and decompressor. 9. Lower layer MUST support transport of feedback packets from decompressor to compressor if ROHC is to be used in O-mode or R- mode. Lower layers MUST support transport of small stand-alone feedback packets if piggybacking of feedback packets is not used. The feedback packets from the decompressor SHOULD be delivered as soon as possible to the compressor. 10. The lower layer MUST indicate to the header compressor that a significant long event of consecutive packet loss has occurred. The ISO 7816 link layer is taken to be error-free and continuously available and thus satisfies 1, 2 and 10 by virtue of the nature of the physical and data link layers. The proposed ISO 7816 IP [7] satisfies 3, 4 and 8 by design. There is currently no provision to satisfy 5 or 9 and 7 is not a considered possibility. Requirement 6 is problematic because there are many different multiplexing schemes ū most of them unused in practice ū for communication with the SIM. In the end full-bore ROHC as described in [18] is probably overly Guthery Experimental - Expires July 2001 4 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links general and too resource demanding for use in ICCs in general and on SIMs in particular. Van Jacobson Header Compression Since the physical link to the ICC is in fact a low-speed, low-loss serial link, classic Van Jacobson header compression is a good starting point for header compression for ISO 7816 links. The Van Jacobson algorithm [9] can be coded in around 1K bytes for the micro-processors in current ICCs and thus does not present an unbearable code burden. It yields immediate returns and is widely implemented. The shortcomings of Van Jacobson compression are that it doesnĘt include UDP or IPv6 headers and it doesnĘt comply fully with PDCP which is RFC 2507. The IPv4 UDP header isnĘt worth either the code space or the compute time on an ICC to compress. IPv6 will be used on ICCs when the demand for static addresses for them exceeds the IPv4 supply. Current work focuses on IPv4 stacks for ICCs. Packet Type Indication The ISO 7816 link layer must be able to indicate four Van Jacobson packet types: TYPE_IP, TYPE_UNCOMPRESSED_TCP, TYPE_COMPRESSED_TCP and TYPE_ERROR. The upper two bits of the second (INS) field of the ISO 7816 link layer frame can be used for this purpose. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CLA = 0xFE |INS = Pkt Type | PP = 0x00 0x21 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0x00 | Length | IP Datagram ą +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- INS Meaning --- ------- 0xFE TYPE_IP 0xBE TYPE_UNCOMPRESSED_TCP 0x7E TYPE_COMPRESSED_TCP 0x3E TYPE_ERROR Security Considerations Security issues are not discussed in this memo. References 1 Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996. 2 Bradner, S., "Key words for use in RFCs to Indicate requirement Levels", BCP 14, RFC 2119, March 1997. Guthery Experimental - Expires July 2001 5 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links 3 Braden, R., "Requirements for Internet Hosts -- Communication Layers," RFC 1122, October 1989. 4 ISO/IEC 7816-3 Identification cards - Integrated circuit(s) cards with contacts - Part 3: Electronic signals and transmission protocols, First edition, September 15, 1989. 5 ISO/IEC 7816-3 Identification cards - Integrated circuit(s) cards with contacts - Part 3: Electronic signals and transmission protocols. Amendment 1: Protocol type T=1, asynchronous half duplex block transmission protocol. Amendment 1, December 1, 1992. 6 ISO/IEC 7816-4 Identification cards - Integrated circuit(s) cards with contacts - Part 4: Interindustry commands for interchange. 7 Guthery, S. and S. Marks, "IP and ARP over ISO 7816," draft- guthery-ip7816-01.txt, January, 2001. 8 Mitzel, D, "Overview of 2000 IAB Wireless Internetworking Workshop", RFC 3002, December, 2000. 9 Jacobson, V., "Compressing TCP/IP Headers for Low-Speed Serial Links", RFC 1144, February 1990. 10 Schryver, V., "PPP BSD Compression Protocol", RFC 1977, August, 1996. 11 Perkins, C., "Minimal Encapsulation within IP", RFC 2004, October 1996. 12 Degermark, M., B. Nordgren and S. Pink, "IP Header Compression", RFC 2507, February, 1999. 13 Casner, S. and V. Jacobson, "Compressing IP/UDP/RTP Headers for Low-Speed Serial Links", RFC 2508, February 1999. 14 Engan, M., S. Casner, and C. Bormann, "IP Header Compression for PPP", RFC 2509, February 1999. 15 Egan, M., S. Casner and C. Bormann, "IP Header Compression over PPP", draft-koren-avt-crtp-ipcp-00.txt, November, 2000. 16 Casner, S., V. Jacobson, T. Koren, P. Ruddy, B. Thompson, A. Tweeedly, D. Wing, J. Geevarghese, "Enhancements to IP/UDP/RTP Header Compression", draft-ietf-avt-crtp-enhance-01.txt, July 2000. 17 Hiller, T. and P. McCann, "Good Enough Header COmpression (GEHCO)", draft-hiller-rohc-gehco-00.txt, August, 2000. Guthery Experimental - Expires July 2001 6 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links 18 Bormann, C. et.al., "Robust Header Compression (ROHC)", draft- ietf-rohc-rtp-06.txt, November, 2000. 19 Degermark, M., "Requirements for robust IP/UDP/RTP header compression", draft-ietf-rohc-rtp-requirements-04.txt, December, 2000. 20 K. Svanbro, "Lower Layer Guidelines for Robust RTP/UDP/IP Header Compression", draft-ietf-rohc-rtp-lower-layer-guidelines-00.txt, October 2000. 21 Jonsson, L.-E., M. Degermark, H. Hannu, K. Svanbro, "RObust Checksum-based header COmpression (ROCCO)", Internet Draft (work in progress), June 2000. 22 Jonsson, L.-E., K. Svanbro and H. Hannu, "Profiles and Parameters in ROHC", draft-jonsson-rohc-profiles-00.txt, August, 2000. 23 Liao, H.B., Q. Zhang, W. Zhu and Y.-Q. Zhang, "TCP-Aware RObust Header Compression (TAROC)", draft-ietf-rohc-tcp-taroc-00.txt, November, 2000. 24 Hannu, H., J. Christoffersson and K. Svanbro, "Application signaling over cellular links", draft-hannu-rohc-signaling- cellular-00.txt, November, 2000. 25 Telecommunications Industry Association, "Wireless IP Network Standard", TIA/EIA/IS-835, June 2000. 26 European Telecommunications Standards Institute, "Mobile Station - Serving GPRS Support Node (MS-SGSN); Logical Link Control (LLC) layer specification", GSM 04.64. 27 European Telecommunications Standards Institute, "Packet Data Convergence Protocol (PDCP) Specification", 3G TS 25.323. 28 European Telecommunications Standards Institute, "General Packet Radio Service (GPRS); Service Description; Stage 3", GSM 03.60. 29 Lilley, Jermey, Jason Yang, Hari Balakrishnan, and Srinivasan Seshan, "A Unified Header Compression Framework for Low-Bandwidth Links", Proc. of the Sixth Annual ACM/IEEE International Conference on Mobile Computing and Networking, August 2000. (http://nms.lcs.mit.edu/software/headercompress) 1 RFC 2119 Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997 Guthery Experimental - Expires July 2001 7 IP/TCP/UDP Header Compression January 2001 for ISO 7816 Links Author's Addresses Scott Guthery Mobile-Mind 24 Church Street Phone: 1-617-926-6888 Watertown, MA USA Email: sguthery@mobile-mind.com Scott Marks Mobile-Mind 1808 Rolling Road Phone: 1-919-929-1436 Chapel Hill, NC USA Email: smarks@mobile-mind.com Full Copyright Statement Copyright (C) The Internet Society (2001). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Guthery Experimental - Expires July 2001 8