crypto-bigint icon indicating copy to clipboard operation
crypto-bigint copied to clipboard

Support for creating `BoxedMontyParams` from `ConstMontyParams`

Open jjteo74 opened this issue 1 year ago • 3 comments

Version: 0.6.0-pre.12.

I am trying to define pre-computed SSH DH groups 1 and 14-18 parameters using ConstMontyParams because groups 15-18 take a long time to compute--more than 5s (debug) for group 18 with modulus U8192 on my laptop. And to do DH shared secret computation in BoxedUint for good hygiene.

However, there doesn't seem to be a way to create BoxedMontyParams from either MontyParams or ConstMontyParams so the current way forward is to use OnceLock<Arc<BoxedMontyParams>>, but this is not ideal.

Is there a way to pre-compute BoxedMontyParams?

jjteo74 avatar Apr 08 '24 13:04 jjteo74

We don't yet have an easy From conversion for this but it should be easy to add

tarcieri avatar May 10 '24 00:05 tarcieri

Thanks for the reply.

jjteo74 avatar May 13 '24 07:05 jjteo74

Reopened this so we can track adding an appropriate From impl

tarcieri avatar May 13 '24 13:05 tarcieri