Skip to content

Commit e43395a

Browse files
committed
Define PAE more rigorously to avoid ambiguity
1 parent 27ce241 commit e43395a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

protocol.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ Functions:
5757
* PAE() is the "Pre-Authentication Encoding", where parameters `type` and
5858
`body` are byte sequences:
5959

60-
```python
61-
PAE(type, body) := "DSSEv1 <len(type)> <type> <len(body)> <body>"
62-
len(s) := ASCII decimal encoding of the byte length of s, with no leading zeros
60+
```none
61+
PAE(type, body) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(body) + SP + body
62+
+ = concatenation
63+
SP = ASCII space [0x20]
64+
"DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
65+
LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
6366
```
6467
6568
* Sign() is an arbitrary digital signature format. Details are agreed upon

0 commit comments

Comments
 (0)