home

kskb.dev/data · documents with their text · this document in the catalog

Papers

repository prose file · license Apache-2.0 · 16331 characters · the original · source smithsamuelm-papers-master

CESR Composable Event Streaming Representation Composable cryptographic material primitives and groups in dual text and binary streaming protocol design Samuel M. Smith Ph.D. /‘ 2022/04/26 8.N))

Documentation: hitps:jgithub.com/WebOfTrust/ietf-cesr httpsifigithub.com/WebOfTrustfetf-cesr-proof httpsifgithub.comjtrustoveripltswg-acdcspecification hitps/jdocs google.comipresentation/d/imO1EZagBCAWEZw7DWit24uMfyNyDeM3HuajsGNoToleditislide=id gradefidibae_0_164 httpsifjkeri.onefkeriresources/ hitps//aniv.orglabs/907.02143 (KERI White Paper) Community: (meetings, open source code, IETF internet drafts) ttpsijgithub.com{WebOfTrust hitpsi/github.com/WebOfTrust/keri

Protocol Formats Internet Protocols Cryptographic Protocols Binary ISON or Hybrid JSON/MGPK UDP, TCP, DNS, RTP, RTCP, NTP, SNMP, BGP, BGMP, ARP, RAET, Secure Scuttlebutt, DIDCom IGMP, RIP, PING, WebRTC. Fixed Binary Text (line based) RLPx (Ethereurn) Syslog, SMTP, POP, Telnet, NNTP, RTSP, IRC Bitcoin Text (header framed) Flexible Concatenable Binary Crypto Material HTTP, SIP Noise (Signal) Inflection Point in Protocol Design (dual representation) Flexible Composable Concatenable Text/Binary Crypto Material XML, JSON (text self describing map) CESR (KERI) Composable Event Streaming Representation MGPK, CBOR (binary self describing map)

Binary vs Text Based Protocol Features Binary Format Advantages Compact, efficient, and performant Disadvantages: Difficult to develop, test, debug (over the wire), prove compliance, and extremely diffcuit to fix and version Requires custom tooling especially over the wire debug, difficult to understand, and hard to gain adoption Text Format (especially sef-describing hash map based) Advantages Easy to develop, test, debug (especially over the wire), and prove compliance, and extremely easy to fix and version Requires ittle custom tooling especially over the wire debug, easy to understand and easy to gain adoption. Disadvantages: Verbose, Inefficient, Non-performant Hybrid Both Text & Binary Formats. (self describing map, Text=JSON_and Binary=MGPK or CBOR) Advantages: Zero cost to switch between text and binary. Text for development and adoption. Binary for production use. Easy to develop, test, debug (especially over the wire), and prove compliance when text Requires little custom tooling especially over the wire debug, easy to understand Extremely easy to fix and version Easy to adopt as text with no additional barrier to binary adoption Fairly compact when binary, Fairly efficient when binary, fairly performant when binary

Composable Concatenable (Text/Binary) Event Streaming Representation (CESR) Hybrid Flexible Concatenated Compact Text Base64 & Binary Formats Advantages: Composable (any concatenated block in one format may be converted as a block to the other without loss, round trippable ) Zero cost to switch between text and binary. Text for development and adoption. Binary for production use. Flexible concatenation of heterogenous crypto material that preserves byte/char boundaries between primitives Pipelined parsing and processing Stream or Datagram Fully qualified self framing derivation codes for primitives. Fully qualified self framing count codes for groups of primitives or groups of groups. Fully qualified self framing count codes for pipelining groups. More compact text and binary than hybrid text and binary self describing map based formats Fairly Easy to develop, test, debug (especially over the wire), and prove compliance when text Fairly easy to fix and version Requires little custom tooling especially over the wire debug when text Fairly easy to understand when text Archivable audit compliant text format Fairly easy to adopt as text with no additional barrier to binary adoption Compact when binary, Efficient when binary, Performant when binary Disadvantages: Not as but almost as compact, effcient, performant as non-composable tuned binary.

Three native domains and formats Raw Domain (separated code and raw binary) (cryptographic operations) Namespace Domain (fully qualified text) (name-spaceable text) (streamable text) (archivable text) (envelopable text) Compact Domain (fully qualified binary) (streaming binary) Raw Domain = Raw binary representation that crypto libraries use ‘Compact Domain = Fully qualfied binary representation of cryptographic materia for effcient over the wire streaming Namespace Domain = Fully qualified text representations of cryptographic materia:identifers, digests,signatures etc Includes any textual use of cryptographic material, Documents, VCs, Archives, Audit logs etc Usable in over the wie streaming for development and debug BB CxkeRmS e SR TS LOGh) dldskeziiprec il sapeions) /path] 7quesy) [ <zagnent B ke s 35 SR O bl Db o/ oo Tname-soizeatly

Round Trippable Closed loop Transformation EmaEe e T2S 2 =T (") s21 “ ot =8 (') 0 compossbe s ) oy =T (e +y) N A o ry = S( ) ] $($4)-5x W r(3e) -5 {de, rm)

Code Tables 3 classes of stable composable derivation codes: Basic material primitives, Indexed signature primitives o variable length values, Grouping count codes.

Tritet Parsing CESR Parser Tritet Table Starting Tritet Serialization Character 06000 0b001 CESR T Domain Count (Group) Code - 06010 CESR T Domain Op Code [ 0b011 JSON { 06100 MGPK 0b101 CBOR 0b110 MGPK ob111 CESR B Domain

CESR Code Table Schemes o | Sobcor Tpechs | keSO et Ledes | Pedsin ot (Minimal Size) : ; 0 : 2 B sisniias + setestor character is alse type character aans a bascéé Gigit as bart of a base 64 Integer that deterhirGs the mumbor of followlng quadlets or rapreserts one or more Sasesd value charactars repressnting che corverced raw binary value included lesd

Parsing Size Tables Siza Table Selector Parse Size Tabie . - g | o B w . " 3 3 b‘ fi o I 1 f . p p v B ; W

  • size may be calealated from otner sizes. § 3iza may be calcalated from cxtracted code characters given by other sizes. %5 means full size in chats where fs - hs ¢ 55 ¢ ve. 15 means lead size in byses. bs means binary size in bytes where b = 43 + rs.

Special Context Tables Special Indexed Primitive Table Selector | Select Type Chars| Index CodeSize Lead Bytes| Pad Size Format or Chars (a-z,3-2] It T 2 B 2 Stes o 1 2 1 0 o 0siissss * selector character is alse type character $ means tyve code character from subset of Base6d [A-Z,a-z,0-9,-, 1.

means a BaseGd digit as part of a base 64 integer that determines the index.

& represents one or more BaseGd value characters representing the converted raw binary value included lead bytes when applicable. The actual number of chars is determined by Lhe prep-ended oxt code.

Master Table Code | Descipton Cote Count S, Leader | Tonl Longh orindex Longth Langth Longtn

Basic One CharacerGodos 2| Ranco s of Ec25519prts ey o engh 25 s T “ [T e ———— B E | X518 sulic rction . Moy b convrd Fom EGZ551S ubic s vercation . T e | 25579 piie g voficalon ey s dcvan, T | Bato3. 256 gt Stacssingdovaton a = | ez 255 Diget.Strsingdrvion. a | Babezs 25 Dt Seasdssin crvaton T 44 [IET ST —— B E 942.255 Digst Soladressing crvatr. a | e s o ECDSA ecpaSic rte iy of engh 256 . T W | R seed o Eckds vt by of g 4Bt i | 8 sulc oncyption ey, My o covorid Fom EG4 bl sgring ereaion . B B 5| Svartvae of g 16 T g

Master Table ol o ot ot | Lo | o Length orIndex Length Length. i

e oot BT ————— 7 B 53 camsian soigi e 55 ECOSmq i s Sy i 2 « 55 212t St ashm ot 2 o oo zom 2 .

o CraninCots 1003 E00Swr e i vt o s . 1000 e e oy e 0 ; L ot vt Sy e : s OneTe St oo vess 5451 ST . M s X051 Sk Ot 245t o

Master Table Cate | Desarpton Code Comt Sz, Leader | Tl Longh orhdex Lengin | Length Longth Variatl Sized haratr oo 1 [sing S Ony LcrSze 0 2 2 o 1 sing B4 OnyLoder Sz | 2 B 1 . [sing Basei Ony LoderSze 2 2 2 2 S a5 Orty L Sz 0 O i o 0[S S OryLoder Sz | [ 1 5na Sing 82594 Oy Lot S i [ 2 Indexed Two haracer Cades | E2559 nterd sgrar z T 0 i | EC0SA scpas ndencdsinat B b 5 Indexed Four Chrscer Cades i | Esesaindvod o < B T 5t | Lol Bt crarsof vt ongh L whra N s vl of sl =Lrd g 2 Variab

Master Table oot [ourpen oo | comt | ot |

=R MR

==

o N [ O O B TP T—— LI T 50t cortl e ot e s £ 0 ZCHF|Cotl ol s e il o 5 T : 348 Cotf il s vl s g g . 24 Cotl ottt s g T f T## | Countof atiached quallfed Bases4 translerable Indexed sig groups pre-+snuscig + i sig group . 2 N 4ot et B i e i - g 04| Contl b sttt oo St v 4 oo : o8 Gt s s oot s Bt 4 v s O g X4 Comtl b o e s el st s T : T —— T . 24 ool g e st 4 o i ) T .

Example

Trans Indexed Sig Groups counter code 1 following group

)

trans prefix of signer for sigs

E_T2_p83_gRSUAYvGhqV350JzYEF2dIa-0CPLDIABOTY

sequence number of est event of signer's public keys for sigs

-EABORAARRAARAAARARRRAARARAB + digest of est event of signer’s public keys for sigs EwmQt1cs zNOETIDEQD-Z1h3N605B3hunRKVBBLn2 uTEM

Controller Indexed Sigs counter code 3 following sigs

-AAD

sig 0

ARS267ULFg1 3HeedDauht 7752G18HUC_0oimYG5 T£350T0SZHMBQs 95FajAi10co7XIVabkY5stG_KANDKANBAAQ

sig 1

ABBgeqntZW3Gu4HLOR30dYz6La%_SMEmITL-Bcoq 70ZFe3Ll65m0e49Url0BwHTnnBag2E_0UONDCSYgrItDpAQ

sig 2

ACTDTNDX93ZGTKZBELSeSGSAOTuUOhAGPNTZTK UnT rUZGNLRNIv0500nnC1J24 BQHux0q8 Py] AT 3BHS2Li Prs2Cy

Stream Parsing Rules

Stream start, cold restart, message end, group end: Examine tritet (3 bits). Each stream must start (restart) with one of four things:

Framing count code in either Base64 or Binary.

Framing opcode in either Base64 or Binary

JSON encoded mapping.

CBOR encoded Mapping.

MGPK encoded mapping.

(1remaining unused tritet) 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 is. When the first tritet indicates its JSON, CBOR, or MGPK, then the included version string provides the remaining and confirming information needed to fully parse the associated encoded message. When the first tritet is a framing code then, the remainder of framing code itself will include the remaining information needed to parse the attached group. The framing code may be in either Base64 or binary. Atthe end of the stream start, the stream must resume with one of the 5 things, either a new JSON, CBOR, or MGPK encoded mapping or another of two types of framing codes expressed in either Base64 or binary.

‘Why Composability Verifiable Text Stream = Verifiable Binary Stream (no loss of verifiability in mass conversion) Amount of cryptographic material in attachments far exceeds cryptographic material in message bodies. Controller signatures, witness signatures, other receipt signatures, endorsement signatures. Replay of KELs must replay messages (key events) plus signatures Want this replay to be compact, performant, and supported by bare metal protocols (TCP, UDP) Verifiable Credential world is Text Verifiable Authentic Data world human facing side is Text Verifiable Digitally Signed Contract world is Text Verifiable Audit Trail World is Text

Archival Preservation The ISO ISO 14641:2018 standard for the preservation of electronic documents, lists four important features of a legally defensible archive [33][34]. These are long-term preservation, data integrity, data security, and traceability. AKERI Key Event Receipt Log (KERL) is already in a form that provides data integrity, data security, and traceabilty. Al that is needed is to ensure long-term preservation capabiliy. The standard formats for long-term document archival are by-in-large text based (with some exceptions) [30]. What this means is that a KERI event log stream in a native text format is inherently compatible with archival requirements. Indeed because a KERL text stream with composition operators only uses the Base84URL character set, that is,[A-Z,a-2,0-9,-, ] Annotated KELs Any of the other characters in the ASCII set may be used to loss-lessly annotate a KERI text event stream. These include white space characters. Primitives and groups of framed primitives within the text KERL could then be line delimited and white spaced and comments added using the *#” symbol for example. Atext parser could easily strip all non Base-64 characters, line delimiters and comments to reconstitute the KERL stream which could then be converted en mass for transmission. The archivist never need access or convert to the raw binary format.

Legally Binding Digital Signatures (Contracts) The relevant legislation for legally compliant electronic signatures are the USA Electronic Signatures in Global and National Commerce Act (ESIGN), the USA Uniform Eletronic Transactions Act (UETA) and the EU Regulation for Electronic Identification and Electronic Trust Services (eIDAS) [27][28][29]. The legislations have similar conditions at least those relevant to KERI. When the set of legally defined conditions are met, a cryptographic digital signature based on asymmetric key pairs has legal standing. Key pairs used to control a KERI self-certifying identifier may also be used to create legally binding electronic signatures on electronic documents. Establishment of control authority is provided by cryptographically verifiable proof of key state, that is, a proof that a given set of key pairs are the authoritative ones. This proof is expressed as a KERI KERL (Key Event Receipt Log) which is a hash chained signed data structure. The most relevant condition (to KERI) that a legally binding signature must satisfy is proof or assurance that the entity creating the electronic signature is also the entity that is the controller of the associated private keys. AKERI KEL may be used to support that proof or assurance. An annotated text domain KEL could be attached to the signed legal document as an appendix or provided to an electronic signature notary. This text based annotated KEL appendix could be archived with all the associated legal documents. This greatly facilitates the broader adoption of electronic signatures and KERI. This could also help reduce trust transaction costs for the authentic data economy.

Audit Trails An audit log is used to provenance something. An annotated text domain KERL could be used to support a securely atiributed tamper evident archival audit rail [24]125](26] Gomposability would allow archival in streaming text form while also enabling efficient transmission in streaming binry form. Electronic Code of Federal Regulations: Electronic Signatures (E-GFR) regulation requires non-repudiable audit trial attribution(25] E-CFR (©) Use of secure, computer-generated, time-stamped audit trails to independently record the date and time of operator entries and actions that create, modify, or delete electronic records. Record changes shall not obscure previously recorded information. Such audit trail documentation shall be retained for a period at least as long as that required for the subject electronic records and shall be avalable for agency review and copying. () Use of operational system checks to enforce permitted sequencing of steps and events, s appropriate. (6) Use of authority checks to ensure that only authorized individuals can use the system, electronically sign a record, access the operation or computer system input or output device, alter a record, or perform the operation at hand. () The establishment of, and adherence to, written policies that hold individuals accountable and responsible for actions initiated under their electronic signatures, in order to deter record and signature falsification. The Alliance for Telecommunications Industry Solutions (ATIS ) provides various definitions for audit tral as follows [26]; Aset of records that colectively provide documentary evidence of processing used to aid in tracing from original transactions forward to related records and reports, and/or backwards from records and reports to their component source transactions. KERI supports secure attribution via non-repudiable signatures on any data in such a compliance log. The key events in the text KEL may be Interspersed in the audit trail so that the timing of key events that rotate keys may be correlated to the audit log signed data. The audit trail may be viewed as an annotated KEL. Atext processor could extract the KERL from any archived audit trail and then convert it to streaming binary for compact transmission to a processor to perform the cryptographic verification operations. This provides efficient scalable provenance.

SmithSamuelM / Papers-master, https://github.com/SmithSamuelM/Papers/blob/master/presentations/CESR_Overview.web.pdf. Licensed under the Apache License 2.0; the license and any notices are in the repository. Found through KERISSE. The abstract, the level and the labels on the catalog entry are the KERISuite Knowledge Base's own, CC BY 4.0.

Powered by Datasette · Queries took 196.356ms