Skip to content

Adding missing encodings for CleartextCredentials and CustomLabel #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions draft-irtf-cfrg-opaque.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,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 @@ -1586,7 +1593,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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reference to RFC8446 might potentially be overkill here.

You might also specify CustomLabel as the concatenation of I2OSP(Length, 2), I2OSP(len("OPAQUE-" + Label), 2), "OPAQUE-", Label, I2OSP(len(Context)), and Context. This would also match how Preamble is specified in 6.4.2.1.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I contemplated doing it this way, but ultimately decided that referencing the section in RFC8446 was a more concise way to describe the concatenation. Hope that this is still clear enough.


~~~
struct {
Expand Down
Loading