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

Merge configurably sized basepoint multiplication lookup tables #350

Merged
merged 10 commits into from Apr 13, 2021

Conversation

isislovecruft
Copy link
Member

Closes #311

This implements a macro for implementing the BasepointTable trait, and
uses the macro to create basepoint table types. The default table
still uses radix-16 representation and is ~30KB in size.  The new
table types, and their memory usage and additions required per
basepoint multiplication are:

 * `EdwardsBasepointTableRadix64`: ~120KB, 43 additions
 * `EdwardsBasepointTableRadix128`: ~240KB, 37 additions
 * `EdwardsBasepointTableRadix256`: ~480KB, 32 additions
This is useful for programs/protocol which can do some heuristics or
learning-based approach towards optimising the table size based on the number of
uses of e.g. a public key, the second basepoint in a Pedersen commitment, etc.,
i.e. the first time a public key is used to verify a signature, the usual
variable-time basepoint multiscalar multiplication is used, however after 1000
verifications, the table size is upgraded, and again after 10000 verifications,
etc.
@isislovecruft isislovecruft merged commit b05feec into dalek-cryptography:develop Apr 13, 2021
@isislovecruft isislovecruft added this to the 3.1 milestone Apr 13, 2021
@isislovecruft
Copy link
Member Author

Reminder to remove the legacy 3.x series support code before doing a 4.0 release! It should just mean reverting
0da8f08, which added support for using the old basepoint table struct without having to do use curve25519_dalek::traits::BasepointTable.

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

1 participant