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

Further expand array size support #49

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Further expand array size support #49

merged 1 commit into from
Feb 16, 2024

Commits on Feb 16, 2024

  1. Further expand array size support

    This adds support for sizes identified as needed for post-quantum
    KEM/DSA use cases, namely the ones from this comment:
    
    RustCrypto/KEMs#2 (comment)
    
    These should ideally get expanded into some consistent multiples above
    1024, e.g. multiples of 32, and generated in a purely automated manner
    (e.g. by a script that can break down the bit representation and build
    the generic syntax), but this should at least be sufficient to unblock
    these use cases.
    
    Note that `UInt<UInt<..<UTerm, B#>, B#...` aliases expressing the
    explicit bits for a given number are used instead of e.g.
    `<U1024 as Add<U32>>::Output` because when the latter is used it causes
    similar errors for conflicting trait impls as we saw with
    `typenum::U<N>` for whatever reason:
    
        error[E0119]: conflicting implementations of trait `traits::ArraySize` for type `UTerm`
           --> src/sizes.rs:82:13
            |
        82  |               unsafe impl ArraySize for $ty {
            |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            |               |
            |               first implementation here
            |               conflicting implementation for `UTerm`
    tarcieri committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    0deabc3 View commit details
    Browse the repository at this point in the history