view Side-By-Side changes
Network Working Group Richard Price, Siemens/Roke Manor INTERNET-DRAFT Hans Hannu, Ericsson Expires:SeptemberNovember 2002 Carsten Bormann, TZI/Uni Bremen Jan Christoffersson, Ericsson Zhigang Liu, Nokia Jonathan Rosenberg, dynamicsoftMarch 1,May 6, 2002 Signaling Compression(SigComp) <draft-ietf-rohc-sigcomp-05.txt><draft-ietf-rohc-sigcomp-06.txt> 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 cite them other than as "work in progress". The list of current Internet-Drafts can be accessed athttp://www.ietf.org/ietf/lid-abstracts.txthttp://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html This document is a submission of the IETF ROHC WG. Comments should be directed to its mailing list, rohc@ietf.org. Abstract This document defines SigComp, a solution for compressing messages generated by application protocols such as[SIP]SIP [RFC-2543] and[RTSP].RTSP [RFC-2326]. The architecture and pre-requisites of SigComp are outlined, along with the format of the SigComp message. Decompression functionality fortheSigCompsolutionis provided by a "Universal Decompressor Virtual Machine" optimized for the task of running decompression algorithms. The UDVM can be configured to understand the output of many well-known compressors such as[DEFLATE].DEFLATE [RFC-1951]. Price, Hannu, et al. [Page 1] INTERNET-DRAFTSigComp March 1, 2002Signaling Compression 2002-05-06 Table of contents 1. Introduction..................................................2 2. Terminology...................................................3 3. SigCompArchitecture..........................................6architecture..........................................5 4. SigCompmessage flow..........................................11dispatchers...........................................13 5. SigCompcompressor............................................14compressor............................................16 6.State handling and announcement...............................16SigComp state handler.........................................18 7. SigComp message format........................................21 8. Overview of theUDVM..........................................20 8. Decompressing a SigComp message...............................23UDVM..........................................25 9. UDVM instructionset..........................................26set..........................................34 10. Securityconsiderations.......................................38considerations.......................................51 11. IANAconsiderations...........................................40considerations...........................................54 12.Acknowledgements..............................................41Acknowledgements..............................................54 13.AuthorsĘ addresses............................................41Authors' addresses............................................55 14.References....................................................42 Appendix A. Document history......................................43References....................................................56 1. IntroductionThe Session Initiation Protocol [SIP], along with many otherMany application protocols used for multimedia communicationssuch as [RTSP], is a textual protocolare text-based and engineered for bandwidth rich links. As aresult, SIPresult the messages have not been optimized in terms of size.TypicalFor example, typical SIP messages range from a few hundred bytes up toas high astwothousand. To date, this has not been a significant problem.thousand bytes or more. With the planned usage of these protocols in wireless handsets as part of 2.5G and 3G cellular networks, the large message sizeof these messagesis problematic. With low-rate IPconnectivity, store-and- forwardconnectivity the transmission delays are significant. Taking into accountretransmits,retransmissions, and the multiplicity of messages that are required in some flows, call setup and feature invocation are adversely affected.Therefore, we believe there is merit in reducing these message sizes.SigComp provides a means to eliminate this problem by offering robust, lossless compression of application messages. This document outlines the architecture and pre-requisites of the SigComp solution, the format of the SigCompmessage, algorithm upload,message and the Universal Decompressor Virtual Machine (UDVM) that provides decompression functionality. SigComp is offered to applications as a"shim"layer between the application andthean underlying transport. The service provided is that of the underlying transport plus compression.Both connection-oriented and connectionless transports are supported by SigComp. This document focuses on the signaling scenario where an end-terminal communicates with a proxy. HoweverSigCompmay be applicable to other scenarios with multiple endpoints compressingsupports a wide range of transports including TCP, UDP anddecompressing data.SCTP [RFC-2960]. Price, Hannu, et al. [Page 2] INTERNET-DRAFTSigComp March 1, 2002Signaling Compression 2002-05-06 2. Terminology 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 [RFC-2119]. Application Entity that invokes SigCompThe overall solution for signaling compression, comprising the compressor, decompressor, dispatchersandstate handler. Application Forperforms thepurpose of this document, an application is a text-based protocol software that: a) sendsfollowing tasks: 1. Supplying applicationdatamessages to the compressor dispatcherb) receives data2. Receiving decompressed messages from the decompressor dispatcherc) authenticates3. Determining thesender ofcompartment identifier for a decompressed message Bytecode Machine code that can be executed by a virtual machine. Compressor Entity that encodes application messages using a certain compression algorithm, andgives permission forkeeps track of statetothat can besaved inused for compression. The compressor is responsible for ensuring that thesender's name Application message An uncompressed message provided to or frommessages it generates can be decompressed by theapplication. Endpoint One instance of anremote UDVM. Compressor dispatcher Entity that receives applicationplusmessages, invokes a compressor, and forwards the resulting SigComplayer. Each endpointcompressed messages to a remote endpoint. UDVM cycles A measure of the amount of "CPU power" required to execute a UDVM instruction (the simplest UDVM instructions require a single UDVM cycle). An upper limit iscapableplaced on the number of UDVM cycles that can be used to decompress each bit in a SigComp message. Decompressor dispatcher Entity that receives SigComp messages, invokes a UDVM, and forwards the resulting decompressed messages to the application. Endpoint One instance of an application, a SigComp layer, and a transport Price, Hannu, et al. [Page 3] INTERNET-DRAFT Signaling Compression 2002-05-06 layer for sending and/or receiving SigComp messages.Endpoint identityMessage-based transport Aunique indicator assignedtransport that carries data as a set of bounded messages. Compartment An application-specific grouping of messages that relate toeach endpoint bya peer endpoint. Depending on the signaling protocol, this grouping may relate to application(for example an URI).concepts such as "session", "dialog", "connection", or "association". The applicationauthenticatesallocates state memory on a per-compartment basis, and determines when a compartment should be created or closed. Compartment identifier An identifier (in a locally chosen format) that uniquely references a compartment. SigComp The overall compression solution, comprising thesendercompressor, UDVM, dispatchers and state handler. SigComp message A message sent from the compressor dispatcher to the decompressor dispatcher. In case of adecompressed message, and provides their endpoint identitymessage-based transport such as UDP, a SigComp message corresponds to exactly one datagram. For a stream- based transport such as TCP, the SigCompstate handler.messages are separated by reserved delimiters. Stream-based transport A transport that carries data as a continuous stream with no message boundaries. Transport Mechanism for passing data between two endpoints. SigComp is capable of sending messages over a wide range of transports including TCP, UDP and[SCTP]. Message-based transport A transport that carries data as a set of bounded messages. Stream-based transport A transport that carries data as a continuous stream with no message boundaries.SCTP [RFC-2960]. Universal Decompressor Virtual Machine (UDVM) The machine architecture described in this document. The UDVM is used to decompress SigComp messages. Price, Hannu, et al. [Page3]4] INTERNET-DRAFTSigComp March 1, 2002 Application-defined parameters Parameters that must be agreed upon by the local and remote endpoints invoking SigComp. ValuesSignaling Compression 2002-05-06 State Data saved forthe application-defined parameters are typically fixed to meet the requirements of a particular signaling application. SigComp message May contain a compressed application message in the form of UDVM bytecode. In case of a message-based transport such as UDP, a SigComp message corresponds to exactly one (UDP) datagram. For a stream-based transport such as TCP, each SigComp message is separatedretrieval bya reserved delimiter. Standalone SigComp message A SigComp message that does not include any compressed application data. Certain signaling applications may not allow standalonelater SigCompmessages due to security requirements. Compressormessages. State handler Entitythat invokes an encoder, and keeps track of states that can be used for compression. It isresponsible forsupplying UDVM bytecode to the remote decompressor in order for compressed data to be decompressed. Encoder Encodes data according to a particular compression algorithm. Compressor dispatcher Entity that receives uncompressed application messages, invokes a compressor,accessing andforwardsstoring state information once permission is granted by theresulting SigComp messagesapplication. State identifier Reference used to access aremote endpoint. Decompressor Entity that is responsible for converting apreviously created item of state. 3. SigCompmessage into uncompressed data. Decompression functionality is provided byarchitecture In theUDVM. Decompressor dispatcher Entity that receivesSigCompmessages, invokes a decompressor, and forwards the decompressed application messages to an application. Price, Hannu, et al. [Page 4] INTERNET-DRAFT SigComp March 1, 2002 Virtual machine A machine architecture designed to be implemented in software (although silicon implementations are of course possible). Universal Decompressor Virtual Machine (UDVM) The virtual machine described in this document. The UDVM is used for decompression of SigComp messages. Bytecode Machine code that can be executed by a virtual machine. UDVM bytecode is a combination of UDVM instructions and compressed data. Per-message compression Compression that does not reference data from previous messages. SigComp can decompress a message of this type using only the application-defined parameters and the data in the message itself. Dynamic compression Compression relative to messages sent prior to the current compressed message. SigComp stores and retrieves this data using the state handler. State Data saved for retrieval by later SigComp messages. An item of state typically reflects the contents of the UDVM memory after decompressing a message, but state can also be created by the compressor or by the application. State handler Entity responsible for storing and accessing state information once permission is granted by the application. State identifier Reference used to access an item of state previously created by the compressor, the decompressor or the application. CPU cycles A measure of the amount of "CPU power" required to execute a UDVM instruction (the simplest UDVM instructions require a single CPU cycle). An upper limit is placed on the number of cycles that can be used to decompress each bit in a compressed message. Price, Hannu, et al. [Page 5] INTERNET-DRAFT SigComp March 1, 2002 3. SigComp Architecture In the SigComp architecture compressionarchitecture, compression and decompression is performed at two communicatingentities. SigComp is offered to applications asendpoints. The layout of a"shim" layer between the application and the underlying transport, and so these entities are endpoints when viewed from a transport layer perspective. Note however that from the application perspective SigComp is applied on a per-hop basis. Figure 1 shows the layout of a communicatingsingle endpointthat implements a SigComp layer. The figure does not mandate any particular implementation, but is shown to the reader for the sake of clarity. The SigComp layerisfurther decomposedillustrated inthe following components: - A compressor dispatcher: this is the interface from the application. The compressor dispatcher receives anFigure 1: +-------------------------------------------------------------------+ | | | Local application | | | +-------------------------------------------------------------------+ | ^ | Application messageand an& | Decompressed | | Compartment compartment identifierfor the receiving endpoint. Based on the endpoint identity the compressor dispatcher invokes a particular compressor, which returns a SigComp message that is forwarded to the remote SigComp endpoint. - A decompressor dispatcher: this is the interface towards the application. A SigComp| messageis received by the decompressor| | identifier | | | +-- -- -- -- -- -- -- --|-- -- -- -- -- -- -- --|--|-- -- -- -- -- -+ v | v | +------------------------+ +----------------------+ | | | | | | +--| Compressor | | Decompressor |<-+ | | | dispatcherand an instance a decompressor is invoked. Once the| | dispatcherhas received the (decompressed) application data it forwards the message to the application. - One or more compressors: a distinct compressor is invoked for each remote endpoint with which the local application wishes to communicate. A compressor receives an (uncompressed) application message from the compressor dispatcher, compresses the message, and returns a SigComp message to the compressor dispatcher. During the compression process the compressor may invoke the state handler to restore previous state or save new state. Each compressor chooses a certain algorithm to encode the data, (e.g. [DEFLATE]). - One or more decompressors: since SigComp can run over an unsecure transport layer, a distinct decompressor must be invoked on a per-message basis. A decompressor receives a SigComp message from the decompressor dispatcher, decompresses the message, and returns the (decompressed) application message to the decompressor dispatcher. During the decompression process, the decompressor may invoke the state handler to restore previous state or save new state. - State handler: this entity contains enough logic to store and retrieve states. State is information that is stored between SigComp messages: this data can be saved either by a compressor, a decompressor or an application. For security purposes the state Price, Hannu, et al. [Page 6] INTERNET-DRAFT SigComp March 1, 2002 handler must always ask the application to grant permission for new states to be saved. State creation and retrieval are further described in Chapter 6. +---------------------------------------------+ || |Application || | | |+---------------------------------------------+| |^ Message & | Endpoint| |Decompressed endpoint|identity+------------------------+ +----------------------+ | |message identity| ^ ^ ^ | | | | |+-- -- -- -- --|-- -- -- -- -- -- --|-- -- -- |- -- -- -- -- +| | | | | vv| |+--------------+ +--------------+ +--------------+ | SigComp| | | +--------------+ +---------------+ | | |SigComp message|Compressor| |State| |Decompressor+-------+ |message <-------| dispatcherv | |handler| |dispatcher |<-------| Compressor 1 |<----->|State 1| | +--------------+ | | | | | |+--------------+ +--------------+ +--------------+|^ ^ ^ ^ ^ ^ ^ ^+-------+ | | | | | | | +--------------+ | | | Decompressor | | | | | | State handler |<-->| | | | | | +--------------+ | | | (UDVM) | | Price, Hannu, et al. [Page 5] INTERNET-DRAFT Signaling Compression 2002-05-06 | |v| | | | +-------+ |v| |+--------------+| | | +->| Compressor 2 |<----->|State 2| | +--------------+ | |Compressor 1 | || | ||Decompressor 1|| +-------+ ||<----+| |+---->|| +--------------+ +---------------+ SigComp layer | |(Encoder)| | || (UDVM) | | | | | | | | | +--------------+ | | +--------------+ | | | | | | v | | v | +--------------+ | | +--------------+ | | Compressor 2 | | | |Decompressor 2| | | |<-------+ +------->| | | | (Encoder) | | (UDVM) | | | | | | | +--------------+ +--------------+ | | SigComp layer | +--+-| -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --+-- --|-+ | | | SigComp SigComp | | message message | v | +-------------------------------------------------------------------+ | | | Transport layer | | | +-------------------------------------------------------------------+ Figure 1: High-level architectural overview of one SigComp endpoint Note that SigComp is offered to applications as a layer between the application and the underlying transport, and so Figure 1 is an endpoint when viewed from a transport layer perspective. From the perspective of multi-hop application layer protocols however, SigComp is applied on a per-hop basis. The SigComp layer is further decomposed into the following entities: 1. Compressor dispatcher - the interface from the application. The application supplies the compressor dispatcher with an application message and a compartment identifier (see Section 3.1 for further details). The compressor dispatcher invokes a particular compressor, which returns a SigComp message to be forwarded to the remote endpoint. 2. Decompressor dispatcher - the interface towards the application. The decompressor dispatcher receives a SigComp message and invokes an instance of the Universal Decompressor Virtual Machine (UDVM). It then forwards the resulting decompressed message to the application, which may return a compartment identifier if it wishes to allow state to be saved for the message. 3. One or more compressors - the entities that convert application messages into SigComp messages. Distinct compressors are invoked on a per-compartment basis, using the compartment identifiers supplied by the application. A compressor receives an application message from the compressor dispatcher, compresses the message, and returns a SigComp message to the compressor dispatcher. Each compressor chooses a certain algorithm to encode the data (e.g. DEFLATE). Price, Hannu, et al. [Page 6] INTERNET-DRAFT Signaling Compression 2002-05-06 4. UDVM - the entity that decompresses SigComp messages. Note that since SigComp can run over an unsecured transport layer, a separate instance of the UDVM is invoked on a per-message basis. However, during the decompression process the UDVM may invoke the state handler to access existing state or create new state. 5. State handler - the entity that can store and retrieve state. State is information that is stored between SigComp messages, avoiding the need to upload the data on a per-message basis. For security purposes it is only possible to create new state with the permission of the application. State creation and retrieval are further described in Chapter 6. When compressing a bidirectional application protocol the choice to use SigComp can be made independently in both directions, and compression in one direction does not necessarily imply compression in the reverse direction. Moreover, even when two communicating endpoints send SigComp messages in both directions, there is no need to use the same compression algorithm in each direction. Note that a SigComp endpoint can decompress messages from multiple remote endpoints at different locations in a network, as the architecture is designed to prevent SigComp messages from one endpoint interfering with messages from a different endpoint. A consequence of this design choice is that it is difficult for a malicious user to disrupt SigComp operation by inserting false compressed messages on the transport layer. 3.1. Requirements on the application From an application perspective the SigComp layer appears as a new transport, with similar behavior to the original transport used to carry uncompressed data (for example SigComp/UDP behaves similarly to native UDP). Mechanisms for discovering whether an endpoint supports SigComp are beyond the scope of this document. All SigComp messages contain a prefix that does not occur in UTF-8 encoded text messages [RFC-2279], so for applications which use this encoding it is possible to multiplex uncompressed application messages and SigComp messages on the same port. Applications can still reserve a new port specifically for SigComp however (e.g. as part of the discovery mechanism). If a particular endpoint wishes to be stateful then it needs to partition its decompressed messages into "compartments" under which state can be saved. SigComp relies on the application to provide this Price, Hannu, et al. [Page 7] INTERNET-DRAFT Signaling Compression 2002-05-06 partition. So for stateful endpoints a new interface is required to the application in order to leverage the authentication mechanisms used by the application itself. When the application receives a decompressed message it maps the message to a certain compartment and supplies the compartment identifier to SigComp. Each compartment is allocated a separate compressor and a certain amount of memory to store state information, so the application must assign distinct compartments to distinct remote endpoints. However it is possible for a local endpoint to establish several compartments that relate to the same remote endpoint (this should be avoided where possible as it may waste memory and reduce the overall compression ratio, but it does not cause messages to be incorrectly decompressed). In this case, reliable stateful operation is possible only if the decompressor does not lump several messages into one compartment when the compressor expected them to be assigned different compartments. The exact format of the compartment identifier is unimportant provided that different identifiers are given to different compartments. Applications that wish to communicate using SigComp in a stateful fashion should use an authentication mechanism to securely map decompressed messages to compartment identifiers. They should also agree on any limits to the lifetime of a compartment, to avoid the case where an endpoint accesses state information that has already been deleted. 3.2. SigComp feedback mechanism If a signaling protocol sends SigComp messages in both directions and there is a one-to-one relationship between the compartments established by the applications on both ends ("peer compartments"), the two endpoints can cooperate more closely. In this case, it is possible to send feedback information that monitors the behavior of an endpoint and helps to improve the overall compression ratio. SigComp performs feedback on a request/response basis, so a compressor makes a feedback request and receives some feedback data in return. The procedure for requesting and returning feedback in SigComp is illustrated in Figure 2: +---------------------+ +---------------------+ | +-----------------+ | | +-----------------+ | -->| Compressor |------------------------>| UDVM |<-> | | sending to B | | SigComp message | | | |2 | +-----------------+ | requesting feedback | +-----------------+ | | ^ 1,9 | | 3 | | Price, Hannu, et al. [Page 8] INTERNET-DRAFT Signaling Compression 2002-05-06 | | | | v | | +-----------------+ | | +-----------------+ | | | State | | | | State | | | | handler | | | | handler | | | +-----------------+ | | +-----------------+ | | ^ 8 | | 4 | | | | | | v | | +-----------------+ | | +-----------------+ | | | UDVM | | | | Compressor | | <->| |<------------------------| sending to A |<-- 6| +-----------------+ | SigComp message | +-----------------+ | | 7 | returning feedback | 5 | | Endpoint A | | Endpoint B | +---------------------+ +---------------------+ Figure 2: Steps involved in the transmission of feedback data The dispatchers, the application and the transport layer are omitted from the diagram for clarity. Note that the decompressed messages pass via the decompressor dispatcher to the application; moreover the SigComp messages transmitted from the compressor to the remote UDVM are sent via first the compressor dispatcher, followed by the transport layer and finally the decompressor dispatcher. The steps for requesting and returning feedback data are described in more detail below: 1. The compressor that sends messages to Endpoint B piggybacks a feedback request onto a SigComp message. 2. When the application receives the decompressed message it may return the compartment identifier for the message. 3. The UDVM in Endpoint B forwards the requested feedback data to the state handler. 4. If the UDVM can supply a valid compartment identifier then the state handler forwards the feedback data to the appropriate compressor (namely the compressor sending to Endpoint A). 5. The compressor returns the requested feedback data to Endpoint A piggybacked onto a SigComp message. 6. When the application receives the decompressed message it may return the compartment identifier for the message. 7. The UDVM in Endpoint A forwards the returned feedback data to the state handler. Price, Hannu, et al. [Page 9] INTERNET-DRAFT Signaling Compression 2002-05-06 8. If the UDVM can supply a valid compartment identifier then the state handler forwards the feedback data to the appropriate compressor (namely the compressor sending to Endpoint B). 9. The compressor makes use of the returned feedback data. The detailed role played by each entity in the transmission of feedback data is explained in subsequent chapters. 3.3. SigComp parameters An advantage of using a virtual machine for decompression is that almost all of the implementation flexibility lies in the SigComp compressors. When receiving SigComp messages an endpoint generally behaves in a predictable manner. Note however that endpoints implementing SigComp will typically have a wide range of capabilities, each offering a different amount of working memory, processing power etc. In order to support this wide variation in endpoint capabilities, the following parameters are provided to modify SigComp behavior when receiving SigComp messages: decompression_memory_size state_memory_size cycles_per_bit SigComp_version locally available state (a set containing 0 or more state items) Each parameter has a minimum value that MUST be offered by all receiving SigComp endpoints. Moreover endpoints MAY offer additional resources if available; these resources can be advertised to remote endpoints using the SigComp feedback mechanism. Particular applications may also agree a-priori to offer additional resources as mandatory (e.g. SigComp for SIP offers a dictionary of common SIP phrases as a mandatory state item). Each of the SigComp parameters is described in greater detail below. 3.3.1. Memory size and UDVM cycles The decompression_memory_size parameter specifies the amount of memory available to decompress one SigComp message. A portion of this memory is used to buffer a SigComp message before it is decompressed; the remainder is given to the UDVM. Note that the memory is allocated on a per-message basis and can be reclaimed after the message has been decompressed. All endpoints implementing SigComp MUST offer a decompression_memory_size of at least 2048 bytes. Price, Hannu, et al. [Page 10] INTERNET-DRAFT Signaling Compression 2002-05-06 The state_memory_size parameter specifies the number of bytes offered to a particular compartment for the creation of state. This parameter is set to 0 if the endpoint is stateless. Unlike the other SigComp parameters, the state_memory_size is offered on a per-compartment basis and may vary for different compartments. The memory for a compartment is reclaimed when the application determines that the compartment is no longer required. The cycles_per_bit parameter specifies the number of "UDVM cycles" available to decompress each bit in a SigComp message. Executing a UDVM instruction requires a certain number of UDVM cycles; a complete list of UDVM instructions and their cost in UDVM cycles can be found in Chapter 9. An endpoint MUST offer a minimum of 16 cycles_per_bit. Each of the three parameter values MUST be chosen from the limited set given below, so that the parameters can be efficiently encoded for transmission using the SigComp feedback mechanism. The cycles_per_bit parameter is encoded using 2 bits, whilst the decompression_memory_size and state_memory_size are both encoded using 3 bits. The bit encodings and their corresponding values are as follows: Encoding: cycles_per_bit: Encoding: state_memory_size (bytes): 00 16 000 0 01 32 001 2048 10 64 010 4096 11 128 011 8192 100 16384 101 32768 110 65536 111 131072 The decompression_memory_size is encoded in the same manner as the state_memory_size, except that the bit pattern 000 cannot be used (as an endpoint cannot offer a decompression_memory_size of 0 bytes). 3.3.2. SigComp version The SigComp_version parameter specifies whether only the basic version of SigComp is available, or whether an upgraded version is available offering additional instructions etc. Within the UDVM, it is available as a 2-byte value, generated by zero-extending the 1-byte SigComp_version parameter (i.e., the first byte of the 2-byte value is always zero). Price, Hannu, et al. [Page 11] INTERNET-DRAFT Signaling Compression 2002-05-06 The basic version of SigComp is Version 0x01, which is the version described in this document. To ensure backwards compatibility, if a SigComp message is successfully decompressed by Version 0x01 of SigComp then it will be successfully decompressed on upgraded versions. Similarly if the message triggers a manual decompression failure (see Section 8.7) then it will also continue to do so. However, messages that cause an unexpected decompression failure on Version 0x01 of SigComp may be successfully decompressed by upgraded versions. The simplest way to upgrade SigComp in a backwards-compatible manner is to add additional UDVM instructions, as this will not affect the decompression of SigComp messages compatible with Version 0x01. Reserved addresses in the UDVM memory (Useful Values, see section 7.2) may also be assigned values in future versions of SigComp. 3.3.3. Locally available state items A SigComp state item is an item of data that is retained between SigComp messages. State items can be retrieved and loaded into the UDVM memory as part of the decompression process, often significantly improving the compression ratio as the same information does not have to be uploaded on a per-message basis. Each endpoint maintains a set of state items where every item is composed of the following information: Name: Type of data: state_identifier 20-byte value state_length 2-byte value state_address 2-byte value state_instruction 2-byte value minimum_access_length 2-byte value from 6 to 20 inclusive state_value String of state_length consecutive bytes State items are typically created at an endpoint upon successful decompression of a SigComp message. The remote compressor sending the message makes a state creation request by invoking the appropriate UDVM instruction, and the state is saved once permission is granted by the application. However, an endpoint MAY also wish to offer a set of locally available state items that have not been uploaded as part of a SigComp message. For example it might offer well-known decompression Price, Hannu, et al. [Page 12] INTERNET-DRAFT Signaling Compression 2002-05-06 algorithms, dictionaries of common phrases used in a specific signaling protocol, etc. Since these state items are established locally without input from a remote endpoint, they are most useful if publically documented so that a wide collection of remote endpoints can determine the data contained in each state item and how it may be used. Further Internet Drafts and RFCs may be published to describe particular locally available state items. Although there are no locally available state items that are mandatory for every SigComp endpoint, certain state items can be made mandatory in a specific environment (e.g. the dictionary of common phrases for a specific signaling protocol could be made mandatory for that signaling protocol's usage of SigComp). Also, remote endpoints can indicate their interest in receiving a list of some of the state items available locally at an endpoint using the SigComp feedback mechanism. It is a matter of local decision for an endpoint what items of locally available state it advertises; this decision has no influence on interoperability, but may increase or decrease the efficiency of the compression achievable between the endpoints. 4. SigComp dispatchers This chapter defines the behavior of the compressor and decompressor dispatcher. The function of these entities is to provide an interface between SigComp and its environment, minimizing the effort needed to integrate SigComp into an existing protocol stack. 4.1. Compressor dispatcher The compressor dispatcher receives messages from the application and passes the compressed version of each message to the transport layer. Note that SigComp invokes compressors on a per-compartment basis, so when the application provides a message to be compressed it must also provide a compartment identifier. The compressor dispatcher forwards the application message to the correct compressor based on the compartment identifier (invoking a new compressor if a new compartment identifier is encountered). The compressor returns a SigComp message that can be passed to the transport layer. Additionally, the application should indicate to the compressor dispatcher when it wishes to close a particular compartment, so that the resources taken by the corresponding compressor can be reclaimed. Price, Hannu, et al. [Page 13] INTERNET-DRAFT Signaling Compression 2002-05-06 4.2. Decompressor dispatcher The decompressor dispatcher receives messages from the transport layer and passes the decompressed version of each message to the application. To ensure that SigComp can run over an unsecured transport layer, the decompressor dispatcher invokes a new instance of the UDVM for each new SigComp message. Resources for the UDVM are released as soon as the message has been decompressed. The dispatcher MUST NOT make more than one SigComp message available to a given instance of the UDVM. In particular, the dispatcher MUST NOT concatenate two SigComp messages to form a single message. 4.2.1. Decompressor dispatcher strategies Once the UDVM has been invoked it is initialized using the SigComp message of Chapter 7. The message is then decompressed by the UDVM, returned to the decompressor dispatcher, and passed on to the receiving application. Note that the UDVM has no awareness of whether the underlying transport is message-based or stream-based, and so it always outputs decompressed data as a stream. It is the responsibility of the dispatcher to provide the decompressed message to the application in the expected form (i.e. as a stream or as a distinct, bounded message). The dispatcher knows that the end of a decompressed message has been reached when the UDVM instruction END- MESSAGE is invoked (see Section 9.4.9). For a stream-based transport, two strategies are therefore possible for the decompressor dispatcher: 1) The dispatcher collects a complete SigComp message and then invokes the UDVM. The advantage is that, even in implementations that have multiple incoming compressed streams, only one instance of the UDVM is ever required. 2) The dispatcher collects the SigComp header (see section 7) and invokes the UDVM; the UDVM stays active while the rest of the message arrives. The advantage is that there is no need to buffer up the rest of the message; the message can be decompressed as it arrives, and any decompressed output can be relayed to the application immediately. In general, this alternative is an implementation choice. However, the compressor may want to take advantage of strategy 2 by expecting that some of the application message is passed on to the Price, Hannu, et al. [Page7]14] INTERNET-DRAFT Signaling Compression 2002-05-06 application before the SigCompMarch 1, 2002 Note that itmessage ispossible for SigCompterminated, e.g., by keeping the UDVM active while expecting the application todecompress messages from multiple endpoints at different physical locationscontinuously receive decompressed output. This approach ("continuous mode") invalidates some assumptions of the SigComp security model and can only be used if the transport itself can provide the required protection against denial of service attacks. Also, since only strategy 2 works in this approach, the use of continuous mode requires previous agreement between the two endpoints. 4.2.2. Record marking For anetwork, asstream-based transport, thearchitecture is designed to preventdispatcher delimits messages by parsing the compressed datafromstream for instances of 0xFF and taking the following actions: Occurs in data stream: Action: 0xFF 00 oneendpoint interfering0xFF byte in the data stream 0xFF 01 same, but the next byte is quoted (could be another 0xFF) : : 0xFF 7F same, but the next 127 bytes are quoted 0xFF 80 to 0xFF FE (reserved for future standardization) 0xFF FF end of SigComp message The combinations 0xFF01 to 0xFF7F are useful to limit the worst case expansion of the record marking scheme: the 1 (0xFF01) to 127 (0xFF7F) bytes following the byte combination are copied literally by the decompressor without taking any special action on 0xFF. (Note that 0xFF00 is just a special case of this, where zero following bytes are copied literally.) In UDVM version 0x01, any occurrence of the combinations 0xFF80 to 0xFFFE that are not protected by quoting causes decompression failure; the decompressor SHOULD close the stream-based transport in this case. 4.3. Returning a compartment identifier Upon receiving a decompressed message the application may supply the dispatcher with a compartment identifier. Supplying this identifier grants permission for the following: 1. Items of state accompanying the decompressed message can be saved using the state memory reserved for the specified compartment. 2. The feedback datafrom a different endpoint. A consequence of this design choice isaccompanying the decompressed message can be trusted sufficiently that itis difficult for a malicious user to disruptcan be used when sending SigCompoperation by inserting false compressedPrice, Hannu, et al. [Page 15] INTERNET-DRAFT Signaling Compression 2002-05-06 messagesonthat relate to thetransport layer. Each decompressor incompressor's equivalent for thearchitecture of Figure 1compartment. The dispatcher passes the compartment identifier to the UDVM, where it isan instance ofused as per theUniversal Decompressor Virtual Machine (UDVM). Figure 2 givesEND-MESSAGE instruction (see Section 9.4.9). The application uses amore detailed view ofsuitable authentication mechanism to determine whether the decompressed message belongs to aUDVM, including all oflegitimate compartment or not. If theinterfaces betweenapplication fails to authenticate theUDVM and its environment. +----------------+ +----------------+ | | Request compressed data | | | |-------------------------------->| | | |<--------------------------------| | | | Provide compressed data | | | | | Dispatcher | | | | | | | Output decompressed data | | | |-------------------------------->| | | | | | | | +----------------+ | UDVM | | | +----------------+ | | Request state information | | | |-------------------------------->| | | |<--------------------------------| | | | Provide state information | | | | | State | | | | Handler | | | Makemessage with sufficient confidence to allow statecreation request | | | |-------------------------------->| | | | Forward announcement | | | | | | +----------------+ +----------------+ Figure 2: Interfaces betweento be saved or feedback data to be trusted, it supplies a "no valid compartment" error to theUDVMdispatcher andits environment Notethe UDVM is terminated without creating any state or forwarding any feedback data. 5. SigComp compressor An important feature of SigComp is that decompression functionality is provided by a Universal Decompressor Virtual Machine (UDVM). This means thatfor simplicity,theUDVM indicates when it requires additionalcompressor can choose any algorithm to generate compresseddata or state information using an explicit instruction. It then pausesSigComp messages, andwaitsthen upload bytecode for theinformationcorresponding decompression algorithm tobe supplied before continuing with the next instruction. This preventsthearrivalUDVM as part ofmore data from interferingthe SigComp message. To help with theoperationimplementation and testing of a SigComp endpoint, further Internet Drafts and RFCs may be published to describe particular compression algorithms. The overall requirement placed on theUDVM (e.g. by accidentally overwriting UDVM memory thatcompressor iscurrently in use). Price, Hannu, et al. [Page 8] INTERNET-DRAFTthat of transparency, i.e. the compressor MUST NOT send bytecode which causes the UDVM to incorrectly decompress a given SigCompMarch 1, 2002 3.1. Requirementsmessage. The following more specific requirements are also placed onapplication From an application perspectivetheSigComp layer appears as a new transport, with similar behavior tocompressor (they can be considered particular instances of theoriginal transport usedtransparency requirement): 1. For robustness, it is recommended that the compressor supply some form of integrity check (not necessarily of cryptographic strength) over the application message tocarry uncompressed data (for example SigComp/UDP behaves similarlyensure that successful decompression has occurred. A UDVM instruction is provided for CRC verification; also, another instruction can be used tonative UDP).compute a SHA-1 cryptographic hash. 2. The compressor MUST ensure that the message can be decompressed using the resources available at the remote endpoint. 3. If the transport is message-based then the compressor MUST map each applicationwishesmessage tomix SigComp messages with other types of data (e.g. uncompressed data, orexactly one SigCompdata for a different application) onmessage. Price, Hannu, et al. [Page 16] INTERNET-DRAFT Signaling Compression 2002-05-06 4. If thesametransport is stream-based but the application defines its own internal message boundaries, then the compressor SHOULD map each application message to exactly one SigComp message. Message boundaries should be preserved over a stream-based transportmust distinguish betweenso that accidental or malicious damage to one SigComp message does not affect thedifferent typesdecompression ofdata. This means that a new port will needsubsequent messages. Additionally, if the state handler passes some requested feedback to the compressor then it SHOULD bereserved or discovered forreturned in the next SigCompmessages destined for a particular application. For example SIP uses port 5060 for TCP and port 5061 for TLS/TCP, so it could similarly reserve another port for SigComp/TCP. Inmessage generated by theinterests of security, a new interface is required tocompressor (unless thesignaling applicationstate handler passes some newer requested feedback before the older feedback has been sent, inorder to leveragewhich case theauthentication functions builtolder feedback is deleted). If present, the requested feedback item SHOULD be copied unmodified into theapplication itself. Whenreturned_feedback_item field provided in theapplication receives a decompressed message it determinesSigComp message. Note that there is no need to transmit any requested feedback item more than once. The compressor SHOULD also upload theidentity oflocal SigComp parameters to the remote endpoint, unless thesendingendpointand supplies this informationhas indicated that it does not wish tothe state handler. 3.2. Application-definedreceive these parametersWhen an application invokes SigComp, a numberor the compressor determines that the parameters have already successfully arrived (see Section 5.1 for details of how this can be achieved). The SigComp parameters areprovided by the applicationuploaded tocontrol the maximum size of compressed messages,the UDVM memorysize etc. The local andat the remoteapplications that wish to communicateendpoint as described in Section 9.4.9. 5.1. Ensuring successful decompression A compressor MUSTinitially agree on a common set of values for these parameters. Notebe certain thatthe majorityall ofapplication-defined parameters are setthe data needed tofixed values fordecompress aparticular signaling application. However, endpoints implementingSigCompwill typically have a wide range of capabilities; each offering a different amount of working memory, processing power and so on. In ordermessage is available at the receiving endpoint. One way tosupportensure thiswide variationis to send all of the needed information inendpoint capabilities,every SigCompincludes a mechanismmessage (including bytecode to decompress the message). However the compression ratio formodifyingthis method will be relatively low. To obtain thefollowing application-defined parameters onbest overall compression ratio thefly: UDVM_version UDVM_memory_size cycles_per_bit cycles_per_message Initialcompressor must request the creation of new state items at the remote endpoint. TheSigComp announcement mechanism is described furtherinformation saved inSection 6.3. The advantage of building the announcement mechanism intothese state items can then be accessed by later SigCompis that it avoidsmessages, avoiding the needfor any form of negotiationtobe performed byupload theapplication itself. Instead,data on a per- message basis. Before the compressor can access saved state however, it must ensure that the SigComp message carrying the state creation request arrived successfully at the receiving endpoint. For a reliable transport (e.g. TCP or SCTP) this issufficient to initializeguaranteed. For an unreliable transport however, the compressor must provide a suitable mechanism itself (see [EXTENDED] for further details). Price, Hannu, et al. [Page9]17] INTERNET-DRAFTSigComp March 1, 2002 all ofSignaling Compression 2002-05-06 The compressor must also ensure that theapplication-defined parametersstate item it wishes tofixed values and modify them later using SigComp itself. Each application-defined parameter is described below. Note that unless otherwise indicated, allaccess has not been rejected due to a lack ofthe parametersstate memory. This can bestored as 2-byte integers. UDVM_version The UDVM_version parameter specifiesaccomplished by checking thelevel of functionality available atstate_memory_size parameter using theUDVM.SigComp feedback mechanism (see Section 9.4.9 for further details). 5.2. Compression failure Thebasic version of the UDVM (Version 0) is definedcompressor SHOULD make every effort to successfully compress an application message, but in certain cases thisdocument. maximum_expansion_size The maximum_expansion_size parameter preventsmight not be possible (particularly if resources are scarce at thegeneration of excessively large SigComp messages.receiving endpoint). In this case a "compression failure" is called. Ifset to 0a compression failure occurs then theparameter is ignored by SigComp; for any other value then if an uncompressed message is k bytes long,compressor informs thecorresponding SigComp message must bedispatcher and takes nolarger than (k + maximum_expansion_size). Note that any value other than 0 bans the creation of standalone SigComp messages (i.e. messages that do not contain a compressed application message). maximum_compressed_sizefurther action. Themaximum_compressed_size parameter limits the size of one compressed message. SigComp rejects any message larger thandispatcher MUST report this failure to thespecified value. maximum_uncompressed_size The maximum_uncompressed_size parameter limitsapplication so that it can try other methods to deliver thesize of one uncompressedmessage.SigComp rejects any message larger than the specified value. minimum_hash_size The minimum_hash_size parameter specifies6. State handling and feedback This chapter defines theminimum sizebehavior of the SigComp stateidentifier when creating newhandler. The function of the stateinformation. This value needs to be sufficiently largehandler is toprevent malicious usersretain information between received SigComp messages; it is the only SigComp entity that is capable of this function, and so it is of particular importance fromguessinga security perspective. 6.1. Creating and accessing stateidentifier by brute force. UDVM_memory_size The UDVM_memory_size parameter specifiesTo provide security against thetotal numbermalicious insertion or modification of SigComp messages, a separate instance ofbytes inthe UDVMmemory. cycles_per_bit The cycles_per_bit parameter specifiesis invoked to decompress each message. This ensures that damaged SigComp messages do not prevent thenumbersuccessful decompression of"CPU cycles" Price, Hannu, et al. [Page 10] INTERNET-DRAFT SigComp March 1, 2002subsequent valid messages. Note however that the overall compression ratio is often significantly higher if messages can beusedcompressed relative todecompress a single bit of data. One CPU cycle typically correspondsthe information contained in previous messages. For this reason it is possible to create state items for access when asingle UDVM instruction, although some of the high-level instructions may require additional cycles. cycles_per_message The cycles_per_message parameter specifieslater message is being decompressed. Both thenumbercreation and access ofadditional CPU cycles made available atstate are designed to be secure against malicious tampering with thestart of acompressedmessage. These cyclesdata. The UDVM canbe useful when decompressing algorithms that upload additional data ononly create aper-message basis, for examplestate item when anew set of Huffman codes as with [DEFLATE]. The total maximum number of "CPU cycles" available for each compressedcomplete messageis specified byhas been successfully decompressed and thefollowing formula: maximum_cycles = message_size * cycles_per_bit + cycles_per_message maximum_state_size The maximum_state_size parameter specifiesapplication has returned a compartment identifier under which themaximum amount ofstateinformation thatcan besavedsaved. State access cannot be protected bya local endpoint, for each remote endpoint with which it communicates. Note thatrelying on theamountapplication alone, since the authentication mechanism may require information from the decompressed message (which of course is not available until after the stateinformationhas been accessed). Instead, SigComp protects state access Price, Hannu, et al. [Page 18] INTERNET-DRAFT Signaling Compression 2002-05-06 by creating a state identifier that isexpressed asamultiple ofhash over theparameter UDVM_memory_size, becauseitem of state to be retrieved. This state_identifier must be supplied to retrieve an item of stategenerally reflectsfrom thecontents ofstate handler. Also note that state is not deleted when it is accessed. So even if a malicious sender manages to access some state information, subsequent messages compressed relative to this state can still be successfully decompressed. Each state item contains a state_identifier that is used to access the state. One state identifier can be supplied in the SigComp message header to initialize the UDVMmemory. Initial(see Chapter 7); additional state items can be retrieved using the STATE-ACCESS instruction. TheapplicationUDVM canstore useful information inalso request theformcreation ofstate. This predefined state is used to offerarange of well-known decompression algorithms tonew state item by using thecompressor, whichSTATE-CREATE and END-MESSAGE instructions (see Chapter 9 for further details). 6.2. Memory management The state handler manages state memory on a per-compartment basis. Each compartment canchoosestore state up toavoid uploading bytecodea certain state_memory_size (where the application may assign different values for the state_memory_size parameter to different compartments). As well as storing the state items themselves, the state handler maintains anew algorithm if it supports onelist of thewell-known algorithms. Each itemstate items created by a particular compartment and ensures that no compartment exceeds its allocated state_memory_size. For the purpose ofinitialcalculation each statecan be made mandatory for everyitem is considered to cost (state_length + 64) bytes. Each instance of theapplication, or itUDVM canbe made optional (in which case support forpass up to four state creation requests to therelevantstatewill needhandler, as well as up tobe advertised beforefour state free requests (the latter are requests to free the memory taken by a statecan be used). 4. SigComp message flow This chapter describesitem in a certain compartment). When theSigComp message flow andstate handler receives a state creation request from theoperation ofUDVM it takes thecompressor and decompressor dispatcher. 4.1. Message exchangefollowing steps: 1. Thelocal SigComp layer may send compressed data tostate handler MUST reject all state creation requests that are not accompanied by aremote SigComp layer, andvalid compartment identifier, or if thelocal SigComp layer may also receive compressed data.compartment is allocated 0 bytes of state memory. Notehoweverthatcompression in one directionif a state creation request fails due to lack of state memory then it does notnecessarily imply compression in the reverse direction. Furthermore, even in the casemean thatthere are two unidirectional compressed flows between two Price, Hannu, et al. [Page 11] INTERNET-DRAFT SigComp March 1, 2002the corresponding SigComplayers, theremessage isno need to usedamaged; compressors will often make state creation requests in thesame compression algorithm at both compressors. 4.2.first SigComp messageformat In everyof a compartment, before they have discovered the state_memory_size using the SigCompmessagefeedback mechanism. 2. If the state creation request needs more state memory than the total state_memory_size for the compartment, the state handler deletes all but the firstfew(state_memory_size - 64) bytesare interpretedfrom the Price, Hannu, et al. [Page 19] INTERNET-DRAFT Signaling Compression 2002-05-06 state_value. It sets the state_length to (state_memory_size - 64), and recalculates the state_identifier asadefined in Section 9.4.9. 3. If the stateidentifiercreation request contains a state_identifier thataccesses some previously stored state information. Thisalready exists then the stateinformation includes all ofhandler checks whether thedata neededrequested state item is identical todecompresstheSigComp message: includingestablished state item and counts thedecompression algorithmstate creation request as successful if this is the case. If not then the state creation request is unsuccessful (although the probability that this willbe appliedoccur is vanishingly small). 4. If the state creation request exceeds the state memory allocated to theremaindercompartment, sufficient items of state created by themessage, as well as any additional information thatsame compartmennt are freed until enough memory isrequired (e.g. one or more previously received messages if dynamic compressionavailable to accommodate the new state. When a state item isin use). The formatfreed it is removed from the list of states created by the compartment and the memory cost of thebasic SigComp messagestate item no longer counts towards the total cost for the compartment. Note however that identical state items may be created by several different compartments, so a state item must not be physically deleted unless the state handler determines that it isgiven in Figure 4: 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | 1 1 1 1 1 | length | +---+---+---+---+---+---+---+---+ | | : state_identifier (n-bytes) : | | +---+---+---+---+---+---+---+---+ | | : Remaining SigComp message : | | +---+---+---+---+---+---+---+---+ Figure 4: Basic SigComp messagenot longer required by any compartment. 5. Thelength fieldorder in which the existing state items are freed isa 3-bit value (MSBs before LSBs) that indicatesdetermined by thelength ofstate_retention_priority, which is set when the stateidentifier.items are created. Theactual size nstate_retention_priority of 65535 is reserved for locally available states; these states must always be freed first. Apart from this special case, states with the lowest state_retention_priority are always freed first. In the event of a tie then the stateidentifieritem created first in the compartment iscalculated as follows: n = minimum_hash_size + length - 1also the first to be freed. Thestate identifierstate_retention_priority isthen extracted from the SigComp message and then executedalways stored on a per-compartment basis asdefined bypart of theSTATE-EXECUTE instructionlist ofChapter 9. Ifstate items created by each compartment. In particular thelength value is setsame state item might have several priority values if it has been created by several different compartments. Note that locally available state items (as described in Section 3.3.3) need not be mapped to0any particular compartment. However, if they are created on a per-compartment basis thennothey must not interfere with the stateis accessed; insteadcreated at theentire SigComp messagerequest of the remote endpoint. The special state_retention_priority of 65535 is reserved for locally available state items to ensure that this iscopied intothe case. The UDVMmemory beginning at Address 6, and then executed starting from Address 6. All other addresses inmay also explicitly request theUDVM memory are initializedstate handler to0. Decompression failure occurs iffree a specific state item in a compartment. In this case theSigComp message is too short to containstate handler deletes theexpectedstateidentifier, or ifitem from the list of state items created by the compartment (as before the state item itself must not be physically deleted unless therequestedstatedoeshandler determines that it is notexist. See Section 8.2 for further details.longer required by any compartment). Price, Hannu, et al. [Page12]20] INTERNET-DRAFTSigComp March 1, 2002 4.3. Interfaces to and from the compressor dispatcher When the application provides a message to be compressed, it MUST also provide an "endpoint identity" that distinguishes the endpoint from other endpoints. The exact format of the endpoint identity is unimportant, provided that distinct endpoints have distinct endpoint identities.Signaling Compression 2002-05-06 TheSigComp layer contains one compressor for each remote endpoint with which the local application is communicating; the dispatcher forwards each new application message to the appropriate compressor (invoking a new compressor if a new endpoint identity is encountered). Note that theapplicationMUSTshould indicate to thecompressor dispatcherstate handler when itno longerwishes tocommunicate withclose a particularendpoint,compartment, so that the resources taken by the correspondingcompressorstate can be reclaimed.4.4. Interfaces6.3. Feedback data The SigComp feedback mechanism allows feedback data to be received by a UDVM andfromforwarded via thedecompressor dispatcher To ensure thatstate handler to the correct compressor. Since this feedback data is retained between SigCompcan run over an unsecure transport layer,messages, it is considered to be part of thedecompressor dispatcher invokesoverall state and can only be forwarded if accompanied by anew decompressor for each new SigComp message. Resources forvalid compartment identifier. If this is thedecompressor are released as soon ascase then themessage is decompressed. Uponstate handler forwards thearrival of a SigComp messagefeedback data to thedecompressor dispatcher invokes an instance ofcompressor responsible for sending messages that pertain to theUDVM and loads it withpeer compartment of theindicated state as per Section 4.2. Thespecified compartment. 7. SigComp messageis then decompressed byformat This chapter describes theUDVM, returned toformat of thedecompressor dispatcher,SigComp message andpassed onhow the message is used to initialize thereceiving application.UDVM memory. Note thatwhentheUDVMSigComp message isinvoked it doesnotreceive any compressed data by default, butcopied into the UDVM memory as soon as it arrives; insteadrequests newthe UDVM indicates when it requires compressed dataexplicitlyusing a specific instruction.Therefore, the dispatcher is responsible for buffering each SigComp messageIt then pauses andpassingwaits for thedatainformation to be supplied before executing the next instruction. This means that the UDVM can begin to decompress a SigComp message before the entire message has been received. A consequence of the above behavior is that whenitthe UDVM isrequested. Ifinvoked, the size of the UDVMrequests additional compressed data thatmemory depends on whether the transport used to provide the SigComp message isnot yet availablestream-based or message-based. If the transport is message-based then sufficient memory must be available to buffer the entire SigComp message before itpauses and waits until enough data has been received byis passed to thedispatcher. Uncompressed dataUDVM. So if the message isalso outputted byn bytes long then the UDVMusingmemory size is set to (decompression_memory_size - n), up to aspecific instruction. Note that the UDVM has no awarenessmaximum ofwhether65536 bytes. If theunderlyingtransport ismessage-based or stream-based, and so it always outputs uncompressed data asstream-based however then astream. Itfixed-size input buffer is required to accommodate theresponsibilitystream, independently of thedispatchersize of each SigComp message. So for simplicity the UDVM memory size is set to (decompression_memory_size / 2). As a separate instance of the UDVM is invoked on a per-message basis, each SigComp message must explicitly indicate its chosen decompression algorithm as well as any additional information that is needed toprovidedecompress theuncompressedmessageto the application in the expected form (i.e. as a stream(e.g. one orasmore previously received messages, asetdictionary ofdistinct, bounded messages).common SIP phrases etc.). This information can either be uploaded as part of the SigComp message or Price, Hannu, et al. [Page13]21] INTERNET-DRAFT Signaling Compression 2002-05-06 retrieved from an item of state. A SigCompMarch 1, 2002 Formessage takes one of two forms depending on whether it accesses astream-based transport, the dispatcher delimits messages by parsingstate item at thecompressed data stream for instancesreceiving endpoint. The two variants of0xFF and taking the following actions: Occurs in data stream: Meaning: 0xFF 00 one 0xFF bytea SigComp message are given inthe data stream 0xFF 01 same, but the next byte is quoted (could be another 0xFF)Figure 3. 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | 1 1 1 1 1 | T | len | | 1 1 1 1 1 | T | 0 | +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | | | | : returned feedback item :0xFF 7F same, but the next 127 bytes are quoted 0xFF 80 to 0xFF FE reserved 0xFF FF: returned feedback item : | | | | +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | | | code_len | : partial state identifier : +---+---+---+---+---+---+---+---+ | | | code_len | destination | +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | | | | : remaining SigComp messageboundary The reserved characters are useful for byte stuffing (if a compression algorithm generates compressed data containing the character 0xFF then it should be replaced by the character 0xFF00 to avoid accidentally inserting: : uploaded UDVM bytecode : | | | | +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | | : remaining SigComp message : | | +---+---+---+---+---+---+---+---+ Figure 3: Format of a SigComp messagedelimiter intoDecompression failure occurs if thecompressed data stream). 5. SigComp compressor An important feature ofSigComp message isthat if two endpoints cannot agree on a common algorithm with whichtoo short tosend and receive data, it is possible forcontain thecompressor to upload bytecodeexpected fields (see Section 8.7 for further details). The fields except forits own choice of algorithm tothedecompressor. In particular this means that it is not necessary to force all compressors"remaining SigComp message" are referred touseas thesame default algorithm; instead each implementer has"SigComp header" (note that this may include thefreedom to pick oneuploaded UDVM bytecode). 7.1. Returned feedback item For both variants of thepredefined algorithms or to upload their own if needed. The overall requirement placed onSigComp message, thecompressorT-bit isthat of transparency, i.e. the compressor MUST NOT send bytecode which cause the UDVMset toincorrectly decompress1 whenever the SigComp message contains agiven message.returned feedback item. Thefollowing more specific requirements are also placed on the compressor (they can be considered particular instancesformat of thetransparency requirement): * Itreturned feedback item isRECOMMENDEDillustrated in Figure 4. 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | 0 | returned_feedback_field | | 1 | returned_feedback_length | +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+ | | : returned_feedback_field : Price, Hannu, et al. [Page 22] INTERNET-DRAFT Signaling Compression 2002-05-06 | | +---+---+---+---+---+---+---+---+ Figure 4: Format of returned feedback item Note that thecompressor supply a CRC overreturned feedback length specifies the size of the returned feedback field (from 0 to 127 bytes). So the total size of theuncompressed messagereturned feedback item lies between 1 and 128 bytes. The returned feedback item is not copied toensure that successful decompression has occurred. Athe UDVMinstructionmemory; instead it isprovided to verify this CRC. * Ifbuffered until thetransportUDVM has successfully decompressed the SigComp message. It ismessage-basedthen forwarded to thecompressor MUST preservestate handler with theboundaries between messages. * Ifrest of thetransport is stream-based butfeedback data (see Section 9.4.9 for further details). 7.2. Accessing stored state The len field of theapplication defines its own internalSigComp messageboundaries, thendetermines which fields follow thecompressor SHOULD preservereturned feedback item. If theboundaries between messages by usinglen field is non-zero then the"end-of- message" character 0xFFFF reserved by SigComp. Price, Hannu, et al. [Page 14] INTERNET-DRAFTSigCompMarch 1, 2002 * The compressor MUST NOT exceedmessage contains a state identifier to access a state item at themaximum_compressed_size and MUST ensure thatreceiving endpoint. All state items include a 20-byte state identifier as per Section 3.3.3, but it is possible to transmit as few as 6 bytes from themessage can be decompressed using no more thanidentifier if theresources availablesender believes that this is sufficient to match a unique state item at theremote decompressor.receiving endpoint. Thereason for preservinglen field encodes themessage boundaries over a stream-based transportnumber of transmitted bytes as follows: Encoding: Length of partial state identifier 01 6 bytes 10 9 bytes 11 12 bytes The partial state identifier isthat damagepassed to the state handler, which compares it with the most significant bytes of the state_identifier in every currently stored state item. Decompression failure occurs if no state item is matched or if more than one state item is matched. Decompression failure also occurs if exactly onecompressed message does not affectstate item is matched but thedecompressionstate item contains a minimum_access_length greater than the length ofsubsequent messages. Moreover,theapplication typically vetoespartial statecreation requests on a per-message basis. 5.1. Supplying bytecode toidentifier. This prevents especially sensitive state items from being accessed maliciously by brute force guessing of theUDVM A compressor MUST be certain that compressed data can be decompressed beforestate_identifier. If a state item is successfully accessed then thedatastate_value byte string isto be sent, i.e.copied into the UDVMinstructions for decompression MUST be availablememory beginning atthe remote decompressor. Several options exist for ensuring that this bytecode is available: 1. Each SigComp message sent from the compressor contains the necessarystate_address. The first 32 bytes of UDVMinstructions for decompression. 2. By setting up a reliable connection, suchmemory are then initialized to special values asa TCP connection, between a compressor and its remote decompressor theillustrated in Figure 5. Price, Hannu, et al. [Page 23] INTERNET-DRAFT Signaling Compression 2002-05-06 0 7 8 15 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UDVM_memory_size | 0 - 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | cycles_per_bit | 2 - 3 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SigComp_version | 4 - 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | partial_state_ID_length | 6 - 7 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | state_length | 8 - 9 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : reserved : 10 - 31 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 5: Initializing Useful Values in UDVMinstructions can be transferred and saved as state. 3. If therememory The first five 2-byte words arepredefined UDVM codes for well-known algorithms, a compressor only needsinitialized tosend the state identifier ofcontain some values thatUDVM decompression algorithm codemight be useful toits remote decompressor. The decompressorthe UDVM bytecode (Useful Values). Note that these values are for information only and canthen populatebe overwritten when executing the UDVMlocally. In orderbytecode without any effect on the endpoint. The MSBs of each 2-byte word are stored preceding the LSBs. Addresses 0 tosave delay for "time-critical" sessions,5 indicate theUDVM instructions should be uploaded priorresources available toany initiation of "time- critical" sessions. 5.2. Compression failurethe receiving endpoint. Thecompressor SHOULD make every effort to successfully compress an application message, butUDVM memory size is expressed incertain cases this might not be possible (particularly if a low maximum_compressed_size has beenbytes modulo 2^16, so in particular it is setbyto 0 if theapplication). In this case a "compression failure"UDVM memory size iscalled. Reasons for compression failure include65536 bytes. The cycles_per_bit is expressed as 2-byte integer taking thefollowing: * A compressedvalue 16, 32, 64 oruncompressed message exceeds the maximum size defined by the application. *128. Themaximum_compressed_sizeSigComp_version isexceeded forexpressed as acertain message. * Insufficient resources2-byte value as per Section 3.3.2. Addresses 6 to 9 areavailable atinitialized to thecompressor or atlength of theremote decompressor. If a compression failure occurs when compressingpartial state identifier, followed by the state_length from the retrieved state item. Both are expressed as 2-byte values. Addresses 10 to 31 are reserved and are initialized to 0 for Version 0x01 of SigComp. Future versions of SigComp can use these locations for additional Useful Values, so amessagedecompressor MUST not rely on these values being zero. Any remaining addresses in the UDVM memory that have not yet been initialized MUST be set to 0. The UDVM then begins executing instructions at thecompressor informsmemory address contained in state_instruction (which is part of the retrieved item of state). Note that the remaining SigComp message is held by the decompressor dispatcherand takes no further action. Theuntil requested by the UDVM. Price, Hannu, et al. [Page15]24] INTERNET-DRAFTSigComp March 1, 2002 dispatcher MUST report this failureSignaling Compression 2002-05-06 (Note that the Useful Values are only set at UDVM startup; there is no special significance to this memory area afterwards. This means that theapplication. The application may then tryUDVM bytecode is free to use these locations for any othermethodspurpose a memory location might be used for; it just has todeliverbe aware they are not necessarily initialized to zero.) 7.3. Uploading UDVM bytecode If themessage. 6. State handling and state announcement This chapter defineslen field is set to 0 then thebehavior ofbytecode needed to decompress the SigCompstate handler.message is supplied as part of the message itself. Thefunction12-bit code_len field specifies the size of thestate handler isuploaded UDVM bytecode (from 0 toretain information between successive SigComp messages; it is4095 bytes inclusive); eight most significant bits are in theonly SigComp entityfirst byte, followed by the four least significant bits in the most significant bits in the second byte. The remaining bits in the second byte are interpreted as a 4-bit destination field that specifies the starting memory address to which the bytecode iscapable of this function, and so itcopied. The destination field isof particular importance from a security perspective. 6.1. Storing and retrieving state To provide security againstencoded as follows: Encoding: Destination address: 0000 reserved 0001 2 * 64 = 128 0010 3 * 64 = 196 0011 4 * 64 = 256 : : 1111 16 * 64 = 1024 Note that themalicious insertion or modification ofencoding 0000 is reserved for future SigCompmessages, theversions, and causes a decompression failure in Version 0x01. The UDVM memory is initialized as per Figure 5, except that addresses 6 to 9 inclusive are set to 0 because no state item has been accessed. The UDVM then begins executing instructions at the memoryis reset after decompressing each message. This ensures that damagedaddress specified by the destination field. As above, the remaining SigCompmessages do not preventmessage is held by thesuccessful decompressiondecompressor dispatcher until needed by the UDVM. 8. Overview ofsubsequent valid messages. Note however thattheoverall compression ratioUDVM Decompression functionality for SigComp isoften significantly higher if messages can be compressed relative toprovided by a "Universal Decompressor Virtual Machine" (UDVM). The UDVM is a virtual machine much like theinformation stored in previous messages. For this reasonJava Virtual Machine but with a key difference: it ispossible to create "state" informationdesigned solely foraccess when a later message is being decompressed. Boththecreation and accesspurpose ofstate are designed to be secure against malicious tampering withrunning decompression algorithms. The motivation for creating thecompressed data. State can only be createdUDVM is to provide unlimited flexibility when choosing how to compress acomplete message has been successfully decompressed, and the state handler MUST NOT save state without permission from the application. Upon receiving a decompressed message, thegiven applicationmay supply the state handler with the identitymessage. Rather than picking one of a small number of pre-negotiated algorithms, thesending endpoint. Supplying this identity grants permission forcompressor implementer has thestate handlerfreedom todo the following: * An itemselect an Price, Hannu, et al. [Page 25] INTERNET-DRAFT Signaling Compression 2002-05-06 algorithm ofstate can be saved using the memory reserved fortheir choice. The compressed data is then combined with a set of UDVM instructions that allow thespecified endpoint. * Announcement information can be taken into account when sending SigComp messagesoriginal data to be extracted, and thespecified endpoint. Thisresult isespecially useful if the application has an authentication mechanism that can be applied to determine whetheroutputted as a SigComp message. Since thedecompressed dataUDVM islegitimate. Also note that stateoptimized specifically for running decompression algorithms, the code size of a typical algorithm is small (often sub 100 bytes). Moreover the UDVM approach does notdeleted when it is accessed. So even if a malicious user managesadd significant extra processing or memory requirements compared toaccess state information, subsequent messagesrunning a fixed pre- programmed decompression algorithm. Figure 6 gives a detailed view of the interfaces between the UDVM and its environment. +----------------+ +----------------+ | | Request compressedrelative to thisdata | | | |-------------------------------->| | | |<--------------------------------| | | | Provide compressed data | | | | | | | | Output decompressed data | Decompressor | | |-------------------------------->| dispatcher | | | | | | | Indicate end of message | | | |-------------------------------->| | | |<--------------------------------| | | UDVM | Provide compartment identifier | | | | +----------------+ | | | | +----------------+ | | Request statecan still be successfully decompressed. Instead, theinformation | | | |-------------------------------->| | | |<--------------------------------| | | | Provide state information | State | | | | handleris responsible for deleting Price, Hannu, et al. [Page 16] INTERNET-DRAFT SigComp March 1, 2002| | | Make state creation request | | | |-------------------------------->| | | | Forward feedback informationonce it determines| | +----------------+ +----------------+ Figure 6: Interfaces between the UDVM and its environment Note that once the UDVM has been initialized, additional compressed data and statewill no longer be needed. Each item of state storesinformation are only provided at thefollowing information: Name: Type of data: state_identifier 16-byte value state start 2-byte value state_instruction 2-byte value state length 2-byte value state_value Stringrequest ofbytes The state_identifier must be supplied to retrieve an itema specific UDVM instruction. This chapter describes the basic features ofstate fromthestate handler. State can be accessed usingUDVM including the UDVMinstructions STATE-REFERENCE and STATE-EXECUTE,registers andcan be created usingtheEND-MESSAGE instruction.format of UDVM bytecode. 8.1. UDVM registers Price, Hannu, et al. [Page 26] INTERNET-DRAFT Signaling Compression 2002-05-06 Thestate_value is a byte string that contains the actual value that is copied from/toUDVM registers are 2-byte words in the UDVMmemory. The state_length specifiesmemory that have special tasks, for example specifying thenumberlocation ofbytes contained within state_value,the stack used by the CALL andstate_start givesRETURN instructions. The UDVM registers are illustrated in Figure 7. 0 7 8 15 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | byte_copy_left | 64 - 65 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | byte_copy_right | 66 - 67 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | input_bit_order | 68 - 69 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | stack_location | 70 - 71 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 7: Memory addresses of the UDVMmemory address to whichregisters The MSBs of each register are always stored before thestate_value is copied when it is accessed. Finally, state_instruction specifiesLSBs. So, for example, thememory addressMSBs of byte_copy_left are stored at Address 64 whilst thenext UDVM instruction to execute when state is accessed.LSBs are stored at Address 65. Thekinduse ofinformation which is included in the state_valueeach UDVM register isup to a particular compressor and the uploaded instructionsdefined in theremote UDVM. However a compressor MUST NOT use a statefollowing sections. (Note thatis not known to be establishedthe UDVM registers start at Address 64, that is 32 bytes after theremote decompressor. 6.2. Saving and deleting states The state handlerarea reserved foreach endpointUseful Values. The intention isexpected to offer memory to store UDVM-created state. Every remote endpointthatwishes to communicate withthelocal endpoint expects to be able to store a fixed amount of state;gap, i.e., thenumber of bytesarea between Address 32 and Address 63, will often be used as scratch-pad memory thatit can storeisgiven by the formula UDVM_memory_size * maximum_state_size. Note that each item of state costs (state_length + 22) bytesguaranteed tostore.be zero at UDVM startup and is efficiently addressible in operand types reference ($) and multitype (%).) 8.2. Requesting additional compressed data Thestate handler keeps track of which endpoint created each item of state; when a particular endpoint exceeds its allocated memory limit then sufficient items of state created bydecompressor dispatcher stores thesame endpoint are deleted (oldest state first) until enough memory is available to accommodatecompressed data from thenew state. Price, Hannu, et al. [Page 17] INTERNET-DRAFTSigCompMarch 1, 2002 The application MUST indicate to the state handler whenmessage before itno longer wishes to communicate with a particular endpoint, so that the resources takenis requested by thecorresponding state can be reclaimed. 6.3. Announcement The announcement informationUDVM via one of the INPUT instructions. When the UDVM bytecode isused to modifyfirst executed thevalue of certain application-defined parameters. Since these parameter values are saved betweendispatcher contains the remaining SigCompmessages, they are considered to be part ofmessage after theoverall state and hence are supplied fromheader has been used to initialize the UDVMtoas per Chapter 7. Note that thestate handler. The following listINPUT-BITS and INPUT-HUFFMAN instructions retrieve a stream ofparameters is passed toindividual compressed bits from thestate handler usingdispatcher. To provide bitwise compatibility with various well-known compression algorithms, theappropriate UDVM instruction (namelyinput_bit_order register can modify theEND-MESSAGE instruction): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UDVM_version | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UDVM_memory_size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | cycles_per_bit | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | cycles_per_message | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | id_length 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : id_value_1 : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : : : : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | id_length n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : id_value_n : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : reserved : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 5: Announcement informationorder in which individual bits are passed within a byte. The input_bit_order register contains the following three flags: Price, Hannu, et al. [Page18]27] INTERNET-DRAFTSigComp March 1, 2002 IfSignaling Compression 2002-05-06 0 7 8 15 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | reserved |F|H|P| 68 - 69 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The P-bit controls theapplication does not return a valid endpoint identifier thenorder in which bits are passed from theannouncement information is automatically discarded bydispatcher to thestate handler. OtherwiseINPUT instructions. If set to 0, it indicates that the bits within an individual byte are passed to the INPUT instructions in MSB to LSB order. If it is set to 1, the bits are passed in LSB to MSB order. Note that thecompressor responsible for sending messagesinput_bit_order register cannot change the order in which the bytes themselves are passed to the INPUT instructions (bytes are always passed in the same order as they occur in the SigComp message). The following diagram illustrates the order in which bits are passed to thegiven endpoint. The reserved field allowsINPUT instructions foradditional itemsboth cases: MSB LSB MSB LSB MSB LSB MSB LSB +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 2 3 4 5 6 7|8 9 ... | |7 6 5 4 3 2 1 0| ... 9 8| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Byte 0 Byte 1 Byte 0 Byte 1 P = 0 P = 1 Note that after one or more INPUT instructions the dispatcher may hold a fraction ofdataa byte (what used to beadded to the announcement information in future. Note thatthelength field specifiesLSBs if P = 0, or, thetotal length ofMSBs, if P = 1). If an INPUT instruction is encountered and theannouncement information includingP- bit has changed since thereserved field. As usual, MSBs are stored preceding LSBs. The remaining items of data are explained in greater detail below: 6.3.1. UDVM version The next 2 byteslast INPUT instruction, any fraction of a byte still held by theannouncement information specify whether onlydispatcher MUST be discarded (even if thebasic version ofINPUT instruction requests zero bits). The first bit passed to theUDVMINPUT instruction isavailable, or whethertaken from the subsequent byte. When anupgraded versionINPUT instruction requests n bits of compressed data, it interprets theUDVM is available offering additional instructions etc.received bits as an integer between 0 and 2^n - 1. Thebasic version ofF-bit and theUDVM is Version 0, which isH-bit specify whether theversion describedbits inthis document. Upgraded versions MUST be backwards- compatible with the basic versionthese integers are considered to arrive inthe following sense: * If some UDVM bytecode reaches the END-MESSAGEMSB to LSB order (bit set to 0) orDECOMPRESSION- FAILURE instructions when running on Version 0 ofin LSB to MSB order (bit set to 1). If theUDVM, thenF-bit is set to 0, theupgraded version MUST runINPUT-BITS instruction interprets thebytecode in an identical manner. This condition ensures that all bytecode thatreceived bits as arriving MSBs first, and if it isvalid for Version 0 of the UDVM will continueset tobe valid for upgraded versions of1 it interprets theUDVM. However, bytecode that is invalid on Version 0 ofbits as arriving LSBs first. The H-bit performs theUDVM (i.e. bytecode that produces a decompression failuresame function for the INPUT-HUFFMAN instruction. Note that it isnot manually triggered) may become valid on upgraded versions. The simplest waypossible toupgrade the UDVMset these two bits to different values ina backwards-compatible manner isorder toadd additional UDVMuse Price, Hannu, et al. [Page 28] INTERNET-DRAFT Signaling Compression 2002-05-06 different bit orders for the two instructions (certain algorithms actually require this, e.g. DEFLATE [RFC-1951]). (Note that there are no special considerations for changing the F- or H-bit between INPUT instructions,as this will not affectunlike theoperation of existing UDVM bytecode. 6.3.2. Memory size and CPU cycles The next 6 bytes of data specify new valuesdiscard rule for theapplication- defined parameters UDVM_memory_size, cycles_per_bitP-bit described above.) Decompression failure occurs if an INPUT-BITS or an INPUT-HUFFMAN instruction is encountered andcycles_per_message. Note that this data can only be used to increasetheamountinput_bit_order register does not lie between 0 and 7 inclusive. 8.3. UDVM stack Certain UDVM instructions make use ofresources availablea stack of 2-byte words stored at theremote UDVM. Ifmemory address specified by thedata specifies a parameter value that2-byte word stack_location. The stack contains the following words: Name: Starting memory address: stack_fill stack_location stack[0] stack_location + 2 stack[1] stack_location + 4 stack[2] stack_location + 6 : : The notation stack_location issmaller than the value already possessed byan abbreviation for thestate handler,contents of theparameter keeps its original value (i.e.stack_location register, i.e., theannouncement data2-byte word at locations 70 and 71. The notation stack_fill is an abbreviation forthis parameterthe 2-byte word at stack_location and stack_location+1. Similarly, the notation stack[n] issimply ignored). Price, Hannu, et al. [Page 19] INTERNET-DRAFT SigComp March 1, 2002 In particular, only allowingan abbreviation for theparameter values to increase means that2-byte word at stack_location+2*n+2 and stack_location+2*n+3. (As always, theannouncement mechanismarithmetic isrobust against message loss or reordering.modulo 2^16.) Theparameters can only be restored to their original values if reset or renegotiatedstack is used by theapplication. 6.3.3. State identifiers The list of state identifiers indicates thatCALL, RETURN, PUSH and POP instructions. "Pushing" a value on thesending endpoint supports one or more optional mechanisms (including well-known decompression algorithms, dictionaries of common SIP phrases, feedback mechanisms etc.). The integer n specifiesstack is an abbreviation for copying thenumber of state identifiersvalue tofollow. The field id_length_j specifies the length in bytes of id_value_j, where acceptablestack[stack_fill] and then increasing stack_fill by 1. CALL and PUSH push valuesfor id_length_j range from 1 to 16 inclusive. Ifon the stack. "Popping" a valueoutside this range is received then the subsequent state identifiers are ignored byfrom thestate handler. Each id_value_j indicates supportstack is an abbreviation forone optional mechanism at the sending endpoint. The optional mechanisms themselves,decreasing stack_fill by 1, andtheir corresponding state identifiers, are beyond the scope of this document. 7. Overview ofthen using theUDVMvalue stored in stack[stack_fill]. Decompressionfunctionality for SigComp is provided by a "Universal Decompressor Virtual Machine" (UDVM). The UDVMfailure occurs if stack_fill isa virtual machine much likezero at theJava Virtual Machine but withcommencement of akey difference: it is designed solely forpopping operation. POP and RETURN pop values from thepurposestack. For both ofrunning decompression algorithms. The motivation for creatingthese abstract operations, the UDVMis to provide unlimited flexibility when choosing how to compress a given item of data. Rather than picking onefirst takes note ofa small numberthe current value ofpre-negotiated compression algorithms,stack_location and uses this value for both sub- operations (accessing theimplementer hasstack and manipulating stack_fill), i.e. overwriting stack_location in thefreedom to select an algorithmcourse oftheir choice. The compressed datathe operation isthen combined with a setPrice, Hannu, et al. [Page 29] INTERNET-DRAFT Signaling Compression 2002-05-06 inconsequential for the operation. 8.4. Byte copying A number of UDVM instructionsthat allow the original datarequire a string of bytes to beextracted,copied to and from areas of theresult is outputted asUDVMbytecode. Sincememory. This section defines how theUDVMbyte copying operation should be performed. The string of bytes isoptimized specifically for running decompression algorithms, the code sizecopied in ascending order of memory address, respecting the bounds set by byte_copy_left and byte_copy_right. More precisely, if atypical algorithmbyte issmall (often sub 100 bytes). Moreovercopied from/to Address m then theUDVM approach does not add significant extra processing or memory requirements compared to runningnext byte is copied from/to Address n where n is calculated as follows: Set k := m + 1 (modulo 2^16) If k = byte_copy_right then set n := byte_copy_left, else set n := k Decompression failure occurs if afixed pre- programmed decompression algorithm. This chapter describes some basic features of the UDVM, includingbyte is copied from/to an address beyond thewell-known variables and instruction operands. Price, Hannu, et al. [Page 20] INTERNET-DRAFT SigComp March 1, 2002 RecallUDVM memory. Note that theamount of memory available to the UDVMstring of bytes isspecified bycopied one byte at a time. In particular, some of theapplication-defined parameter UDVM_memory_size. Any attemptlater bytes toread memory addresses beyond the overall memory size MUST cause a decompression failure (see Section 8.2). 7.1. Well-known variables The first few variables inbe copied may themselves have been written into the UDVM memoryhave special tasks, for example specifying the location of the stack usedby theCALL and RETURN instructions. Each of these well-known variablesbyte copying operation currently being performed. Equally, it is possible for a2-byte integer. The following list givesbyte copying operation to overwrite thename of each well-known variable andinstruction that invoked thememory address at whichbyte copy. If this occurs then thevariable canbyte copying operation MUST befound: Name: Startingcompleted as if the original instruction were still in place in the UDVM memoryaddress:(this also applies if byte_copy_left0or byte_copy_right2 stack_location 4 The MSBs of each variable are always stored before the LSBs. So, for example, the MSBs of stack_location are stored at Address 4 whilst the LSBsarestored at Address 5. The use of each well-known variableoverwritten). Byte copying isdescribed inused by the followingsections of the document. 7.2.UDVM instructions: SHA-1 COPY COPY-LITERAL COPY-OFFSET MEMSET INPUT-BYTES STATE-ACCESS OUTPUT END-MESSAGE 8.5. Instruction operands and UDVM bytecode Each of the UDVM instructions in a piece of UDVM bytecode is represented by a single byte, followed by 0 or more bytes containing the operands required by theinstruction.instruction. During instruction execution, conceptually the UDVM first fetches the first byte of the instruction, determines the number and types of operands required for this instruction, and then decodes all the operands in sequence before starting to act on the instruction. (Note that the UDVM instructions have been designed in such a way that this sequence remains conceptual in those cases where it would result in an unreasonable burden on the implementation.) Price, Hannu, et al. [Page 30] INTERNET-DRAFT Signaling Compression 2002-05-06 To reduce thecodesize ofatypical UDVMprogram,bytecode, each operand for a UDVM instruction is compressed using variable-length encoding. The aim is to store more common operand values using fewerbitsbytes than rarely occurring values.ThreeFour different types of operand are available: the literal, thereferencereference, the multitype and the address. Chapter 9 gives a complete list of UDVM instructions and themultitype. Theoperand types that follow eachUDVM instruction are specified in Chapter 9.instruction. The UDVM bytecode for each operand type is illustrated in Figure78 to Figure9,10, together with the integer values represented by the bytecode. Note that the MSBs in the bytecode are illustrated as preceding the LSBs. Also, any string of bits marked with k consecutive "n"s is to be interpreted as an integer N from 0 to 2^k - 1 inclusive (with the MSBs of n illustrated as preceding the LSBs).Price, Hannu, et al. [Page 21] INTERNET-DRAFT SigComp March 1, 2002The decoded integer value of the bytecode can be interpreted in two ways. In some cases it is taken to be the actual value of the operand. In other cases it is taken to be a memory address at which the 2-byte operand value can be found (MSBs found at the specified address, LSBs found at the following address). The lattercase iscases are denoted by memory[X] where X is the address and memory[X] is the2- byte2-byte value starting at Address X. The simplest operand type is the literal (#), which encodes a constant integer from 0 to 65535 inclusive. A literal operand may require between 1 and 3 bytes depending on its value. Bytecode: Operand value: Range: 0nnnnnnn N 0 - 127 10nnnnnn nnnnnnnn N 0 - 16383 11000000 nnnnnnnn nnnnnnnn N 0 - 65535 Figure7:8: Bytecode for a literal (#) operand The second operand type is the reference ($), which is always used to access a 2-byte value located elsewhere in the UDVM memory. The bytecode for a reference operand is decoded to be a constant integer from 0 to 65535 inclusive, which is interpreted as the memory address containing the actual value of the operand.Note that reference operands can always take values from 0 to 65535 inclusive, as they reference 2-byte values.Bytecode: Operand value: Range: 0nnnnnnn memory[2 * N] 0 - 65535 Price, Hannu, et al. [Page 31] INTERNET-DRAFT Signaling Compression 2002-05-06 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535 Figure8:9: Bytecode for a reference ($) operand Note that the range of a reference operand is always 0 - 65535 independently of how many bits are used to encode the reference, because the operand always references a 2-byte value in the memory. The third kind of operand is the multitype (%), which can be used to encode both actual values and memory addresses. The multitype operand also offers efficient encoding for small integer values (both positive and negative) and for powers of 2. Bytecode: Operand value: Range: 00nnnnnn N 0 - 63 01nnnnnn memory[2 * N] 0 - 65535 1000011n 2 ^ (N + 6) 64 , 128 10001nnn 2 ^ (N + 8) 256 , ... , 32768 111nnnnn N + 65504 65504 - 65535 1001nnnn nnnnnnnn N + 61440 61440 - 65535 101nnnnn nnnnnnnn N 0 - 8191Price, Hannu, et al. [Page 22] INTERNET-DRAFT SigComp March 1, 2002110nnnnn nnnnnnnn memory[N] 0 - 65535 10000000 nnnnnnnn nnnnnnnn N 0 - 65535 10000001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535 Figure9:10: Bytecode for a multitype (%) operand7.3. Byte copying A numberThe fourth operand type is the address (@). This operand is decoded as a multitype operand followed by a further step: the memory address of the UDVM instruction containing the address operand is added to obtain the correct operand value. So if the operand value from Figure 10 is D then the actual operand value of an address is calculated as follows: operand_value = (memory_address_of_instruction + D) modulo 2^16 Address operands are always used in instructions that control program flow, because they ensure that the UDVM bytecode is position- independent code (i.e. it will run independently of where it is placed in the UDVM memory). 8.6. UDVM cycles Once the UDVM has been invoked it executes the instructions contained in its memory consecutively unless otherwise indicated (for example when the UDVMinstructions requireencounters astring of bytesJUMP instruction). If the next instruction Price, Hannu, et al. [Page 32] INTERNET-DRAFT Signaling Compression 2002-05-06 to becopiedexecuted lies outside the available memory then decompression failure occurs (see Section 8.7). To ensure that a SigComp message cannot consume excessive processing resources, SigComp limits the number of "UDVM cycles" allocated toand from areaseach message. The number oftheavailable UDVMmemory. This section defines howcycles is initialized to 1000 plus thebyte copying operation should be performed. In general,number of bits in thestringSigComp header (as described in section 7); this sum is then multiplied by cycles_per_bit. Each time an instruction is executed the number ofbytesavailable UDVM cycles iscopieddecreased by the amount specified inascending orderChapter 9. Additionally, if the UDVM successfully requests n bits ofmemory address.compressed data using one of the INPUT instructions then the number of available UDVM cycles is increased by n * cycles_per_bit once the instruction has been executed. This means that the maximum number of UDVM cycles available for processing an n-byte SigComp message is given by the formula: maximum_UDVM_cycles = (8 * n + 1000) * cycles_per_bit The reason that this total is not allocated to the UDVM when it is invoked is that the UDVM can begin to decompress a message that has only been partially received. So the total message size may not be known when the UDVM is initialized. Note that the number of UDVM cycles MUST NOT be increased if a request for additional compressed data fails. The UDVM stops executing instructions when it encounters an END- MESSAGE instruction or if decompression failure occurs (see Section 8.7 for further details). 8.7. Decompression failure If abytecompressed message given to the UDVM iscopied from/to Address ncorrupted (either accidentally or maliciously) then thenext byte is copied from/to Address n + 1. As usual, ifUDVM may terminate with abytedecompression failure. Reasons for decompression failure include the following: 1. A SigComp message contains an invalid header as per Chapter 7. 2. A SigComp message is larger than the decompression_memory_size. 3. An instruction costs more that the number of remaining UDVM cycles. 4. The UDVM attempts to read fromanor write to a memory address beyondthe overallPrice, Hannu, et al. [Page 33] INTERNET-DRAFT Signaling Compression 2002-05-06 its memorysize then decompression failure occurs. Note however that if a bytesize. 5. An unknown instruction iscopied from/to the memory address specified in byte_copy_right, the byte copy operation continuesencountered. 6. An unknown operand is encountered. 7. An instruction is encountered that cannot be processed successfully bycopying the next byte from/tothememory address specified in byte_copy_left. ThisUDVM (for example a RETURN instruction when no CALL instruction has previously been encountered). 8. A request to access some state information fails. 9. A manual decompression failure isuseful for setting uptriggered using the DECOMPRESSION-FAILURE instruction. If a"circular buffer" withindecompression failure occurs when decompressing a message then the UDVMmemory. Note thatinforms thestring of bytesdispatcher and takes no further action. It iscopied on a purely byte-by-byte basis. In particular, somethe responsibility of thelater bytesdispatcher tobe copied may themselves havedecide how to cope with the decompression failure. In general a dispatcher SHOULD discard the compressed message (or the compressed stream if the transport is stream-based) and any decompressed data that has beenwritten intooutputted but not yet passed to the application. 9. UDVM instruction set The UDVMmemory by the byte copying operationcurrentlybeing performed. Equally, it is possible for a byte copying operationunderstands 33 instructions, chosen tooverwritesupport theinstruction that calledwidest possible range of compression algorithms with thebyte copy. If this occurs thenminimum possible overhead. Figure 11 lists thebyte copying operation MUST be completed as ifdifferent instructions and theoriginalbytecode values used to encode the instructions. The cost of each instructionwere still in placeintheUDVMmemory (thiscycles is alsoapplies if byte_copy_left or byte_copy_right are overwritten). 8. Decompressing a SigComp message This chapter lists the steps involvedgiven: Instruction: Bytecode value: Cost inthe decompression of a single SigComp message. 8.1. Invoking theUDVMWhenever the dispatcher receives a message to be decompressed, it invokes a new instance of the UDVM. The UDVM_memory_size is initialized using thecycles: DECOMPRESSION-FAILURE 0 1 AND 1 1 OR 2 1 NOT 3 1 LSHIFT 4 1 RSHIFT 5 1 ADD 6 1 SUBTRACT 7 1 MULTIPLY 8 1 DIVIDE 9 1 REMAINDER 10 1 SORT-ASCENDING 11 1 + k * ceiling(log2(k)) SORT-DESCENDING 12 1 + k * ceiling(log2(k)) Price, Hannu, et al. [Page 34] INTERNET-DRAFT Signaling Compression 2002-05-06 SHA-1 13 1 + length LOAD 14 1 MULTILOAD 15 1 + n PUSH 16 1 POP 17 1 COPY 18 1 + length COPY-LITERAL 19 1 + length COPY-OFFSET 20 1 + length + offset MEMSET 21 1 + length JUMP 22 1 COMPARE 23 1 CALL 24 1 RETURN 25 1 SWITCH 26 1 + n CRC 27 1 + length INPUT-BYTES 28 1 + length INPUT-BITS 29 1 INPUT-HUFFMAN 30 1 + n STATE-ACCESS 31 1 + state_length STATE-CREATE 32 1 + state_length STATE-FREE 33 1 OUTPUT 34 1 + output_length END-MESSAGE 35 1 + state length Figure 11: UDVM instructions and correspondingapplication-defined parameter. The following steps are then taken: 1.) The numberbytecode values Each UDVM instruction costs a minimum ofremaining CPU1 UDVM cycle. Certain instructions may cost additional cyclesis set equal todepending on theapplication-defined parameter cycles_per_message. Price, Hannu, et al. [Page 23] INTERNET-DRAFT SigComp March 1, 2002 Notes: The amountvalues ofcompressed data available to the UDVM is exactly one compressed message. If the transport is stream-based then SigComp usesthereserved byte string 0xFFFF to delimitinstruction operands. Note that for thecompressed messages:SORT instructions, thedispatcher takesformula ceiling(log2(k)) calculates thedata between a pair of neighboring reserved byte strings to be a single compressed message.smallest value n such that k <= 2^n. Thereserved byte string itself is not considered to be partUDVM instruction set offers a mix ofthe compressed message.low-level and high-level instructions. Thecompressed data is not provided to the UDVM by default. Instead, the UDVM requests compressed data using the INPUThigh-level instructions(useful when running over a stream-based transport since there is no need to wait for the entire compressed message before decompressioncanbegin). The dispatcher MUST NOT make more than one compressed message available to a given instanceall be emulated using combinations ofthe UDVM. In particular, the dispatcher MUST NOT concatenate two messages to formlow-level instructions, but given asingle compressed message. Thischoice it isbecause compressed messages are typically padded with trailing zero bits so that they aregenerally preferable to use awholesingle instruction rather than a large number ofbytes long. Concatenating two messages would cause these padding bitsgeneral-purpose instructions. The resulting bytecode will be more compact (leading to a higher overall compression ratio) and decompression will typically beincorrectly interpreted as compressed data. 2.) Next,faster because theinstructions contained withinimplementation of theUDVM memoryhigh-level instructions can be more easily optimized. All instructions areexecuted beginning atencoded as a single byte to indicate theaddress specifiedinstruction type, followed by 0 or more bytes containing thestate as per Section 4.2. Notes:operands required by the instruction. Theinstructions are executed consecutively unless otherwise indicated (forinstruction specifies which of the four operand types of Section 8.5 is used in each case. For examplewhentheUDVM encounters a JUMP instruction). IfADD instruction is followed by two operands: Price, Hannu, et al. [Page 35] INTERNET-DRAFT Signaling Compression 2002-05-06 ADD ($operand_1, %operand_2) When converted into bytecode thenextnumber of bytes required by the ADD instructionto be executed lies outsidedepends on theavailablevalue of each operand, and whether the multitype operand contains the operand value itself or a memorythen decompression failure occurs (see Section 8.2). 3.)address where the actual value of the operand can be found. Eachtimeinstruction is explained in more detail below. Whenever the description of an instruction uses the expression "and then", the intended semantics isexecutedthat the effect explained before "and then" is completed before work on the effect explained after the "and then" is commenced. 9.1. Mathematical instructions The following instructions provide a number of mathematical operations including bit manipulation, arithmetic and sorting. 9.1.1. Bit manipulation The AND, OR, NOT, LSHIFT and RSHIFT instructions provide simple bit manipulation on 2-byte words. AND ($operand_1, %operand_2) OR ($operand_1, %operand_2) NOT ($operand_1) LSHIFT ($operand_1, %operand_2) RSHIFT ($operand_1, %operand_2) After thenumber of available CPU cyclesoperation isdecreased by the amount specified in Chapter 9. Additionally, if the UDVM requests n bits of compressed data (using one of the INPUT instructions) thencomplete, thenumbervalue ofavailable CPU cycles is increased by n * cycles_per_bit. Notes: This means thatthetotal number of CPU cycles available for processing a compressed messagefirst operand isgiven byoverwritten with theformula: maximum_cycles = cycles_per_message + message_size * cycles_per_bit The reasonresult. (Note that since thistotaloperand isnot allocated to the UDVM whena reference, it isinvokedthe 2-byte word at the memory address specified by the operand that is overwritten.) The precise definitions of LSHIFT and RSHIFT are given below. Note that m and n are theUDVM can begin to decompress a message2-byte values encoded by the operands, and thathasfloor(x) calculates the largest integer not greater than x: LSHIFT (m, n) := m * 2^n (modulo 2^16) RSHIFT (m, n) := floor(m / 2^n) 9.1.2. Arithmetic The ADD, SUBTRACT, MULTIPLY, DIVIDE and REMAINDER instructions perform arithmetic on 2-byte words. ADD ($operand_1, %operand_2) Price, Hannu, et al. [Page24]36] INTERNET-DRAFTSigComp March 1, 2002 only been partially received. SoSignaling Compression 2002-05-06 SUBTRACT ($operand_1, %operand_2) MULTIPLY ($operand_1, %operand_2) DIVIDE ($operand_1, %operand_2) REMAINDER ($operand_1, %operand_2) After thetotal message size may not be known whenoperation is complete, theUDVMvalue of the first operand isinitialized. 4.)overwritten with the result. TheUDVM stops executing instructions when it encounters an END-MESSAGEprecise definition of each instructionor if decompressionis given below: ADD (m, n) := m + n (modulo 2^16) SUBTRACT (m, n) := m - n (modulo 2^16) MULTIPLY (m, n) := m * n (modulo 2^16) DIVIDE (m, n) := floor(m / n) REMAINDER (m, n) := m - n * floor(m / n) Decompression failureoccurs. Notes:occurs if a DIVIDE or REMAINDER instruction encounters an operand_2 that is zero. 9.1.3. Sorting TheUDVM passes uncompressed data toSORT-ASCENDING and SORT-DESCENDING instructions sort lists of 2-byte words. SORT-ASCENDING (%start, %n, %k) SORT-DESCENDING (%start, %n, %k) The start operand specifies thedispatcher usingstarting memory address of theOUTPUT instruction. The OUTPUT instruction can be usedblock of data tooutput a partially decompressed message; itbe sorted. The block of data itself is divided into n lists each containing k 2-byte words. The SORT-ASCENDING instruction applies adispatcher decision whethercertain permutation tousethedata immediately or whether to buffer and wait untillists, such that theentire message has been decompressed.first list is sorted into ascending order (treating each 2-byte word as an unsigned integer). TheUDVM passes state creation requests to the state handler using the END-MESSAGE instruction. This means that itsame permutation isonly possibleapplied tomake a state creation request onceall n lists, so lists other than themessage has been decompressed, which is necessary sincefirst will not necessarily be sorted into order. In theapplication typically determinescase that two words have thevalidity of these requests based onsame value, thecontentsoriginal ordering of thedecompressed message. 8.2. Decompression failure If a compressed message given to the UDVMlist iscorrupted (either accidentally or maliciously) then the UDVM may terminate with a decompression failure. Reasons for decompression failure include the following: * A compressed or uncompressed message exceeds the maximum size defined by the application. * The UDVM exceedspreserved. For example, theavailable CPU cycles for decompressingfirst list might contain amessage. * The UDVM attemptsset of integers toread a memory address beyond the overall memory size. * An unknown instruction type is encountered. * An unknown operand type is encountered. * An instruction is encountered that cannotbeprocessed successfully bysorted whilst theUDVM (for example a RETURN instruction when no CALL instruction has previously been encountered). * The UDVM attemptssecond list might be used toaccess non-existent state. * A manual decompression failure is triggered usingkeep track of where theDECOMPRESSION-FAILURE instruction.integers appear in the sorted list: Before sorting After sorting List 1 List 2 List 1 List 2 Price, Hannu, et al. [Page25]37] INTERNET-DRAFTSigComp March 1, 2002 If a decompression failure occurs when decompressingSignaling Compression 2002-05-06 8 1 1 2 1 2 1 3 1 3 3 4 3 4 8 1 The SORT-DESCENDING instruction behaves as above, except that the first list is sorted into descending order. 9.1.4. SHA-1 The SHA-1 instruction calculates amessage then20-byte SHA-1 hash [PUB-180-1] over the specified area of UDVMinformsmemory. SHA-1 (%position, %length, %destination) The position and length operands specify thedispatcherstarting memory address andtakes no further action. It istheresponsibilitylength of thedispatcherbyte string over which the SHA-1 hash is calculated. Byte copying rules are enforced as per Section 8.4. The destination operand gives the starting address todecide howwhich the resulting 20-byte hash will be copied. Byte copying rules are enforced as above. 9.2. Memory management instructions The following instructions are used tocope withset up thedecompression failure. In generalUDVM memory, and to copy byte strings from one memory location to another. 9.2.1. LOAD The LOAD instruction sets adispatcher SHOULD discard2-byte word to a certain specified value. The format of a LOAD instruction is as follows: LOAD (%address, %value) The first operand specifies the starting address of a 2-byte word, whilst the second operand specifies the value to be loaded into this word. As usual, MSBs are stored before LSBs in thecompressed message and any decompressed data that has been outputted. 9.UDVMinstruction setmemory. 9.2.2. MULTILOAD The MULTILOAD instruction sets a contiguous block of 2-byte words in the UDVMcurrently understands 30 instructions, chosenmemory tosupportspecified values. MULTILOAD (%address, #n, %value_0, ..., %value_n-1) The first operand specifies thewidest possible rangestarting address ofcompression algorithms withtheminimum possible overhead. Figure 10 listscontiguous 2-byte words, whilst thedifferent instructions andoperands value_0 through to value_n-1 Price, Hannu, et al. [Page 38] INTERNET-DRAFT Signaling Compression 2002-05-06 specify thebytecodevaluesusedtostoreload into these words (in theinstructions atsame order as they appear in theUDVM. The costinstruction). Decompression failure occurs if the set ofeach instruction in CPU cycles is also given: Instruction: Bytecode value: Cost in CPU cycles: DECOMPRESSION-FAILURE 0 1 AND 1 1 OR 2 1 NOT 3 1 ADD 4 1 SUBTRACT 5 1 MULTIPLY 6 1 DIVIDE 7 1 SORT-ASCENDING 8 1 + k * ceiling(log2(k)) SORT-DESCENDING 9 1 + k * ceiling(log2(k)) MD5 10 1 + length LOAD 11 1 MULTILOAD 12 1 + n COPY 13 1 + length COPY-LITERAL 14 1 + length COPY-OFFSET 15 1 + length + offset JUMP 16 1 COMPARE 17 1 CALL 18 1 RETURN 19 1 SWITCH 20 1 + n CRC 21 1 + length END-MESSAGE 22 1 + state length OUTPUT 23 1 + output_length NBO 24 1 INPUT-BYTECODE 25 1 + length INPUT-FIXED 26 1 INPUT-HUFFMAN 27 1 + n STATE-REFERENCE 28 1 + state_length STATE-EXECUTE 29 1 + state length Figure 10: UDVM2-byte words set by the instruction would overlap the memory locations held by the instruction (including its operands) itself, i.e., if the instruction would be self-modifying. (This restriction makes it simpler to implement MULTILOAD step-by-step instead of having to decode all operands before being able to copy data, as is implied by the conceptual model of instruction execution.) 9.2.3. PUSH and POP The PUSH and POP instructions read from andcorresponding bytecode values Price, Hannu, et al. [Page 26] INTERNET-DRAFT SigComp March 1, 2002 Eachwrite to the UDVM stack (as defined in Section 8.3). PUSH (%value) POP (%address) The PUSH instructioncostspushes the value specified by its operand on the stack. The POP instruction pops aminimumvalue from the stack and then copies the value to the specified memory address. (Note that the expression "and then" implies that the copying of1 CPU cycle. Certain high- level instructions may cost additional cycles depending onthe value is inconsequential for the stack operation itself, which happens beforehand.) See Section 8.3 for possible error conditions. 9.2.4. COPY The COPY instruction is used to copy a string of bytes from one part of theinstruction operands.UDVM memory to another. COPY (%position, %length, %destination) Theonly exception when calculatingposition operand specifies the memory address of the first byte in the string to be copied, and the length operand specifies the number ofCPU cyclesbytes to be copied. The destination operand gives the address to which the first byte in the string will be copied. Byte copying isthatperformed as per the rules of Section 8.4. 9.2.5. COPY-LITERAL A modified version of theSTATE-EXECUTECOPY instructiontakes (1 + state_length) cycles even though it does not haveis given below: Price, Hannu, et al. [Page 39] INTERNET-DRAFT Signaling Compression 2002-05-06 COPY-LITERAL (%position, %length, $destination) The COPY-LITERAL instruction behaves as astate_length operand; insteadCOPY instruction except that after copying is completed, the value of the destination operand is replaced by thevalueaddress to which the next byte ofstate lengthdata would be copied. More precisely it isprovidedreplaced by thestate handlervalue n, derived aspartper Section 8.4 with m set to the destination address of thestate being accessed. All instructions are stored as a singlelast byte toindicatebe copied, if any. 9.2.6. COPY-OFFSET A further version of the COPY-LITERAL instructiontype, followed by 0 or more bytes containing the operands required by the instruction.is given below: COPY-OFFSET (%offset, %length, $destination) The COPY-OFFSET instructionspecifies whichbehaves as a COPY-LITERAL instruction except that an offset operand is given instead of a position operand. To derive thethree operand typesvalue ofSection 7.2 is used in each case. For example,theADD instruction is followed by two operands as shown below: ADD ($operand_1, %operand_2) When converted into bytecodeposition operand, starting at thenumber of bytes requiredmemory address specified by destination, theADD instruction depends on the sizeUDVM counts backwards a total ofeach operand value, and whetheroffset memory addresses. If thesecond (multitype) operand containsmemory address specified in byte_copy_left is reached, theoperand value itself or anext memory addresswhereis taken to be (byte_copy_right - 1) modulo 2^16. The COPY-OFFSET instruction then behaves as a COPY-LITERAL instruction, taking theactualvalue of the position operandcanto befound. The instruction set available fortheUDVM offers a mix of low-level and high-level instructions. The high-level instructions can all be emulated usinglast memory address reached in thelow-level instructions provided, but given a choice it is generally preferable to use a single instruction rather than a large number of general-purpose instructions.above step. 9.2.7. MEMSET Theresulting bytecode will be more compact (leadingMEMSET instruction initializes an area of UDVM memory to ahigher overall compression ratio) and decompression will typically be faster because the implementationspecified sequence ofthe compression-specific instructions can be optimized for the UDVM. Eachvalues. The format of a MEMSET instruction isexplained in more detail below: 9.1. Mathematical instructionsas follows: MEMSET (%address, %length, %start_value, %offset) Thefollowing instructions provide a numbersequence ofmathematical operations including bit manipulation, arithmetic and sorting. 9.1.1. Bit manipulationvalues used by the MEMSET instruction is specified by the following formula: Seq[n] := (start_value + n * offset) modulo 256 TheAND, ORvalues Seq[0] to Seq[length - 1] inclusive are each interpreted as a single byte, andNOT instructions provide simple bit manipulation on 2-byte words. AND ($operand_1, %operand_2) OR ($operand_1, %operand_2) NOT ($operand_1) Afterthen concatenated to form a byte string where theoperation is complete,first byte has value Seq[0], the second byte has valueofSeq[1] and so on up to thefirst operandlast byte which has value Seq[length - 1]. The string isoverwritten withthen byte copied into the UDVM memory beginning at theresult. Note that since this operand is aPrice, Hannu, et al. [Page27]40] INTERNET-DRAFTSigComp March 1, 2002 reference, theSignaling Compression 2002-05-06 memory address specifiedby the operand is always overwritten and not theas an operanditself. 9.1.2. Arithmetic The ADD, SUBTRACT, MULTIPLY and DIVIDE instructions perform arithmetic on 2-byte words. ADD ($operand_1, %operand_2) SUBTRACT ($operand_1, %operand_2) MULTIPLY ($operand_1, %operand_2) DIVIDE ($operand_1, %operand_2) After the operation is complete,to thefirst operand is overwritten withMEMSET instruction, obeying theresult. Noterules of Section 8.4. (Note thatin all casesthearithmetic operation is performed modulo 2^16. So for example, subtracting 1 from 0 givesbyte string may overwrite theresult 65535. ForMEMSET instruction or its operands; as explained in section 8.5, theSUBTRACTMEMSET instruction must be executed as if thesecond operand is subtracted fromoriginal operands were still in place in thefirst. Similarly, forUDVM memory.) 9.3. Program flow instructions The following instructions alter theDIVIDEflow of UDVM code. Each instructionthe first operand is divided by the second operand.jumps to one of a number of memory addresses based on a certain specified criterion. Note that certain I/O instructions (see Section 9.4) can also alter program flow. 9.3.1. JUMP The JUMP instruction moves program execution to the specified memory address. JUMP (@address) Decompression failure occurs if thesecond operand does not divide exactly intovalue of thefirstaddress operandthenlies beyond theremainder is ignored. 9.1.3. Sortingoverall UDVM memory size. 9.3.2. COMPARE TheSORT-ASCENDINGCOMPARE instruction compares two operands andSORT-DESCENDING instructions sort liststhen jumps to one of2- byte words. SORT-ASCENDING (%start, %n, %k) SORT-DESCENDING (%start, %n, %k) The start operand specifies the startingthree specified memoryaddress ofaddresses depending on theblock of data to be sorted. The block of data itself is divided into n lists each containing k words. The SORT-ASCENDINGresult. COMPARE (%value_1, %value_2, @address_1, @address_2, @address_3) If value_1 < value_2 then the UDVM continues instructionapplies a certain permutationexecution at the memory address specified by address 1. If value_1 = value_2 then it jumps to thelists, such thataddress specified by address_2. If value_1 > value_2 then it jumps to thefirst list is sorted into ascending order (treating each data word as an integer).address specified by address_3. 9.3.3. CALL and RETURN Thesame permutation is applied to all n lists, so lists other thanCALL and RETURN instructions provide support for compression algorithms with a nested structure. CALL (@address) RETURN Both instructions use thefirst will not necessarily be sorted into order. For example,UDVM stack of Section 8.3. When thefirst list might containUDVM reaches aset of integers to be sorted, whilstCALL instruction, it finds thesecond list might be used to keep trackmemory address of theintegers: Before sorting After sorting List 1 List 2 List 1 List 2 8 1 1 2instruction immediately following the CALL instruction and pushes Price, Hannu, et al. [Page28]41] INTERNET-DRAFTSigComp March 1, 2002 1 2 1 3 1 3 3 4 3 4 8 1 InSignaling Compression 2002-05-06 this 2-byte value on thecase of two words of data withstack, ready for later retrieval. It then continues instruction execution at thesame value,memory address specified by theoriginal ordering ofaddress operand. When thelist is preserved.UDVM reaches a RETURN instruction it pops a value from the stack and then continues instruction execution at the memory address just popped. See Section 8.3 for error conditions. 9.3.4. SWITCH TheSORT-DESCENDINGSWITCH instructionbehaves as above, except thatperforms a conditional jump based on thefirst listvalue of one of its operands. SWITCH (#n, %j, @address_0, @address_1, ... , @address_n-1) When a SWITCH instruction issorted into descending order. 9.1.4. MD5encountered the UDVM reads the value of j. It then continues instruction execution at the address specified by address j. Decompression failure occurs if j specifies a value of n or more, or if the address lies beyond the overall UDVM memory size. 9.3.5. CRC TheMD5CRC instructioncalculates an MD5 hash oververifies a string of bytes using a 2-byte CRC. CRC (%value, %position, %length, @address) The actual CRC calculation is performed using the generator polynomial x^16 + x^12 + x^5 + 1, which coincides with thespecified area2-byte Frame Check Sequence (FCS) ofUDVM memory. MD5 (%position, %length, %destination)PPP [RFC-1662]. The position and length operands define the string of bytes over which theMD5 hashCRC iscalculated.evaluated. Byte copying rules are enforced as per Section7.3. The destination operand gives the starting address8.4. Note that since a CRC calculation is always performed over a bitstream, for interoperability it is necessary towhichdefine theresulting 16-byte hash will be copied. 9.2. Memory management instructions The following instructionsorder in which bits areused to manipulatesupplied within each individual byte. In this case theUDVM memory. Bytes can be copied from one area of memory to another, and areasMSBs ofmemory can be write-protected to make it easier for UDVM code tothe byte MUST always becompiled. 9.2.1. LOAD The LOAD instruction sets a 2-byte variablesupplied toa certain specified value. The format of a LOAD instruction is as follows: LOAD (%address, %value)the CRC calculation before the LSBs. Thefirstvalue operandspecifiescontains thestarting addressexpected integer value of the 2-bytevariable, whilstCRC. If thesecond operand specifiescalculated CRC matches the expected valueto be loaded into this variable. As usual, MSBs are stored before LSBs inthen the UDVMmemory. 9.2.2. MULTILOAD The MULTILOAD instruction sets a contiguous block of 2-byte variablescontinues at the following instruction. Otherwise the UDVM jumps tospecified values. MULTILOAD (%address, #n, %value_0, ..., %value_n-1) The first operand specifiesthestartingmemory addressof the contiguous variables, whilstspecified by theoperands value_0 through to value_n-1 specifyaddress operand. Price, Hannu, et al. [Page29]42] INTERNET-DRAFT Signaling Compression 2002-05-06 9.4. I/O instructions The following instructions allow the UDVM to interface with its environment. Note that in the overall SigCompMarch 1, 2002architecture all of these interfaces pass to thevaluesdecompressor dispatcher or toload into these variables (inthesame order as they appear instate handler. 9.4.1. DECOMPRESSION-FAILURE The DECOMPRESSION-FAILURE instruction triggers a manual decompression failure. This is useful if the UDVM bytecode discovers that it cannot successfully decompress the message (e.g. by using the CRC instruction).9.2.3. COPYThis instruction has no operands. 9.4.2. INPUT-BYTES TheCOPYINPUT-BYTES instructionis used to copyrequests astringcertain number of bytesfrom one partof compressed data from theUDVM memory to another. COPY (%position, %length, %destination)decompressor dispatcher. INPUT-BYTES (%length, %destination, @address) Theposition operand specifies the memory address of the first byte in the string to be copied, and thelength operandspecifiesindicates the requested number of bytesto be copied. Theof compressed data, and the destination operandgivesspecifies the starting memory address to whichthe first byte in the string willthey should be copied.Note that byteByte copying is performed as per the rules of Section7.3. 9.2.4. COPY-LITERAL A modified version8.4. If the instruction requests data that lies beyond the end of theCOPYSigComp message, no data is returned. Instead the UDVM moves program execution to the address specified by the address operand. If the INPUT-BYTES is encountered after an INPUT-BITS or an INPUT- HUFFMAN instruction has been used, and the dispatcher currently holds a fraction of a byte, then the fraction MUST be discarded before any data isgiven below: COPY-LITERAL (%position, %length, $destination)passed to the UDVM. The first byte to be passed is the byte immediately following the discarded data. 9.4.3. INPUT-BITS The INPUT-BITS instruction requests a certain number of bits of compressed data from the decompressor dispatcher. INPUT-BITS (%length, %destination, @address) The length operand indicates the requested number of bits. Decompression failure occurs if this operand does not lie between 0 and 16 inclusive. Price, Hannu, et al. [Page 43] INTERNET-DRAFT Signaling Compression 2002-05-06 TheCOPY-LITERAL instruction behaves as a COPY instruction except that after copying, thedestination operandis replaced withspecifies the memory addressimmediately following the addressto which thefinal byte wascompressed data should be copied.IfNote that thefinal byte was copiedrequested bits are interpreted as a 2-byte integer ranging from 0 tothe memory address specified2^length - 1, as explained inbyte_copy_right,Section 8.1. If thedestination operandinstruction requests data that lies beyond the end of the SigComp message, no data issetreturned. Instead the UDVM moves program execution to thememoryaddress specifiedin byte_copy_left. 9.2.5. COPY-OFFSET A further versionby the address operand. 9.4.4. INPUT-HUFFMAN The INPUT-HUFFMAN instruction requests a variable number of bits of compressed data from theCOPY-LITERALdecompressor dispatcher. The instruction initially requests a small number of bits and compares the result against a certain criterion; if the criterion isgiven below: COPY-OFFSET (%offset, %length, $destination)not met then additional bits are requested until the criterion is achieved. TheCOPY-OFFSETINPUT-HUFFMAN instructionbehavesis followed by three mandatory operands plus n additional sets of operands. Every additional set contains four operands asa COPY-LITERAL instruction exceptshown below: INPUT-HUFFMAN (%destination, @address, #n, %bits_1, %lower_bound_1, %upper_bound_1, %uncompressed_1, ... , %bits_n, %lower_bound_n, %upper_bound_n, %uncompressed_n) Note that if n = 0 then the INPUT-HUFFMAN instruction is ignored and program execution resumes at the following instruction. Decompression failure occurs if (bits_1 + ... + bits_n) > 16. In all other cases, the behavior of the INPUT-HUFFMAN instruction is defined below: 1. Set j := 1 and set H := 0. 2. Request bits_j compressed bits. Interpret the returned bits as anoffset operandinteger k from 0 to 2^bits_j - 1, as explained in Section 8.1. 3. Set H := H * 2^bits_j + k. 4. If data isgiven insteadrequested that lies beyond the end ofa position operand. To derive a suitable position operand, starting atthememory address specified by destination,SigComp message, terminate theUDVM counts backwards a total of offset memory addresses. IfINPUT-HUFFMAN instruction and move program execution to the memory address specifiedin byte_copy_left is reached,by thenext memoryaddressis taken to be byte_copy_right. The COPY-OFFSET instructionoperand. 5. If (H < lower_bound_j) or (H > upper_bound_j) thenbehaves as a COPY-LITERAL instruction, taking the position operandset j := j + 1. Then go back tobe the last memory address reachedStep 2, unless j > n in which case decompression failure occurs. 6. Copy (H + uncompressed_j - lower_bound_j) modulo 2^16 to theabove step.Price, Hannu, et al. [Page30]44] INTERNET-DRAFTSigComp March 1, 2002 9.3. Program flow instructionsSignaling Compression 2002-05-06 memory address specified by the destination operand. 9.4.5. STATE-ACCESS Thefollowing instructions alterSTATE-ACCESS instruction retrieves some previously stored state information. STATE-ACCESS (%partial_identifier_start, %partial_identifier_length, %state_begin, %state_length, %state_address, %state_instruction) The partial_identifier_start and partial_identifier_length operands specify theflowlocation ofUDVM code. Each instruction jumpsthe partial state identifier used toone of a number of memory addresses based on a certain specified criterion. Note that all ofretrieve theinstructions givestate information. This identifier has thememory addressessame function as the partial state identifier transmitted in theformSigComp message as per Section 7.2. Decompression failure occurs if partial_identifier_length does not lie between 6 and 20 inclusive. Decompression failure also occurs if no state item matching the partial state identifier can be found, if more than one state item matches the partial identifier, or if partial_identifier_length is less than the minimum_access_length ofdeltas relative tothememory addressmatched state item. Otherwise, a state item is returned from the state handler. If any of theinstruction. The actual memory addressoperands state_address, state_instruction or state_length iscalculated as follows: memory_address = (memory_address_of_instruction + delta) modulo 2^16 Note that certain I/O instructions (see Section 9.4) can also alter program flow. 9.3.1. JUMP The JUMP instruction moves program executionset to 0 then its value is taken from thespecified memory address. JUMP (%delta)returned item of state instead. Note thatifwhen calculating theaddress (specified as a deltanumber of UDVM cycles the STATE-ACCESS instruction costs (1 + state_length) cycles. The value of state_length MUST be taken from theaddressreturned item of state in theJUMP instruction) lies beyondcase that theoverall UDVM memory size then decompression failure occurs. 9.3.2. COMPAREstate_length operand is set to 0. TheCOMPARE instruction compares twostate_begin and state_length operands define the starting byte andthen jumps to onenumber ofthree specified memory addresses depending onbytes to copy from theresult. COMPARE (%operand_1, %operand_2, %delta_1, %delta_2, %delta_3) If operand_1 < operand_2 thenstate_value contained in theUDVM continues instruction execution atreturned item of state. Decompression failure occurs if bytes are copied from beyond the(relative) memory address specified by delta 1. If operand_1 = operand_2 then it jumps toend of theaddress specified by delta_2. If operand_1 > operand_2 then it jumpsstate_value. Note that decompression failure will always occur if the state_length operand is set to 0 but theaddress specified by delta_3. 9.3.3. CALL and RETURNstate_begin operand is non-zero. TheCALL and RETURN instructions provide support for compression algorithms withstate_address operand contains anested structure. CALL (%delta) RETURNUDVM memory address. TheCALL and RETURN instructions make userequested portion ofa stackthe state_value is byte copied to this memory address using the rules of2-byte variables storedSection 8.4. Program execution then resumes at the memory address specified by state_instruction, unless this address is 0 in which case program execution resumes at thewell-known variable stack_location. The stack contains thenext instruction followingvariables:the STATE-ACCESS instruction. Note that the latter case only occurs if both the Price, Hannu, et al. [Page31]45] INTERNET-DRAFTSigComp March 1, 2002 Name: Starting memory address: stack_free stack_location stack[0] stack_location + 2 stack[1] stack_location + 4 stack[2] stack_location + 6 : : The MSBs of these variables are stored before the LSBs inSignaling Compression 2002-05-06 state_instruction operand and theUDVM memory. Whenstate_instruction value from theUDVM reaches a CALL instruction, it findsrequested state are set to 0. 9.4.6. STATE-CREATE The STATE-CREATE instruction requests thememory addresscreation of a state item at theinstruction immediately followingreceiving endpoint. STATE-CREATE (%state_length, %state_address, %state_instruction, %minimum_access_length, %state_retention_priority) Note that theCALL instruction and copies this 2-byte value into stack[stack_free] ready for later retrieval. It then increases stack_freenew state item cannot be created until a valid compartment identifier has been returned by1 and continuesthe application. Consequently, when a STATE-CREATE instructionexecution atis encountered the(relative) memory address specified byUDVM simply buffers theoperand. Whenfive supplied operands until theUDVM reaches a RETURN instruction it decreases stack_free by 1, and then continuesEND-MESSAGE instructionexecutionis reached. The steps taken atthe byte position storedthis point are described instack[stack_free]. IfSection 9.4.9. Decompression failure must occur if more than four state creation requests are made before thevariable stack_freeEND-MESSAGE instruction isever increased beyond 65535 or decreased below 0 then a bad compressed message has been received and decompression failure occurs (see Section 8.2).encountered. Decompression failure also occurs ifone oftheabove instructions is encounteredminimum_access_length does not lie between 6 and 20 inclusive, or if the state_retention_priority is 65535. 9.4.7. STATE-FREE The STATE-FREE instruction informs thevalue of stack_location is smaller than 6 (this preventsreceiving endpoint that thestack from overwritingsender no longer wishes to use a particular state item. STATE-FREE (%partial_identifier_start, %partial_identifier_length) Note that thewell-known variables). 9.3.4. SWITCH The SWITCHSTATE-FREE instructionperformsdoes not automatically delete aconditional jump based onstate item, but instead reclaims thevalue of one of its operands. SWITCH (#n, %j, %delta_0, %delta_1, ... , %delta_n-1) Whenmemory taken by the state item within aSWITCHcertain compartment, which is generally not known before the END-MESSAGE instruction is reached. So just as for the STATE-CREATE instruction, when a STATE-FREE instruction is encountered the UDVMreadssimply buffers thevalue of j. It then continuestwo supplied operands until the END-MESSAGE instructionexecutionis reached. The steps taken at this point are described in Section 9.4.9. Decompression failure must occur if more than 4 state free requests are made before the(relative) address specified by delta j. If j specifies a value of n or more, a bad compressed message has been received and decompressionEND-MESSAGE instruction is encountered. Decompression failureoccurs. 9.3.5. CRCalso occurs if partial_identifier_length does not lie between 6 and 20 inclusive. 9.4.8. OUTPUT TheCRCOUTPUT instructionverifies a string of bytes using a 2-byte CRC. CRC (%value, %position, %length, %delta)provides successfully decompressed data to the Price, Hannu, et al. [Page32]46] INTERNET-DRAFTSigComp March 1, 2002 The actual CRC calculation is performed using the generator polynomial x^16 + x^12 + x^5 + 1, which coincides with the 2-byte Frame Check Sequence (FCS) of [RFC-1662]. The position and length operands define the string of bytes over which the CRC is evaluated. Byte copying rules are enforced as per Section 7.3. Important note: Since a CRC calculation is always performed over a bitstream, for interoperability it is necessary toSignaling Compression 2002-05-06 dispatcher. OUTPUT (%output_start, %output_length) The operands define theorder in which bits are supplied within each individual byte. In this case the MSBsstarting memory address and length of the byteMUSTstring to besuppliedprovided to theCRC calculation beforedispatcher. Note that theLSBs. The value operand containsOUTPUT instruction can be used to output a partially decompressed message; each time theexpected integer value ofinstruction is encountered it provides a new byte string that the2-byte CRC. Ifdispatcher appends to thecalculated CRC matchesend of any bytes previously passed to theexpected value thendispatcher via the OUTPUT instruction. The string of data is byte copied from the UDVMcontinuesmemory obeying the rules of Section 8.4. Decompression failure occurs if the cumulative number of bytes provided to the dispatcher exceeds 65536 bytes. Since there is technically a difference between outputting a 0-byte decompressed message, and not outputting a decompressed message at all, thefollowing instruction. OtherwiseOUTPUT instruction needs to distinguish between the two cases. Thus, if the UDVMjumpsterminates before encountering an OUTPUT instruction it is considered not to have outputted a decompressed message. If it encounters one or more OUTPUT instructions, each of which provides 0 bytes of data to the(relative) memory address specified by delta. 9.4. I/O instructionsdispatcher, then it is considered to have outputted a 0-byte decompressed message. 9.4.9. END-MESSAGE Thefollowing instructions allowEND-MESSAGE instruction successfully terminates the UDVM and forwards the state creation and state free requests tointerfacethe state handler together withits environment. Note that inany supplied feedback data. END-MESSAGE (%requested_feedback_location, %returned_parameters_location, %state_length, %state_address, %state_instruction, %minimum_access_length, %state_retention_priority) When theoverall SigComp architecture all of these interfaces pass toEND-MESSAGE instruction is encountered, the decompressor dispatcherorindicates to thestate handler. 9.4.1. END-MESSAGEapplication that a complete message has been decompressed. TheEND-MESSAGE instruction successfully terminatesapplication may return a compartment identifier, which the UDVMand passes state informationforwards to the statehandler. END-MESSAGE (%hash_length, %state_start, %state_length, %state_instruction, %announcement_location) Note thathandler together with the state creation and state free requests and any supplied feedback data. The actualuncompresseddecompressed message is outputted separately using the OUTPUT instruction; this conserves memory at the UDVM because there is no need to buffer an entireuncompresseddecompressed message before it can be passed to the dispatcher.Note that if the announcement_location operand is set to 0 then no announcement information is provided, otherwise it points to the starting memory address of the announcement information as per Section 6.3.Price, Hannu, et al. [Page 47] INTERNET-DRAFT Signaling Compression 2002-05-06 The END-MESSAGE instructionrequests the creation of state using the operands state start andmay pass up to four statelength, which together denote a byte string state_value. Provided that the application gives permission, state_value is byte copied from the UDVM memory (obeying the rules of Section 7.3)creation requests andstored together with a 16-byteup to four stateidentifier that can be usedfree requests toaccessthe stateby a later compressed message. Price, Hannu, et al. [Page 33] INTERNET-DRAFT SigComp March 1, 2002 To provide security against malicious access,handler. The requests are passed to theidentifier for any item ofstatecreated byhandler in theUDVMsame order as they are made; in particular it isderived from the [MD5] hash ofpossible for thestate_value to be stored. Thestateidentifier is constructed by taking the 16-byte [MD5] hashcreation requests andreplacing all but the first hash_length most significant bytes with zeroes. Note that if hash_length is 16 then the unmodified [MD5] hash is the state identifier. Decompression failure occurs if hash_length is less than the application-defined parameter minimum_hash_size or greater than 16. If a state identifier already exists (hash collision occurs), the decompressor should check whethertherequested state is identicalstate free requests to be interleaved. The state creation requests are made by theestablished state, and countSTATE-CREATE instruction. Note however that the END-MESSAGE can make one state creation requestas successful if this isitself using thecase.supplied operands. If the specified minimum_access_length does not lie between 6 and 20 inclusive, or if the state_retention_priority is 65535 then the END-MESSAGE instruction fails to make a state creation requestis unsuccessful. The existing state MUST NOT be replaced withof its own (however decompression failure does not occur and therequestedstateto be saved. This is to avoidcreation requests made by thesituation where a compressed message cannot be decompressed becauseSTATE-CREATE instruction are still valid). Note that there is aneeded itemmaximum limit of four statehas been replaced (possibly by a malicious sender). 9.4.2. DECOMPRESSION-FAILURE The DECOMPRESSION-FAILURE instruction triggers a manualcreation requests per instance of the UDVM. Therefore, decompressionfailure. This is usefulfailure occurs if theUDVM program discovers that it cannot successfully decompress the message (e.g. by using the CRC instruction). This instruction has no operands. 9.4.3. OUTPUT The OUTPUTEND-MESSAGE instructionprovides successfully decompressed data to the dispatcher. OUTPUT (%output_start, %output_length) The operands define the starting memory addressmakes a state creation request andlengthfour instances of thebyte string to be provided to the dispatcher. Note that the OUTPUTSTATE-CREATE instructioncan be used to outputhave already been encountered. When creating apartially decompressed message; each time the instruction is encounteredstate item itappends a byte stringis necessary to give theend of the data previously passed tostate_length, state address, state_instruction and minimum_access_length; these are supplied as operands in thedispatcher viaSTATE-CREATE instruction (or theOUTPUT instruction.END- MESSAGE instruction). A complete item of state also requires a state_value and a state_identifier, which are derived as follows: The UDVM byte copies a string ofdata is byte copiedstate_length bytes from the UDVM memoryobeyingbeginning at state_address (obeying the rules of Section7.3. Decompression failure occurs if8.4). This is thecumulative number of bytes provided tostate_value. The UDVM then calculates a 20-byte SHA-1 hash [PUB-180-1] over thedispatcher exceedsbyte string formed by concatenating theapplication-defined parameter maximum_uncompressed_size. Price, Hannu, et al. [Page 34] INTERNET-DRAFT SigComp March 1, 2002 Since there is technically a difference between outputting a 0-byte decompressed message,state_length, state_address, state_instruction, minimum_access_length and state_value (in the order given). This is the state_identifier. The state_retention_priority is notoutputting a decompressed message at all,part of theOUTPUT instruction needs to distinguish betweenstate item itself, but instead determines thetwo cases. Thus, iforder in which state will be deleted when theUDVM terminates before encounteringcompartment exceeds its allocated state memory. The state_retention_priority is supplied as anOUTPUToperand in the STATE- CREATE or END-MESSAGE instructionitand isconsidered notpassed tohave outputtedthe state handler as part of each state creation request. The state free requests are made by the STATE-FREE instruction. Each STATE-FREE instruction supplies the values partial_identifier_start and partial_identifier_length; upon reaching the END-MESSAGE instruction these values are used to byte copy adecompressed message.partial state identifier from the UDVM memory. Ifit encounters oneno state item matching the Price, Hannu, et al. [Page 48] INTERNET-DRAFT Signaling Compression 2002-05-06 partial state identifier can be found or if moreOUTPUT instructions, each of which provides 0 bytes of data tothan one state item in thedispatcher,compartment matches the partial state identifier thenitthe state free request isconsideredignored (this does not cause decompression failure tohave outputted a 0-byte decompressed message. 9.4.4. NBO The NBO instruction modifiesoccur). Otherwise, theorder in which compressed bits are passed tostate handler frees theUDVM.matched state item as specified in Section 6.2. As well as forwarding theINPUT-FIXEDstate creation andINPUT-HUFFMAN instructions read individual bits from within a byte, to avoid ambiguity it is necessarystate free requests, the END-MESSAGE instruction may also pass feedback data todefinetheorder in which these bits are read. The default operationstate handler. Feedback data is used toreadinform theMSBs beforereceiving endpoint about theLSBs, but ifcapabilities of theNBO instruction is encountered thensending endpoint, which can help to improve theLSBs are read beforeoverall compression ratio and to reduce theMSBs. Both casesworking memory requirements of the endpoints. Two types of feedback data areillustrated below: MSB LSB MSB LSB MSB LSB MSB LSB +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 2 3 4 5 6 7|8 9 ... | |7 6 5 4 3 2 1 0| ... 9 8| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Byte 0 Byte 1 Byte 0 Byte 1 Default operation After NBO instructionavailable: requested feedback and returned feedback. TheNBO instructionformat of the requested feedback data is given in Figure 12. As outlined in Section 3.2, the requested feedback data canonlybe usedbefore bitwise compressed data is passedto influence theUDVM. Therefore,contents of the returned feedback data in the reverse direction. The returned feedback data is itself subdivided into adecompression failure occurs if itreturned feedback item and a list of returned SigComp parameters. The returned feedback item isencountered after an INPUT-FIXED or an INPUT-HUFFMAN instruction has been used. 9.4.5. INPUT-BYTECODEof sufficient importance to warrant its own field in the SigComp header as described in Section 7.1. TheINPUT-BYTECODE instruction requests a certain numberreturned SigComp parameters are illustrated in Figure 13. Note that the formats ofbytesFigure 12 and Figure 13 are only for local presentation ofcompressedthe feedback datafromon thedispatcher. INPUT-BYTECODE (%length, %destination, %delta) The length operand indicatesinterface between therequested number of bytes of compressed data,UDVM and state handler. The formats do not mandate any bits on thedestination operand specifieswire; thestarting memory address to which they should be copied. Byte copyingcompressor can transmit the data in any form provided that it isperformed as perloaded into therules of Section 7.3. IfUDVM memory at theinstruction requests datacorrect addresses. Moreover, the responsibility for ensuring that feedback data arrives successfully over an unreliable transport liesbeyondwith theendsender. The receiving endpoint always uses the last received value for each field in the feedback data, even if the values are out of date due to packet loss or misordering. If thecompressed message,requested_feedback_location operand is set to 0 then nodatafeedback request isreturned. Insteadmade; otherwise it points to theUDVM movesstarting memory address of the requested feedback data as shown in Figure 12. 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | reserved | Q | S | I | requested_feedback_location +---+---+---+---+---+---+---+---+ | | : requested feedback item : if Q = 1 | | Price, Hannu, et al. [Page35]49] INTERNET-DRAFTSigComp March 1, 2002 program execution to the memory address specified by the formula (memory_address_of_INPUT-BYTECODE_instruction + delta) modulo 2^16. The INPUT-BYTECODE instruction can only be used before bitwise compressedSignaling Compression 2002-05-06 +---+---+---+---+---+---+---+---+ Figure 12: Format of requested feedback datais passed to the UDVM. Therefore, a decompression failure occurs if it is encountered after an INPUT-FIXED or an INPUT- HUFFMAN instruction has been used. 9.4.6. INPUT-FIXEDTheINPUT-FIXED instruction requests a certain number ofreserved bits may be used in future versions ofcompressed data fromSigComp, and are set to 0 in Version 0x01. Non-zero values should be ignored by thedispatcher. INPUT-FIXED (%length, %destination, %delta)receiving endpoint. Thelength operandQ-bit indicatesthe requested number of bits. If this operand does not lie between 1 and 16 inclusive thenwhether adecompression failure occurs.requested feedback item is present or not. Thedestination operand specifiescompressor can set thememory addressrequested feedback item to an arbitrary value, whichthe compressed data shouldwill then becopied. Note thattransmitted unmodified in therequested bits are interpretedreverse direction as a2-byte integer ranging from 0 to 2^length - 1. Under default operation the MSBs of this integer are provided first, but if an NBO instruction has been executed then the LSBs are provided first. If the instruction requests data that lies beyond the endreturned feedback item. See Chapter 5 for further details of how thecompressed message, no datarequested feedback item is returned.InsteadThe format of theUDVM moves program executionrequested feedback item is identical to thememory address specified by the formula (memory_address_of_INPUT-FIXED_instruction + delta) modulo 2^16. 9.4.7. INPUT-HUFFMAN The INPUT-HUFFMAN instruction requests a variable number of bitsformat ofcompressed data fromthedispatcher.returned feedback item illustrated in Figure 4. Theinstruction initially requests a small number of bits and comparescompressor sets theresult against a certain criterion;S-bit to 1 ifthe criterion isit does notmet then additional bits are requested untilwish (or no longer wishes) to save state information at thecriterion is achieved. The INPUT-HUFFMAN instruction is followed by three mandatory operands plus n additional sets of operands. Every additional set contains four operands as shown below: INPUT-HUFFMAN (%destination, %delta, #n, %bits_1, %lower_bound_1, %upper_bound_1, %uncompressed_1, ... , %bits_n, %lower_bound_n, %upper_bound_n, %uncompressed_n) Notereceiving endpoint and also does not wish to access state information that it has previously saved. Consequently, ifn = 0 thentheINPUT-HUFFMAN instructionS-bit isignored by the UDVM. If bits_1 = 0 or (bits_1 + ... + bits_n) > 16set to 1 thendecompression failure occurs. Price, Hannu, et al. [Page 36] INTERNET-DRAFT SigComp March 1, 2002 In all other cases,thebehavior ofreceiving endpoint can reclaim theINPUT-HUFFMAN instruction is defined below: 1.) Set j = 1. 2.) Request an additional bits_j compressed bits. Interpretstate memory allocated to thetotal (bits_1 + ... + bits_j) bits of compressed data requested so far as an integer H, withremote compressor and set thefirst bit to be supplied asstate_memory_size for theMSBcompartment to 0. The compressor may change its mind and switch thelast bitS-bit back tobe supplied as0 in a later message. However, theLSB (note that thisreceiving endpoint isalwaysunder no obligation to use thecase, independently of whetheroriginal state_memory_size for theNBO instruction has been used). 3.) If data is requested that lies beyondcompartment; it may choose to allocate less memory to theendcompartment or possibly none at all. Similarly the compressor sets the I-bit to 1 if it does not wish (or no longer wishes) to access any of thecompressed message, terminatelocally available state items offered by theINPUT-HUFFMAN instruction and move program executionreceiving endpoint. This can help to conserve bandwidth because the list of locally available state items no longer needs to be returned in the reverse direction. It may also conserve memoryaddress specifiedat the receiving endpoint, as the state handler can delete any locally available state items that it determines are no longer required by any remote endpoint. Note that the compressor can set the I-bit back to 0 in a later message, but it cannot access any locally available state items that were previously offered by theformula (memory_address_of_INPUT-HUFFMAN_instruction + delta) modulo 2^16. 4.)receiving endpoint unless they are subsequently re-announced. If(H < lower_bound_j) or (H > upper_bound_j) thenthe returned_parameters_location operand is setj = j + 1. Then go backtoStep 2, unless j > n in which case decompression failure occurs. 5.) Copy (H + uncompressed_j - lower_bound_j) modulo 2^160 then no SigComp parameters are returned; otherwise it points to the starting memory addressspecified byof thedestination operand. 9.4.8. STATE-REFERENCE The STATE-REFERENCE instruction retrieves some previously stored state information. STATE-REFERENCE (%id_start, %id_length, %state_start, %state_length, %state_destination)returned parameters as shown in Figure 13. 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ Price, Hannu, et al. [Page 50] INTERNET-DRAFT Signaling Compression 2002-05-06 | cpb | dms | sms | returned_parameters_location +---+---+---+---+---+---+---+---+ | SigComp_version | +---+---+---+---+---+---+---+---+ | length_of_partial_state_ID_1 | +---+---+---+---+---+---+---+---+ | | : partial_state_identifier_1 : | | +---+---+---+---+---+---+---+---+ : : +---+---+---+---+---+---+---+---+ | length_of_partial_state_ID_n | +---+---+---+---+---+---+---+---+ | | : partial_state_identifier_n : | | +---+---+---+---+---+---+---+---+ Figure 13: Format of returned SigComp parameters Theid_startfirst byte encodes the SigComp parameters cycles_per_bit, decompression_memory_size andid_length operands specifystate_memory_size as per Section 3.3.1. The byte can be set to 0 if thelocation ofthree parameters are not included in thestate identifier usedfeedback data. (This may be useful toretrievesave bits in thestate information. The state identifier is always 16 bytes long;compressed message, ifid_length is less than 16 then the remaining least significant bytes oftheidentifier are padded with zeroes. Decompression failure occurs if id_lengthremote endpoint isgreater than 16. Decompression failure also occurs if no state information matching the state identifier can be found. Note that when accessing statealready satisfied all necessary informationthathasbeen previously created by the UDVM,reached thestate identifier is always taken from an [MD5] hash ofendpoint receiving thestate to be retrieved. However this is not necessarilymessage.) The second byte encodes thecase for application-defined stateSigComp_version as per Section3.2. The state_start and state_length operands define3.3.2. Similar to thestartingfirst byte, the second byteand number of bytescan be set tocopy from0 if thestate_value containedparameter is not included in theidentified itemfeedback data. The remaining bytes encode a list ofstate. If morepartial stateis requested than is actuallyidentifiers for the locally availablethen decompression failure occurs. Price, Hannu, et al. [Page 37] INTERNET-DRAFT SigComp March 1, 2002 The state_destination operand contains a UDVM memory address. The requestedstateis byte copied to this memory address usingitems offered by therules of Section 7.3. 9.4.9. STATE-EXECUTE The STATE-EXECUTE instruction retrieves and runs some previously storedsending endpoint. Each stateinformation. STATE-EXECUTE (%id_start, %id_length) The id_start and id_length operands functionitem is encoded aspera 1-byte length field, followed by a partial state identifier containing as many bytes as indicated in theSTATE- REFERENCE instruction. STATE-EXECUTE is similarlength field. The sender can choose toSTATE-REQUEST except thatsend as few as 6 bytes if itdoes not require the amount of state being requested or the proposed destinationbelieves that this is sufficient for thestatereceiver tobe specified explicitly. Instead, it simply puts the state_value back into the UDVM memory using the operands state_start and state_length contained as part of thedetermine which stateinformation.item is being offered. Theentire state_value (all state length byteslist ofit)state identifiers is terminated by a bytecopied intoin thememory address specified by state start. The UDVM then jumps toposition where the(absolute) memory address specified by state_instruction. Note that state start, statenext lengthand state_instruction are all stored together with state_value as part of an itemfield would be expected that is set to a value below 6 or above 20. Note that upgraded SigComp versions may append additional items ofstate information.data after the final length field. 10. Security considerations Price, Hannu, et al. [Page 51] INTERNET-DRAFT Signaling Compression 2002-05-06 10.1. Security goals The overall security goal of the SigComp architecture is to not create risks that are in addition to those already present in the application protocols. There is no intention for SigComp to enhance the security of theprotocols,application, as it always can be circumvented by not using compression. More specifically, the high-level security goals can be described as:-- do1. Do not worsen security of existing application protocol-- do2. Do not create any new security issues-- do3. Do not hinder deployment of application securityPrice, Hannu, et al. [Page 38] INTERNET-DRAFT SigComp March 1, 200210.2. Security risks andmitigationsmitigation Thissubsectionsection identifies the potential security risks associated withthe overall SigComp architecture,SigComp, anddetails the proposed solution forexplains how eachrisk. **risk is minimized by the scheme. 10.2.1. Confidentiality risks***- Attacking SigComp by snooping into state of otherusersusers: Statecan only beis accessedusingby supplying a state identifier, which is a(prefix of a)cryptographic hash of the state being referenced. This implies that the referencingpacketmessage already needs knowledge about the state. To enforce this, areference lengthstate item cannot be accessed without supplying a minimum of7248 bitsis defined.from the hash. This also minimizes the probability of an accidental state collision. A compressor can, using the minimum_access_length operand of the STATE-CREATE and END-MESSAGE instructions, increase the number of bits that need to be supplied to access the state, increasing the protection against attacks. Generally, ways to obtain knowledge about the state identifier (e.g., passive attacks) will also easily provide knowledge about thestate referenced,referenced state, so no new vulnerability results.The applicationAn endpoint needs to handle state identifiers with the same care it would handle the state itself.**10.2.2. Integrity risks The SigComp approach assumes that there is appropriate integrity protection below and/or above the SigComp layer.However, theThe stateestablishmentcreation mechanism provides some additional potential to compromise the integrity of themessages (which, however,messages; however this would most likely be detectable at the applicationlayer). ***layer. Price, Hannu, et al. [Page 52] INTERNET-DRAFT Signaling Compression 2002-05-06 - Attacking SigComp by faking state or making unauthorized changes tostatestate: State cannot be destroyedor changedby a malicious sender--unless it can send messages that the application identifies as belonging to the same compartment the state was created under; this adds additional security risks onlyadd new state.when the application allows the installation of SigComp state from a message where it would not have installed state itself. Faking or changing state is only possible if the hash allows intentional collision.**10.2.3. Availability risks(avoid(avoiding DoS vulnerabilities)***- Use of SigComp as a tool in a DoS attack to anothertargettarget: SigComp cannot easily be used as an amplifier in a reflection attack, as it only generates one decompressed message per incoming compressed message. Thispacketmessage is then handed to the application; the utility as a reflection amplifier is therefore limited by the utility of theapplication.application for this purpose. However, it must be noted that SigComp can be used to generate largerpacketsmessages as input to the application than have to be sent from thePrice, Hannu, et al. [Page 39] INTERNET-DRAFT SigComp March 1, 2002malicious sender; this therefore can send smallerpacketsmessages (at a lower bandwidth) than are delivered to the application. Depending on the reflection characteristics of the application, this can be considered a mild form of amplification. The application MUST limit the number of packets reflected to a potential target--- even if SigComp is used to generate a large amount of information from a small incoming attack packet.***- Attacking SigComp as the DoS target by filling it withstatestate: Excessive state can only be installed by a malicious sender (or a set of malicious senders) with the consent of the application. The system consisting of SigComp and application is thus approximately as vulnerable as the application itself, unless it allows the installation of SigComp state from a message where it would not have installed application state itself. If this is desirable to increase the compression ratio, the effect can be mitigated byaddingmaking use of feedback at the application level that indicates whether the state requested was actually installed-- This- this allows asystem under attack to gracefully degrade by no longer installing compressorsystem under attack to gracefully degrade by no longer installing compressor state that is not matched by application state. Price, Hannu, et al. [Page 53] INTERNET-DRAFT Signaling Compression 2002-05-06 Obviously, if a stream-based transport is used, the streams themselves constitute state that has to be handled in the same way that the application itself would handle a stream-based transport; if an application is notmatchedequipped for stream-based transport, it should not allow SigComp connections on a stream-based transport. For the alternative SigComp usage described as "continuous mode" in section 4.2.1, an attacker could create any number of active UDVMs unless there is some DoS protection at a lower level (e.g., byapplication state. ***using TLS in appropriate configurations). - Attacking the UDVM by faking state or making unauthorized changes tostate (See "Integrity risks" above.) ***state: This is covered in Section 10.2.2. - Attacking the UDVM by sending it loopingcodecode: The application sets an upper limit to the number of"CPU"UDVM cycles" that can be used per compressed message and per input bit in the compressed message. The damage inflicted by sending packets with looping code is therefore limited, although this may still be substantial if a large number ofCPUUDVM cycles are offered by the UDVM. However, this would be true for any decompressor that can receive packetsfrom anywhere.over an unsecured transport. 11. IANA considerationsTheSigCompsolution currentlyrequirestwo identifiersa 1-byte name space, the SigComp_version, to beassignedcreated byIANA: the UDVM_version andthestate identifier.IANA. Upgraded versions ofthe UDVM will containSigComp must be backwards- compatible with version 0x01, described in this document. Adding additional UDVM instructions and assigning values toimprove the performance oftheoverall SigComp solution; new UDVM_version parameters will be needed inreserved UDVM memory addresses are two possible upgrades for which this is the case. Following the policies outlined in [RFC-2434], the IANA policy for assigning a new value for the SigComp_version shall require a Standards Action. Values are thus assigned only for Standards Track RFCs approved by the IESG. 12. Acknowledgements Thanks toPrice, Hannu, et al. [Page 40] INTERNET-DRAFT SigComp March 1, 2002Abigail Surtees(abigail.surtees@roke.co.uk)Mark A West(mark.a.west@roke.co.uk)Lawrence Conroy(lwc@roke.co.uk)Price, Hannu, et al. [Page 54] INTERNET-DRAFT Signaling Compression 2002-05-06 Christian Schmidt(christian.schmidt@icn.siemens.de)Max Riegel(maximilian.riegel@icn.siemens.de)Lars-Erik Jonsson(lars-erik.jonsson@epl.ericsson.se)Stefan Forsgren(stefan.forsgren@epl.ericsson.se)Krister Svanbro(krister.svanbro@epl.ericsson.se)Miguel Garcia(miguel.a.garcia@ericsson.com)Christopher Clanton(christopher.clanton@nokia.com)Khiem Le(khiem.le@nokia.com)Ka Cheong Leung(kacheong.leung@nokia.com)Robert Sugar for valuable input and review. 13. Authors' addresses Richard Price Tel: +44 1794 833681 Email: richard.price@roke.co.uk Roke Manor Research Ltd Romsey, Hants, SO51 0ZN United Kingdom Hans Hannu Tel: +46 920 20 21 84 Email: hans.hannu@epl.ericsson.se Box 920 EricssonErisoftAB SE-971 28 Lulea, Sweden Carsten Bormann Tel: +49 421 218 7024 Email: cabo@tzi.org Universitaet Bremen TZI Postfach 330440 D-28334 Bremen, Germany Jan Christoffersson Tel: +46 920 20 28 40 Email: jan.christoffersson@epl.ericsson.se Box 920 EricssonErisoftAB SE-971 28 Lulea, SwedenPrice, Hannu, et al. [Page 41] INTERNET-DRAFT SigComp March 1, 2002Zhigang Liu Tel: +1 972 894-5935 Price, Hannu, et al. [Page 55] INTERNET-DRAFT Signaling Compression 2002-05-06 Email: zhigang.liu@nokia.com Nokia Research Center 6000 Connection Drive Irving, TX 75039 USA Jonathan Rosenberg Email: jdrosen@dynamicsoft.com dynamicsoft 72 Eagle Rock Avenue First Floor East Hanover, NJ 07936 14. References[SIP] "SIP: Session Initiation Protocol", Handley14.1. Normative References [RFC-1662] "PPP in HDLC-like Framing", Simpson et al, Internet Engineering Task Force, July 1994 [RFC-2119] "Key words for use in RFCs to Indicate Requirement Levels", Scott Bradner, Internet Engineering Task Force, March 1997 [PUB-180-1] "FIPS PUB 180-1: Secure Hash Standard", NIST, April 1995 14.2. Informative References [RFC-1951] "DEFLATE Compressed Data Format Specification version 1.3", P. Deutsch, RFC2543,1951, Internet Engineering Task Force,March 1999 [RTSP]May 1996 [RFC-2026] "The Internet Standards Process - Revision 3", Scott Bradner, Internet Engineering Task Force, October 1996 [RFC-2279] "UTF-8, a transformation format of ISO 10646", F. Yergeau, Internet Engineering Task Force, January 1998 [RFC-2326] "Real Time Streaming Protocol (RTSP)", H. Schulzrinne, A. Rao and R. Lanphier, , RFC 2326, April 1998[HTTP] "HyperText Transfer Protocol, HTTP/1.1", R. Fielding et al.",[RFC-2434] "Guidelines for Writing an IANA Considerations Section in RFCs", H. Alvestrand and T. Narten, RFC2616, June 1999 [SIPsrv]2434, Internet Engineering Task Force, October 1998 Price, Hannu, et al. [Page 56] INTERNET-DRAFT Signaling Compression 2002-05-06 [RFC-2543] "SIP:Locating SIP Servers", J. Rosenberg, H. Schulzrinne, draft-ietf-sip-srv-04.txt, January 2002, work in progress [DEFLATE] "DEFLATE Compressed Data Format Specification version 1.3", P. Deutsch,Session Initiation Protocol", Handley et al, RFC1951,2543, Internet Engineering Task Force,May 1996 [SCTP]March 1999 [RFC-2960] "Stream Control Transmission Protocol", Stewart et al, RFC 2960, Internet Engineering Task Force, October 2000[MD5] "The MD5 Message-Digest Algorithm", R. Rivest, RFC 1321, Internet Engineering Task Force, April 1992 [RFC-1662] "PPP in HDLC-like Framing", Simpson[EXTENDED] "SigComp - Extended Operations", Hannu et al, Internet Engineering Task Force,July 1994 [RFC-2026] "The Internet Standards Process - Revision 3", Scott Bradner, Internet Engineering Task Force, October 1996 [RFC-2119] "Key words for use in RFCs to Indicate Requirement Levels", Scott Bradner, Internet Engineering Task Force, March 1997 Price, Hannu, et al. [Page 42] INTERNET-DRAFT SigComp March 1,May 2002Appendix A. Document history - October 19, 2001, version 00 First version. The draft describes the current ideas, from people involved in the ROHC WG, of how to perform compression of application signaling messages. - October 31, 2001, version 01 Second version. Additional section, 5.2.1, which describes when a message identifier can be reused. - November 21, 2001, version 02 Third version. Section 6 has been moved to a separate draft. The third version describes a modular solution, providing flexibility for implementers to decide which functions they want to integrate. - January 28, 2002, version 03 Fourth version. SigComp version 02 is divided into this draft, a UDVM draft and an extended operation mechanisms draft. Compressor/decompressor (UDVM) state approach has been introduced for security reasons. - February 14, 2002, version 04 Fifth version. Describes the complete base SigComp solution including the UDVM. - March 1, 2002, version 05 Sixth version. Comments from several authors and contributors have been taken into account. Announcement mechanism has been updated.This Internet-Draft expires inSeptemberNovember 2002. Price, Hannu, et al. [Page43]57] ----