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

Make the PRF hardware module friendly #5

Closed
martinthomson opened this issue Apr 17, 2014 · 4 comments
Closed

Make the PRF hardware module friendly #5

martinthomson opened this issue Apr 17, 2014 · 4 comments

Comments

@martinthomson
Copy link
Contributor

Mike StJohns points out several ways in which the current PRF is inimical to clean hardware module design in an email and in a draft.

@martinthomson martinthomson mentioned this issue Apr 17, 2014
@martinthomson
Copy link
Contributor Author

Mike's proposal:

My PRF proposal is to change the PRF to a counter based PRF

prf_step (i, secret, label, context, total_length) =
     MAC (secret, i + label + 0x00 + context + total_length); // i and total_length are uint32 big endian
prf_data (secret, label, context, total_length) =
     CONCAT (i = 1 to CEIL(total_length/blocksize), prf_step (i, secret, label, context, total_length))[0..total_length-1];

For deriving keys, you use the above construct and a master secret. For using this for the production of random public data (e.g. IVs), you use a '0' key of the appropriate length. The externalized functions are the KDF function (which passes in a key) and the DRBG (deterministic random bit generator) (which doesn't pass in a key), but the underlying implementation is common. The PRF function is never externalized.

@briansmith
Copy link
Contributor

Mike's suggestion is to base the KDF on SP800-108. However, I thought IETF decided to try to move new protocols to HKDF [1]. Selection of an SP800-108-based mechanism would require a clear justification for why it is used instead of HKDF.

[1] https://tools.ietf.org/html/rfc5869

@ekr
Copy link
Contributor

ekr commented Sep 22, 2015

Consensus at interim.

  1. Label + length is enough.
  2. Add:
    • length + label
    • all labels will now have "TLS 1.3, " in front of them.

@ekr
Copy link
Contributor

ekr commented Sep 22, 2015

Done

@ekr ekr closed this as completed Sep 22, 2015
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

No branches or pull requests

3 participants