Skip to content

k256: add Scalar::from_digest#78

Merged
tarcieri merged 1 commit into
masterfrom
k256/scalar-from-digest
Jul 16, 2020
Merged

k256: add Scalar::from_digest#78
tarcieri merged 1 commit into
masterfrom
k256/scalar-from-digest

Conversation

@tarcieri

Copy link
Copy Markdown
Member

This PR is an alternative to #76

This method is intended for use when implementing ECDSA, namely for computing a Scalar from the hash of the message:

https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm#Signature_generation_algorithm

  1. Calculate 𝑒 = HASH(𝑚)
  2. Let 𝐳 be the 𝐋𝑛 leftmost bits of 𝑒, where 𝐋𝑛 is the bit length of the group order 𝑛

This method is intended for use when implementing ECDSA, namely for
computing a `Scalar` from the hash of the message:

https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm#Signature_generation_algorithm

1. Calculate 𝑒 = HASH(𝑚)
2. Let 𝐳 be the 𝐋𝑛 leftmost bits of 𝑒, where 𝐋𝑛 is the bit length of the
   group order 𝑛
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #78 into master will decrease coverage by 0.40%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
- Coverage   55.91%   55.51%   -0.41%     
==========================================
  Files          15       15              
  Lines        2897     2918      +21     
==========================================
  Hits         1620     1620              
- Misses       1277     1298      +21     
Impacted Files Coverage Δ
k256/src/arithmetic/scalar.rs 81.62% <0.00%> (-0.45%) ⬇️
k256/src/arithmetic/scalar/scalar_4x64.rs 90.55% <0.00%> (-3.22%) ⬇️
k256/src/arithmetic/scalar/scalar_8x32.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37125d0...5b5368f. Read the comment docs.

@tarcieri tarcieri merged commit 6b6758a into master Jul 16, 2020
@tarcieri tarcieri deleted the k256/scalar-from-digest branch July 16, 2020 18:26
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