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

Interfacing with Rust, part 2 #267

Merged
merged 24 commits into from
May 27, 2021
Merged

Interfacing with Rust, part 2 #267

merged 24 commits into from
May 27, 2021

Conversation

fjarri
Copy link
Contributor

@fjarri fjarri commented Apr 19, 2021

More changes based on the needs of nucypher. Based on top of #263

Synchronized with nucypher/rust-umbral@3cba902

  • Introducing Signer class and making generate_kfrags() take it instead of the secret key
  • Some parameter name normalization (signing_pk -> verifying_pk)
  • Removed all the supported curves other than secp256k1
  • Removed DST for the hash used in signing/verification
  • Moved generate_kfrags() to pre.py (where the rest of high-level API resides)
  • Moved backend parts of signing to openssl.py
  • CurvePoint.from_affine() is removed

# Try `r`
q = (rs - ge) * inv_r
if q == public_key.point():
return False
Copy link
Member

Choose a reason for hiding this comment

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

Noticed this yesterday during the walkthrough - how come this returns False?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function returns a recovery byte, which can only be \x00 or \x01, so I return a boolean flag instead.

@fjarri fjarri force-pushed the interfacing-2 branch 7 times, most recently from 8d88535 to d1a37c4 Compare May 27, 2021 05:52
@fjarri fjarri merged commit 2ad8223 into nucypher:master May 27, 2021
@fjarri fjarri deleted the interfacing-2 branch May 27, 2021 06:05
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.

4 participants