diff --git a/CHANGELOG.md b/CHANGELOG.md index 53c63cc5..86f56206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. SLH-DSA (smallstep/certinfo#69). - Show the enrollment time in the `Step Managed Device` extension of a certificate when it is present (smallstep/certinfo#96). +- Add support for ML-DSA keys (ML-DSA-44, ML-DSA-65, and ML-DSA-87) in the + `step crypto jwk`, `step crypto jws`, and `step crypto jwt` commands, using + the `AKP` key type (smallstep/cli#1742). +- Add support for creating JWK provisioners that use ML-DSA keys + (smallstep/cli#1742). +- Infer the key type and use from `--alg` in `step crypto jwk create` when + `--kty` is not set, for example `--alg ML-DSA-44` (smallstep/cli#1742). +- Allow `step crypto jwk public` and `step crypto jwk thumbprint` to read the + JWK from a file passed as an argument, in addition to STDIN + (smallstep/cli#1742). ### Changed @@ -46,6 +56,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Keep the original protected header in `step crypto jose format`, reordering its fields invalidated the signature or authentication tag of the token (smallstep/cli#1732). +- Reject JSON JWEs with additional authenticated data in + `step crypto jose format` when converting to the compact serialization, which + cannot carry it. The command used to print a token that could not be decrypted + (smallstep/cli#1742). +- Fix the error of `step crypto keypair` and other key commands when `--curve` + is used with an ML-DSA key type, it named `--size` as the incompatible flag + (smallstep/cli#1742). +- Fix the use of ML-DSA keys in a KMS to sign tokens, which failed with + `unsupported key type *mldsa.PublicKey` (smallstep/cli#1742). ### Security diff --git a/README.md b/README.md index 14550b58..966cee3b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Step CLI's command groups illustrate its wide-ranging uses: - Create, revoke, validate, lint, and bundle X.509 certificates. - Install (and remove) X.509 certificates into your system's (and browser's) trust store. - Validate certificate deployment and renewal status for automation - - Create key pairs (RSA, ECDSA, EdDSA) and certificate signing requests (CSRs) + - Create key pairs (RSA, ECDSA, EdDSA, ML-DSA) and certificate signing requests (CSRs) - [Sign CSRs](https://smallstep.com/docs/step-cli/reference/certificate/sign/) - Create [RFC5280](https://tools.ietf.org/html/rfc5280) and [CA/Browser Forum](https://cabforum.org/baseline-requirements-documents/)-compliant certificates that work for TLS and HTTPS - [Create](https://smallstep.com/docs/step-cli/reference/certificate/create/) CA certificates (root and intermediate signing certificates) diff --git a/command/crypto/jose/jose.go b/command/crypto/jose/jose.go index f3c8f5f0..78d52632 100644 --- a/command/crypto/jose/jose.go +++ b/command/crypto/jose/jose.go @@ -5,8 +5,8 @@ import ( "fmt" "io" "os" - "regexp" "strings" + "unicode" "github.com/pkg/errors" "github.com/urfave/cli" @@ -80,6 +80,12 @@ func formatAction(*cli.Context) error { // If it fails parse a regular JWS var srz serializer if enc, err := joseutil.ParseEncryptedInsecure(token); err == nil { + // The compact serialization cannot carry the additional authenticated + // data, and go-jose would drop it, which makes the token impossible to + // decrypt. + if strings.HasPrefix(token, "{") && len(enc.GetAuthData()) > 0 { + return errors.New("error serializing data: compact serialization does not support additional authenticated data (aad)") + } srz = enc } else { tok, err := joseutil.ParseSignedInsecure(token) @@ -117,8 +123,10 @@ func withCompactProtected(compact, token string) string { return compact } + // Like go-jose, ignore the flattened members if there are signatures. There + // is only one at this point, the compact serialization fails otherwise. protected := jws.Protected - if protected == "" && len(jws.Signatures) == 1 { + if len(jws.Signatures) > 0 { protected = jws.Signatures[0].Protected } _, rest, ok := strings.Cut(compact, ".") @@ -144,9 +152,14 @@ func withJSONProtected(full, token string) string { `"protected":"`+protected+`"`, 1) } -var stripWhitespaceRegex = regexp.MustCompile(`\s`) - -// stripWhitespace strip all newlines and whitespace +// stripWhitespace strips all newlines and whitespace. It removes the same +// characters as the parsers, the format of the output and the protected header +// to keep are taken from the result. func stripWhitespace(data string) string { - return stripWhitespaceRegex.ReplaceAllString(data, "") + return strings.Map(func(r rune) rune { + if unicode.IsSpace(r) { + return -1 + } + return r + }, data) } diff --git a/command/crypto/jwk/create.go b/command/crypto/jwk/create.go index d53fd3ac..2ccec93c 100644 --- a/command/crypto/jwk/create.go +++ b/command/crypto/jwk/create.go @@ -2,8 +2,6 @@ package jwk import ( "bytes" - "crypto" - "encoding/base64" "encoding/json" "fmt" "strconv" @@ -130,6 +128,12 @@ Create an RSA JWK: $ step crypto jwk create rsa.pub.json rsa.json --kty RSA ''' +Create a JWK with an ML-DSA-44 key: + +''' +$ step crypto jwk create mldsa.pub.json mldsa.json --alg ML-DSA-44 +''' + Create a symmetric key (oct key type): ''' @@ -176,14 +180,17 @@ If unset, default is EC. **EC** : Create an **elliptic curve** keypair - **oct** - : Create a **symmetric key** (octet stream) + **RSA** + : Create an **RSA** keypair **OKP** : Create an octet key pair (for **"Ed25519"** curve) - **RSA** - : Create an **RSA** keypair + **AKP** + : Create an **ML-DSA-44**, **ML-DSA-65**, or **ML-DSA-87** keypair + + **oct** + : Create a **symmetric key** (octet stream) `, }, cli.IntFlag{ @@ -205,14 +212,15 @@ depends on the key use, key type, and curve (for EC and OKP keys). Defaults are: | EC | sig | P-256 | ES256 | | EC | sig | P-384 | ES384 | | EC | sig | P-521 | ES512 | - | oct | sig | N/A | HS256 | | RSA | sig | N/A | RS256 | | OKP | sig | Ed25519 | EdDSA | + | AKP | sig | N/A | ML-DSA-44 | + | oct | sig | N/A | HS256 | | EC | enc | P-256 | ECDH-ES | | EC | enc | P-384 | ECDH-ES | | EC | enc | P-521 | ECDH-ES | - | oct | enc | N/A | A256GCMKW | | RSA | enc | N/A | RSA-OAP-256 | + | oct | enc | N/A | A256GCMKW | : If the key **"use"** is **"sig"** (signing) must be one of: @@ -255,6 +263,15 @@ depends on the key use, key type, and curve (for EC and OKP keys). Defaults are: **EdDSA** : EdDSA signature algorithm + **ML-DSA-44** + : ML-DSA-44 signature algorithm (FIPS 204, RFC 9964) + + **ML-DSA-65** + : ML-DSA-65 signature algorithm (FIPS 204, RFC 9964) + + **ML-DSA-87** + : ML-DSA-87 signature algorithm (FIPS 204, RFC 9964) + : If the key **"use"** is **"enc"** (encryption) must be one of: **RSA1_5** @@ -436,12 +453,22 @@ func createAction(ctx *cli.Context) (err error) { size := ctx.Int("size") pemFile := ctx.String("from-pem") + // Get the kty and use if --alg is passed: + // step crypto jwk create --alg ML-DSA-44 ml.pub ml.priv + if alg != "" && !ctx.IsSet("kty") { + var algUse string + kty, algUse = getKeyTypeAndUseFromAlgorithm(alg, kty) + if !ctx.IsSet("use") { + use = algUse + } + } + switch kty { - case "EC": + case jose.EC: if ctx.IsSet("size") { return errs.IncompatibleFlag(ctx, "size", "--kty EC") } - case "RSA": + case jose.RSA: if ctx.IsSet("crv") { return errs.IncompatibleFlag(ctx, "crv", "--kty RSA") } @@ -455,11 +482,18 @@ func createAction(ctx *cli.Context) (err error) { return errs.MinSizeFlag(ctx, "size", "1") } } - case "OKP": + case jose.OKP: if ctx.IsSet("size") { return errs.IncompatibleFlag(ctx, "size", "--kty OKP") } - case "oct": + case jose.AKP: + switch { + case ctx.IsSet("size"): + return errs.IncompatibleFlag(ctx, "size", "--kty AKP") + case ctx.IsSet("crv"): + return errs.IncompatibleFlag(ctx, "crv", "--kty AKP") + } + case jose.OCT: if ctx.IsSet("crv") { return errs.IncompatibleFlag(ctx, "crv", "--kty oct") } @@ -498,7 +532,7 @@ func createAction(ctx *cli.Context) (err error) { } } default: - return errs.InvalidFlagValue(ctx, "kty", kty, "EC, RSA, OKP, or oct") + return errs.InvalidFlagValue(ctx, "kty", kty, "EC, RSA, OKP, AKP, or oct") } // Generate or read secrets @@ -517,13 +551,9 @@ func createAction(ctx *cli.Context) (err error) { if ctx.IsSet("kid") { jwk.KeyID = ctx.String("kid") } else if kty != "oct" { - // A hash of a symmetric key can leak information, so we only thumbprint asymmetric keys. - var hash []byte - hash, err = jwk.Thumbprint(crypto.SHA256) - if err != nil { - return errors.Wrap(err, "error generating JWK thumbprint") + if jwk.KeyID, err = jose.Thumbprint(jwk); err != nil { + return err } - jwk.KeyID = base64.RawURLEncoding.EncodeToString(hash) } jwk.Use = use @@ -659,3 +689,40 @@ func aesKeySize(alg string) int { return 0 } } + +func getKeyTypeAndUseFromAlgorithm(alg, def string) (string, string) { + const ( + sig = "sig" + enc = "enc" + ) + + // Signature algorithms + switch alg { + case jose.ES256, jose.ES384, jose.ES512: + return jose.EC, sig + case jose.RS256, jose.RS384, jose.RS512: + return jose.RSA, sig + case jose.PS256, jose.PS384, jose.PS512: + return jose.RSA, sig + case jose.EdDSA, jose.XEdDSA: + return jose.OKP, sig + case jose.MLDSA44, jose.MLDSA65, jose.MLDSA87: + return jose.AKP, sig + case jose.HS256, jose.HS384, jose.HS512: + return jose.OCT, sig + } + + // Encryption algorithms + switch jose.KeyAlgorithm(alg) { + case jose.ECDH_ES, jose.ECDH_ES_A128KW, jose.ECDH_ES_A192KW, jose.ECDH_ES_A256KW: + return jose.EC, enc + case jose.RSA1_5, jose.RSA_OAEP, jose.RSA_OAEP_256: + return jose.RSA, enc + case jose.DIRECT, + jose.A128GCMKW, jose.A192GCMKW, jose.A256GCMKW, + jose.A128KW, jose.A192KW, jose.A256KW: + return jose.OCT, enc + } + + return def, sig +} diff --git a/command/crypto/jwk/jwk.go b/command/crypto/jwk/jwk.go index a0c05091..94d7e861 100644 --- a/command/crypto/jwk/jwk.go +++ b/command/crypto/jwk/jwk.go @@ -1,6 +1,12 @@ package jwk -import "github.com/urfave/cli" +import ( + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/utils" +) // Command returns the jwk subcommand. func Command() cli.Command { @@ -93,3 +99,21 @@ L38TOXsig8h6FeBOos03nFy6iXmwusFcIBBB0ZilahY }, } } + +func readFromStdInOrFile(ctx *cli.Context) ([]byte, error) { + if err := errs.MinMaxNumberOfArguments(ctx, 0, 1); err != nil { + return nil, err + } + + var name string + switch ctx.NArg() { + case 0: + name = "-" + case 1: + name = ctx.Args().First() + default: + return nil, errs.TooManyArguments(ctx) + } + + return utils.ReadFile(name) +} diff --git a/command/crypto/jwk/public.go b/command/crypto/jwk/public.go index 349837ff..2bbd7517 100644 --- a/command/crypto/jwk/public.go +++ b/command/crypto/jwk/public.go @@ -3,8 +3,6 @@ package jwk import ( "encoding/json" "fmt" - "io" - "os" "github.com/pkg/errors" "github.com/urfave/cli" @@ -18,18 +16,23 @@ func publicCommand() cli.Command { Name: "public", Action: cli.ActionFunc(publicAction), Usage: "extract a public JSON Web Key (JWK) from a private JWK", - UsageText: `**step crypto jwk public**`, - Description: `**step crypto jwk public** command reads a JWK from STDIN, derives the -corresponding public JWK, and prints the derived JWK to STDOUT. + UsageText: `**step crypto jwk public** []`, + Description: `**step crypto jwk public** command reads a JWK from or STDIN, +derives the corresponding public JWK, and prints the derived JWK to STDOUT. + +## POSITIONAL ARGUMENTS + + +: Path to a JWK. If it is not set, the JWK is read from STDIN. For examples, see **step help crypto jwk**.`, } } -func publicAction(*cli.Context) error { - b, err := io.ReadAll(os.Stdin) +func publicAction(ctx *cli.Context) error { + b, err := readFromStdInOrFile(ctx) if err != nil { - return errors.Wrap(err, "error reading from STDIN") + return err } jwk := new(jose.JSONWebKey) diff --git a/command/crypto/jwk/thumbprint.go b/command/crypto/jwk/thumbprint.go index a91661ad..54dfd9a7 100644 --- a/command/crypto/jwk/thumbprint.go +++ b/command/crypto/jwk/thumbprint.go @@ -1,12 +1,8 @@ package jwk import ( - "crypto" - "encoding/base64" "encoding/json" "fmt" - "io" - "os" "github.com/pkg/errors" "github.com/urfave/cli" @@ -20,19 +16,24 @@ func thumbprintCommand() cli.Command { Name: "thumbprint", Action: cli.ActionFunc(thumbprintAction), Usage: "compute thumbprint for a JWK", - UsageText: `**step crypto jwk thumbprint**`, - Description: `**step crypto jwk thumbprint** reads a JWK from STDINT, derives the -corresponding JWK Thumbprint (RFC7638), and prints the base64-urlencoded + UsageText: `**step crypto jwk thumbprint** []`, + Description: `**step crypto jwk thumbprint** reads a JWK from or STDIN, derives +the corresponding JWK Thumbprint (RFC7638), and prints the base64-urlencoded thumbprint to STDOUT. +## POSITIONAL ARGUMENTS + + +: Path to a JWK. If it is not set, the JWK is read from STDIN. + For examples, see **step help crypto jwk**.`, } } -func thumbprintAction(*cli.Context) error { - b, err := io.ReadAll(os.Stdin) +func thumbprintAction(ctx *cli.Context) error { + b, err := readFromStdInOrFile(ctx) if err != nil { - return errors.Wrap(err, "error reading from STDIN") + return err } jwk := new(jose.JSONWebKey) @@ -48,10 +49,10 @@ func thumbprintAction(*cli.Context) error { return errors.New("error reading JWK: unsupported format") } - hash, err := jwk.Thumbprint(crypto.SHA256) + s, err := jose.Thumbprint(jwk) if err != nil { - return errors.Wrap(err, "error generating JWK thumbprint") + return err } - fmt.Println(base64.RawURLEncoding.EncodeToString(hash)) + fmt.Println(s) return nil } diff --git a/command/crypto/jws/sign.go b/command/crypto/jws/sign.go index e4faa691..e1c188aa 100644 --- a/command/crypto/jws/sign.go +++ b/command/crypto/jws/sign.go @@ -81,7 +81,16 @@ the two options must match unless the '--subtle' flag is also passed. : RSASSA-PSS using SHA-512 and MGF1 with SHA-512 **EdDSA** - : EdDSA signature algorithm`, + : EdDSA signature algorithm + + **ML-DSA-44** + : ML-DSA-44 signature algorithm (FIPS 204, RFC 9964) + + **ML-DSA-65** + : ML-DSA-65 signature algorithm (FIPS 204, RFC 9964) + + **ML-DSA-87** + : ML-DSA-87 signature algorithm (FIPS 204, RFC 9964)`, }, cli.StringFlag{ Name: "jku", diff --git a/command/crypto/jwt/sign.go b/command/crypto/jwt/sign.go index 97c91171..c30cb98e 100644 --- a/command/crypto/jwt/sign.go +++ b/command/crypto/jwt/sign.go @@ -112,7 +112,16 @@ the two options must match unless the '--subtle' flag is also passed. : RSASSA-PSS using SHA-512 and MGF1 with SHA-512 **EdDSA** - : EdDSA signature algorithm`, + : EdDSA signature algorithm + + **ML-DSA-44** + : ML-DSA-44 signature algorithm (FIPS 204, RFC 9964) + + **ML-DSA-65** + : ML-DSA-65 signature algorithm (FIPS 204, RFC 9964) + + **ML-DSA-87** + : ML-DSA-87 signature algorithm (FIPS 204, RFC 9964)`, }, cli.StringFlag{ Name: "iss, issuer", diff --git a/command/crypto/key/public.go b/command/crypto/key/public.go index 7484cdb1..a272252a 100644 --- a/command/crypto/key/public.go +++ b/command/crypto/key/public.go @@ -76,7 +76,7 @@ func publicAction(ctx *cli.Context) error { b, err := utils.ReadFile(name) if err != nil { - return errs.FileError(err, name) + return err } opts := []pemutil.Options{pemutil.WithFilename(name), pemutil.WithFirstBlock()} diff --git a/flags/flags.go b/flags/flags.go index a320f5eb..8adc6efb 100644 --- a/flags/flags.go +++ b/flags/flags.go @@ -39,15 +39,14 @@ If unset, default is EC. **RSA** : Create an **RSA** key pair - **ML-DSA-44** - : Create an ML-DSA key pair using the **ML-DSA-44** parameter set. + **ML-DSA-44** + : Create an ML-DSA key pair using the **ML-DSA-44** parameter set. - **ML-DSA-65** - : Create an ML-DSA key pair using the **ML-DSA-65** parameter set. + **ML-DSA-65** + : Create an ML-DSA key pair using the **ML-DSA-65** parameter set. - **ML-DSA-87** - : Create an ML-DSA key pair using the **ML-DSA-87** parameter set. - `, + **ML-DSA-87** + : Create an ML-DSA key pair using the **ML-DSA-87** parameter set.`, } // Size is the flag to set the key size. diff --git a/go.mod b/go.mod index f1b7c0d8..e6615ea3 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/rogpeppe/go-internal v1.16.0 github.com/slackhq/nebula v1.11.2 github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 - github.com/smallstep/certificates v0.30.3-0.20261105213751-6d5a251fbe01 + github.com/smallstep/certificates v0.30.3-0.20261110092624-0d8a80647845 github.com/smallstep/certinfo v1.18.0 github.com/smallstep/cli-utils v0.13.0 github.com/smallstep/go-attestation v0.4.4-0.20260814222900-a849f4e2cd68 @@ -27,7 +27,7 @@ require ( github.com/stretchr/testify v1.12.1 github.com/urfave/cli v1.22.17 go.mozilla.org/pkcs7 v0.10.0 - go.step.sm/crypto v0.92.0 + go.step.sm/crypto v0.92.1 golang.org/x/crypto v0.59.0 golang.org/x/sys v0.50.0 golang.org/x/term v0.48.0 @@ -41,10 +41,10 @@ require ( charm.land/lipgloss/v2 v2.0.6 // indirect cloud.google.com/go v0.123.0 // indirect cloud.google.com/go/auth v0.24.1-0.20261001053825-dbc26066f70a // indirect - cloud.google.com/go/auth/oauth2adapt v0.3.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.3.1 // indirect cloud.google.com/go/compute/metadata v0.10.0 // indirect cloud.google.com/go/iam v1.14.0 // indirect - cloud.google.com/go/longrunning v1.3.0 // indirect + cloud.google.com/go/longrunning v1.5.0 // indirect cloud.google.com/go/security v1.29.1 // indirect codeberg.org/chavacava/garif v0.2.0 // indirect codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect @@ -125,7 +125,7 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dlclark/regexp2/v2 v2.2.1 // indirect github.com/dnephin/pflag v1.0.7 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dustin/go-humanize v1.1.0 // indirect github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.19.0 // indirect github.com/fatih/structtag v1.2.0 // indirect @@ -175,7 +175,7 @@ require ( github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 // indirect github.com/google/s2a-go v0.1.11 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.24 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.25 // indirect github.com/googleapis/gax-go/v2 v2.27.0 // indirect github.com/gordonklaus/ineffassign v0.2.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -314,19 +314,19 @@ require ( go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/exp/typeparams v0.0.0-20260811152304-ee035b5b010f // indirect - golang.org/x/mod v0.42.0 // indirect + golang.org/x/mod v0.43.0 // indirect golang.org/x/net v0.62.0 // indirect - golang.org/x/oauth2 v0.37.0 // indirect + golang.org/x/oauth2 v0.38.0 // indirect golang.org/x/sync v0.25.0 // indirect golang.org/x/telemetry v0.0.0-20261010193011-f71dc92da45e // indirect golang.org/x/text v0.44.0 // indirect golang.org/x/time v0.16.0 // indirect golang.org/x/tools v0.52.0 // indirect golang.org/x/vuln v1.9.0 // indirect - google.golang.org/api v0.310.0 // indirect + google.golang.org/api v0.315.0 // indirect google.golang.org/genproto v0.0.0-20261012220534-4341edf3f941 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20261012220534-4341edf3f941 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab // indirect google.golang.org/grpc v1.85.0 // indirect google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index e55fa984..7e0860c4 100644 --- a/go.sum +++ b/go.sum @@ -8,16 +8,16 @@ cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= cloud.google.com/go/auth v0.24.1-0.20261001053825-dbc26066f70a h1:jW1ZLFy9oa5ai8LOI40z6s+DL1cO/L1KSm9hVGnibn8= cloud.google.com/go/auth v0.24.1-0.20261001053825-dbc26066f70a/go.mod h1:1dmBXa9xfBvBr39ZnDUDkaaA91ccq9CcqENDgJA4d7c= -cloud.google.com/go/auth/oauth2adapt v0.3.0 h1:FY8oSZpCYoUNv6QxVODuMjQz4IlSOVeiQtZ08vLPz88= -cloud.google.com/go/auth/oauth2adapt v0.3.0/go.mod h1:7+2uCm7++XFO+/lN06c2HXpDXb/NMNn2/UwyBPbTnkk= +cloud.google.com/go/auth/oauth2adapt v0.3.1 h1:BKLDdbWS7pafd820dsyFDF6fPEzIGqr7ny6hbTzCCgE= +cloud.google.com/go/auth/oauth2adapt v0.3.1/go.mod h1:B1nM4FJDxoDqAt3PXFG4IflUoQ5kvWAOOM3R+5wAszg= cloud.google.com/go/compute/metadata v0.10.0 h1:pyKMUQSwchgkIBBJGdILqQbs/BNJXqwSA7Ej6LAvvtY= cloud.google.com/go/compute/metadata v0.10.0/go.mod h1:rGFHRrIif570kSibjFTMbt6/4/tzgJWFGI/HVol4GIk= cloud.google.com/go/iam v1.14.0 h1:YRIB1/4xxwJ+NfI6RQr1WaOoHHeV0MizJEj940nBXJA= cloud.google.com/go/iam v1.14.0/go.mod h1:JTPZfbHdGXJrOYREtkRoFzCDGaBdbA7ILLKO/DDuav0= -cloud.google.com/go/kms v1.36.0 h1:Yewd4nwxa5IOaYJX0dpfzEM5PMCcg6d2LOdrW7V7bbQ= -cloud.google.com/go/kms v1.36.0/go.mod h1:BZZ2mD9XlonF2JRr7DVIokrTeHKG/CKde5aSPHqeuS4= -cloud.google.com/go/longrunning v1.3.0 h1:lZ6c8SJJBmILp/Wnr3vGnBLa0q+cYfSHRCcUfVI2hpI= -cloud.google.com/go/longrunning v1.3.0/go.mod h1:wpgLxCn+UA3/TZ1bj/fW39mfDpwVlMPu1xKJyoMt7V0= +cloud.google.com/go/kms v1.37.0 h1:JIVi+qr6MP+s8esyiXCYAczwBQ3icKkPNp1zFDYf8sk= +cloud.google.com/go/kms v1.37.0/go.mod h1:R58XvLUocyjbOb59X2qXTaBV6sjH+7XKoWmGY2ckQbw= +cloud.google.com/go/longrunning v1.5.0 h1:aGonu6LHQl38DyozLs2jxGieI4Ixk+7GTnmHVcHt8zA= +cloud.google.com/go/longrunning v1.5.0/go.mod h1:vjM1U85ZQuTv8lJoUBSA44HLWvM6BBFeaSJYGFF1Q00= cloud.google.com/go/security v1.29.1 h1:irh7axea3e1bgtMa5TGQhbXr7ikZzY5hFicCRKYxfdw= cloud.google.com/go/security v1.29.1/go.mod h1:Y0eV8RDggumXx3Aq3l92z/fq+4AFDr0pH/gTqEV88Q4= codeberg.org/chavacava/garif v0.2.0 h1:F0tVjhYbuOCnvNcU3YSpO6b3Waw6Bimy4K0mM8y6MfY= @@ -117,26 +117,26 @@ github.com/ashanbrown/forbidigo/v2 v2.3.1 h1:KAZijvQ7zeIBKbhikT4jCm0TLYXC4u78bTi github.com/ashanbrown/forbidigo/v2 v2.3.1/go.mod h1:2QDkLTzU6TV937eFROamXrW92M3paehdae4HCDCOZCM= github.com/ashanbrown/makezero/v2 v2.2.1 h1:A7uU8dgB1PA9aelTxHMfHIQ8Qev8AB3JLxJUBUsejqM= github.com/ashanbrown/makezero/v2 v2.2.1/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY= -github.com/aws/aws-sdk-go-v2 v1.47.5 h1:5yA+A+BiXbDq1ZLbYwPViwhEGDMdR0MEhL8Jh2LnLS4= -github.com/aws/aws-sdk-go-v2 v1.47.5/go.mod h1:iNIkogrRvFwm+1OQIUOP2lPBtlXZboOIUWiCa+pHEMw= +github.com/aws/aws-sdk-go-v2 v1.48.0 h1:tFU7EJVm7MfyaXLsXdYTZ0Vd6vwt9OljCyqq0gqk0Mc= +github.com/aws/aws-sdk-go-v2 v1.48.0/go.mod h1:oeKU5p+TQBnpeLmU42WZLWvzv+ORLn+74n4QVLnm/Z0= github.com/aws/aws-sdk-go-v2/config v1.33.10 h1:RRb0GghYqq2ikMXzfT4r9NO9lVhOld3FIhJJWDIdk+w= github.com/aws/aws-sdk-go-v2/config v1.33.10/go.mod h1:BDSA7QGh6yrNQA5Z5aBnHWKMWdJDMD4IOlB4QjYSp5E= github.com/aws/aws-sdk-go-v2/credentials v1.20.10 h1:ItSjcLk+2M15RnRxO105uVIqLiVQn8y3gaeHC7W0iqs= github.com/aws/aws-sdk-go-v2/credentials v1.20.10/go.mod h1:eO4GlmGXB+gx+zDbhu3IENEFOmjrbVKJtOptJiIhngc= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.4 h1:7ksj/zMap9+831SmNQZkcpmfuATp3DKr4BfLNnBdYXM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.4/go.mod h1:zhi8vDrD1dj76ysTWS6Ny1y6/EEW1Jrq2y8lzKeoqfs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8 h1:gzIWc3DTPfPbWKrQnmL6BV6WD7NPD1htxzgdk/bQ/Z4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8/go.mod h1:vvUA5cDAZWGo4R14FZPZfXfJCmgsafOWEq78Kg0D+ug= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8 h1:PWv+vG8aCLS8qd+HPdYhK7Vees90aKHWFFQ1AGYD/8E= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8/go.mod h1:xxPZEpflYHJA12366ZGyq66z9dHPCoeCIu99Jck+MPw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12 h1:W0yUUzKBA8SofGQ0yZafEUuZq9UxfvijRgdc6vcRQPA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12/go.mod h1:xwKv6vwBNdpPFOxEm/ld4IODZK2s/1ksHvdBqLfH6Gs= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.12 h1:lqSi8qvAnKC1vfosImdmOsuiJLr/jdybZX5299beB6Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.12/go.mod h1:rqPQE2vqkW9YHx5+Gp55sx1wsTM4xtGQLl+TKMjxxrs= github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.7 h1:wYu55QUHARwu9YzeuY5yEJUTsIu8ahkmp1l3QmbzHn8= github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.7/go.mod h1:OteEkhFAgFwQtZft/3myWo3tVWxdAo7cwV+7AbcpAtQ= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.22 h1:qHfXn1Tm2Rh8kic/DvdKaiSVlHQRSr5C+rMuBR29D44= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.22/go.mod h1:D4ytxJbGXu82l+2XF0q60bibysf+KkIbWfAOldAQwf8= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.7 h1:6MSlRo7aiUVBftQ8XmW7XIh3EZqCbkN9zI0YlGW8nl0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.7/go.mod h1:OqapjZfp6VW4YJKKO4l68UdPvS4FIEYuEoq1JNkxCL0= -github.com/aws/aws-sdk-go-v2/service/kms v1.62.2 h1:f0+3opcARrLmWoMciHVzlc1Ww8qFXhvrlscmPShpM+s= -github.com/aws/aws-sdk-go-v2/service/kms v1.62.2/go.mod h1:YVEFrNMhrD35Z6qdvzvpGHDbmFmhZ/Nf58Ubv9dROVU= +github.com/aws/aws-sdk-go-v2/service/kms v1.62.6 h1:AsNvSOsnEpLZGHoDY7u1zYrcBEsXdXoTjh0fSyr0CqQ= +github.com/aws/aws-sdk-go-v2/service/kms v1.62.6/go.mod h1:VMuZyNobzmV/0SRCH5p+0dziD4U5AktOi3TzFMXq1rg= github.com/aws/aws-sdk-go-v2/service/signin v1.10.5 h1:oFsZ3u5PPFSO1YZDGKFgyDuwgpbv/sTmVShEZfRnyaE= github.com/aws/aws-sdk-go-v2/service/signin v1.10.5/go.mod h1:P+IzYJeldxO0mHt8fX4cglzexP3akO94C/UuEA2ojP0= github.com/aws/aws-sdk-go-v2/service/sso v1.38.5 h1:EYD6E6CsgRQPazaOfZ6suyTgfZjg07HoT4S3qB9Exkg= @@ -145,8 +145,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.5 h1:v6V0AnJ0aDmivAIie/6iT7sG github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.5/go.mod h1:P2Lqn27Kph9z400MFOYIebFnKjZEwyUIAva6fFFMiRY= github.com/aws/aws-sdk-go-v2/service/sts v1.51.5 h1:OuyNaMncYP4ftrvcnOHJ9j3AxO3zsC5C/ewD0HoHdjQ= github.com/aws/aws-sdk-go-v2/service/sts v1.51.5/go.mod h1:Bhu66tgvf94uunUSiAc0Ew0avhnpSm0J8Hl1MYocRbo= -github.com/aws/smithy-go v1.28.7 h1:h/n1SHrwVtaDYLz8mR1/Kq4Xh4RaFbFW7bOYckg9mfE= -github.com/aws/smithy-go v1.28.7/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/smithy-go v1.28.9 h1:zkZ058OpNX0iGTK24b+ZUEQSMc11CBA6oO7xtKZfzkY= +github.com/aws/smithy-go v1.28.9/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE= @@ -255,8 +255,8 @@ github.com/dlclark/regexp2/v2 v2.2.1/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSS github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dustin/go-humanize v1.1.0 h1:dbKTrvD0klcbBV/h4AWJdMuZogJACoMlvWIWZ5b2xWg= +github.com/dustin/go-humanize v1.1.0/go.mod h1:hc1CvRkJMsgxqjmjMQF3QNRAZBwY8AXBAzKYoSX9sFI= github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA= github.com/envoyproxy/go-control-plane/envoy v1.39.1-0.20260819172001-e6e3fd93e4be h1:SWe0x6yfglnxuvOiYgTTnNq7QD/yvqthOh1RBI8Bj8w= github.com/envoyproxy/go-control-plane/envoy v1.39.1-0.20260819172001-e6e3fd93e4be/go.mod h1:PYEOlng9XcrulfyWpm49jECTPV0LT4q8cO7fLW/xwgk= @@ -406,8 +406,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.24 h1:G9iCJIY+AYVmUskKdjX8FVy7sG+nbzjOQ41cvlmhcvg= -github.com/googleapis/enterprise-certificate-proxy v0.3.24/go.mod h1:hEjCmnoakQzv5ImLUp6alkY7XgLlNoAxwTXmhHHNIsI= +github.com/googleapis/enterprise-certificate-proxy v0.3.25 h1:n/6K8rCcoQQjGZ+o5irYrdwAFZIclQMXq0yeJyK2FaI= +github.com/googleapis/enterprise-certificate-proxy v0.3.25/go.mod h1:hEjCmnoakQzv5ImLUp6alkY7XgLlNoAxwTXmhHHNIsI= github.com/googleapis/gax-go/v2 v2.27.0 h1:qe2iQOUzxb3fd6x6ewpIEixPQhJ+0Ihc/RRZhKA/2g0= github.com/googleapis/gax-go/v2 v2.27.0/go.mod h1:RofiqDw3ehcG4L0H1zO3D2Itpwd3/uS/7wdmbNDF1DE= github.com/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= @@ -646,8 +646,8 @@ github.com/smallstep/android-attestation v0.0.0-20260722204520-a51b1564ebda h1:I github.com/smallstep/android-attestation v0.0.0-20260722204520-a51b1564ebda/go.mod h1:WEOYAQ4qnt6LhEcreLGA0woxzE8k5e0vjGuIq72J5tw= github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY= github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc= -github.com/smallstep/certificates v0.30.3-0.20261105213751-6d5a251fbe01 h1:37RUToHubGV3jBtmuW1I6mwINrVYjljzRbGvg4S2P5s= -github.com/smallstep/certificates v0.30.3-0.20261105213751-6d5a251fbe01/go.mod h1:5H7gEyq41/ZNlGh/0oyrOwmnZtxDKbN5QuqDOcFtkzU= +github.com/smallstep/certificates v0.30.3-0.20261110092624-0d8a80647845 h1:C/LGB8rbmif4KUIXEEBz38E1LbGD3CHTaTrwJUJYG0o= +github.com/smallstep/certificates v0.30.3-0.20261110092624-0d8a80647845/go.mod h1:UCJk8SqiIurdDAtuZSSsiGWHXbxAcZ9+6fdiwo/5Ciw= github.com/smallstep/certinfo v1.18.0 h1:q9T0DSkHSmD3gobEqy+3J6HbHpQIOUPEL1IOSvelRIQ= github.com/smallstep/certinfo v1.18.0/go.mod h1:OPwtFVAOx29OjOYsVtj9cDliDFywkVYPt+ExDg43kPs= github.com/smallstep/cli-utils v0.13.0 h1:yoGBkW9DJJ6cEZS+UhoBPiYDUIXDz3SjAyBKrK7d/EY= @@ -799,8 +799,8 @@ go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw= go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= -go.step.sm/crypto v0.92.0 h1:ifhnf9D2X12SokY000OL9GX038hJJ1xfoFzyX7FzgAs= -go.step.sm/crypto v0.92.0/go.mod h1:3ypkxvcrqPtpvPhRpNgHwoNQcJfFqWd401rxKbrlO5s= +go.step.sm/crypto v0.92.1 h1:MCRS9ZxvGz/nEy+VFDUuGbYuB6qTzP11fvrlh/ymv84= +go.step.sm/crypto v0.92.1/go.mod h1:dg6N76FFDptHIQ/Y85UcKEHBNpld5C3A1ry/zM71BlI= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= @@ -840,8 +840,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= -golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= +golang.org/x/mod v0.43.0 h1:MFuq5J6s35W9D3IjkwyWc9vHh0nENOrt5K8Iof4ofmg= +golang.org/x/mod v0.43.0/go.mod h1:4ec1JnuyBz5+FIVhg86UsA39YG8BpnrZdJYSNHmGzHY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -858,8 +858,8 @@ golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= -golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98= -golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58= +golang.org/x/oauth2 v0.38.0 h1:uW7XQbcu1eoiQS7uMJvLOjPMl04bTbmY1VeRPxvbspI= +golang.org/x/oauth2 v0.38.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -952,14 +952,14 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/api v0.310.0 h1:537ccDDmbwuwX1iof3Vtdz9vow6uJCgrSZJWedAWM0I= -google.golang.org/api v0.310.0/go.mod h1:5NUthU+LmGMKzYgRaScb+TTe1Lo7x4A+J7g+Yj8BRzA= +google.golang.org/api v0.315.0 h1:77nwD4sln0GQQqQKb4CY+DJhRwA0AeQ4w0gkbLwRPms= +google.golang.org/api v0.315.0/go.mod h1:kn5kd1IMbs2x4hq99GcaTOumC0fnMYMwLNAfFxzpISU= google.golang.org/genproto v0.0.0-20261012220534-4341edf3f941 h1:CXq2XEi5aEyLjjPZIwqrmQH8ZY4ctUwK7uyAx3mjX/U= google.golang.org/genproto v0.0.0-20261012220534-4341edf3f941/go.mod h1:3gK0ehnhP0V7/x3ypGoLyT3d0n6TSi/EcsphIjHrcz4= google.golang.org/genproto/googleapis/api v0.0.0-20261012220534-4341edf3f941 h1:DS/w3N8rsfrwxwgGSj6WhMsPo7aNQGmDx74J81zd0NQ= google.golang.org/genproto/googleapis/api v0.0.0-20261012220534-4341edf3f941/go.mod h1:AuGAdi9KnXss7xbLxIKhCvk+Ro/SxpET/iS45DNYN+M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b h1:6WNWHZk91dp4gZ25642OALkuG1UVNZbwENJD19DnB8k= -google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab h1:8sYjjefPfQ+FZEh1ZwBAqK/NifJVhOxut8nRh3SJzZM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw= google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 h1:rgSNvqscFZ1JgV/4wH5GOsZFSFkR2Eua9As3KIr2LlM= diff --git a/integration/crypto_test.go b/integration/crypto_test.go index 878c7183..d6856427 100644 --- a/integration/crypto_test.go +++ b/integration/crypto_test.go @@ -24,6 +24,7 @@ import ( "go.step.sm/crypto/jose" "go.step.sm/crypto/keyutil" + "go.step.sm/crypto/mldsa" ) func TestCryptoJWKCommand(t *testing.T) { @@ -77,6 +78,22 @@ func TestCryptoJWKCreateOKPCommand(t *testing.T) { }) } +func TestCryptoJWKCreateAKPCommand(t *testing.T) { + if !mldsa.Supported { + t.SkipNow() + } + testscript.Run(t, testscript.Params{ + Files: []string{"testdata/crypto/jwk-create-akp.txtar"}, // AKP generation + Setup: func(e *testscript.Env) error { + return os.WriteFile(filepath.Join(e.Cd, "password.txt"), []byte("password"), 0600) + }, + Cmds: map[string]func(ts *testscript.TestScript, neg bool, args []string){ + "check_jwk": checkKeyPair, + "check_jwk_without_password": checkKeyPairWithoutPassword, + }, + }) +} + func TestCryptoJWKCreateOctCommand(t *testing.T) { testscript.Run(t, testscript.Params{ Files: []string{"testdata/crypto/jwk-create-oct.txtar"}, // oct generation @@ -115,8 +132,16 @@ func TestCryptoJWTCommand(t *testing.T) { ed25519Token := createToken(t, ed25519JWK, now) jwksToken := createToken(t, &jwks.Key("1")[0], now) + mldsaCondition := func(cond string) (bool, error) { + if cond == "mldsa" { + return mldsa.Supported, nil + } + return true, nil + } + testscript.Run(t, testscript.Params{ - Files: []string{"testdata/crypto/jwt-sign.txtar"}, + Files: []string{"testdata/crypto/jwt-sign.txtar"}, + Condition: mldsaCondition, Setup: func(e *testscript.Env) error { // set some additional environment variables required for token creation e.Vars = append(e.Vars, @@ -154,12 +179,19 @@ func TestCryptoJWTCommand(t *testing.T) { err = os.WriteFile(filepath.Join(e.Cd, "jwks.json"), jwksBytes, 0600) require.NoError(t, err) + if mldsa.Supported { + _, mldsa44JSONBytes := generateJWK(t, "AKP", "ML-DSA-44") + err = os.WriteFile(filepath.Join(e.Cd, "mldsa44.json"), mldsa44JSONBytes, 0600) + require.NoError(t, err) + } + return nil }, }) testscript.Run(t, testscript.Params{ - Files: []string{"testdata/crypto/jwt-verify.txtar"}, + Files: []string{"testdata/crypto/jwt-verify.txtar"}, + Condition: mldsaCondition, Setup: func(e *testscript.Env) error { // write the (existing) keys to the (temporary) test directory err := os.WriteFile(filepath.Join(e.Cd, "p256.pem"), p256Bytes, 0600) @@ -179,6 +211,18 @@ func TestCryptoJWTCommand(t *testing.T) { err = os.WriteFile(filepath.Join(e.Cd, "jwkstoken.txt"), []byte(jwksToken), 0600) require.NoError(t, err) + if mldsa.Supported { + mldsa44JWK, mldsa44JSONBytes := generateJWK(t, "AKP", "ML-DSA-44") + mldsa44Token := createToken(t, mldsa44JWK, now) + 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) + } else { + err = os.WriteFile(filepath.Join(e.Cd, "mldsa44token.txt"), []byte{}, 0600) + require.NoError(t, err) + } + // write fake / invalid tokens to the (temporary) test directory invalidSignature := ed25519Token[:len(ed25519Token)-5] + "12345" err = os.WriteFile(filepath.Join(e.Cd, "incomplete-signature.txt"), []byte(invalidSignature), 0600) @@ -396,6 +440,7 @@ func checkOctKeySize(ts *testscript.TestScript, neg bool, args []string) { // - For RSA keys, the key size is the expected size, and using the expected algorithm // - For EC keys, the key curve is the expected curve, and using the expected algorithm // - For OKP keys, the key curve is the expected curve, and using the expected algorithm +// - For AKP keys, the key is using the expected algorithm // - For oct keys, the key parts are of the expected type, and using the expected algorithm func checkKeyDetails(ts *testscript.TestScript, pub, priv *jose.JSONWebKey, args []string) { keyType := strings.ToUpper(args[2]) @@ -443,12 +488,16 @@ func checkKeyDetails(ts *testscript.TestScript, pub, priv *jose.JSONWebKey, args return case keyType == "OKP": if !strings.HasPrefix(pub.Algorithm, "EdDSA") { - ts.Fatalf("expected EC algorithm for EC key, got %q", pub.Algorithm) + ts.Fatalf("expected EdDSA algorithm for OKP key, got %q", pub.Algorithm) } if crv := strings.ToUpper(args[3]); crv != "ED25519" { ts.Fatalf("unexpected OKP curve %q", args[3]) } + case keyType == "AKP": + if !strings.HasPrefix(pub.Algorithm, "ML-DSA") { + ts.Fatalf("expected ML-DSA algorithm for AKP key, got %q", pub.Algorithm) + } case keyType == "OCT": if !strings.HasPrefix(pub.Algorithm, "HS") && !strings.HasPrefix(pub.Algorithm, "A") && pub.Algorithm != "dir" { ts.Fatalf("expected oct algorithm for oct key, got %q", pub.Algorithm) diff --git a/integration/testdata/crypto/jose-format.txtar b/integration/testdata/crypto/jose-format.txtar index 56192985..bdc7bb15 100644 --- a/integration/testdata/crypto/jose-format.txtar +++ b/integration/testdata/crypto/jose-format.txtar @@ -94,6 +94,24 @@ stdin jwe-unknown-enc.json exec step crypto jose format stdout '^eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJCQVIifQ.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE$' + +# format ignores a leading non-breaking space +stdin jws-nbsp.json +exec step crypto jose format +stdout '^eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4In0.c2lnbmF0dXJl$' + + +# format keeps the protected header of the signature in jws-general +stdin jws-general.json +exec step crypto jose format +stdout '^eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4In0.c2lnbmF0dXJl$' + + +# format fails for a JWE with additional authenticated data +stdin jwe-aad.json +! exec step crypto jose format +stderr 'error serializing data: compact serialization does not support additional authenticated data \(aad\)' + -- none-nosig.txt -- eyJhbGciOiJub25lIn0.eyJzdWIiOiJ4In0. -- none.txt -- @@ -112,3 +130,9 @@ eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiQTI1NktXIn0.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE. eyJhbGciOiJGT08iLCJlbmMiOiJBMjU2R0NNIn0.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE -- jwe-unknown-enc.txt -- eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJCQVIifQ.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE.YWFhYWFhYWE +-- jws-nbsp.json -- + {"payload":"eyJzdWIiOiJ4In0","protected":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9","signature":"c2lnbmF0dXJl"} +-- jws-general.json -- +{"payload":"eyJzdWIiOiJ4In0","protected":"Ym9ndXM","signatures":[{"protected":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9","signature":"c2lnbmF0dXJl"}]} +-- jwe-aad.json -- +{"protected":"eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiQTI1NktXIn0","encrypted_key":"YWFhYWFhYWE","aad":"YWFhYWFhYWE","iv":"YWFhYWFhYWE","ciphertext":"YWFhYWFhYWE","tag":"YWFhYWFhYWE"} diff --git a/integration/testdata/crypto/jwk-create-akp.txtar b/integration/testdata/crypto/jwk-create-akp.txtar new file mode 100644 index 00000000..440a6cef --- /dev/null +++ b/integration/testdata/crypto/jwk-create-akp.txtar @@ -0,0 +1,48 @@ +# AKP defaults +exec step crypto jwk create --password-file password.txt --kty AKP defaults.pub defaults.priv +check_jwk defaults.pub defaults.priv AKP ML-DSA-44 + + +# AKP with algorithm +exec step crypto jwk create --password-file password.txt --alg ML-DSA-44 mldsa44.pub mldsa44.priv +check_jwk mldsa44.pub mldsa44.priv AKP ML-DSA-44 + + +# AKP with kty and algorithm +exec step crypto jwk create --password-file password.txt --kty AKP --alg ML-DSA-65 alg.pub alg.priv +check_jwk alg.pub alg.priv AKP ML-DSA-65 + + +# AKP with alg and KID +exec step crypto jwk create --password-file password.txt --kty AKP --alg ML-DSA-87 --kid keyid keyid.pub keyid.priv +check_jwk keyid.pub keyid.priv AKP ML-DSA-87 + + +# AKP with wrong arg fails +! exec step crypto jwk create --password-file password.txt --kty AKP --alg ES256 fail.pub fail.priv +stderr 'missing or invalid value for argument ''alg'', expected ''ML-DSA-44'', ''ML-DSA-65'', or ''ML-DSA-87'', but got ''ES256''' + + +# AKP with size flag fails +! exec step crypto jwk create --password-file password.txt --kty AKP --size 256 fail.pub fail.priv +stderr 'flag ''--size'' is incompatible with ''--kty AKP''' + + +# AKP with crv flag fails +! exec step crypto jwk create --password-file password.txt --kty AKP --crv ML-DSA-44 fail.pub fail.priv +stderr 'flag ''--crv'' is incompatible with ''--kty AKP''' + + +# bad key type +! exec step crypto jwk create --password-file password.txt --kty akp fail.pub fail.priv +stderr 'invalid value ''akp'' for flag ''--kty''; options are EC, RSA, OKP, AKP, or oct' + + +# AKP without password +exec step crypto jwk create --no-password --insecure --kty AKP akp-no-pass.pub akp-no-pass.priv +check_jwk_without_password akp-no-pass.pub akp-no-pass.priv AKP ML-DSA-44 + + +# AKP without password without insecure fails +! exec step crypto jwk create --no-password --kty AKP fail.pub fail.priv +stderr 'flag ''--no-password'' requires the ''--insecure'' flag' \ No newline at end of file diff --git a/integration/testdata/crypto/jwk-create-okp.txtar b/integration/testdata/crypto/jwk-create-okp.txtar index 624f2fbd..816dc781 100644 --- a/integration/testdata/crypto/jwk-create-okp.txtar +++ b/integration/testdata/crypto/jwk-create-okp.txtar @@ -30,7 +30,7 @@ stderr 'flag ''--size'' is incompatible with ''--kty OKP''' # bad key type ! exec step crypto jwk create --password-file password.txt --kty okp fail.pub fail.priv -stderr 'invalid value ''okp'' for flag ''--kty''; options are EC, RSA, OKP, or oct' +stderr 'invalid value ''okp'' for flag ''--kty''; options are EC, RSA, OKP, AKP, or oct' # OKP without password diff --git a/integration/testdata/crypto/jwk-create.txtar b/integration/testdata/crypto/jwk-create.txtar index afe79149..7563997a 100644 --- a/integration/testdata/crypto/jwk-create.txtar +++ b/integration/testdata/crypto/jwk-create.txtar @@ -5,22 +5,22 @@ check_jwk defaults.pub defaults.priv ECDSA P-256 # bad RSA key type ! exec step crypto jwk create --kty rsa --size 2048 --alg HS384 fail.pub fail.priv -stderr 'invalid value ''rsa'' for flag ''--kty''; options are EC, RSA, OKP, or oct' +stderr 'invalid value ''rsa'' for flag ''--kty''; options are EC, RSA, OKP, AKP, or oct' # bad EC key type ! exec step crypto jwk create --kty ec fail.pub fail.priv -stderr 'invalid value ''ec'' for flag ''--kty''; options are EC, RSA, OKP, or oct' +stderr 'invalid value ''ec'' for flag ''--kty''; options are EC, RSA, OKP, AKP, or oct' # bad oct key type ! exec step crypto jwk create --kty OCT fail.pub fail.priv -stderr 'invalid value ''OCT'' for flag ''--kty''; options are EC, RSA, OKP, or oct' +stderr 'invalid value ''OCT'' for flag ''--kty''; options are EC, RSA, OKP, AKP, or oct' # bad OKP key type ! exec step crypto jwk create --kty okp fail.pub fail.priv -stderr 'invalid value ''okp'' for flag ''--kty''; options are EC, RSA, OKP, or oct' +stderr 'invalid value ''okp'' for flag ''--kty''; options are EC, RSA, OKP, AKP, or oct' # no positional args diff --git a/integration/testdata/crypto/jwt-sign.txtar b/integration/testdata/crypto/jwt-sign.txtar index 9d87b6a6..eb04ea57 100644 --- a/integration/testdata/crypto/jwt-sign.txtar +++ b/integration/testdata/crypto/jwt-sign.txtar @@ -150,3 +150,8 @@ stderr 'error reading rsa.pem: unsupported format' # Sign with Ed25519 exec step crypto jwt sign -key ed25519.json -iss TestIssuer -aud TestAudience -sub TestSubject -nbf $NBF -iat $IAT -exp $EXP stdout 'eyJhbGciOiJFZERTQSIsImtpZCI6ImtpZC1PS1AtRWQyNTUxOSIsInR5cCI6IkpXVCJ9' + + +# Sign with ML-DSA-44 +[mldsa] exec step crypto jwt sign -key mldsa44.json -iss TestIssuer -aud TestAudience -sub TestSubject -nbf $NBF -iat $IAT -exp $EXP +[mldsa] stdout 'eyJhbGciOiJNTC1EU0EtNDQiLCJraWQiOiJraWQtQUtQLU1MLURTQS00NCIsInR5cCI6IkpXVCJ9' diff --git a/integration/testdata/crypto/jwt-verify.txtar b/integration/testdata/crypto/jwt-verify.txtar index 7cc7dfd4..5aa6dd6d 100644 --- a/integration/testdata/crypto/jwt-verify.txtar +++ b/integration/testdata/crypto/jwt-verify.txtar @@ -107,6 +107,28 @@ stdin jwkstoken.txt exec step crypto jwt verify -jwks jwks.json -iss TestIssuer -aud TestAudience +# ML-DSA-44 verifications +[mldsa] stdin mldsa44token.txt +[mldsa] exec step crypto jwt verify -key mldsa44.json -iss TestIssuer -aud TestAudience + + +# ML-DSA-44 subtle verifications +[mldsa] stdin mldsa44token.txt +[mldsa] exec step crypto jwt verify -key mldsa44.json -subtle + + +# ML-DSA-44 verifications wrong kid +[mldsa] stdin mldsa44token.txt +[mldsa] ! exec step crypto jwt verify -key mldsa44.json -kid 1 -iss TestIssuer -aud TestAudience +[mldsa] stderr 'kid 1 does not match the kid on mldsa44.json' + + +# ML-DSA-44 verifications wrong algorithm +[mldsa] stdin mldsa44token.txt +[mldsa] ! exec step crypto jwt verify -key mldsa44.json -alg ML-DSA-65 -iss TestIssuer -aud TestAudience +[mldsa] stderr 'alg ML-DSA-65 does not match the alg on mldsa44.json' + + # Verify token created by OpenSSL stdin ossltoken.txt exec step crypto jwt verify -key rsa.pem -alg RS256 -iss TestIssuer -aud TestAudience diff --git a/integration/testdata/crypto/keypair.txtar b/integration/testdata/crypto/keypair.txtar index 4d6f1cdf..1a1a86f1 100644 --- a/integration/testdata/crypto/keypair.txtar +++ b/integration/testdata/crypto/keypair.txtar @@ -109,4 +109,9 @@ stderr 'flag ''--kty EC'' is incompatible with flag ''--curve P-512''' # EC with RSA size ! exec step crypto keypair --kty EC --size 2048 ec-error.pub ec-error.priv -stderr 'flag ''--size'' is incompatible with flag ''--kty EC''' \ No newline at end of file +stderr 'flag ''--size'' is incompatible with flag ''--kty EC''' + + +# ML-DSA with curve +! exec step crypto keypair --kty ML-DSA-44 --curve P-256 mldsa-error.pub mldsa-error.priv +stderr 'flag ''--curve'' is incompatible with flag ''--kty ML-DSA-44''' \ No newline at end of file diff --git a/internal/cryptoutil/cryptoutil.go b/internal/cryptoutil/cryptoutil.go index 6c6c17ee..33d1c8d4 100644 --- a/internal/cryptoutil/cryptoutil.go +++ b/internal/cryptoutil/cryptoutil.go @@ -157,6 +157,17 @@ func LoadJSONWebKey(kmsURI, name string, opts ...jose.Option) (*jose.JSONWebKey, jwk.Algorithm = jose.RS256 case ed25519.PublicKey: jwk.Algorithm = jose.EdDSA + case *mldsa.PublicKey: + switch pub.Parameters() { + case mldsa.MLDSA44(): + jwk.Algorithm = jose.MLDSA44 + case mldsa.MLDSA65(): + jwk.Algorithm = jose.MLDSA65 + case mldsa.MLDSA87(): + jwk.Algorithm = jose.MLDSA87 + default: + return nil, fmt.Errorf("unsupported ML-DSA parameter set %q", pub.Parameters().String()) + } default: return nil, fmt.Errorf("unsupported key type %T", pub) } diff --git a/utils/cli.go b/utils/cli.go index 7803976e..488a42cb 100644 --- a/utils/cli.go +++ b/utils/cli.go @@ -70,7 +70,7 @@ func GetKeyDetailsFromCLI(ctx *cli.Context, insecure bool, ktyKey, curveKey, siz case ctx.IsSet(sizeKey): return kty, crv, size, errs.IncompatibleFlagValue(ctx, sizeKey, ktyKey, kty) case ctx.IsSet(curveKey): - return kty, crv, size, errs.IncompatibleFlagValue(ctx, sizeKey, ktyKey, kty) + return kty, crv, size, errs.IncompatibleFlagValue(ctx, curveKey, ktyKey, kty) } default: return kty, crv, size, errs.InvalidFlagValue(ctx, ktyKey, kty, "RSA, EC, OKP, ML-DSA-44, ML-DSA-65, and ML-DSA-87")