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

Refactor: Have a common base for Kyber/Dilithium structures #4024

Merged
merged 7 commits into from
Jul 15, 2024

Commits on Jul 15, 2024

  1. Configuration menu
    Copy the full SHA
    d6e0bf7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb374ca View commit details
    Browse the repository at this point in the history
  3. Add common utilities for CRYSTALS Kyber/Dilithium

    Most notably, this is an abstract implementation to handle CRYSTALS
    polynomials, poly vectors and poly matrices. Also, a generic
    implementation for bit-packed encoding/decoding of coefficients
    useful for both Kyber and Dilithium.
    
    Co-Authored-By: Fabian Albert <[email protected]>
    reneme and FAlbertDev committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    757c006 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    06480e6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ae8eb45 View commit details
    Browse the repository at this point in the history
  6. Cache the result of ntt(t1 << D) in the verification op

    t1 is part of the public key and thus independent of any other verification input.
    Precomputing it saves about 20% of verification runtime when performing more than
    a single verification with the same Botan::PK_Verifier.
    
    Co-Authored-By: Fabian Albert <[email protected]>
    reneme and FAlbertDev committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ebfd459 View commit details
    Browse the repository at this point in the history
  7. Kyber/Dilithium_PK::key_length() returns canonical parameter set ID

    For Kyber those are {512,768,1024} and for Dilithium {44,65,87}
    depending on the respective choice of parameter set.
    reneme committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    8bd26c7 View commit details
    Browse the repository at this point in the history