-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add primality testing #714
Comments
|
…ible with Cryptol changes. At the same time, fix a bug in the `ec_decompress`, and add a property for testing it.
CF #882, which implements the primality constraint in the type system and finite field inverses. |
With the merge of #882, we now have a Certainly, we can expose this capability at the value level, but we should spend some time thinking about the design for this feature. Are probable prime tests enough, or do we want certified primes? If certified, do we want to produce checkable certificates? Do we also want prime sampling/generation algorithms? If so, which ones? At the moment, it isn't clear to me what is actually useful to have. |
I think we can remove this ticket from the 2.10 milestone, as the work on the |
Many bits of public-key cryptography use integers modulo primes as their core mathematical foundation, and involve operations that are only well-defined for groups of prime order. For such operations, and even just documentation, it may be useful to have the ability to test whether numbers are prime within Cryptol. This may be especially useful at the type level, but once it's implemented we may want to expose it at the value level, too.
Some existing Haskell packages support both probabilistic and certified primality checking. The former is generally fast enough for regular use. The latter can be very slow for large primes, but is perhaps still useful sometimes.
The
arithmoi
package is large and complex, but does what we need. Other, simpler packages might also be available.The text was updated successfully, but these errors were encountered: