mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
- Fix bn256/gnark imports to use crypto/bitutil instead of standalone bitutil - Remove unused secp256k1 import from crypto.go - Fix mlkem test files to use correct API (GenerateKeyPair returns pub,priv,err) - Fix mlkem constant names (MLKEM512SharedKeySize not SharedSecretSize) - Restore crypto/common types as standalone (not aliases to geth/common) - Update crypto.go and keccak.go to use crypto/common instead of geth/common - Fix secp256k1 fuzz tests to use correct DecompressPubkey/CompressPubkey API - Remove stale test files and go.work files crypto package is now fully independent of geth (geth -> crypto, not reverse)
27 lines
467 B
Go
27 lines
467 B
Go
package mlkem
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestMLKEM(t *testing.T) {
|
|
t.Run("ML-KEM-512", func(t *testing.T) {
|
|
// Mode constants use iota starting at 0
|
|
if MLKEM512 != Mode(0) {
|
|
t.Error("ML-KEM-512 mode mismatch")
|
|
}
|
|
})
|
|
|
|
t.Run("ML-KEM-768", func(t *testing.T) {
|
|
if MLKEM768 != Mode(1) {
|
|
t.Error("ML-KEM-768 mode mismatch")
|
|
}
|
|
})
|
|
|
|
t.Run("ML-KEM-1024", func(t *testing.T) {
|
|
if MLKEM1024 != Mode(2) {
|
|
t.Error("ML-KEM-1024 mode mismatch")
|
|
}
|
|
})
|
|
}
|