You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/spec.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1209,12 +1209,12 @@ Non-CESR serializations, namely, JSON, CBOR, and MGPK when interleaved in a CESR
1209
1209
1210
1210
The Version String, `v` field shall be the first field in any top-level field map of any interleaved JSON, CBOR, or MGPK serialization. It provides a regular expression target for determining a serialized field map's serialization format and size (character count) of its enclosing field map. A Stream parser may use the Version String to extract and deserialize (deterministically) any serialized Stream field maps. Each field map in a Stream may use a different serialization type from the JSON, CBOR, or MGPK set.
1211
1211
1212
-
The format of the Version String is `PPPPVVVKKKKBBBB_`. It is 16 characters in length and is divided into five parts:
1212
+
The format of the Version String is `PPPPVVVKKKKBBBB.`. It is 16 characters in length and is divided into five parts:
1213
1213
* Protocol: `PPPP` four character version string (for example, `KERI` or `ACDC`)
1214
1214
* Version: `VVV` three character major minor version (described below)
1215
1215
* Serialization kind: `KKKK` four character string of the types (`JSON`, `CBOR`, `MGPK`, `CESR`)
1216
1216
* Serialization length: `BBBB` integer encoded in Base64
1217
-
* terminator character `_`
1217
+
*version 2.XX terminator character `.`
1218
1218
1219
1219
The first four characters, `PPPP` indicate the protocol. Each genus of a given CESR code table set may support multiple protocols.
1220
1220
@@ -1224,7 +1224,7 @@ The next four characters, `KKKK` indicate the serialization kind in uppercase. T
1224
1224
1225
1225
The next four characters, `BBBB`, provide in Base64 notation the total length of the serialization, inclusive of the Version String and any prefixed characters or bytes. This length is the total number of characters in the serialization of the field map. The maximum length of a given field map serialization is thereby constrained to be 64<sup>4</sup> = 2<sup>24</sup> = 16,777,216 characters in length. This is deemed generous enough for the vast majority of anticipated applications. For serializations that may exceed this size, a secure hash chain of Messages may be employed where the value of a field in one Message is the cryptographic digest, SAID of the following Message. The total size of the chain of Messages may, therefore, be some multiple of 2<sup>24</sup>.
1226
1226
1227
-
The final character `_` is the Version String terminator. This enables later Versions of a protocol to change the total Version String size and thereby enable versioned changes to the composition of the fields in the Version String while preserving deterministic regular expression extractability of the Version String.
1227
+
The final character `.` is the Version String terminator. This enables later Versions of a protocol to change the total Version String size and thereby enable versioned changes to the composition of the fields in the Version String while preserving deterministic regular expression extractability of the Version String.
1228
1228
1229
1229
Although a given field map serialization kind may have characters or bytes such as field map delimiters or Framing Codes that appear before, i.e., prefix the Version String field in a serialization, the set of possible prefixes for each of the supported serialization kinds is sufficiently constrained by the allowed serialization protocols to guarantee that a regular expression can determine unambiguously the start of any ordered field map serialization that includes the Version String as the first field value. Given the length of the serialization provided by the Version String, a parser may then determine the end of the serialization to extract the full field map serialization from the Stream without first deserializing it. This enables performant Stream parsing and off-loading of Streams that include any or all of the supported serialization types.
1230
1230
@@ -1237,7 +1237,7 @@ The format of the Version String for version 1.XX is `PPPPvvKKKKllllll_`. It is
1237
1237
* Version: `vv` twocharacter major minor version (described below)
1238
1238
* Serialization kind: `KKKK` four character string of the types (`JSON`, `CBOR`, `MGPK`, `CESR`)
1239
1239
* Serialization length: `llllll` integer encoded in lowercase hexidecimal (Base 16) format
1240
-
* terminator character `_`
1240
+
*legacy version terminator character `_`
1241
1241
1242
1242
The first four characters, `PPPP` indicate the protocol.
1243
1243
@@ -1568,7 +1568,7 @@ Signatures on SAD content require signing the serialized encoding format of the
1568
1568
1569
1569
```json
1570
1570
{
1571
-
"v": "KERI10JSON00011c_"
1571
+
"v": "KERICAAJSONAAQB."
1572
1572
}
1573
1573
```
1574
1574
@@ -1592,7 +1592,7 @@ The SAD Path Signature Group provides a four-character Count Code, `-J##`, for a
1592
1592
1593
1593
```json
1594
1594
{
1595
-
"v": "KERI10JSON00011c_",
1595
+
"v": "KERICAAJSONAAQB.",
1596
1596
"t": "exn",
1597
1597
"dt": "2020-08-22T17:50:12.988921+00:00",
1598
1598
"r": "/credential/offer",
@@ -1678,7 +1678,7 @@ The root path is the single `-` character meaning that all subsequent SAD Paths
0 commit comments