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

Add basic asymmetric roundtrip tests #4314

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Aug 16, 2024

  1. Configuration menu
    Copy the full SHA
    6cef38c View commit details
    Browse the repository at this point in the history
  2. Introduce PK_Signer/PK_Verifier ::set_associated_data()

    This is a new concept introduced by FIPS 204 and 205 (ML-DSA, SLH-DSA)
    where applications get the chance to provide some context that is
    incorporated into their signatures. It is conceptually similar to the
    associated data in an AEAD, therefore it behaves similarly in the
    Signer/Verifier.
    
    Note that algorithms that don't support AD, are supposed to always throw
    when an application calls set_associated_data() on them. There is also a
    predicate function is_valid_associated_data_length() for applications to
    generically check for the support of it.
    
    Co-Authored-By: Fabian Albert <[email protected]>
    reneme and FAlbertDev committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    a3d56a4 View commit details
    Browse the repository at this point in the history
  3. Add basic asymmetric roundtrip tests

    This piggy-backs on the PK_Key_Generation_Test to perform basic
    roundtrip tests for Sign/Verify, Encrypt/Decrypt, Encaps/Decaps,
    and Key Agreement, depending on the capabilities of the keys.
    
    This is explicitly not meant to be exhaustive tests but rather
    be a centralized sanity-check for the PK_*** operators and their
    meta-data methods.
    
    Co-Authored-By: Fabian Albert <[email protected]>
    reneme and FAlbertDev committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    15d44b7 View commit details
    Browse the repository at this point in the history