elliptic-curves icon indicating copy to clipboard operation
elliptic-curves copied to clipboard

x448: initial import

Open baloo opened this issue 5 months ago • 1 comments

This imports https://crates.io/crates/x448 in https://github.com/RustCrypto/elliptic-curves/

baloo avatar Jun 09 '25 04:06 baloo

cc @dignifiedquire @kevaundray

baloo avatar Jun 09 '25 05:06 baloo

This kind of broke when we merged https://github.com/RustCrypto/elliptic-curves/pull/1284

cc @daxpedda

I'm confused. I don't understand how https://www.rfc-editor.org/rfc/rfc7748#section-5 asks for the scalar to be a 56-bytes string and now the EdwardsScalar is 57 bytes.

Am I supposed to use the DecafScalar instead?

baloo avatar Jul 10 '25 19:07 baloo

Apologies, I noticed indeed that this should have been DecafScalar. I'm currently preparing another PR where I try to fix those names, because having a separate scalar for each curve when only one is special, Ed448, is a bit much.

Feel free to fix this in this PR. Basically just replace all uses of EdwardsScalar in montgomery.rs with DecafScalar.

daxpedda avatar Jul 10 '25 20:07 daxpedda

No worries, I'm not sure I'm following what you're saying, I guess I'll wait for your PR ^^

baloo avatar Jul 10 '25 20:07 baloo

I have a new and improved PR up for MontgomeryScalar: #1306.

daxpedda avatar Jul 19 '25 00:07 daxpedda

@baloo is there a specific reason this is still draft? It'd be good to get it landed so we make sure it gets updated when ed448-goldilocks is changed

tarcieri avatar Jul 20 '25 14:07 tarcieri

Its currently relying on https://github.com/RustCrypto/elliptic-curves/pull/1306. I could try to extract MontgomeryScalar from #1306 to make it easily reviewable first if that's desirable.

daxpedda avatar Jul 20 '25 15:07 daxpedda

@baloo is there a specific reason this is still draft? It'd be good to get it landed so we make sure it gets updated when ed448-goldilocks is changed

I struggled for a bit with various Scalars, #1306 fixed it for me.

I'll keep rebasing and testing along with the merges until we can get this out of draft :)

baloo avatar Jul 20 '25 15:07 baloo

I guess the scalar wasn't that hard to figure out in the end.

I've sent a PR over to @daxpedda 's branch to migrate over to MontgomeryXpoint https://github.com/khonsulabs/elliptic-curves/pull/1

baloo avatar Jul 20 '25 18:07 baloo

Is there anything else required here?

baloo avatar Aug 06 '25 17:08 baloo