Skip to content

fix: ML-KEM key size test expectations wrong (expects 2400, gets 64 bytes) #69

@CodeMonkeyCybersecurity

Description

Summary

Tests in pkg/crypto/pq/mlkem_test.go expect ML-KEM-768 private key size of 2400 bytes but get 64 bytes. This causes test failures across TestGenerateMLKEMKeypair, TestValidateMLKEMPrivateKey, and TestGenerateHybridKeypair.

Evidence

expected: 2400
actual  : 64

Root Cause

Likely a Go library version change where the key representation format changed, or the key generation function returns a seed rather than the expanded key.

Impact

  • pkg/crypto test suite fails
  • Coverage measurements are inaccurate

Acceptance Criteria

  • All ML-KEM tests pass
  • Key size assertions match actual library output
  • Coverage for pkg/crypto/pq exceeds 70%

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions