Skip to content

Commit

Permalink
Adding missing encodings for CleartextCredentials and CustomLabel (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlewi authored Nov 21, 2024
1 parent b1bcca6 commit bc85917
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions draft-irtf-cfrg-opaque.md
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,14 @@ def Store(randomized_password, server_public_key,
CreateCleartextCredentials(server_public_key, client_public_key,
server_identity, client_identity)
auth_tag =
MAC(auth_key, concat(envelope_nonce, cleartext_credentials))
MAC(auth_key, concat(
envelope_nonce,
server_public_key,
I2OSP(len(cleartext_credentials.server_identity), 2),
cleartext_credentials.server_identity,
I2OSP(len(cleartext_credentials.client_identity), 2),
cleartext_credentials.client_identity
))

envelope = Envelope {
envelope_nonce,
Expand Down Expand Up @@ -1589,7 +1596,7 @@ Expand-Label(Secret, Label, Context, Length) =
Expand(Secret, CustomLabel, Length)
~~~

Where CustomLabel is specified as:
Where CustomLabel is specified and encoded (following Section 3.4 of {{?RFC8446}}) as:

~~~
struct {
Expand Down

0 comments on commit bc85917

Please sign in to comment.