Skip to content

Add ML-DSA (AKP) support to step crypto jwk, jws, and jwt - #1742

Open
maraino wants to merge 5 commits into
masterfrom
mariano/jose
Open

maraino wants to merge 5 commits into
masterfrom
mariano/jose

Conversation

@maraino

@maraino maraino commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator
  • Create AKP JWKs with ML-DSA-44, ML-DSA-65, and ML-DSA-87
  • Infer the key type and use from --alg when --kty is not set
  • Allow jwk public and thumbprint to read from a file or STDIN
  • Allow creating JWK provisioners with ML-DSA keys
  • Upgrade go.step.sm/crypto to v0.92.1

- Create AKP JWKs with ML-DSA-44, ML-DSA-65, and ML-DSA-87
- Infer the key type and use from --alg when --kty is not set
- Allow jwk public and thumbprint to read from a file or STDIN
- Allow creating JWK provisioners with ML-DSA keys
- Upgrade go.step.sm/crypto to v0.92.1
@maraino
maraino requested a review from hslatman November 21, 2026 01:41
@github-actions github-actions Bot added the needs triage Waiting for discussion / prioritization by team label Nov 21, 2026
Comment thread command/crypto/jwk/create.go Resolved
Comment thread command/crypto/jwk/create.go Resolved
Comment thread integration/crypto_test.go Resolved

if mldsa.Supported {
_, mldsa44JSONBytes := generateJWK(t, "AKP", "ML-DSA-44")
err = os.WriteFile(filepath.Join(e.Cd, "mldsa44.json"), mldsa44JSONBytes, 0600)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't referenced in a .txtar, so likely needs to be added as a test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with d293c49

Comment on lines +208 to +211
err = os.WriteFile(filepath.Join(e.Cd, "mldsa44.json"), mldsa44JSONBytes, 0600)
require.NoError(t, err)
err = os.WriteFile(filepath.Join(e.Cd, "mldsa44token.txt"), []byte(mldsa44Token), 0600)
require.NoError(t, err)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with d293c49

Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
@hslatman

Copy link
Copy Markdown
Member

The PR lists Allow creating JWK provisioners with ML-DSA keys. I assume that's through creating the JWK first, and then step ca provisioner add ...? I think that makes sense and is likely sufficient, but there's also step ca provisioner add ... --create, which will create a JWK provisioner using default settings (through jose.GenerateDefaultKeyPair). We could add support for --alg and/or --kty to that command in a follow-up, as that would be new functionality.

maraino and others added 2 commits November 24, 2026 12:54
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
@maraino

maraino commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

The PR lists Allow creating JWK provisioners with ML-DSA keys. I assume that's through creating the JWK first, and then step ca provisioner add ...? I think that makes sense and is likely sufficient, but there's also step ca provisioner add ... --create, which will create a JWK provisioner using default settings (through jose.GenerateDefaultKeyPair). We could add support for --alg and/or --kty to that command in a follow-up, as that would be new functionality.

@hslatman Yes, that's creating the JWK first, and then using

step-dev ca provisioner add mldsa --public-key mldsa.pub.json --private-key mldsa.json

@maraino
maraino requested a review from hslatman November 24, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants