RustCrypto / hybrid-array

Hybrid typenum/const generic arrays
Apache License 2.0
9 stars 8 forks source link

Support Arrays Up to U1277 #78

Closed oddcoder closed 4 months ago

oddcoder commented 4 months ago

This is a bit annoying I can imagine but NTRU-prime performs ring operation on polynomials of lengths that can go up to 1277

so naturally, it will be nice if hybrid arrays can support that. There is another problem which is which is U1277 is not even part of typenum so we can open PR there to extend the numbers in there, or we can add the numbers locally to hybrid-array so we can implement the appropriate trait.

If you can accept numbers up to U1277 to be defined in hybrid array along side the respective derives. I can roll up a quick PR tonight actually.

To observe the usage of such number check possible values of p here then you can check the functions that operate on arrays of size p such as R3_mult here.

If I would add the arrays here, I will add them under custom use flags so they don't have to slow the build time of everyone else.

tarcieri commented 4 months ago

There is another problem which is which is U1277 is not even part of typenum

That's not a problem. We already support sizes not defined in typenum.

It would be good to discuss this under #66, the existing issue for tracking adding additional array sizes.

Closing as dup.