Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML-DSA-65 verification failure? #538

Closed
mcarrickscott opened this issue Oct 10, 2024 · 3 comments
Closed

ML-DSA-65 verification failure? #538

mcarrickscott opened this issue Oct 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mcarrickscott
Copy link

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?

@mcarrickscott mcarrickscott added the bug Something isn't working label Oct 10, 2024
@baentsch
Copy link
Member

Verification fails. Why?

That's not surprising as final MLDSA is not yet integrated (see open-quantum-safe/liboqs#1891).

@mcarrickscott
Copy link
Author

Sigh.. So why call it MLDSA if its not...

@baentsch
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants