mirror of
https://github.com/zap-proto/rns.git
synced 2026-10-30 15:04:02 +00:00
Adds the minimum-viable PQ-RNS conformance test:
- did.go: ComputeDID(kemPubKey, sigPubKey) — base32 lowercase no-padding
of SHA3-256(kemPubKey || sigPubKey), prefixed "did⚡"
- did_test.go: Go test that reads testdata/pqrns_kat.json and verifies
the implementation reproduces the canonical DID
- testdata/pqrns_kat.json: language-neutral fixture — fixed input keys
(1216 bytes of 0x01 for KEM, 1984 bytes of 0x02 for sig) → fixed
SHA3-256 (72bea585...) and DID (did:zap:ok7klbkh...)
Every language SDK that implements PQ-RNS MUST reproduce the same DID
for the same inputs. The KAT catches any divergence on the hash, byte
order, base32 alphabet, or casing.
go test ./... passes locally.
5 lines
312 B
Plaintext
5 lines
312 B
Plaintext
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
|
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
|
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
|
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|