120 days ago · Tech · hide · Fediverse post

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,…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town