Closed mcarrickscott closed 1 month ago
Verification fails. Why?
That's not surprising as final MLDSA is not yet integrated (see https://github.com/open-quantum-safe/liboqs/issues/1891).
Sigh.. So why call it MLDSA if its not...
Sigh.. So why call it MLDSA if its not...
Point taken. My fault. I assumed we'd be able to do all in one go but didn't.
openssl genpkey -provider=oqsprovider -provider=default -algorithm mldsa65 -out mldsa65.key
openssl pkey -provider=oqsprovider -provider=default -in mldsa65.key -noout -pubout -text_pub > t.txt sed '1,2d' t.txt | tr -d ': ' |tr -d '\n' > PUB
openssl pkeyutl -provider=oqsprovider -provider=default -in hello.txt -inkey mldsa65_CA.key -sign -out sign.out hexdump -ve '1/1 "%02x"' sign.out > SIG
where hello.txt contains "hello world" - 6865 6c6c 6f20 776f 726c 640a Copy contents of PUB and SIG into python implementation from https://github.com/GiacomoPope/dilithium-py
from dilithium_py.ml_dsa import ML_DSA_65
pub_string="PUB" sig_string="SIG"
pub=bytes.fromhex(pub_string); sig=bytes.fromhex(sig_string);
print("PUB len=",len(pub)) print("SIG len=",len(sig))
print(ML_DSA_65.verify(pub, b"hello world\n", sig))
Verification fails. Why?