Sitemap
Press enter or click to view image in full size

Member-only story

Help with AWS ML-DSA

2 min readJun 22, 2025

--

Can anyone help me here?

It is great to see that AWS has integrated ML-DSA, and which will allow us to migrate away from RSA and ECDSA and towards a quantum-robust method. While the Python code works fine, I am unable to verify my ML-DSA signature using the CLI version. For this, I have tried so many different versions of:

% aws kms sign - key-id 71ed4d4e-b4f0–45f7–8645–6b9c847e9a57 - message fileb://1.txt - signing-algorithm ML_DSA_SHAKE_256 - query Signature - output text | base64 -d > 1.sig
% aws kms verify - key-id 71ed4d4e-b4f0–45f7–8645–6b9c847e9a57 - message fileb://1.txt - signature fileb://1.sig - signing-algorithm ML_DSA_SHAKE_256

And I always get:

"An error occurred (KMSInvalidSignatureException) when calling the Verify operation: "

Perhaps AWS needs to improve their exception handling for ML-DSA?

I even tried the example of the AWS web page on Windows and Mac OS:

% aws kms sign - key-id 71ed4d4e-b4f0–45f7–8645–6b9c847e9a57 - message 'eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJNTC1EU0EtNjUifQ.eyJpc3MiOiJqb2UiLA0KICJleHAiOjE3NDg5NTIwMDAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ' - message-type RAW - signing-algorithm ML_DSA_SHAKE_256 - output text - query Signature | base64 -d > ExampleSignature.bin
% aws kms verify - key-id…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.