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 *ring* in the canonical way. #1

Merged
merged 1 commit into from
Oct 23, 2015
Merged

Use *ring* in the canonical way. #1

merged 1 commit into from
Oct 23, 2015

Conversation

briansmith
Copy link
Contributor

  1. Do HMAC verification using |ring::hmac::verify| as recommended in
    the ring documentation. This allows the dependency on
    constant_time_eq to be dropped.
  2. Instead of creating a temporary HMAC key in each sign/verify
    operation, calculate the HMAC key once and reuse the same key multiple
    times. This is more efficient as the creation of an HMAC key is not
    free.
  3. Do not store |salt| seperately. |salt| has already been mixed into
    |s_key| and |v_key| so it isn't needed any more.

1. Do HMAC verification using |ring::hmac::verify| as recommended in
the *ring* documentation. This allows the dependency on
constant_time_eq to be dropped.

2. Instead of creating a temporary HMAC key in each sign/verify
operation, calculate the HMAC key once and reuse the same key multiple
times. This is more efficient as the creation of an HMAC key is not
free.

3. Do not store |salt| seperately. |salt| has already been mixed into
|s_key| and |v_key| so it isn't needed any more.
@badboy
Copy link
Owner

badboy commented Oct 23, 2015

Thank you!

badboy added a commit that referenced this pull request Oct 23, 2015
@badboy badboy merged commit 3a962d5 into badboy:master Oct 23, 2015
@briansmith briansmith deleted the canonical_ring_usage branch November 7, 2015 01:33
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.

None yet

2 participants