Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit a09182f

Browse files
authored
Minor updates to protocol spec (#16)
Minor corrections/additions to protocol spec. Fix issues #29 and #36 Signed-off-by: Chandrakar, Prateek <prateek.chandrakar@intel.com>
1 parent 4675e14 commit a09182f

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

docs/protocol-specification/protocol-data-types.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ string is *((n+2)/3)\*4*, using integer arithmetic.[^5]
123123
2 4 ab YWI=
124124
3 4 abc YWJj
125125
4 8 abcd YWJjZA==
126-
5 8 abcde YWJjZGU=
127126

128127

129128
To simplify the parser, we specify that ByteArrays always contain encoded data
@@ -163,12 +162,7 @@ is used to indicate the name of the quantity and the JSON\* type.
163162
]
164163
```
165164
</td>
166-
<td>See section <a href="../data-transmission-persistence/index.html#data-transmission-persistence">§</a>. The length is stored in hexadecimal format fully specified as 4 hex characters. A message longer than 0xFFFF bytes is stored as a 32-bit hexadecimal number fully specified as 8 hex characters.</td>
167-
</tr>
168-
<tr>
169-
<td></td>
170-
<td>Length((String containing hex),</td>
171-
<td></td>
165+
<td>See section <a href="../data-transmission-persistence/index.html#data-transmission-persistence">§</a>. The length is stored in hexadecimal format fully specified as 4 hex characters. A message longer than 0xFFFF bytes is stored as a 32-bit hexadecimal number fully specified as 8 hex characters. Implementations should store hex strings using upper case letters. Implementations should parse hex strings whether they have upper case or lower case letters in them. This message header need not be transmitted in some protocols.</td>
172166
</tr>
173167
<tr>
174168
<td>ProtocolVersion</td>
@@ -227,8 +221,8 @@ https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
227221
<td>
228222
```json
229223
[
230-
modBytes, # size of group number
231-
modba(ByteArray), # group number as byte array
224+
modBytes, # Number of modulus bytes
225+
modba(ByteArray), # Modulus as byte array
232226
expBytes, # Exponent bytes
233227
expba(ByteArray) # Exponent as byte array
234228
]
@@ -250,7 +244,7 @@ https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
250244

251245
The group no identifies the specific Intel<sup>®</sup> EPID public key used to
252246
generate the signature. The actual key value is extracted from Intel<sup>®</sup> EPID artifacts are maintained by Intel.
253-
/td>
247+
</td>
254248
</tr>
255249
<tr>
256250
<td>SigInfo</td>
@@ -362,12 +356,12 @@ section <a href="index.html#device-attestation-signature-and-mechanism">§</a> .
362356
</tr>
363357
<tr>
364358
<td>Nonce</td>
365-
<td>ByteArray\* (16 bytes)</td>
359+
<td>ByteArray (16 bytes)</td>
366360
<td>128-bit Random number, intended to be used *only once*.</td>
367361
</tr>
368362
<tr>
369363
<td>GUID</td>
370-
<td>ByteArray\* (16 bytes)</td>
364+
<td>ByteArray (16 bytes)</td>
371365
<td>128-bit Random number used for identification. Typically 128 bits.</td>
372366
</tr>
373367
<tr>

docs/protocol-specification/protocol-description.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ The following steps describe the Diffie-Hellman key exchange protocol
716716
(DHKEXid15), as part of the verification of the Ownership Voucher:
717717

718718
1. The Device and Owner each choose random numbers (Owner: a, Device: b), and
719-
encode these numbers into exchanged parameters A = ga mod p, and B = gb mod
719+
encode these numbers into exchanged parameters A = g<sup>a</sup> mod p, and B = g<sup>b</sup> mod p
720720

721721
1. The values “p” and “g” are chosen from
722722
[[RFC3526]] , with sizes as follows:
@@ -932,8 +932,8 @@ concatenation, and blen(x) length of x in bytes. The output of blen(x) is a
932932
randoms when used with larger SEK and SVK for future crypto. Please contact
933933
the Secure Device Onboard Enablement team for details.**
934934

935-
- Shy is not used to compute the shared secret ShSe because it can be derived
936-
from Shx and the curve equation. Hence it provides no additional entropy.
935+
- Sh<sub>y</sub> is not used to compute the shared secret ShSe because it can be derived
936+
from Sh<sub>x</sub> and the curve equation. Hence it provides no additional entropy.
937937

938938
#### Key Derivation Function
939939

@@ -968,8 +968,8 @@ bits (see Table ‎3):
968968

969969
!!! Note
970970
The operation is HMAC-SHA-256[key, value], so the zero argument above
971-
indicates a HMAC with key of zero (0). Since HMAC keys are zero padded (See
972-
), this should be sufficient to generate a consistent HMAC operation.
971+
indicates a HMAC with key of zero (0). Since HMAC keys are zero padded,
972+
this should be sufficient to generate a consistent HMAC operation.
973973

974974
The above strings are ASCII with no terminator character (that is, C ‘&bsol;000’
975975
terminator is not included).

0 commit comments

Comments
 (0)