< draft-ssmith-cesr-01.txt   draft-ssmith-cesr-02.txt >
TODO Working Group S. Smith TODO Working Group S. Smith
Internet-Draft ProSapien LLC Internet-Draft ProSapien LLC
Intended status: Informational 29 November 2021 Intended status: Informational 1 December 2021
Expires: 2 June 2022 Expires: 4 June 2022
Composable Event Streaming Representation (CESR) Composable Event Streaming Representation (CESR)
draft-ssmith-cesr-01 draft-ssmith-cesr-02
Abstract Abstract
The Composable Event Streaming Representation (CESR) is dual text- The Composable Event Streaming Representation (CESR) is dual text-
binary encoding format that has the unique property of text-binary binary encoding format that has the unique property of text-binary
concatenation composability. This composability property enables the concatenation composability. This composability property enables the
round trip conversion en-masse of concatenated primitives between the round trip conversion en-masse of concatenated primitives between the
text domain and binary domain while maintaining separability of text domain and binary domain while maintaining separability of
individual primtives. This enables convenient usability in the text individual primtives. This enables convenient usability in the text
domain and compact transmission in the binary domain. CESR domain and compact transmission in the binary domain. CESR
skipping to change at page 2, line 10 skipping to change at page 2, line 10
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 2 June 2022. This Internet-Draft will expire on 4 June 2022.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 35 skipping to change at page 2, line 35
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Composability . . . . . . . . . . . . . . . . . . . . . . 5 1.1. Composability . . . . . . . . . . . . . . . . . . . . . . 5
1.2. Abstract Domain Representations . . . . . . . . . . . . . 5 1.2. Abstract Domain Representations . . . . . . . . . . . . . 5
1.2.1. Transformations Between Domains . . . . . . . . . . . 6 1.2.1. Transformations Between Domains . . . . . . . . . . . 6
1.2.2. Concatenation Composability Property . . . . . . . . 6 1.2.2. Concatenation Composability Property . . . . . . . . 6
2. Concrete Domain Representations . . . . . . . . . . . . . . . 8 2. Concrete Domain Representations . . . . . . . . . . . . . . . 8
2.1. Stable Text Type Codes . . . . . . . . . . . . . . . . . 11 2.1. Stable Text Type Codes . . . . . . . . . . . . . . . . . 11
2.2. Code Characters and Ante Bytes . . . . . . . . . . . . . 12 2.2. Code Characters and Lead Bytes . . . . . . . . . . . . . 12
2.3. Multiple Code Table Approach . . . . . . . . . . . . . . 13 2.3. Multiple Code Table Approach . . . . . . . . . . . . . . 13
3. Text Coding Scheme Design . . . . . . . . . . . . . . . . . . 13 3. Text Coding Scheme Design . . . . . . . . . . . . . . . . . . 13
3.1. Text Code Size . . . . . . . . . . . . . . . . . . . . . 13 3.1. Text Code Size . . . . . . . . . . . . . . . . . . . . . 13
3.2. Count, Group, or Framing Codes . . . . . . . . . . . . . 15 3.2. Count, Group, or Framing Codes . . . . . . . . . . . . . 15
3.3. Interleaved Non-CESR Serializations . . . . . . . . . . . 15 3.3. Interleaved Non-CESR Serializations . . . . . . . . . . . 15
3.4. Cold Start Stream Parsing Problem . . . . . . . . . . . . 16 3.4. Cold Start Stream Parsing Problem . . . . . . . . . . . . 16
3.4.1. Performant Resynchronization with Unique Start 3.4.1. Performant Resynchronization with Unique Start
Bits . . . . . . . . . . . . . . . . . . . . . . . . 16 Bits . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4.2. Stream Parsing Rules . . . . . . . . . . . . . . . . 18 3.4.2. Stream Parsing Rules . . . . . . . . . . . . . . . . 18
3.5. Compact Fixed Size Codes . . . . . . . . . . . . . . . . 19 3.5. Compact Fixed Size Codes . . . . . . . . . . . . . . . . 19
3.6. Code Table Selectors . . . . . . . . . . . . . . . . . . 21 3.6. Code Table Selectors . . . . . . . . . . . . . . . . . . 21
3.7. Small Fixed Raw Size Tables . . . . . . . . . . . . . . . 21 3.7. Small Fixed Raw Size Tables . . . . . . . . . . . . . . . 21
3.7.1. One Character Fixed Raw Size Table . . . . . . . . . 21 3.7.1. One Character Fixed Raw Size Table . . . . . . . . . 21
3.7.2. Two Character Fixed Raw Size Table . . . . . . . . . 22 3.7.2. Two Character Fixed Raw Size Table . . . . . . . . . 22
3.8. Large Fixed Raw Size Tables . . . . . . . . . . . . . . . 22 3.8. Large Fixed Raw Size Tables . . . . . . . . . . . . . . . 22
3.8.1. Large Fixed Raw Size Table With 0 Ante Bytes . . . . 22 3.8.1. Large Fixed Raw Size Table With 0 Lead Bytes . . . . 22
3.8.2. Large Fixed Raw Size Table With 1 Ante Byte . . . . . 22 3.8.2. Large Fixed Raw Size Table With 1 Lead Byte . . . . . 22
3.8.3. Large Fixed Raw Size Table With 1 Ante Byte . . . . . 22 3.8.3. Large Fixed Raw Size Table With 1 Lead Byte . . . . . 22
3.9. Small Variable Raw Size Tables . . . . . . . . . . . . . 23 3.9. Small Variable Raw Size Tables . . . . . . . . . . . . . 23
3.9.1. Small Variable Raw Size Table With 0 Ante Bytes . . . 23 3.9.1. Small Variable Raw Size Table With 0 Lead Bytes . . . 23
3.9.2. Small Variable Raw Size Table With 1 Ante Byte . . . 24 3.9.2. Small Variable Raw Size Table With 1 Lead Byte . . . 24
3.9.3. Small Variable Raw Size Table With 2 Ante Bytes . . . 24 3.9.3. Small Variable Raw Size Table With 2 Lead Bytes . . . 24
3.10. Large Variable Raw Size Tables . . . . . . . . . . . . . 24 3.10. Large Variable Raw Size Tables . . . . . . . . . . . . . 24
3.10.1. Large Variable Raw Size Table With 0 Ante Bytes . . 25 3.10.1. Large Variable Raw Size Table With 0 Lead Bytes . . 25
3.10.2. Large Variable Raw Size Table With 1 Ante Byte . . . 25 3.10.2. Large Variable Raw Size Table With 1 Lead Byte . . . 25
3.10.3. Large Variable Raw Size Table With 2 Ante Bytes . . 25 3.10.3. Large Variable Raw Size Table With 2 Lead Bytes . . 25
3.11. Count (Framing) Code Tables . . . . . . . . . . . . . . . 26 3.11. Count (Framing) Code Tables . . . . . . . . . . . . . . . 26
3.11.1. Small Count Code Table . . . . . . . . . . . . . . . 26 3.11.1. Small Count Code Table . . . . . . . . . . . . . . . 26
3.11.2. Large Count Code Table . . . . . . . . . . . . . . . 26 3.11.2. Large Count Code Table . . . . . . . . . . . . . . . 26
3.12. Op Code Tables . . . . . . . . . . . . . . . . . . . . . 26 3.12. Op Code Tables . . . . . . . . . . . . . . . . . . . . . 26
3.13. Selector Codes and Encoding Schemes . . . . . . . . . . . 27 3.13. Selector Codes and Encoding Schemes . . . . . . . . . . . 27
3.14. Parse Size Table . . . . . . . . . . . . . . . . . . . . 28 3.14. Parse Size Table . . . . . . . . . . . . . . . . . . . . 28
3.15. Special Context Specific Code Tables . . . . . . . . . . 29 3.15. Special Context Specific Code Tables . . . . . . . . . . 29
4. Master Code Table . . . . . . . . . . . . . . . . . . . . . . 30 4. Master Code Table . . . . . . . . . . . . . . . . . . . . . . 30
4.1. Filling Code Table . . . . . . . . . . . . . . . . . . . 31 4.1. Filling Code Table . . . . . . . . . . . . . . . . . . . 31
4.2. Description . . . . . . . . . . . . . . . . . . . . . . . 31 4.2. Description . . . . . . . . . . . . . . . . . . . . . . . 31
skipping to change at page 12, line 9 skipping to change at page 12, line 9
character and appears first in the framing code. Stable type coding character and appears first in the framing code. Stable type coding
in the _T_ domain translates to stable type coding in the _B_ domain in the _T_ domain translates to stable type coding in the _B_ domain
except that the type coding portion of the framing code may not except that the type coding portion of the framing code may not
respect byte boundaries. This is an acceptable tradeoff because respect byte boundaries. This is an acceptable tradeoff because
binary domain parsing tools easily accommodate bit fields and bit binary domain parsing tools easily accommodate bit fields and bit
shifts while text domain parsing tools no not. By in large text shifts while text domain parsing tools no not. By in large text
domain parsing tools only process whole characters. This is another domain parsing tools only process whole characters. This is another
reason to impose a stability constraint on the _T_ domain type coding reason to impose a stability constraint on the _T_ domain type coding
instead of the _B_ domain. instead of the _B_ domain.
2.2. Code Characters and Ante Bytes 2.2. Code Characters and Lead Bytes
There are two ways to provide the required alignment on 24 bit There are two ways to provide the required alignment on 24 bit
boundaries to satisfy the composability property. One is to increase boundaries to satisfy the composability property. The first way is
the size of text code to ensure that the _T_ domain primitive has a to increase the size of text code to ensure that the _T_ domain
total size (length) that is an integer multiple of 4. The other is primitive has a total size (length) that is an integer multiple of 4
to increase the size of the raw binary value by pre-pending pad bytes (text code sizing). The other way is to increase the size of the raw
of zeros to the raw binary value before conversion to Base64 to binary value by pre-pending leader bytes of zeros to the raw binary
ensure the total size of the raw binary value with pre-pended bytes value before conversion to Base64 to ensure the total size of the raw
is an integer multiple of 3 bytes. This ensures that size in binary value with pre-pended leader bytes is an integer multiple of 3
characters of the Base64 conversion of the pre-padded raw binary is bytes (pre-conversion raw binary sizing). This ensures that size in
an integer multiple of 4 characters. In this case the length of the characters of the Base64 conversion of the raw binary with leader
pre-pended type code MUST also therefore be an integer multiple of 4 bytes is an integer multiple of 4 characters. In this later case
characters so that the total length of the _T_ domain primitive with therefore the length of the pre-pended type code MUST be an integer
code is an integer multiple of 4 characters. multiple of 4 characters so that the total length of the _T_ domain
primitive with code and converted raw binary is an integer multiple
of 4 characters.
The first way may be more compact in some cases. The second way may The first way (text code sizing) may be more compact in some cases.
be easier to compute in some cases. In order to avoid confusion with The second way (pre-conversion raw binary sizing) may be easier to
the use of the term pad character, when pre-padding with bytes we use compute in some cases. In order to avoid confusion with the use of
the term ante bytes. The term pad may be confusing not merely the term pad, we use the term leader or lead bytes when adjusting the
because both ways use a type of padding but it is also true that the raw binary size pre-conversion. The term pad may be confusing not
the number of pad characters when padding post-conversion equals the merely because both ways use a type of padding but it is also true
number of ante bytes when padding pre-conversion. that the the number of pad characters when padding post-conversion
equals the number of lead bytes when padding pre-conversion.
Suppose for example the raw binary value is 32 bytes in length. The Suppose for example the raw binary value is 32 bytes in length. The
next higher integer multiple of 3 is 33 bytes. Thus 1 additional next higher integer multiple of 3 is 33 bytes. Thus 1 additional
ante byte is needed to make the size (length in byte) of raw binary lead byte is needed to make the size (length in byte) of raw binary
an integer multiple of 3. The 1 ante byte makes that combination a an integer multiple of 3. The 1 lead byte makes that combination a
total of 33 bytes in length. The resultant Base64 converted value total of 33 bytes in length. The resultant Base64 converted value
will be 44 characters in length, which is an integer multiple of 4 will be 44 characters in length, which is an integer multiple of 4
characters. In contrast, recall that when we convert a 32 byte raw characters. In contrast, recall that when we convert a 32 byte raw
binary value to Base64 the converted value will have 1 pad character binary value to Base64 the converted value will have 1 pad character
which may be replaced with a text code character. In both cases the which may be replaced with a text code character. In both cases the
resultant length in Base64 is 44 characters. resultant length in Base64 is 44 characters.
Similarly, a 64 byte sized raw binary needs 2 ante bytes to make the Whereas a 64 byte sized raw binary needs 2 lead bytes to make the
combination 66 bytes in length where 66 is the next integer multiple combination 66 bytes in length where 66 is the next integer multiple
of 3 greater than 64. When converted the result is 88 characters in of 3 greater than 64. When converted the result is 88 characters in
length. The number of pad characters added on the result of the length. The number of pad characters added on the result of the
Base64 conversion of a 64 byte raw binary is also 2. Base64 conversion of a 64 byte raw binary is also 2.
In summary we can use pre-conversion ante bytes or post-conversion In summary we can use either pre-conversion lead byte sizing or post-
pad characters in our coding scheme to ensure composable 24 bit conversion pad character sizing in our coding scheme to ensure
alignment. composable 24 bit alignment.
2.3. Multiple Code Table Approach 2.3. Multiple Code Table Approach
The design goals for CESR framing codes include minimizing the The design goals for CESR framing codes include minimizing the
framing code size for the most frequently used (most popular) codes framing code size for the most frequently used (most popular) codes
while also supporting a sufficiently comprehensive set of codes for while also supporting a sufficiently comprehensive set of codes for
all foreseeable current and future applications. This requires a all foreseeable current and future applications. This requires a
high degree of both flexibility and extensibility. We believe this high degree of both flexibility and extensibility. We believe this
is best achieved with multiple code tables each with a different is best achieved with multiple code tables each with a different
coding scheme that is optimized for a different set of features coding scheme that is optimized for a different set of features
skipping to change at page 15, line 41 skipping to change at page 15, line 41
count code is its own primitive. But it is a primitive that does not count code is its own primitive. But it is a primitive that does not
include a raw binary value, only the text code. Because a count include a raw binary value, only the text code. Because a count
code's raw binary element is empty, its pad size is always 0. Thus a code's raw binary element is empty, its pad size is always 0. Thus a
count code's size is always an integer multiple of 4 characters i.e. count code's size is always an integer multiple of 4 characters i.e.
4, 8, etc. 4, 8, etc.
3.3. Interleaved Non-CESR Serializations 3.3. Interleaved Non-CESR Serializations
One extremely useful property of CESR is that special count codes One extremely useful property of CESR is that special count codes
enable CESR to be interleaved with other serializations. For enable CESR to be interleaved with other serializations. For
example, Many applications use JSON JSON [RFC4627], CBOR CBOR example, Many applications use [JSON], [RFC4627], [CBOR], [RFC8949],
[RFC8949], or MsgPack (MGPK) [MGPK] to serialize flexible self- or MsgPack [MGPK] to serialize flexible self-describing data
describing data structures based on hash maps, also know as structures based on hash maps, also know as dictionaries. With
dictionaries. With respect to hash map serializations, CESR respect to hash map serializations, CESR primitives may appear in two
primitives may appear in two different contexts. The first context different contexts. The first context is as a delimited text
is as a delimited text primitive inside of a hash map serialization. primitive inside of a hash map serialization. The delimited text may
The delimited text may be either the key or value of a (key, value) be either the key or value of a (key, value) pair. The second
pair. The second context is as a standalone serialization that is context is as a standalone serialization that is interleaved with
interleaved with hash map serializations in a stream. Special CESR hash map serializations in a stream. Special CESR count codes enable
count codes enable support for the second context of interleaving support for the second context of interleaving standalone CESR with
standalone CESR with other serializations. other serializations.
3.4. Cold Start Stream Parsing Problem 3.4. Cold Start Stream Parsing Problem
After a cold start a stream processor looks for framing information After a cold start a stream processor looks for framing information
to know how to parse groups of elements in the stream. If that to know how to parse groups of elements in the stream. If that
framing information is ambiguous then the parser may become confused framing information is ambiguous then the parser may become confused
and require yet another cold start. While processing a given stream and require yet another cold start. While processing a given stream
a parser may become confused especially if a portion of the stream is a parser may become confused especially if a portion of the stream is
malformed in some way. This usually requires flushing the stream and malformed in some way. This usually requires flushing the stream and
forcing a cold start to resynchronize the parser to subsequent stream forcing a cold start to resynchronize the parser to subsequent stream
skipping to change at page 16, line 36 skipping to change at page 16, line 36
Special CESR count codes support re-synchronization at each boundary Special CESR count codes support re-synchronization at each boundary
between interleaved CESR and other serializations like JSON, CBOR, or between interleaved CESR and other serializations like JSON, CBOR, or
MGPK MGPK
3.4.1. Performant Resynchronization with Unique Start Bits 3.4.1. Performant Resynchronization with Unique Start Bits
Given the popularity of three specific serializations, namely, JSON, Given the popularity of three specific serializations, namely, JSON,
CBOR, and MGPK, more fine grained serialization boundary detection CBOR, and MGPK, more fine grained serialization boundary detection
for interleaving CESR may be highly beneficial both from a for interleaving CESR may be highly beneficial both from a
performation and robustness perspective. One way to provide this is performance and robustness perspective. One way to provide this is
by selecting the count code start bits such that there is always a by selecting the count code start bits such that there is always a
unique (mutually distinct) set of start bits at each interleaved unique (mutually distinct) set of start bits at each interleaved
boundary between CESR, JSON, CBOR, and MGPK. boundary between CESR, JSON, CBOR, and MGPK.
Furthermore, it may also be highly beneficial to support in-stride Furthermore, it may also be highly beneficial to support in-stride
switching between interleaved CESR text domain streams and CESR switching between interleaved CESR text domain streams and CESR
binary domain streams. In other words the start bits for count binary domain streams. In other words the start bits for count
(framing) codes in both the _T_ domain (Base64) and the _B_ domain (framing) codes in both the _T_ domain (Base64) and the _B_ domain
should be unique. This would provide the analogous equivalent of a should be unique. This would provide the analogous equivalent of a
UTF Byte Order Mark (BOM) [BOM]. A BOM enables a parser of UTF UTF Byte Order Mark (BOM) [BOM]. A BOM enables a parser of UTF
encoded documents to determine if the UTF codes are big endian or encoded documents to determine if the UTF codes are big endian or
little endian [[19]]. In the CESR case this feature would enable a little endian. In the CESR case this feature would enable a stream
stream parser to know if a count code along with its associated parser to know if a count code along with its associated counted or
counted or framed group of primitives are expressed in the _T_ or _B_ framed group of primitives are expressed in the _T_ or _B_ domain.
domain. Toghether these impose the constraint that the boundary Together these impose the constraint that the boundary start bits for
start bits for interleaved text CESR, binary CESR, JSON, CBOR, and interleaved text CESR, binary CESR, JSON, CBOR, and MGPK be mutually
MGPK be mutually distinct. distinct.
Amongst the codes for map objects in the JSON, CBOR, and MGPK only Amongst the codes for map objects in the JSON, CBOR, and MGPK only
the first three bits are fixed and not dependent on mapping size. In the first three bits are fixed and not dependent on mapping size. In
JSON a serialized mapping object always starts with {. This is JSON a serialized mapping object always starts with {. This is
encoded as 0x7b. the first three bits are 0b011. In CBOR the first encoded as 0x7b. the first three bits are 0b011. In CBOR the first
three bits of the major type of the serialized mapping object are three bits of the major type of the serialized mapping object are
0b101. In MGPK (MsgPack) there are three different mapping object 0b101. In MGPK (MsgPack) there are three different mapping object
codes. The _FixMap_ code starts with 0b100. Both the _Map16_ code codes. The _FixMap_ code starts with 0b100. Both the _Map16_ code
and _Map32_ code start with 0b110. and _Map32_ code start with 0b110.
skipping to change at page 18, line 6 skipping to change at page 18, line 6
codes. This also provides a BOM like capability to determine if a codes. This also provides a BOM like capability to determine if a
framing code is expressed in the _T_ or _B_ domain. To clarify, if a framing code is expressed in the _T_ or _B_ domain. To clarify, if a
stream starts with the tritet 0b111 then the stream is _B_ domain stream starts with the tritet 0b111 then the stream is _B_ domain
CESR and a stream parser would thereby know how to convert the first CESR and a stream parser would thereby know how to convert the first
sextet of the stream to determine which of the two framing codes is sextet of the stream to determine which of the two framing codes is
being used, 0x3E or ox3F . If on the other hand the framing code being used, 0x3E or ox3F . If on the other hand the framing code
starts with either of the tritets 0b001 or 0b010 then the framing starts with either of the tritets 0b001 or 0b010 then the framing
code is expressed in the _T_ domain and a stream parser likewise code is expressed in the _T_ domain and a stream parser likewise
would thereby know how to convert the first character (octet) of the would thereby know how to convert the first character (octet) of the
framing code to determine which framing code is being used. framing code to determine which framing code is being used.
Otherwise if a stream starts with 0b100 then is JSON, with 0b101 then Otherwise if a stream starts with 0b100 its JSON, with 0b101 its CBOR
its CBOR and with either 0b011,and 0b110 then its MGPK. and with either 0b011,and 0b110 its MGPK.
This is summaraized in the following table: This is summarized in the following table:
+=================+====================================+===========+ +=================+====================================+===========+
| Starting Tritet | Serialization | Character | | Starting Tritet | Serialization | Character |
+=================+====================================+===========+ +=================+====================================+===========+
| 0b000 | | | | 0b000 | | |
+-----------------+------------------------------------+-----------+ +-----------------+------------------------------------+-----------+
| 0b001 | CESR _T_ Domain Count (Group) Code | - | | 0b001 | CESR _T_ Domain Count (Group) Code | - |
+-----------------+------------------------------------+-----------+ +-----------------+------------------------------------+-----------+
| 0b010 | CESR _T_ Domain Op Code | _ | | 0b010 | CESR _T_ Domain Op Code | _ |
+-----------------+------------------------------------+-----------+ +-----------------+------------------------------------+-----------+
skipping to change at page 18, line 40 skipping to change at page 18, line 40
Table 2 Table 2
3.4.2. Stream Parsing Rules 3.4.2. Stream Parsing Rules
Given this set of tritets (3 bits) we can express a requirement for Given this set of tritets (3 bits) we can express a requirement for
well formed stream start and restart. well formed stream start and restart.
Each stream MUST start (restart) with one of five tritets: Each stream MUST start (restart) with one of five tritets:
1) A framing count (group) code in CESR _T_ domain 2) A framing count 1) A framing count (group) code in CESR _T_ domain.
(group) code in CESR _B_ Domain. 3) A JSON encoded mapping. 4) A CBOR 2) A framing count (group) code in CESR _B_ Domain.
encoded Mapping. 5) A MGPK encoded mapping. 3) A JSON encoded mapping.
4) A CBOR encoded Mapping.
5) A MGPK encoded mapping.
A parser merely needs to examine the first tritet (3 bits) of the A parser merely needs to examine the first tritet (3 bits) of the
first byte of the stream start to determine which one of the five it first byte of the stream start to determine which one of the five it
is. When the first tritet is a framing code then, the remainder of is. When the first tritet is a framing code then, the remainder of
framing code itself will include the additional information needed to framing code itself will include the additional information needed to
parse the attached group. When the first tritet indicates its JSON, parse the attached group. When the first tritet indicates its JSON,
CBOR, or MGPK, then the mapping's first field must be a version CBOR, or MGPK, then the mapping's first field must be a version
string that provides the additional information needed to fully parse string that provides the additional information needed to fully parse
the associated encoded serialization. the associated encoded serialization.
skipping to change at page 22, line 15 skipping to change at page 22, line 15
3.7.2. Two Character Fixed Raw Size Table 3.7.2. Two Character Fixed Raw Size Table
The two character type code table uses selector 0 as its first The two character type code table uses selector 0 as its first
character. The second character is the type code. This provides 64 character. The second character is the type code. This provides 64
unique type codes for fixed size raw binary values that have a pad unique type codes for fixed size raw binary values that have a pad
size of 2. size of 2.
3.8. Large Fixed Raw Size Tables 3.8. Large Fixed Raw Size Tables
The three tables in this group are for large fixed raw size The three tables in this group are for large fixed raw size
primitives. These three tables use 0, 1 or 2 ante bytes as primitives. These three tables use 0, 1 or 2 lead bytes as
appropriate for a pad size of 0, 1 or 2 for a given fixed raw binary appropriate for a pad size of 0, 1 or 2 for a given fixed raw binary
value. The text code size for all three tables is 4 characters. The value. The text code size for all three tables is 4 characters. The
selector not only encodes the table but also implicitly encodes the selector not only encodes the table but also implicitly encodes the
number of ante bytes. With 3 characters for each unique type code, number of lead bytes. With 3 characters for each unique type code,
each table provides 262,144 unique type codes. This should be enough each table provides 262,144 unique type codes. This should be enough
type codes to accommodate all fixed raw size primitive types for the type codes to accommodate all fixed raw size primitive types for the
foreseeable future. foreseeable future.
3.8.1. Large Fixed Raw Size Table With 0 Ante Bytes 3.8.1. Large Fixed Raw Size Table With 0 Lead Bytes
This table uses 1 as its first character or selector. The remaining This table uses 1 as its first character or selector. The remaining
3 characters provide the types codes. Only fixed size raw binaries 3 characters provide the types codes. Only fixed size raw binaries
with pad size of 0 are encoded with this table. The 3 character type with pad size of 0 are encoded with this table. The 3 character type
code provides a total of 262,144 unique type code values (262144 = code provides a total of 262,144 unique type code values (262144 =
64**3) for fixed size raw binary primitives with pad size of 0. 64**3) for fixed size raw binary primitives with pad size of 0.
3.8.2. Large Fixed Raw Size Table With 1 Ante Byte 3.8.2. Large Fixed Raw Size Table With 1 Lead Byte
This table uses 2 as its first character or selector. The remaining This table uses 2 as its first character or selector. The remaining
3 characters provide the types codes. Only fixed size raw binaries 3 characters provide the types codes. Only fixed size raw binaries
with pad size of 1 are encoded with this table. The 3 character type with pad size of 1 are encoded with this table. The 3 character type
code provides a total of 262,144 unique type code values (262144 = code provides a total of 262,144 unique type code values (262144 =
64**3) . Together with the 52 values from the 1 character code table 64**3) . Together with the 52 values from the 1 character code table
above there are 262,196 type codes for fixed size raw binary above there are 262,196 type codes for fixed size raw binary
primitives with pad size of 1. primitives with pad size of 1.
3.8.3. Large Fixed Raw Size Table With 1 Ante Byte 3.8.3. Large Fixed Raw Size Table With 1 Lead Byte
This table uses 3 as its first character or selector. The remaining This table uses 3 as its first character or selector. The remaining
3 characters provide the types codes. Only fixed size raw binaries 3 characters provide the types codes. Only fixed size raw binaries
with pad size of 2 are encoded with this table. The 3 character type with pad size of 2 are encoded with this table. The 3 character type
code provides a total of 262,144 unique type code values (262144 = code provides a total of 262,144 unique type code values (262144 =
64**3) . Together with the 64 values from the 2 character code table 64**3) . Together with the 64 values from the 2 character code table
above (selector 0) there are 262,208 type codes for fixed size raw above (selector 0) there are 262,208 type codes for fixed size raw
binary primitives with pad size of 2. binary primitives with pad size of 2.
3.9. Small Variable Raw Size Tables 3.9. Small Variable Raw Size Tables
Although many primitives have fixed raw binary sizes especially those Although many primitives have fixed raw binary sizes especially those
for modern cryptographic suites such as keys, signatures and digests, for modern cryptographic suites such as keys, signatures and digests,
there are other primitives that benefit from variable sizing such as there are other primitives that benefit from variable sizing such as
encrypted material. Indeed CESR is meant to support not only encrypted material. Indeed CESR is meant to support not only
cryptographic material types but other basic types such as generic cryptographic material types but other basic types such as generic
text strings. These benefit from variable size codes. text strings. These benefit from variable size codes.
The three tables in this group are for small variable raw size The three tables in this group are for small variable raw size
primitives. These three tables use 0, 1 or 2 ante bytes as primitives. These three tables use 0, 1 or 2 lead bytes as
appropriate given the pad size of 0, 1 or 2 for a given variable size appropriate given the pad size of 0, 1 or 2 for a given variable size
raw binary value. The text code size for all three tables is 4 raw binary value. The text code size for all three tables is 4
characters. The first character is the selector, the second characters. The first character is the selector, the second
character is the type, and the last two characters provide the size character is the type, and the last two characters provide the size
of the value as a Base64 encoded integer. The number of unique type of the value as a Base64 encoded integer. The number of unique type
codes is 64. A given type code is repeated in each table for the codes is 64. A given type code is repeated in each table for the
same type. What is different for each table is the number of ante same type. What is different for each table is the number of lead
bytes. The selector not only encodes the table but also implicitly bytes. The selector not only encodes the table but also implicitly
encodes the number of ante bytes. The variable size is measured in encodes the number of lead bytes. The variable size is measured in
quadlets of 4 characters each in the _T_ domain and equivalently in quadlets of 4 characters each in the _T_ domain and equivalently in
triplets of 3 bytes each in the _B_ domain. Thus computing the triplets of 3 bytes each in the _B_ domain. Thus computing the
number of characters when parsing or off-loading in the _T_ domain number of characters when parsing or off-loading in the _T_ domain
means multiplying the variable size by 4. Computing the number of means multiplying the variable size by 4. Computing the number of
bytes when parsing or off-loading in the _B_ domain means multiplying bytes when parsing or off-loading in the _B_ domain means multiplying
the variable size by 3. The two Base64 size characters provide value the variable size by 3. The two Base64 size characters provide value
lengths in quadlets/triplets from 0 to 4095 (64**2 -1). This lengths in quadlets/triplets from 0 to 4095 (64**2 -1). This
corresponds to value lengths of up to 16,380 characters (4095 * 4) or corresponds to value lengths of up to 16,380 characters (4095 * 4) or
12,285 bytes (4095 * 3). 12,285 bytes (4095 * 3).
3.9.1. Small Variable Raw Size Table With 0 Ante Bytes 3.9.1. Small Variable Raw Size Table With 0 Lead Bytes
This table uses 4 as its first character or selector. The second This table uses 4 as its first character or selector. The second
character provides the type. The final two characters provide the character provides the type. The final two characters provide the
size of the value in quadlets/triplets as a Base64 encoded integer. size of the value in quadlets/triplets as a Base64 encoded integer.
Only raw binaries with pad size of 0 are encoded with this table. Only raw binaries with pad size of 0 are encoded with this table.
The 1 character type code provides a total of 64 unique type code The 1 character type code provides a total of 64 unique type code
values. The maximum length of the value provided by the 2 size values. The maximum length of the value provided by the 2 size
characters is 4095 quadlets of characters in the _T_ domain and characters is 4095 quadlets of characters in the _T_ domain and
triplets of bytes in the _B_ domain. All are raw binary primitives triplets of bytes in the _B_ domain. All are raw binary primitives
with pad size of 0 that each include 0 ante bytes. with pad size of 0 that each include 0 lead bytes.
3.9.2. Small Variable Raw Size Table With 1 Ante Byte 3.9.2. Small Variable Raw Size Table With 1 Lead Byte
This table uses 5 as its first character or selector. The second This table uses 5 as its first character or selector. The second
character provides the type. The final two characters provide the character provides the type. The final two characters provide the
size of the value in quadlets/triplets as a Base64 encoded integer. size of the value in quadlets/triplets as a Base64 encoded integer.
Only raw binaries with pad size of 1 are encoded with this table. Only raw binaries with pad size of 1 are encoded with this table.
The 1 character type code provides a total of 64 unique type code The 1 character type code provides a total of 64 unique type code
values. The maximum length of the value provided by the 2 size values. The maximum length of the value provided by the 2 size
characters is 4095 quadlets of characters in the _T_ domain and characters is 4095 quadlets of characters in the _T_ domain and
triplets of bytes in the _B_ domain. All are raw binary primitives triplets of bytes in the _B_ domain. All are raw binary primitives
with pad size of 1 that each include 1 ante byte. with pad size of 1 that each include 1 lead byte.
3.9.3. Small Variable Raw Size Table With 2 Ante Bytes 3.9.3. Small Variable Raw Size Table With 2 Lead Bytes
This table uses 6 as its first character or selector. The second This table uses 6 as its first character or selector. The second
character provides the type. The final two characters provide the character provides the type. The final two characters provide the
size of the value in quadlets/triplets as a Base64 encoded integer. size of the value in quadlets/triplets as a Base64 encoded integer.
Only raw binaries with pad size of 0 are encoded with this table. Only raw binaries with pad size of 0 are encoded with this table.
The 1 character type code provides a total of 64 unique type code The 1 character type code provides a total of 64 unique type code
values. The maximum length of the value provided by the 2 size values. The maximum length of the value provided by the 2 size
characters is 4095 quadlets of characters in the _T_ domain and characters is 4095 quadlets of characters in the _T_ domain and
triplets of bytes int the _B_ domain. All are raw binary primitives triplets of bytes int the _B_ domain. All are raw binary primitives
with pad size of 2 that each include 2 ante bytes. with pad size of 2 that each include 2 lead bytes.
3.10. Large Variable Raw Size Tables 3.10. Large Variable Raw Size Tables
Many legacy cryptographic libraries such as OpenSSL and GPG support Many legacy cryptographic libraries such as OpenSSL and GPG support
any sized variable sized primitive for keys, signatures and digests. any sized variable sized primitive for keys, signatures and digests.
Although this approach is often criticized for providing too much Although this approach is often criticized for providing too much
flexibility, many legacy applications depend on this degree of flexibility, many legacy applications depend on this degree of
flexibility. Consequently these large variable raw size tables flexibility. Consequently these large variable raw size tables
provide a sufficiently expansive set of tables with enough types and provide a sufficiently expansive set of tables with enough types and
sizes to accommodate all the legacy cryptographic libraries as well sizes to accommodate all the legacy cryptographic libraries as well
as all the variable sized raw primitives for the foreseeable future. as all the variable sized raw primitives for the foreseeable future.
The three tables in this group are for large variable raw size The three tables in this group are for large variable raw size
primitives. These three tables use 0, 1 or 2 ante bytes as primitives. These three tables use 0, 1 or 2 Lead bytes as
appropriate for the associated pad size of 0, 1 or 2 for a given appropriate for the associated pad size of 0, 1 or 2 for a given
variable sized raw binary value. The text code size for all three variable sized raw binary value. The text code size for all three
tables is 8 characters. The first character is the selector, the tables is 8 characters. The first character is the selector, the
next three characters provide the type, and the last four characters next three characters provide the type, and the last four characters
provide the size of the value as a Base64 encoded integer. With 3 provide the size of the value as a Base64 encoded integer. With 3
characters for each unique type code, each table provides 262,144 characters for each unique type code, each table provides 262,144
unique type codes. This should be enough type codes to accommodate unique type codes. This should be enough type codes to accommodate
all fixed raw size primitive types for the foreseeable future. A all fixed raw size primitive types for the foreseeable future. A
given type code is repeated in each table for the same type. What is given type code is repeated in each table for the same type. What is
different for each table is the number of ante bytes. The selector different for each table is the number of lead bytes. The selector
not only encodes the table but also implicitly encodes the number of not only encodes the table but also implicitly encodes the number of
ante bytes. The variable size is measured in quadlets of 4 lead bytes. The variable size is measured in quadlets of 4
characters each in the _T_ domain and equivalently in triplets of 3 characters each in the _T_ domain and equivalently in triplets of 3
bytes each in the _B_ domain. Thus computing the number of bytes each in the _B_ domain. Thus computing the number of
characters when parsing or off-loading in the _T_ domain means characters when parsing or off-loading in the _T_ domain means
multiplying the variable size by 4. Likewise computing the number of multiplying the variable size by 4. Likewise computing the number of
bytes when parsing or off-loading in the _B_ domain means multiplying bytes when parsing or off-loading in the _B_ domain means multiplying
the variable size by 3. The four Base64 size characters provide the variable size by 3. The four Base64 size characters provide
value lengths in quadlets/triplets from 0 to 16,777,215 (64**4 -1). value lengths in quadlets/triplets from 0 to 16,777,215 (64**4 -1).
This corresponds to value lengths of up to 67,108,860 characters This corresponds to value lengths of up to 67,108,860 characters
(16777215 * 4) or 50,331,645 bytes (16777215 * 3). (16777215 * 4) or 50,331,645 bytes (16777215 * 3).
3.10.1. Large Variable Raw Size Table With 0 Ante Bytes 3.10.1. Large Variable Raw Size Table With 0 Lead Bytes
This table uses 7 as its first character or selector. The next three This table uses 7 as its first character or selector. The next three
characters provide the type. The final four characters provide the characters provide the type. The final four characters provide the
size of the value in quadlets/triplets as a Base64 encoded integer. size of the value in quadlets/triplets as a Base64 encoded integer.
Only raw binaries with pad size of 0 are encoded with this table. Only raw binaries with pad size of 0 are encoded with this table.
The 3 character type code provides a total of 262,144 unique type The 3 character type code provides a total of 262,144 unique type
code values. The maximum length of the value provided by the 4 size code values. The maximum length of the value provided by the 4 size
characters is 16,777,215 quadlets of characters in the _T_ domain and characters is 16,777,215 quadlets of characters in the _T_ domain and
triplets of bytes in the _B_ domain. All are raw binary primitives triplets of bytes in the _B_ domain. All are raw binary primitives
with pad size of 0 that each include 0 ante bytes. with pad size of 0 that each include 0 lead bytes.
3.10.2. Large Variable Raw Size Table With 1 Ante Byte 3.10.2. Large Variable Raw Size Table With 1 Lead Byte
This table uses 8 as its first character or selector. The next three This table uses 8 as its first character or selector. The next three
characters provide the type. The final four characters provide the characters provide the type. The final four characters provide the
size of the value in quadlets/triplets as a Base64 encoded integer. size of the value in quadlets/triplets as a Base64 encoded integer.
Only raw binaries with pad size of 1 are encoded with this table. Only raw binaries with pad size of 1 are encoded with this table.
The 3 character type code provides a total of 262,144 unique type The 3 character type code provides a total of 262,144 unique type
code values. The maximum length of the value provided by the 4 size code values. The maximum length of the value provided by the 4 size
characters is 16,777,215 quadlets of characters in the _T_ domain and characters is 16,777,215 quadlets of characters in the _T_ domain and
triplets of bytes in the _B_ domain. All are raw binary primitives triplets of bytes in the _B_ domain. All are raw binary primitives
with pad size of 1 that each include 1 ante bytes. with pad size of 1 that each include 1 lead bytes.
3.10.3. Large Variable Raw Size Table With 2 Ante Bytes 3.10.3. Large Variable Raw Size Table With 2 Lead Bytes
This table uses 9 as its first character or selector. The next three This table uses 9 as its first character or selector. The next three
characters provide the type. The final four characters provide the characters provide the type. The final four characters provide the
size of the value in quadlets/triplets as a Base64 encoded integer. size of the value in quadlets/triplets as a Base64 encoded integer.
Only raw binaries with pad size of 2 are encoded with this table. Only raw binaries with pad size of 2 are encoded with this table.
The 3 character type code provides a total of 262,144 unique type The 3 character type code provides a total of 262,144 unique type
code values. The maximum length of the value provided by the 4 size code values. The maximum length of the value provided by the 4 size
characters is 16,777,215 quadlets of characters in the _T_ domain and characters is 16,777,215 quadlets of characters in the _T_ domain and
triplets of bytes in the _B_ domain. All are raw binary primitives triplets of bytes in the _B_ domain. All are raw binary primitives
with pad size of 2 that each include 2 ante bytes. with pad size of 2 that each include 2 lead bytes.
3.11. Count (Framing) Code Tables 3.11. Count (Framing) Code Tables
There may be as many at 13 count code tables, but only two are There may be as many at 13 count code tables, but only two are
currently specified. These two are the small count, four character currently specified. These two are the small count, four character
table and the large count, eight character table. Because count table and the large count, eight character table. Because count
codes only count quadlets/triplets, primitives or groups of codes only count quadlets/triplets, primitives or groups of
primitives, count codes have no value component, but only type and primitives, count codes have no value component, but only type and
size components. Because primitives are already guaranteed to be size components. Because primitives are already guaranteed to be
composable count codes do not need to account for pad size as long as composable count codes do not need to account for pad size as long as
skipping to change at page 27, line 11 skipping to change at page 27, line 11
tables. Op codes are meant to provide stream processing instructions tables. Op codes are meant to provide stream processing instructions
that are more general and flexible than simply concatenated that are more general and flexible than simply concatenated
primitives or groups of primitives. primitives or groups of primitives.
3.13. Selector Codes and Encoding Schemes 3.13. Selector Codes and Encoding Schemes
The following table summarizes the _T_ domain coding schemes for the The following table summarizes the _T_ domain coding schemes for the
13 code tables defined above. 13 code tables defined above.
+===========+===========+=====+=====+====+======+====+==============+ +===========+===========+=====+=====+====+======+====+==============+
| Selector | Selector | Type|Value|Code| Ante |Pad | Format | | Selector | Selector | Type|Value|Code| Lead |Pad | Format |
| | |Chars| Size|Size|Bytes |Size| | | | |Chars| Size|Size|Bytes |Size| |
| | | |Chars| | | | | | | | |Chars| | | | |
+===========+===========+=====+=====+====+======+====+==============+ +===========+===========+=====+=====+====+======+====+==============+
+-----------+-----------+-----+-----+----+------+----+--------------+ +-----------+-----------+-----+-----+----+------+----+--------------+
| [A-Z,a-z] | | 1* | 0 | 1 | 0 | 1 | $&&& | | [A-Z,a-z] | | 1* | 0 | 1 | 0 | 1 | $&&& |
+-----------+-----------+-----+-----+----+------+----+--------------+ +-----------+-----------+-----+-----+----+------+----+--------------+
| 0 | | 1 | 0 | 2 | 0 | 2 | 0$&& | | 0 | | 1 | 0 | 2 | 0 | 2 | 0$&& |
+-----------+-----------+-----+-----+----+------+----+--------------+ +-----------+-----------+-----+-----+----+------+----+--------------+
| 1 | | 3 | 0 | 4 | 0 | 0 | 1$$$&&&& | | 1 | | 3 | 0 | 4 | 0 | 0 | 1$$$&&&& |
+-----------+-----------+-----+-----+----+------+----+--------------+ +-----------+-----------+-----+-----+----+------+----+--------------+
skipping to change at page 28, line 8 skipping to change at page 28, line 8
* selector character is also type character * selector character is also type character
Character format symbol definitions: Character format symbol definitions:
$ means type code character from subset of Base64 [A-Z,a-z,0-9,-,_]. $ means type code character from subset of Base64 [A-Z,a-z,0-9,-,_].
# means a Base64 digit as part of a base 64 integer that determines # means a Base64 digit as part of a base 64 integer that determines
the number of following quadlets or triplets in the primitive or when the number of following quadlets or triplets in the primitive or when
part of a count code, the count of following primitives or groups of part of a count code, the count of following primitives or groups of
primitives. primitives.
& represents one or more Base64 value characters representing the & represents one or more Base64 value characters representing the
converted raw binary value included ante bytes when applicable. The converted raw binary value included lead bytes when applicable. The
actual number of chars is determined by the prep-ended text code. actual number of chars is determined by the prep-ended text code.
TBD means to be determined TBD means to be determined
3.14. Parse Size Table 3.14. Parse Size Table
Text domain parsing can be simplified by using a parse size table. A Text domain parsing can be simplified by using a parse size table. A
text domain parser uses the first character selector code to look up text domain parser uses the first character selector code to look up
the hard size (stable) portion of the text code. The parse then the hard size (stable) portion of the text code. The parse then
extracts hard size characters from the text stream. These characters extracts hard size characters from the text stream. These characters
form an index in to the parse size table which includes a set of form an index in to the parse size table which includes a set of
skipping to change at page 29, line 6 skipping to change at page 29, line 6
+----------+----+ +----------+----+
| 0 | 2 | | 0 | 2 |
+----------+----+ +----------+----+
| 5 | 2 | | 5 | 2 |
+----------+----+ +----------+----+
+----------+----+ +----------+----+
Table 4 Table 4
+==================+====+====+=====+====+====+====+ +==================+====+====+=====+====+====+====+
| hard sized index | hs | ss | vs | fs | as | ps | | hard sized index | hs | ss | vs | fs | ls | ps |
+==================+====+====+=====+====+====+====+ +==================+====+====+=====+====+====+====+
+------------------+----+----+-----+----+----+----+ +------------------+----+----+-----+----+----+----+
| B | 1 | 0 | 43* | 44 | 0 | 1 | | B | 1 | 0 | 43* | 44 | 0 | 1 |
+------------------+----+----+-----+----+----+----+ +------------------+----+----+-----+----+----+----+
| 0B | 2 | 0 | 86* | 88 | 0 | 2* | | 0B | 2 | 0 | 86* | 88 | 0 | 2* |
+------------------+----+----+-----+----+----+----+ +------------------+----+----+-----+----+----+----+
| 5A | 2 | 2 | # | # | 1 | 1* | | 5A | 2 | 2 | # | # | 1 | 1* |
+------------------+----+----+-----+----+----+----+ +------------------+----+----+-----+----+----+----+
+------------------+----+----+-----+----+----+----+ +------------------+----+----+-----+----+----+----+
skipping to change at page 29, line 28 skipping to change at page 29, line 28
* size may be calculated from other sizes. * size may be calculated from other sizes.
# size may be calculated from extracted code characters given by # size may be calculated from extracted code characters given by
other sizes. other sizes.
_hs_ means hard size in chars. _hs_ means hard size in chars.
_ss_ means soft size in chars. _ss_ means soft size in chars.
_cs_ means code size where _cs = hs + ss_. _cs_ means code size where _cs = hs + ss_.
_vs_ means value size in chars. _vs_ means value size in chars.
_fs_ means full size in chars where _fs = hs + ss + vs_. _fs_ means full size in chars where _fs = hs + ss + vs_.
_as_ means ante size in bytes. _ls_ means lead size in bytes.
_ps_ means pad size in chars. _ps_ means pad size in chars.
_rs_ means raw size in bytes of binary value. _rs_ means raw size in bytes of binary value.
_as_ means ante size in bytes.
_bs_ means binary size in bytes where _bs = as + rs_. _bs_ means binary size in bytes where _bs = as + rs_.
3.15. Special Context Specific Code Tables 3.15. Special Context Specific Code Tables
The table above that provides the encoding schemes each with an The table above that provides the encoding schemes each with an
associated code table that provides the type codes or set of codes associated code table that provides the type codes or set of codes
for each associated primitive type. These coding schemes constitute for each associated primitive type. These coding schemes constitute
the basic set of code tables. This basic set may be extended with the basic set of code tables. This basic set may be extended with
context specific code tables. The context in which a primitive context specific code tables. The context in which a primitive
occurs may provide an additional implicit selector that is not part occurs may provide an additional implicit selector that is not part
skipping to change at page 30, line 23 skipping to change at page 30, line 22
A new signature scheme based on Ed448 with 114 byte signatures A new signature scheme based on Ed448 with 114 byte signatures
signatures is also supported. These signatures have a pad size of signatures is also supported. These signatures have a pad size of
zero so require a four charactor text code. The first characters is zero so require a four charactor text code. The first characters is
the selector 0, the second characters is the type with 64 values, the the selector 0, the second characters is the type with 64 values, the
last two characters provide the index as a Base64 encoded integer last two characters provide the index as a Base64 encoded integer
with 4096 different values. with 4096 different values.
The associate indexed schemes are provided in the following table. The associate indexed schemes are provided in the following table.
+===========+==========+======+=======+====+=======+====+===========+ +===========+==========+======+=======+====+=======+====+===========+
| Selector | Selector | Type | Index |Code| Ante |Pad | Format| | Selector | Selector | Type | Index |Code| Lead |Pad | Format|
| | |Chars | Chars |Size| Bytes |Size| | | | |Chars | Chars |Size| Bytes |Size| |
+===========+==========+======+=======+====+=======+====+===========+ +===========+==========+======+=======+====+=======+====+===========+
+-----------+----------+------+-------+----+-------+----+-----------+ +-----------+----------+------+-------+----+-------+----+-----------+
| [A-Z,a-z] | | 1* | 1 | 2 | 0 | 2 | $#&&| | [A-Z,a-z] | | 1* | 1 | 2 | 0 | 2 | $#&&|
+-----------+----------+------+-------+----+-------+----+-----------+ +-----------+----------+------+-------+----+-------+----+-----------+
| 0 | | 1 | 2 | 4 | 0 | 0 |` 0$##&&&&`| | 0 | | 1 | 2 | 4 | 0 | 0 |` 0$##&&&&`|
+-----------+----------+------+-------+----+-------+----+-----------+ +-----------+----------+------+-------+----+-------+----+-----------+
+-----------+----------+------+-------+----+-------+----+-----------+ +-----------+----------+------+-------+----+-------+----+-----------+
Table 6 Table 6
* selector character is also type character * selector character is also type character
Character format symbol definitions: Character format symbol definitions:
$ means type code character from subset of Base64 [A-Z,a-z,0-9,-,_]. $ means type code character from subset of Base64 [A-Z,a-z,0-9,-,_].
# means a Base64 digit as part of a base 64 integer that determines # means a Base64 digit as part of a base 64 integer that determines
the index. the index.
& represents one or more Base64 value characters representing the & represents one or more Base64 value characters representing the
converted raw binary value included ante bytes when applicable. The converted raw binary value included lead bytes when applicable. The
actual number of chars is determined by the prep-ended text code. actual number of chars is determined by the prep-ended text code.
TBD means to be determined TBD means to be determined
4. Master Code Table 4. Master Code Table
4.1. Filling Code Table 4.1. Filling Code Table
The approach to filling the tables is a first needed first served The approach to filling the tables is a first needed first served
basis. In addition the requirement that all cryptographic operations basis. In addition the requirement that all cryptographic operations
maintain at least 128 bits of cryptographic strength precludes the maintain at least 128 bits of cryptographic strength precludes the
entry of many weak cryptographic suites into the compact tables. entry of many weak cryptographic suites into the compact tables.
skipping to change at page 38, line 24 skipping to change at page 38, line 24
5. Conventions and Definitions 5. Conventions and Definitions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
6. Security Considerations 6. Security Considerations
TODO Security None
7. IANA Considerations 7. IANA Considerations
This document has no IANA actions. This document has no IANA actions.
8. References 8. References
8.1. Normative References 8.1. Normative References
[RFC20] "ASCII format for network interchange", 29 July 2020, [RFC20] "ASCII format for network interchange", 29 July 2020,
 End of changes. 50 change blocks. 
95 lines changed or deleted 99 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/