Skip to content

v0.11.0-beta.2: ECDH-KEM Serialization Support (Fixed)

Pre-release
Pre-release

Choose a tag to compare

@NoCentralHub NoCentralHub released this 26 Jul 18:45
· 253 commits to master since this release

This release fixes compilation errors in v0.11.0-beta.1 and delivers comprehensive serialization support for all ECDH-KEM types.

🐛 Bug Fixes

  • Fixed compilation errors from v0.11.0-beta.1
    • Removed non-existent generic type re-exports from prelude
    • Users should import specific implementations directly (e.g., use dcrypt::kem::ecdh::p256::EcdhP256PublicKey)

✨ New Features (from v0.11.0-beta.1)

  • Serialization for all ECDH-KEM types - All key types now support from_bytes() and to_bytes() methods:
    • PublicKey, SecretKey, SharedSecret, and Ciphertext
    • Supported curves: B-283k, K-256, P-192, P-224, P-256, P-384, P-521
    • Comprehensive validation including point-on-curve checks
    • Identity point rejection for enhanced security

🔒 Security Improvements

  • Secret key exports now use Zeroizing wrapper to ensure sensitive data is cleared from memory
  • All deserialization methods validate inputs to prevent creation of invalid keys

⚠️ Breaking Changes

  • P-384 KEM shared secret size corrected from 32 to 48 bytes
    • P-384 correctly uses SHA-384 which produces 48-byte outputs
    • Systems using P-384 ECDH-KEM must update together as old and new versions are incompatible

📦 Installation

[dependencies]
dcrypt = "0.11.0-beta.2"

🔄 Migration Guide

If you're using P-384 ECDH-KEM, you'll need to regenerate any stored shared secrets as the output size has changed. All other curves remain compatible with previous versions.

For importing types, use specific implementations:

// Instead of generic types from prelude
use dcrypt::kem::ecdh::p256::{EcdhP256PublicKey, EcdhP256SecretKey};
use dcrypt::sign::dilithium::{DilithiumSigningKey, DilithiumVerifyingKey};

Note: This is a beta release. The library has not been independently audited and is not recommended for production use.