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

crypto-refresh: minor fixes and updates for X25519/Ed25519 (new format) #1687

Merged
merged 7 commits into from
Oct 10, 2023

Commits on Oct 3, 2023

  1. Add enums.publicKey.eddsaLegacy

    Set to replace `enums.publicKey.eddsa`, which can still be used everywhere,
    but it will be dropped in v6.
    Deprecation notices have been added to ease transition.
    larabr committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5b28355 View commit details
    Browse the repository at this point in the history
  2. Always select SHA-256 or longer hash for Ed25519 signatures (new format)

    Due to a bug, a shorter hash could be selected, and signing would throw as a result.
    This change fixes the issue by automatically picking SHA-256, if needed.
    The same was already done for legacy EdDSA signatures.
    larabr committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    01b02d6 View commit details
    Browse the repository at this point in the history
  3. Fix binding signature generation using shorter hash than expected for…

    … some ECDSA subkeys
    
    The required hash size was determined based on the subkey algo rather than the primary key.
    As a result, if the subkey being certified required a shorter hash size than the ECDSA primary key,
    the issued signature would include a shorter digest than expected.
    
    This issue is not expected to have practical security impact, and
    it only affected keys with ECDSA subkeys with smaller key sizes than their ECDSA primary key
    (e.g. NIST p521 primary key and NIST p256 subkey).
    larabr committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    1fd9d2f View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2023

  1. Configuration menu
    Copy the full SHA
    b6fbab0 View commit details
    Browse the repository at this point in the history
  2. Do not clamp generated private key in X25519 (new format)

    This was required by legacy ECDH over curve25519, but not for the new format.
    Relevant spec: https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#name-curve25519legacy-ecdh-secre
    larabr committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    c0f57df View commit details
    Browse the repository at this point in the history
  3. Reject signatures with hash digest shorter than 256-bit for ed25519

    As mandated by the new crypto-refresh spec.
    This applies to both the new and legacy EdDSA format.
    For the legacy signatures, it is not expected to be a breaking change, since the spec
    already mandated the use SHA-256 (or stronger).
    larabr committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    a12ca97 View commit details
    Browse the repository at this point in the history
  4. Add enums.curve.ed25519Legacy and .x25519Legacy

    Set to replace `enums.curve.ed25519` (resp. `.curve25519`), which can still be used everywhere,
    but it will be dropped in v6.
    Deprecation notices have been added to ease transition.
    larabr committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    99ba76c View commit details
    Browse the repository at this point in the history