Skip to content

Commit e72edbd

Browse files
authored
Merge pull request #48 from patricklawsongoogle/patch-1
Update proto signature comment to use DSSEv1 ASCII PAE encoding
2 parents c0d39aa + 9c81347 commit e72edbd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

envelope.proto

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ message Envelope {
1313
string payloadType = 2;
1414

1515
// Signature over:
16-
// le64(2) || le64(len(utf8(payloadType))) || utf8(payloadType) ||
17-
// le64(len(payload)) || payload
18-
// where:
19-
// le64(n) := 64-bit little-endian encoding of integer `n`, 0 <= n < 2^63
20-
// len(s) := number of octets in byte sequence `s`
21-
// utf8(s) := UTF-8 encoding of unicode string `s`
16+
// PAE(type, body)
17+
// Where PAE is defined as:
18+
// PAE(type, body) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(body) + SP + body
19+
// + = concatenation
20+
// SP = ASCII space [0x20]
21+
// "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
22+
// LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
2223
// REQUIRED (length >= 1).
2324
repeated Signature signatures = 3;
2425
}

0 commit comments

Comments
 (0)