Skip to content

Curve448: Ed448 signatures and X448 key exchange #163

Backlog

Description

@WingZer0o

Summary

cas-lib has Ed25519 and X25519 but not their Curve448 counterparts. Ed448 (RFC 8032) and X448 (RFC 7748) give a ~224-bit security level, are allowed in FIPS 186-5 and TLS 1.3, and are the conservative choice where Curve25519's 128-bit level isn't enough.

Upstream

Scope

  • Ed448 keygen, sign, verify (with optional context string)
  • X448 keygen and Diffie-Hellman

Implementation notes

  • Follow the module pattern: trait in cas_<module>.rs, impl in <algorithm>.rs, declared in src/lib.rs (no top-level re-exports).
  • Return CasResult<T> and never panic (a panic across the FFI boundary is UB); add CasError variants only by appending (stable ABI codes).
  • Zeroize intermediate secret buffers with zeroize::Zeroizing; structs holding secrets get a redacting Debug impl (see src/pqc/cas_pqc.rs).
  • Mirror the Ed25519 (src/signatures/ed25519.rs) and X25519 (src/key_exchange/x25519.rs) APIs and result structs.
  • Use strict verification for Ed448 (as Security (Low): ed25519_verify_with_key_pair uses permissive (non-strict) verification #118 did for Ed25519) and reject low-order / all-zero X448 results (as Security (Medium): X25519 accepts low-order public keys, and the X25519-to-AES helpers share one HKDF info #112 did for X25519).
  • Version choice: the latest stable ed448-goldilocks (0.9) and x448 (0.6) are older than the 0.14 pre-releases in the elliptic-curves workspace. Pick one generation for both crates, check cargo audit, and say which in the PR.

Tests

  • Wycheproof: ed448_test.json, x448_test.json.
  • RFC 8032 section 7.4 and RFC 7748 section 6.2 vectors under tests/data/.

Docs

  • Add a complete, runnable fn main() example for each new API to docs/EXAMPLES.md and keep its Table of Contents in sync.

Activity

  1. added
    enhancement
    on Nov 27, 2026
  2. WingZer0o commented on Nov 27, 2026

    @WingZer0o
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions