Skip to content
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

Use psk_key instead of psk_id #1

Merged
merged 1 commit into from
Aug 13, 2022
Merged

Conversation

voluntas
Copy link
Contributor

Fixed to use psk key instead of psk_id when using secret in the KeySchedule function.

reference

https://www.rfc-editor.org/rfc/rfc9180.html#section-5.1

def KeySchedule<ROLE>(mode, shared_secret, info, psk, psk_id):
  VerifyPSKInputs(mode, psk, psk_id)

  psk_id_hash = LabeledExtract("", "psk_id_hash", psk_id)
  info_hash = LabeledExtract("", "info_hash", info)
  key_schedule_context = concat(mode, psk_id_hash, info_hash)

  // psk_key is used instead of psk_id
  secret = LabeledExtract(shared_secret, "secret", psk)

@jedisct1 jedisct1 merged commit 9799bfe into jedisct1:master Aug 13, 2022
@jedisct1
Copy link
Owner

Good catch! Thank you!

@voluntas voluntas deleted the fix-psk branch August 13, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants