1 hour ago · Tech · hide · 0 comments

I don’t do a lot of Python, at least not in my most recent life.1 However, I happen to have just written a production ML-DSA verifier in pure Python. It’s 350 lines of code (plus many more of tests), it supports all parameter sets, and I am pretty satisfied with it. You can fetch it as mldsa from PyPI, thanks to William Woodruff, or you can copy-paste it: it’s a single file without dependencies and it’s dual-licensed CC0 and 0BSD. It works with Python 3.8 and later. The API is modeled after the excellent pyca/cryptography. import mldsa vk = mldsa.VerificationKey(verification_key_bytes) try: vk.verify(signature, message) except mldsa.VerificationError: print("invalid signature!") I hope this will make it easier for some projects to migrate to post-quantum authentication, which has suddenly become more urgent than we all anticipated. In particular, I hope it will unblock some client applications that can’t use C extensions for portability reasons. Modern Python package management,…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.