diff --git a/go.mod b/go.mod
index 3a51f64cbe..857b67dbe2 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/tektoncd/cli
-go 1.23.4
+go 1.24.0
require (
github.com/AlecAivazis/survey/v2 v2.3.7
@@ -12,15 +12,15 @@ require (
github.com/docker/docker v28.2.2+incompatible
github.com/fatih/color v1.18.0
github.com/google/go-cmp v0.7.0
- github.com/google/go-containerregistry v0.20.3
+ github.com/google/go-containerregistry v0.20.6
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
github.com/hinshun/vt10x v0.0.0-20220228203356-1ab2cad5fd82
github.com/jonboulle/clockwork v0.5.0
github.com/ktr0731/go-fuzzyfinder v0.8.0
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
- github.com/sigstore/cosign/v2 v2.5.0
- github.com/sigstore/sigstore v1.9.4
+ github.com/sigstore/cosign/v2 v2.5.2
+ github.com/sigstore/sigstore v1.9.5
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/tektoncd/chains v0.25.1
@@ -35,10 +35,10 @@ require (
golang.org/x/term v0.32.0
gotest.tools v2.2.0+incompatible
gotest.tools/v3 v3.5.2
- k8s.io/api v0.32.5
- k8s.io/apimachinery v0.32.5
+ k8s.io/api v0.33.1
+ k8s.io/apimachinery v0.33.1
k8s.io/cli-runtime v0.29.15
- k8s.io/client-go v0.32.5
+ k8s.io/client-go v0.33.1
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883
sigs.k8s.io/yaml v1.4.0
)
@@ -47,23 +47,23 @@ replace github.com/alibabacloud-go/cr-20160607 => github.com/vdemeester/cr-20160
require (
cel.dev/expr v0.23.1 // indirect
- cloud.google.com/go v0.120.0 // indirect
- cloud.google.com/go/auth v0.16.0 // indirect
+ cloud.google.com/go v0.121.1 // indirect
+ cloud.google.com/go/auth v0.16.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
- cloud.google.com/go/compute/metadata v0.6.0 // indirect
+ cloud.google.com/go/compute/metadata v0.7.0 // indirect
cloud.google.com/go/firestore v1.18.0 // indirect
- cloud.google.com/go/iam v1.5.0 // indirect
- cloud.google.com/go/kms v1.21.1 // indirect
- cloud.google.com/go/longrunning v0.6.6 // indirect
- cloud.google.com/go/monitoring v1.24.1 // indirect
- cloud.google.com/go/storage v1.52.0 // indirect
+ cloud.google.com/go/iam v1.5.2 // indirect
+ cloud.google.com/go/kms v1.22.0 // indirect
+ cloud.google.com/go/longrunning v0.6.7 // indirect
+ cloud.google.com/go/monitoring v1.24.2 // indirect
+ cloud.google.com/go/storage v1.53.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
github.com/AliyunContainerService/ack-ram-tool/pkg/credentials/provider v0.14.0 // indirect
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 // indirect
- github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 // indirect
- github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
+ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect
+ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 // indirect
+ github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.3.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.1.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
@@ -81,7 +81,6 @@ require (
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect
github.com/IBM/sarama v1.45.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
- github.com/ProtonMail/go-crypto v1.1.5 // indirect
github.com/ThalesIgnite/crypto11 v1.2.5 // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
github.com/alibabacloud-go/cr-20160607 v1.0.1 // indirect
@@ -96,44 +95,44 @@ require (
github.com/aliyun/credentials-go v1.3.2 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
- github.com/aws/aws-sdk-go v1.55.6 // indirect
- github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
- github.com/aws/aws-sdk-go-v2/config v1.29.12 // indirect
- github.com/aws/aws-sdk-go-v2/credentials v1.17.65 // indirect
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
- github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
- github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
+ github.com/aws/aws-sdk-go v1.55.7 // indirect
+ github.com/aws/aws-sdk-go-v2 v1.36.4 // indirect
+ github.com/aws/aws-sdk-go-v2/config v1.29.16 // indirect
+ github.com/aws/aws-sdk-go-v2/credentials v1.17.69 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.40.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.31.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
- github.com/aws/aws-sdk-go-v2/service/kms v1.38.1 // indirect
- github.com/aws/aws-sdk-go-v2/service/sso v1.25.2 // indirect
- github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0 // indirect
- github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 // indirect
+ github.com/aws/aws-sdk-go-v2/service/kms v1.41.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 // indirect
+ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 // indirect
github.com/aws/smithy-go v1.22.3 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.9.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
+ github.com/cenkalti/backoff/v5 v5.0.2 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/cloudevents/sdk-go/v2 v2.16.0 // indirect
- github.com/cloudflare/circl v1.6.1 // indirect
github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f // indirect
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/coreos/go-oidc/v3 v3.14.1 // indirect
- github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46 // indirect
+ github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect
github.com/digitorus/timestamp v0.0.0-20231217203849-220c5c2851b7 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
- github.com/docker/docker-credential-helpers v0.8.2 // indirect
+ github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eapache/go-resiliency v1.7.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
@@ -156,7 +155,7 @@ require (
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
- github.com/go-logr/logr v1.4.2 // indirect
+ github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.1 // indirect
@@ -177,31 +176,30 @@ require (
github.com/golang/snappy v1.0.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/cel-go v0.25.0 // indirect
- github.com/google/certificate-transparency-go v1.3.1 // indirect
+ github.com/google/certificate-transparency-go v1.3.2 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20240108195214-a0658aa1d0cc // indirect
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20240108195214-a0658aa1d0cc // indirect
- github.com/google/go-github/v55 v55.0.0 // indirect
+ github.com/google/go-github/v72 v72.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
- github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/google/wire v0.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
- github.com/googleapis/gax-go/v2 v2.14.1 // indirect
- github.com/gorilla/websocket v1.5.3 // indirect
+ github.com/googleapis/gax-go/v2 v2.14.2 // indirect
+ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/grafeas/grafeas v0.2.3 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
- github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect
+ github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
- github.com/hashicorp/go-sockaddr v1.0.5 // indirect
+ github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
@@ -249,17 +247,17 @@ require (
github.com/nsf/termbox-go v1.1.1 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
- github.com/opencontainers/image-spec v1.1.0 // indirect
+ github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
- github.com/pelletier/go-toml/v2 v2.2.3 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
- github.com/prometheus/client_golang v1.21.1 // indirect
- github.com/prometheus/client_model v0.6.1 // indirect
- github.com/prometheus/common v0.62.0 // indirect
+ github.com/prometheus/client_golang v1.22.0 // indirect
+ github.com/prometheus/client_model v0.6.2 // indirect
+ github.com/prometheus/common v0.63.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prometheus/statsd_exporter v0.22.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
@@ -271,15 +269,15 @@ require (
github.com/secure-systems-lab/go-securesystemslib v0.9.0 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
- github.com/sigstore/fulcio v1.6.6 // indirect
- github.com/sigstore/protobuf-specs v0.4.1 // indirect
+ github.com/sigstore/fulcio v1.7.1 // indirect
+ github.com/sigstore/protobuf-specs v0.4.3 // indirect
github.com/sigstore/rekor v1.3.10 // indirect
- github.com/sigstore/sigstore-go v0.7.1 // indirect
- github.com/sigstore/sigstore/pkg/signature/kms/aws v1.9.1 // indirect
- github.com/sigstore/sigstore/pkg/signature/kms/azure v1.9.1 // indirect
- github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.9.1 // indirect
- github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.1 // indirect
- github.com/sigstore/timestamp-authority v1.2.5 // indirect
+ github.com/sigstore/sigstore-go v1.0.0 // indirect
+ github.com/sigstore/sigstore/pkg/signature/kms/aws v1.9.5 // indirect
+ github.com/sigstore/sigstore/pkg/signature/kms/azure v1.9.5 // indirect
+ github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.9.5 // indirect
+ github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.5 // indirect
+ github.com/sigstore/timestamp-authority v1.2.8 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
@@ -291,7 +289,7 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/thales-e-security/pool v0.0.2 // indirect
- github.com/theupdateframework/go-tuf/v2 v2.0.2 // indirect
+ github.com/theupdateframework/go-tuf/v2 v2.1.1 // indirect
github.com/tidwall/gjson v1.14.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
@@ -299,7 +297,7 @@ require (
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/transparency-dev/merkle v0.0.2 // indirect
- github.com/vbatts/tar-split v0.11.6 // indirect
+ github.com/vbatts/tar-split v0.12.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
@@ -307,38 +305,38 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/zeebo/errs v1.4.0 // indirect
- gitlab.com/gitlab-org/api/client-go v0.127.0 // indirect
+ gitlab.com/gitlab-org/api/client-go v0.130.1 // indirect
go.mongodb.org/mongo-driver v1.17.3 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.35.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
- go.opentelemetry.io/otel v1.35.0 // indirect
- go.opentelemetry.io/otel/metric v1.35.0 // indirect
- go.opentelemetry.io/otel/sdk v1.35.0 // indirect
- go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect
- go.opentelemetry.io/otel/trace v1.35.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
+ go.opentelemetry.io/otel v1.36.0 // indirect
+ go.opentelemetry.io/otel/metric v1.36.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.36.0 // indirect
+ go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
+ go.opentelemetry.io/otel/trace v1.36.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
- goa.design/goa/v3 v3.20.0 // indirect
+ goa.design/goa/v3 v3.20.1 // indirect
gocloud.dev v0.40.0 // indirect
gocloud.dev/docstore/mongodocstore v0.40.0 // indirect
gocloud.dev/pubsub/kafkapubsub v0.40.0 // indirect
- golang.org/x/crypto v0.37.0 // indirect
- golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
- golang.org/x/mod v0.24.0 // indirect
- golang.org/x/net v0.39.0 // indirect
- golang.org/x/oauth2 v0.29.0 // indirect
- golang.org/x/sync v0.13.0 // indirect
+ golang.org/x/crypto v0.39.0 // indirect
+ golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
+ golang.org/x/mod v0.25.0 // indirect
+ golang.org/x/net v0.41.0 // indirect
+ golang.org/x/oauth2 v0.30.0 // indirect
+ golang.org/x/sync v0.15.0 // indirect
golang.org/x/sys v0.33.0 // indirect
- golang.org/x/text v0.24.0 // indirect
- golang.org/x/time v0.11.0 // indirect
+ golang.org/x/text v0.26.0 // indirect
+ golang.org/x/time v0.12.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
- google.golang.org/api v0.229.0 // indirect
- google.golang.org/genproto v0.0.0-20250324211829-b45e905df463 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect
- google.golang.org/grpc v1.72.0 // indirect
+ google.golang.org/api v0.237.0 // indirect
+ google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
+ google.golang.org/grpc v1.73.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
@@ -347,7 +345,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.32.4 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
- k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
+ k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
knative.dev/eventing v0.30.3 // indirect
knative.dev/networking v0.0.0-20231017124814-2a7676e912b7 // indirect
@@ -355,6 +353,7 @@ require (
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
+ sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/release-utils v0.11.1 // indirect
- sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
)
diff --git a/go.sum b/go.sum
index 211a687d81..ed618b15a4 100644
--- a/go.sum
+++ b/go.sum
@@ -28,10 +28,10 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM=
-cloud.google.com/go v0.120.0 h1:wc6bgG9DHyKqF5/vQvX1CiZrtHnxJjBlKUyF9nP6meA=
-cloud.google.com/go v0.120.0/go.mod h1:/beW32s8/pGRuj4IILWQNd4uuebeT4dkOhKmkfit64Q=
-cloud.google.com/go/auth v0.16.0 h1:Pd8P1s9WkcrBE2n/PhAwKsdrR35V3Sg2II9B+ndM3CU=
-cloud.google.com/go/auth v0.16.0/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI=
+cloud.google.com/go v0.121.1 h1:S3kTQSydxmu1JfLRLpKtxRPA7rSrYPRPEUmL/PavVUw=
+cloud.google.com/go v0.121.1/go.mod h1:nRFlrHq39MNVWu+zESP2PosMWA0ryJw8KUBZ2iZpxbw=
+cloud.google.com/go/auth v0.16.2 h1:QvBAGFPLrDeoiNjyfVunhQ10HKNYuOwZ5noee0M5df4=
+cloud.google.com/go/auth v0.16.2/go.mod h1:sRBas2Y1fB1vZTdurouM0AzuYQBMZinrUYL8EufhtEA=
cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
@@ -40,39 +40,39 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I=
-cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg=
+cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU=
+cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
cloud.google.com/go/firestore v1.18.0 h1:cuydCaLS7Vl2SatAeivXyhbhDEIR8BDmtn4egDhIn2s=
cloud.google.com/go/firestore v1.18.0/go.mod h1:5ye0v48PhseZBdcl0qbl3uttu7FIEwEYVaWm0UIEOEU=
-cloud.google.com/go/iam v1.5.0 h1:QlLcVMhbLGOjRcGe6VTGGTyQib8dRLK2B/kYNV0+2xs=
-cloud.google.com/go/iam v1.5.0/go.mod h1:U+DOtKQltF/LxPEtcDLoobcsZMilSRwR7mgNL7knOpo=
-cloud.google.com/go/kms v1.21.1 h1:r1Auo+jlfJSf8B7mUnVw5K0fI7jWyoUy65bV53VjKyk=
-cloud.google.com/go/kms v1.21.1/go.mod h1:s0wCyByc9LjTdCjG88toVs70U9W+cc6RKFc8zAqX7nE=
+cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8=
+cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE=
+cloud.google.com/go/kms v1.22.0 h1:dBRIj7+GDeeEvatJeTB19oYZNV0aj6wEqSIT/7gLqtk=
+cloud.google.com/go/kms v1.22.0/go.mod h1:U7mf8Sva5jpOb4bxYZdtw/9zsbIjrklYwPcvMk34AL8=
cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc=
cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA=
-cloud.google.com/go/longrunning v0.6.6 h1:XJNDo5MUfMM05xK3ewpbSdmt7R2Zw+aQEMbdQR65Rbw=
-cloud.google.com/go/longrunning v0.6.6/go.mod h1:hyeGJUrPHcx0u2Uu1UFSoYZLn4lkMrccJig0t4FI7yw=
-cloud.google.com/go/monitoring v1.24.1 h1:vKiypZVFD/5a3BbQMvI4gZdl8445ITzXFh257XBgrS0=
-cloud.google.com/go/monitoring v1.24.1/go.mod h1:Z05d1/vn9NaujqY2voG6pVQXoJGbp+r3laV+LySt9K0=
+cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE=
+cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY=
+cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM=
+cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/pubsub v1.47.0 h1:Ou2Qu4INnf7ykrFjGv2ntFOjVo8Nloh/+OffF4mUu9w=
-cloud.google.com/go/pubsub v1.47.0/go.mod h1:LaENesmga+2u0nDtLkIOILskxsfvn/BXX9Ak1NFxOs8=
+cloud.google.com/go/pubsub v1.49.0 h1:5054IkbslnrMCgA2MAEPcsN3Ky+AyMpEZcii/DoySPo=
+cloud.google.com/go/pubsub v1.49.0/go.mod h1:K1FswTWP+C1tI/nfi3HQecoVeFvL4HUOB1tdaNXKhUY=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM=
-cloud.google.com/go/storage v1.52.0 h1:ROpzMW/IwipKtatA69ikxibdzQSiXJrY9f6IgBa9AlA=
-cloud.google.com/go/storage v1.52.0/go.mod h1:4wrBAbAYUvYkbrf19ahGm4I5kDQhESSqN3CGEkMGvOY=
-cloud.google.com/go/trace v1.11.3 h1:c+I4YFjxRQjvAhRmSsmjpASUKq88chOX854ied0K/pE=
-cloud.google.com/go/trace v1.11.3/go.mod h1:pt7zCYiDSQjC9Y2oqCsh9jF4GStB/hmjrYLsxRR27q8=
+cloud.google.com/go/storage v1.53.0 h1:gg0ERZwL17pJ+Cz3cD2qS60w1WMDnwcm5YPAIQBHUAw=
+cloud.google.com/go/storage v1.53.0/go.mod h1:7/eO2a/srr9ImZW9k5uufcNahT2+fPb8w5it1i5boaA=
+cloud.google.com/go/trace v1.11.6 h1:2O2zjPzqPYAHrn3OKl029qlqG6W8ZdYaOWRyr8NgMT4=
+cloud.google.com/go/trace v1.11.6/go.mod h1:GA855OeDEBiBMzcckLPE2kDunIpC72N+Pq8WFieFjnI=
code.gitea.io/sdk/gitea v0.20.0 h1:Zm/QDwwZK1awoM4AxdjeAQbxolzx2rIP8dDfmKu+KoU=
code.gitea.io/sdk/gitea v0.20.0/go.mod h1:faouBHC/zyx5wLgjmRKR62ydyvMzwWf3QnU0bH7Cw6U=
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI=
@@ -102,14 +102,14 @@ github.com/AliyunContainerService/ack-ram-tool/pkg/credentials/provider v0.14.0
github.com/AliyunContainerService/ack-ram-tool/pkg/credentials/provider v0.14.0/go.mod h1:tlqp9mUGbsP+0z3Q+c0Q5MgSdq/OMwQhm5bffR3Q3ss=
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU=
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 h1:DSDNVxqkoXJiko6x8a90zidoYqnYYa6c1MTzDKzKkTo=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1/go.mod h1:zGqV2R4Cr/k8Uye5w+dgQ06WJtEcbQG/8J7BB6hnCr4=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 h1:Gt0j3wceWMwPmiazCa8MzMA0MfhmPIz0Qp0FJ6qcM0U=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 h1:B+blDbyVIG3WaikNxPnhPiJ1MThR03b3vKGtER95TP4=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1/go.mod h1:JdM5psgjfBf5fo2uWOZhflPWyDBZ/O/CNAH9CtsuZE4=
github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY=
github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8=
-github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
-github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY=
+github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4=
+github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.3.1 h1:Wgf5rZba3YZqeTNJPtvqZoBu1sBN/L4sry+u2U3Y75w=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.3.1/go.mod h1:xxCBG/f/4Vbmh2XQJBsOmNdxWUY5j/s27jujKPbQf14=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.1.1 h1:bFWuoEKg+gImo7pvkiQEFAc8ocibADgXeiLAxWhWmkI=
@@ -166,10 +166,6 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
-github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
-github.com/ProtonMail/go-crypto v1.1.5 h1:eoAQfK2dwL+tFSFpr7TbOaPNUbPiJj4fLYwwGE1FQO4=
-github.com/ProtonMail/go-crypto v1.1.5/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
@@ -243,20 +239,20 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
-github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk=
-github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
-github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM=
-github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg=
-github.com/aws/aws-sdk-go-v2/config v1.29.12 h1:Y/2a+jLPrPbHpFkpAAYkVEtJmxORlXoo5k2g1fa2sUo=
-github.com/aws/aws-sdk-go-v2/config v1.29.12/go.mod h1:xse1YTjmORlb/6fhkWi8qJh3cvZi4JoVNhc+NbJt4kI=
-github.com/aws/aws-sdk-go-v2/credentials v1.17.65 h1:q+nV2yYegofO/SUXruT+pn4KxkxmaQ++1B/QedcKBFM=
-github.com/aws/aws-sdk-go-v2/credentials v1.17.65/go.mod h1:4zyjAuGOdikpNYiSGpsGz8hLGmUzlY8pc8r9QQ/RXYQ=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q=
+github.com/aws/aws-sdk-go v1.55.7 h1:UJrkFq7es5CShfBwlWAC8DA077vp8PyVbQd3lqLiztE=
+github.com/aws/aws-sdk-go v1.55.7/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
+github.com/aws/aws-sdk-go-v2 v1.36.4 h1:GySzjhVvx0ERP6eyfAbAuAXLtAda5TEy19E5q5W8I9E=
+github.com/aws/aws-sdk-go-v2 v1.36.4/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg=
+github.com/aws/aws-sdk-go-v2/config v1.29.16 h1:XkruGnXX1nEZ+Nyo9v84TzsX+nj86icbFAeust6uo8A=
+github.com/aws/aws-sdk-go-v2/config v1.29.16/go.mod h1:uCW7PNjGwZ5cOGZ5jr8vCWrYkGIhPoTNV23Q/tpHKzg=
+github.com/aws/aws-sdk-go-v2/credentials v1.17.69 h1:8B8ZQboRc3uaIKjshve/XlvJ570R7BKNy3gftSbS178=
+github.com/aws/aws-sdk-go-v2/credentials v1.17.69/go.mod h1:gPME6I8grR1jCqBFEGthULiolzf/Sexq/Wy42ibKK9c=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 h1:oQWSGexYasNpYp4epLGZxxjsDo8BMBh6iNWkTXQvkwk=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31/go.mod h1:nc332eGUU+djP3vrMI6blS0woaCfHTe3KiSQUVTMRq0=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 h1:o1v1VFfPcDVlK3ll1L5xHsaQAFdNtZ5GXnNR7SwueC4=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35/go.mod h1:rZUQNYMNG+8uZxz9FOerQJ+FceCiodXvixpeRtdESrU=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 h1:R5b82ubO2NntENm3SAm0ADME+H630HomNJdgv+yZ3xw=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35/go.mod h1:FuA+nmgMRfkzVKYDNEqQadvEMxtxl9+RLT9ribCwEMs=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
github.com/aws/aws-sdk-go-v2/service/ecr v1.40.3 h1:a+210FCU/pR5hhKRaskRfX/ogcyyzFBrehcTk5DTAyU=
@@ -265,16 +261,16 @@ github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.31.2 h1:E6/Myrj9HgLF22medmDrKm
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.31.2/go.mod h1:OQ8NALFcchBJ/qruak6zKUQodovnTKKaReTuCkc5/9Y=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY=
-github.com/aws/aws-sdk-go-v2/service/kms v1.38.1 h1:tecq7+mAav5byF+Mr+iONJnCBf4B4gon8RSp4BrweSc=
-github.com/aws/aws-sdk-go-v2/service/kms v1.38.1/go.mod h1:cQn6tAF77Di6m4huxovNM7NVAozWTZLsDRp9t8Z/WYk=
-github.com/aws/aws-sdk-go-v2/service/sso v1.25.2 h1:pdgODsAhGo4dvzC3JAG5Ce0PX8kWXrTZGx+jxADD+5E=
-github.com/aws/aws-sdk-go-v2/service/sso v1.25.2/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0 h1:90uX0veLKcdHVfvxhkWUQSCi5VabtwMLFutYiRke4oo=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs=
-github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 h1:PZV5W8yk4OtH1JAuhV2PXwwO9v5G5Aoj+eMCn4T+1Kc=
-github.com/aws/aws-sdk-go-v2/service/sts v1.33.17/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 h1:/ldKrPPXTC421bTNWrUIpq3CxwHwRI/kpc+jPUTJocM=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16/go.mod h1:5vkf/Ws0/wgIMJDQbjI4p2op86hNW6Hie5QtebrDgT8=
+github.com/aws/aws-sdk-go-v2/service/kms v1.41.0 h1:2jKyib9msVrAVn+lngwlSplG13RpUZmzVte2yDao5nc=
+github.com/aws/aws-sdk-go-v2/service/kms v1.41.0/go.mod h1:RyhzxkWGcfixlkieewzpO3D4P4fTMxhIDqDZWsh0u/4=
+github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 h1:EU58LP8ozQDVroOEyAfcq0cGc5R/FTZjVoYJ6tvby3w=
+github.com/aws/aws-sdk-go-v2/service/sso v1.25.4/go.mod h1:CrtOgCcysxMvrCoHnvNAD7PHWclmoFG78Q2xLK0KKcs=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 h1:XB4z0hbQtpmBnb1FQYvKaCM7UsS6Y/u8jVBwIUGeCTk=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2/go.mod h1:hwRpqkRxnQ58J9blRDrB4IanlXCpcKmsC83EhG77upg=
+github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 h1:nyLjs8sYJShFYj6aiyjCBI3EcLn1udWrQTjEF+SOXB0=
+github.com/aws/aws-sdk-go-v2/service/sts v1.33.21/go.mod h1:EhdxtZ+g84MSGrSrHzZiUm9PYiZkrADNja15wtRJSJo=
github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k=
github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.9.1 h1:50sS0RWhGpW/yZx2KcDNEb1u1MANv5BMEkJgcieEDTA=
@@ -295,8 +291,8 @@ github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox
github.com/bluekeyes/go-gitdiff v0.8.0 h1:Nn1wfw3/XeKoc3lWk+2bEXGUHIx36kj80FM1gVcBk+o=
github.com/bluekeyes/go-gitdiff v0.8.0/go.mod h1:WWAk1Mc6EgWarCrPFO+xeYlujPu98VuLW3Tu+B/85AE=
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q=
-github.com/buildkite/agent/v3 v3.95.1 h1:soe8EyQf068snMYtsQM10+l/l2wwbZIz0P7aDbz+Zws=
-github.com/buildkite/agent/v3 v3.95.1/go.mod h1:k2rfXF1U6fl/wejFXuS4YWXX4nDXZFpvKjCc5KUOAXg=
+github.com/buildkite/agent/v3 v3.98.2 h1:VOOxv8XD8HVCtEvtRPQhvB6k2Gorha2gN1wGh94gYAA=
+github.com/buildkite/agent/v3 v3.98.2/go.mod h1:+zCvvo/OlOwfs+AH3QvSn37H3cBXP3Fe18eoSbqUvnY=
github.com/buildkite/go-pipeline v0.13.3 h1:llI7sAdZ7sqYE7r8ePlmDADRhJ1K0Kua2+gv74Z9+Es=
github.com/buildkite/go-pipeline v0.13.3/go.mod h1:1uC2XdHkTV1G5jYv9K8omERIwrsYbBruBrPx1Zu1uFw=
github.com/buildkite/interpolate v0.1.5 h1:v2Ji3voik69UZlbfoqzx+qfcsOKLA61nHdU79VV+tPU=
@@ -306,6 +302,8 @@ github.com/buildkite/roko v1.3.1/go.mod h1:23R9e6nHxgedznkwwfmqZ6+0VJZJZ2Sg/uVcp
github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
+github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
+github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
@@ -333,8 +331,6 @@ github.com/cloudevents/sdk-go/v2 v2.4.1/go.mod h1:MZiMwmAh5tGj+fPFvtHv9hKurKqXtd
github.com/cloudevents/sdk-go/v2 v2.8.0/go.mod h1:GpCBmUj7DIRiDhVvsK5d6WCbgTWs8DxAWTRtAwQmIXs=
github.com/cloudevents/sdk-go/v2 v2.16.0 h1:wnunjgiLQCfYlyo+E4+mFlZtAh7pKn7vT8MMD3lSwCg=
github.com/cloudevents/sdk-go/v2 v2.16.0/go.mod h1:5YWqklyhDSmGzBK/JENKKXdulbPq0JFf3c/KEnMLqgg=
-github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
-github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
@@ -378,10 +374,10 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
-github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46 h1:2Dx4IHfC1yHWI12AxQDJM1QbRCDfk6M+blLzlZCXdrc=
-github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46/go.mod h1:uzvlm1mxhHkdfqitSA92i7Se+S9ksOn3a3qmv/kyOCw=
-github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs=
-github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps=
+github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 h1:uX1JmpONuD549D73r6cgnxyUu18Zb7yHAy5AYU0Pm4Q=
+github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467/go.mod h1:uzvlm1mxhHkdfqitSA92i7Se+S9ksOn3a3qmv/kyOCw=
+github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0=
+github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -410,8 +406,8 @@ github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBi
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw=
github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
-github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
+github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
+github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@@ -522,8 +518,8 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
-github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
+github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU=
@@ -561,8 +557,8 @@ github.com/go-piv/piv-go/v2 v2.3.0 h1:kKkrYlgLQTMPA6BiSL25A7/x4CEh2YCG7rtb/aTkx+
github.com/go-piv/piv-go/v2 v2.3.0/go.mod h1:ShZi74nnrWNQEdWzRUd/3cSig3uNOcEZp+EWl0oewnI=
github.com/go-rod/rod v0.116.2 h1:A5t2Ky2A+5eD/ZJQr1EfsQSe5rms5Xof/qj296e+ZqA=
github.com/go-rod/rod v0.116.2/go.mod h1:H+CMO9SCNc2TJ2WfrG+pKhITz57uGNYU43qYHh438Mg=
-github.com/go-sql-driver/mysql v1.9.1 h1:FrjNGn/BsJQjVRuSa8CBrM5BWA9BWoXXat3KrtSb/iI=
-github.com/go-sql-driver/mysql v1.9.1/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
+github.com/go-sql-driver/mysql v1.9.2 h1:4cNKDYQ1I84SXslGddlsrMhc8k4LeDVj6Ad6WRjiHuU=
+github.com/go-sql-driver/mysql v1.9.2/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
@@ -651,8 +647,8 @@ github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/cel-go v0.25.0 h1:jsFw9Fhn+3y2kBbltZR4VEz5xKkcIFRPDnuEzAGv5GY=
github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI=
-github.com/google/certificate-transparency-go v1.3.1 h1:akbcTfQg0iZlANZLn0L9xOeWtyCIdeoYhKrqi5iH3Go=
-github.com/google/certificate-transparency-go v1.3.1/go.mod h1:gg+UQlx6caKEDQ9EElFOujyxEQEfOiQzAt6782Bvi8k=
+github.com/google/certificate-transparency-go v1.3.2 h1:9ahSNZF2o7SYMaKaXhAumVEzXB2QaayzII9C8rv7v+A=
+github.com/google/certificate-transparency-go v1.3.2/go.mod h1:H5FpMUaGa5Ab2+KCYsxg6sELw3Flkl7pGZzWdBoYLXs=
github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -672,8 +668,8 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
-github.com/google/go-containerregistry v0.20.3 h1:oNx7IdTI936V8CQRveCjaxOiegWwvM7kqkbXTpyiovI=
-github.com/google/go-containerregistry v0.20.3/go.mod h1:w00pIgBRDVUDFM6bq+Qx8lwNWK+cxgCuX1vd3PIBDNI=
+github.com/google/go-containerregistry v0.20.6 h1:cvWX87UxxLgaH76b4hIvya6Dzz9qHB31qAwjAohdSTU=
+github.com/google/go-containerregistry v0.20.6/go.mod h1:T0x8MuoAoKX/873bkeSfLD2FAkwCDf9/HZgsFJ02E2Y=
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20240108195214-a0658aa1d0cc h1:eJ9J17+23quNw5z6O9AdTH+irI7JI+6eQX9TswViyvk=
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20240108195214-a0658aa1d0cc/go.mod h1:Ek+8PQrShkA7aHEj3/zSW33wU0V/Bx3zW/gFh7l21xY=
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20240108195214-a0658aa1d0cc h1:fHDosK/RhxYQpWBRo+bbawVuR402odSaNToA0Pp+ojw=
@@ -681,8 +677,8 @@ github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-2024010819521
github.com/google/go-github/v27 v27.0.6/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0=
github.com/google/go-github/v31 v31.0.0 h1:JJUxlP9lFK+ziXKimTCprajMApV1ecWD4NB6CCb0plo=
github.com/google/go-github/v31 v31.0.0/go.mod h1:NQPZol8/1sMoWYGN2yaALIBytu17gAWfhbweiEed3pM=
-github.com/google/go-github/v55 v55.0.0 h1:4pp/1tNMB9X/LuAhs5i0KQAE40NmiR/y6prLNb9x9cg=
-github.com/google/go-github/v55 v55.0.0/go.mod h1:JLahOTA1DnXzhxEymmFF5PP2tSS9JVNj68mSZNDwskA=
+github.com/google/go-github/v72 v72.0.0 h1:FcIO37BLoVPBO9igQQ6tStsv2asG4IPcYFi655PPvBM=
+github.com/google/go-github/v72 v72.0.0/go.mod h1:WWtw8GMRiL62mvIquf1kO3onRHeWWKmK01qdCY8c5fg=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
@@ -717,18 +713,16 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
-github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
+github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
+github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
-github.com/google/tink/go v1.7.0 h1:6Eox8zONGebBFcCBqkVmt60LaWZa6xg1cl/DwAh/J1w=
-github.com/google/tink/go v1.7.0/go.mod h1:GAUOd+QE3pgj9q8VKIGTCP33c/B7eb4NhxLcgTJZStM=
-github.com/google/trillian v1.7.1 h1:+zX8jLM3524bAMPS+VxaDIDgsMv3/ty6DuLWerHXcek=
-github.com/google/trillian v1.7.1/go.mod h1:E1UMAHqpZCA8AQdrKdWmHmtUfSeiD0sDWD1cv00Xa+c=
+github.com/google/trillian v1.7.2 h1:EPBxc4YWY4Ak8tcuhyFleY+zYlbCDCa4Sn24e1Ka8Js=
+github.com/google/trillian v1.7.2/go.mod h1:mfQJW4qRH6/ilABtPYNBerVJAJ/upxHLX81zxNQw05s=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -742,8 +736,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
-github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q=
-github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA=
+github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0=
+github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w=
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
@@ -757,8 +751,8 @@ github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWS
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
-github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
+github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/grafeas/grafeas v0.2.3 h1:B9Bgc3ZQjPhqXKmro95Dfyb+GlE6D1pMuExT+n66ChE=
github.com/grafeas/grafeas v0.2.3/go.mod h1:O+UvNYn4LhdKR59XrxRDWwr2bbheR1KRRNdD8mJpxs4=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
@@ -770,8 +764,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b h1:wDUNC2eKiL35DbLvsDhiblTUXHxcOPwQSCzi7xpQUN4=
@@ -798,15 +792,13 @@ github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFO
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
-github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs=
-github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
-github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U=
+github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 h1:U+kC2dOhMFQctRfhK0gRctKAPTloZdMU5ZJxaesJ/VM=
+github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0/go.mod h1:Ll013mhdmsVDuoIXVfBtvgGJsXDYkTw1kooNcoCXuE0=
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts=
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
-github.com/hashicorp/go-sockaddr v1.0.5 h1:dvk7TIXCZpmfOlM+9mlcrWmWjw/wlKT+VDq2wMvfPJU=
-github.com/hashicorp/go-sockaddr v1.0.5/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI=
+github.com/hashicorp/go-sockaddr v1.0.7 h1:G+pTkSO01HpR5qCxg7lxfsFEZaG+C0VssTy/9dbT+Fw=
+github.com/hashicorp/go-sockaddr v1.0.7/go.mod h1:FZQbEYa1pxkQ7WLpyXJ6cbjpT8q0YgQaK/JakXqGyWw=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@@ -858,14 +850,12 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/influxdata/tdigest v0.0.0-20180711151920-a7d76c6f093a/go.mod h1:9GkyshztGufsdPQWjH+ifgnIr3xNUL5syI70g2dzU1o=
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
-github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0=
-github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
-github.com/jackc/pgx/v5 v5.7.2 h1:mLoDLV6sonKlvjIEsV56SkWNCnuNv531l94GaIzO+XI=
-github.com/jackc/pgx/v5 v5.7.2/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ=
+github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs=
+github.com/jackc/pgx/v5 v5.7.5/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M=
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
@@ -918,8 +908,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
-github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 h1:IsMZxCuZqKuao2vNdfD82fjjgPLfyHLpR41Z88viRWs=
-github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6/go.mod h1:3VeWNIJaW+O5xpRQbPp0Ybqu1vJd/pm7s2F473HRrkw=
+github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU=
+github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
@@ -996,14 +986,12 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE=
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
@@ -1071,12 +1059,12 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4=
github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
-github.com/open-policy-agent/opa v1.1.0 h1:HMz2evdEMTyNqtdLjmu3Vyx06BmhNYAx67Yz3Ll9q2s=
-github.com/open-policy-agent/opa v1.1.0/go.mod h1:T1pASQ1/vwfTa+e2fYcfpLCvWgYtqtiUv+IuA/dLPQs=
+github.com/open-policy-agent/opa v1.5.1 h1:LTxxBJusMVjfs67W4FoRcnMfXADIGFMzpqnfk6D08Cg=
+github.com/open-policy-agent/opa v1.5.1/go.mod h1:bYbS7u+uhTI+cxHQIpzvr5hxX0hV7urWtY+38ZtjMgk=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
-github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
-github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
+github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
+github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
@@ -1089,8 +1077,8 @@ github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw=
github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml/v2 v2.0.0-beta.2/go.mod h1:+X+aW6gUj6Hda43TeYHVCIvYNG/jqY/8ZFXAeXXHl+Q=
-github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
-github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
+github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
+github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
@@ -1120,14 +1108,14 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
-github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
-github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
+github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
+github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
-github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
+github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
+github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
@@ -1137,8 +1125,8 @@ github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
-github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
-github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
+github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k=
+github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
@@ -1158,8 +1146,8 @@ github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0V
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
-github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM=
-github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA=
+github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI=
+github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
github.com/rickb777/date v1.13.0/go.mod h1:GZf3LoGnxPWjX+/1TXOuzHefZFDovTyNLHDMd3qH70k=
github.com/rickb777/plural v1.2.1/go.mod h1:j058+3M5QQFgcZZ2oKIOekcygoZUL8gKW5yRO14BuAw=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
@@ -1178,7 +1166,6 @@ github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNl
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
@@ -1201,28 +1188,28 @@ github.com/shurcooL/githubv4 v0.0.0-20190718010115-4ba037080260/go.mod h1:hAF0iL
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk=
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/sigstore/cosign/v2 v2.5.0 h1:1aRfPgRQHHlODI3Mvs/JkPBS9dJT9bRLCuHZgnHxFt8=
-github.com/sigstore/cosign/v2 v2.5.0/go.mod h1:2V2hmo+jjFNnDb5Q5VL6PXvLU9Vujio7T5yldrpNTRw=
-github.com/sigstore/fulcio v1.6.6 h1:XaMYX6TNT+8n7Npe8D94nyZ7/ERjEsNGFC+REdi/wzw=
-github.com/sigstore/fulcio v1.6.6/go.mod h1:BhQ22lwaebDgIxVBEYOOqLRcN5+xOV+C9bh/GUXRhOk=
-github.com/sigstore/protobuf-specs v0.4.1 h1:5SsMqZbdkcO/DNHudaxuCUEjj6x29tS2Xby1BxGU7Zc=
-github.com/sigstore/protobuf-specs v0.4.1/go.mod h1:+gXR+38nIa2oEupqDdzg4qSBT0Os+sP7oYv6alWewWc=
+github.com/sigstore/cosign/v2 v2.5.2 h1:i5Dw7M7W9OcWgyiknJB8vNx/07KweninBDxRoHPxqHE=
+github.com/sigstore/cosign/v2 v2.5.2/go.mod h1:CYlcgkPQJZ5pvWlbl7mOfO/Q1S1N7r4tpdYCtFwhXco=
+github.com/sigstore/fulcio v1.7.1 h1:RcoW20Nz49IGeZyu3y9QYhyyV3ZKQ85T+FXPKkvE+aQ=
+github.com/sigstore/fulcio v1.7.1/go.mod h1:7lYY+hsd8Dt+IvKQRC+KEhWpCZ/GlmNvwIa5JhypMS8=
+github.com/sigstore/protobuf-specs v0.4.3 h1:kRgJ+ciznipH9xhrkAbAEHuuxD3GhYnGC873gZpjJT4=
+github.com/sigstore/protobuf-specs v0.4.3/go.mod h1:+gXR+38nIa2oEupqDdzg4qSBT0Os+sP7oYv6alWewWc=
github.com/sigstore/rekor v1.3.10 h1:/mSvRo4MZ/59ECIlARhyykAlQlkmeAQpvBPlmJtZOCU=
github.com/sigstore/rekor v1.3.10/go.mod h1:JvryKJ40O0XA48MdzYUPu0y4fyvqt0C4iSY7ri9iu3A=
-github.com/sigstore/sigstore v1.9.4 h1:64+OGed80+A4mRlNzRd055vFcgBeDghjZw24rPLZgDU=
-github.com/sigstore/sigstore v1.9.4/go.mod h1:Q7tGTC3gbtK7c3jcxEmGc2MmK4rRpIRzi3bxRFWKvEY=
-github.com/sigstore/sigstore-go v0.7.1 h1:lyzi3AjO6+BHc5zCf9fniycqPYOt3RaC08M/FRmQhVY=
-github.com/sigstore/sigstore-go v0.7.1/go.mod h1:AIRj4I3LC82qd07VFm3T2zXYiddxeBV1k/eoS8nTz0E=
-github.com/sigstore/sigstore/pkg/signature/kms/aws v1.9.1 h1:/YcNq687WnXpIRXl04nLfJX741G4iW+w+7Nem2Zy0f4=
-github.com/sigstore/sigstore/pkg/signature/kms/aws v1.9.1/go.mod h1:ApL9RpKsi7gkSYN0bMNdm/3jZ9EefxMmfYHfUmq2ZYM=
-github.com/sigstore/sigstore/pkg/signature/kms/azure v1.9.1 h1:FnusXyTIInnwfIOzzl5PFilRm1I97dxMSOcCkZBu9Kc=
-github.com/sigstore/sigstore/pkg/signature/kms/azure v1.9.1/go.mod h1:d5m5LOa/69a+t2YC9pDPwS1n2i/PhqB4cUKbpVDlKKE=
-github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.9.1 h1:LFiYK1DEWQ6Hf/nroFzBMM+s5rVSjVL45Alpb5Ctl5A=
-github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.9.1/go.mod h1:GFyFmDsE2wDuIHZD+4+JErGpA0S4zJsKNz5l2JVJd8s=
-github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.1 h1:sIW6xe4yU5eIMH8fve2C78d+r29KmHnIb+7po+80bsY=
-github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.1/go.mod h1:3pNf99GnK9eu3XUa5ebHzgEQSVYf9hqAoPFwbwD6O6M=
-github.com/sigstore/timestamp-authority v1.2.5 h1:W22JmwRv1Salr/NFFuP7iJuhytcZszQjldoB8GiEdnw=
-github.com/sigstore/timestamp-authority v1.2.5/go.mod h1:gWPKWq4HMWgPCETre0AakgBzcr9DRqHrsgbrRqsigOs=
+github.com/sigstore/sigstore v1.9.5 h1:Wm1LT9yF4LhQdEMy5A2JeGRHTrAWGjT3ubE5JUSrGVU=
+github.com/sigstore/sigstore v1.9.5/go.mod h1:VtxgvGqCmEZN9X2zhFSOkfXxvKUjpy8RpUW39oCtoII=
+github.com/sigstore/sigstore-go v1.0.0 h1:4N07S2zLxf09nTRwaPKyAxbKzpM8WJYUS8lWWaYxneU=
+github.com/sigstore/sigstore-go v1.0.0/go.mod h1:UYsZ/XHE4eltv1o1Lu+n6poW1Z5to3f0+emvfXNxIN8=
+github.com/sigstore/sigstore/pkg/signature/kms/aws v1.9.5 h1:qp2VFyKuFQvTGmZwk5Q7m5nE4NwnF9tHwkyz0gtWAck=
+github.com/sigstore/sigstore/pkg/signature/kms/aws v1.9.5/go.mod h1:DKlQjjr+GsWljEYPycI0Sf8URLCk4EbGA9qYjF47j4g=
+github.com/sigstore/sigstore/pkg/signature/kms/azure v1.9.5 h1:CRZcdYn5AOptStsLRAAACudAVmb1qUbhMlzrvm7ju3o=
+github.com/sigstore/sigstore/pkg/signature/kms/azure v1.9.5/go.mod h1:b9rFfITq2fp1M3oJmq6lFFhSrAz5vOEJH1qzbMsZWN4=
+github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.9.5 h1:7U0GsO0UGG1PdtgS6wBkRC0sMgq7BRVaFlPRwN4m1Qg=
+github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.9.5/go.mod h1:/2qrI0nnCy/DTIPOMFaZlFnNPWEn5UeS70P37XEM88o=
+github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.5 h1:S2ukEfN1orLKw2wEQIUHDDlzk0YcylhcheeZ5TGk8LI=
+github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.5/go.mod h1:m7sQxVJmDa+rsmS1m6biQxaLX83pzNS7ThUEyjOqkCU=
+github.com/sigstore/timestamp-authority v1.2.8 h1:BEV3fkphwU4zBp3allFAhCqQb99HkiyCXB853RIwuEE=
+github.com/sigstore/timestamp-authority v1.2.8/go.mod h1:G2/0hAZmLPnevEwT1S9IvtNHUm9Ktzvso6xuRhl94ZY=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
@@ -1313,8 +1300,8 @@ github.com/thales-e-security/pool v0.0.2 h1:RAPs4q2EbWsTit6tpzuvTFlgFRJ3S8Evf5gt
github.com/thales-e-security/pool v0.0.2/go.mod h1:qtpMm2+thHtqhLzTwgDBj/OuNnMpupY8mv0Phz0gjhU=
github.com/theupdateframework/go-tuf v0.7.0 h1:CqbQFrWo1ae3/I0UCblSbczevCCbS31Qvs5LdxRWqRI=
github.com/theupdateframework/go-tuf v0.7.0/go.mod h1:uEB7WSY+7ZIugK6R1hiBMBjQftaFzn7ZCDJcp1tCUug=
-github.com/theupdateframework/go-tuf/v2 v2.0.2 h1:PyNnjV9BJNzN1ZE6BcWK+5JbF+if370jjzO84SS+Ebo=
-github.com/theupdateframework/go-tuf/v2 v2.0.2/go.mod h1:baB22nBHeHBCeuGZcIlctNq4P61PcOdyARlplg5xmLA=
+github.com/theupdateframework/go-tuf/v2 v2.1.1 h1:OWcoHItwsGO+7m0wLa7FDWPR4oB1cj0zOr1kosE4G+I=
+github.com/theupdateframework/go-tuf/v2 v2.1.1/go.mod h1:V675cQGhZONR0OGQ8r1feO0uwtsTBYPDWHzAAPn5rjE=
github.com/tidwall/gjson v1.14.2 h1:6BBkirS0rAHjumnjHF6qgy5d2YAJ1TLIaFE2lzfOLqo=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
@@ -1327,6 +1314,8 @@ github.com/tink-crypto/tink-go-awskms/v2 v2.1.0 h1:N9UxlsOzu5mttdjhxkDLbzwtEecuX
github.com/tink-crypto/tink-go-awskms/v2 v2.1.0/go.mod h1:PxSp9GlOkKL9rlybW804uspnHuO9nbD98V/fDX4uSis=
github.com/tink-crypto/tink-go-gcpkms/v2 v2.2.0 h1:3B9i6XBXNTRspfkTC0asN5W0K6GhOSgcujNiECNRNb0=
github.com/tink-crypto/tink-go-gcpkms/v2 v2.2.0/go.mod h1:jY5YN2BqD/KSCHM9SqZPIpJNG/u3zwfLXHgws4x2IRw=
+github.com/tink-crypto/tink-go-hcvault/v2 v2.3.0 h1:6nAX1aRGnkg2SEUMwO5toB2tQkP0Jd6cbmZ/K5Le1V0=
+github.com/tink-crypto/tink-go-hcvault/v2 v2.3.0/go.mod h1:HOC5NWW1wBI2Vke1FGcRBvDATkEYE7AUDiYbXqi2sBw=
github.com/tink-crypto/tink-go/v2 v2.4.0 h1:8VPZeZI4EeZ8P/vB6SIkhlStrJfivTJn+cQ4dtyHNh0=
github.com/tink-crypto/tink-go/v2 v2.4.0/go.mod h1:l//evrF2Y3MjdbpNDNGnKgCpo5zSmvUvnQ4MU+yE2sw=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0=
@@ -1344,10 +1333,12 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs=
-github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI=
+github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
+github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
github.com/vdemeester/cr-20160607 v1.0.1 h1:nHyI7BZNR04QFtgItJFVAr8SLeoVIFd8co+DODxnPKE=
github.com/vdemeester/cr-20160607 v1.0.1/go.mod h1:QHeKZtZ3F3FOE+/uIXCBAp8POwnUYekpLwr1dtQa5r0=
+github.com/vektah/gqlparser/v2 v2.5.26 h1:REqqFkO8+SOEgZHR/eHScjjVjGS8Nk3RMO/juiTobN4=
+github.com/vektah/gqlparser/v2 v2.5.26/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
github.com/wavesoftware/go-ensure v1.0.0/go.mod h1:K2UAFSwMTvpiRGay/M3aEYYuurcR8S4A6HkQlJPV8k4=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
@@ -1393,8 +1384,8 @@ github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97
github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk=
github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM=
github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4=
-gitlab.com/gitlab-org/api/client-go v0.127.0 h1:8xnxcNKGF2gDazEoMs+hOZfOspSSw8D0vAoWhQk9U+U=
-gitlab.com/gitlab-org/api/client-go v0.127.0/go.mod h1:bYC6fPORKSmtuPRyD9Z2rtbAjE7UeNatu2VWHRf4/LE=
+gitlab.com/gitlab-org/api/client-go v0.130.1 h1:1xF5C5Zq3sFeNg3PzS2z63oqrxifne3n/OnbI7nptRc=
+gitlab.com/gitlab-org/api/client-go v0.130.1/go.mod h1:ZhSxLAWadqP6J9lMh40IAZOlOxBLPRh7yFOXR/bMJWM=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
@@ -1421,43 +1412,43 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz
go.opentelemetry.io/contrib/detectors/gcp v1.35.0 h1:bGvFt68+KTiAKFlacHW6AhA56GF2rS0bdD3aJYEnmzA=
go.opentelemetry.io/contrib/detectors/gcp v1.35.0/go.mod h1:qGWP8/+ILwMRIUf9uIVLloR1uo5ZYAslM4O6OqUi1DA=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo=
-go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
-go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
+go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
+go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg=
go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 h1:BEj3SPM81McUZHYjRS5pEgNgnmzGJ5tRpU5krWnV8Bs=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0/go.mod h1:9cKLGBDzI/F3NoHLQGm4ZrYdIHsvGt6ej6hUowxY0J4=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0 h1:PB3Zrjs1sG1GBX51SXyTSoOTqcDglmsk7nT6tkKPb/k=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0/go.mod h1:U2R3XyVPzn0WX7wOIypPuptulsMcPDPs/oiSVOMVnHY=
go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU=
-go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
-go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
+go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
+go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw=
go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc=
-go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
-go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
+go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
+go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE=
go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE=
-go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
-go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
+go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
+go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw=
-go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
-go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
+go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
+go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY=
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds=
-go.step.sm/crypto v0.60.0 h1:UgSw8DFG5xUOGB3GUID17UA32G4j1iNQ4qoMhBmsVFw=
-go.step.sm/crypto v0.60.0/go.mod h1:Ep83Lv818L4gV0vhFTdPWRKnL6/5fRMpi8SaoP5ArSw=
+go.step.sm/crypto v0.66.0 h1:9TW6BEguOtcS9NIjja9bDQ+j8OjhenU/F6lJfHjbXNU=
+go.step.sm/crypto v0.66.0/go.mod h1:anqGyvO/Px05D1mznHq4/a9wwP1I1DmMZvk+TWX5Dzo=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
@@ -1475,8 +1466,8 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
-goa.design/goa/v3 v3.20.0 h1:mYYNqCBg9SSxe2jxvPJFOPmJqqKkSAUSU84jpczky3s=
-goa.design/goa/v3 v3.20.0/go.mod h1:g8sT4ioTaRt8BZKwZ1YOQe7UgWqkZMx+q6NWgQfzLUU=
+goa.design/goa/v3 v3.20.1 h1:NpGdgRjaXUMOvb4dIfkUwAJOrLf1Jz0K0ggYj4Q7DFM=
+goa.design/goa/v3 v3.20.1/go.mod h1:cLX3Y1JvnCabMWDAZxmfnjxM1f1l9g7Zf0C9CD9GIAQ=
gocloud.dev v0.40.0 h1:f8LgP+4WDqOG/RXoUcyLpeIAGOcAbZrZbDQCUee10ng=
gocloud.dev v0.40.0/go.mod h1:drz+VyYNBvrMTW0KZiBAYEdl8lbNZx+OQ7oQvdrFmSQ=
gocloud.dev/docstore/mongodocstore v0.40.0 h1:KTwP9Wr3PNPxN3bItxtK/RHiF4D6cTYjE5GDkPKcJrI=
@@ -1509,8 +1500,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
-golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
-golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
+golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
+golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1522,8 +1513,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo7yrN4mVcnkHDYz5vvs=
-golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo=
+golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
+golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -1554,8 +1545,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
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.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
-golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
-golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
+golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
+golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1619,8 +1610,8 @@ golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
-golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
-golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
+golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
+golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1639,8 +1630,8 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
-golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98=
-golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
+golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
+golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1658,8 +1649,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
-golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
-golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
+golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
+golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1783,15 +1774,15 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
-golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
+golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
+golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
-golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
+golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
+golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -1863,8 +1854,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
-golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU=
-golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s=
+golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
+golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1909,8 +1900,8 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E=
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
-google.golang.org/api v0.229.0 h1:p98ymMtqeJ5i3lIBMj5MpR9kzIIgzpHHh8vQ+vgAzx8=
-google.golang.org/api v0.229.0/go.mod h1:wyDfmq5g1wYJWn29O22FDWN48P7Xcz0xz+LBpptYvB0=
+google.golang.org/api v0.237.0 h1:MP7XVsGZesOsx3Q8WVa4sUdbrsTvDSOERd3Vh4xj/wc=
+google.golang.org/api v0.237.0/go.mod h1:cOVEm2TpdAGHL2z+UwyS+kmlGr3bVWQQ6sYEqkKje50=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -1981,12 +1972,12 @@ google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ6
google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20250324211829-b45e905df463 h1:qEFnJI6AnfZk0NNe8YTyXQh5i//Zxi4gBHwRgp76qpw=
-google.golang.org/genproto v0.0.0-20250324211829-b45e905df463/go.mod h1:SqIx1NV9hcvqdLHo7uNZDS5lrUJybQ3evo3+z/WBfA0=
-google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e h1:UdXH7Kzbj+Vzastr5nVfccbmFsmYNygVLSPk1pEfDoY=
-google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e/go.mod h1:085qFyf2+XaZlRdCgKNCIZ3afY2p4HHZdoIRpId8F4A=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e h1:ztQaXfzEXTmCBvbtWYRhJxW+0iJcz2qXfd38/e9l7bA=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
+google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78=
+google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk=
+google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 h1:Kog3KlB4xevJlAcbbbzPfRG0+X9fdoGM+UBRKVz6Wr0=
+google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237/go.mod h1:ezi0AVyMKDWy5xAncvjLWH7UcLBB5n7y2fQ8MzjJcto=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -2015,8 +2006,8 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM=
-google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
+google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
+google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@@ -2088,21 +2079,21 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs=
-k8s.io/api v0.32.5 h1:uqjjsYo1kTJr5NIcoIaP9F+TgXgADH7nKQx91FDAhtk=
-k8s.io/api v0.32.5/go.mod h1:bXXFU3fGCZ/eFMZvfHZC69PeGbXEL4zzjuPVzOxHF64=
+k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw=
+k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw=
k8s.io/apiextensions-apiserver v0.22.5/go.mod h1:tIXeZ0BrDxUb1PoAz+tgOz43Zi1Bp4BEEqVtUccMJbE=
k8s.io/apiextensions-apiserver v0.32.4 h1:IA+CoR63UDOijR/vEpow6wQnX4V6iVpzazJBskHrpHE=
k8s.io/apiextensions-apiserver v0.32.4/go.mod h1:Y06XO/b92H8ymOdG1HlA1submf7gIhbEDc3RjriqZOs=
k8s.io/apimachinery v0.19.7/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q=
k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U=
-k8s.io/apimachinery v0.32.5 h1:6We3aJ6crC0ap8EhsEXcgX3LpI6SEjubpiOMXLROwPM=
-k8s.io/apimachinery v0.32.5/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
+k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4=
+k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.22.5/go.mod h1:s2WbtgZAkTKt679sYtSudEQrTGWUSQAPe6MupLnlmaQ=
k8s.io/cli-runtime v0.29.15 h1:DLucYFyRTyYfRADJEIJ3270Kx6a4C9Ac+o1FkknyZyM=
k8s.io/cli-runtime v0.29.15/go.mod h1:EjQsNazuwZWLTXLCCP4jGpkd95UO6wXKLVguSqfjwaU=
k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y=
-k8s.io/client-go v0.32.5 h1:huFmQMzgWu0z4kbWsuZci+Gt4Fo72I4CcrvhToZ/Qp0=
-k8s.io/client-go v0.32.5/go.mod h1:Qchw6f9WIVrur7DKojAHpRgGLcANT0RLIvF39Jz58xA=
+k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4=
+k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA=
k8s.io/code-generator v0.22.5/go.mod h1:sbdWCOVob+KaQ5O7xs8PNNaCTpbWVqNgA6EPwLOmRNk=
k8s.io/component-base v0.22.5/go.mod h1:VK3I+TjuF9eaa+Ln67dKxhGar5ynVbwnGrUiNF4MqCI=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
@@ -2119,8 +2110,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
-k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg=
-k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas=
+k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
+k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0=
@@ -2148,13 +2139,16 @@ sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKU
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY=
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U=
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag=
+sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
+sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
+sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/release-utils v0.11.1 h1:hzvXGpHgHJfLOJB6TRuu14bzWc3XEglHmXHJqwClSZE=
sigs.k8s.io/release-utils v0.11.1/go.mod h1:ybR2V/uQAOGxYfzYtBenSYeXWkBGNP2qnEiX77ACtpc=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
-sigs.k8s.io/structured-merge-diff/v4 v4.5.0 h1:nbCitCK2hfnhyiKo6uf2HxUPTCodY6Qaf85SbDIaMBk=
-sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4=
+sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
+sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
diff --git a/vendor/cloud.google.com/go/.release-please-manifest-individual.json b/vendor/cloud.google.com/go/.release-please-manifest-individual.json
index 512fdb07b6..4587272da2 100644
--- a/vendor/cloud.google.com/go/.release-please-manifest-individual.json
+++ b/vendor/cloud.google.com/go/.release-please-manifest-individual.json
@@ -1,16 +1,16 @@
{
- "auth": "0.15.0",
+ "auth": "0.16.1",
"auth/oauth2adapt": "0.2.8",
- "bigquery": "1.67.0",
- "bigtable": "1.35.0",
+ "bigquery": "1.68.0",
+ "bigtable": "1.37.0",
"datastore": "1.20.0",
"errorreporting": "0.3.2",
"firestore": "1.18.0",
"logging": "1.13.0",
"profiler": "0.4.2",
- "pubsub": "1.48.0",
+ "pubsub": "1.49.0",
"pubsublite": "1.8.2",
- "spanner": "1.77.0",
- "storage": "1.51.0",
+ "spanner": "1.81.0",
+ "storage": "1.54.0",
"vertexai": "0.13.3"
}
diff --git a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json
index 58620ecb26..87a8d1683b 100644
--- a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json
+++ b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json
@@ -1,156 +1,161 @@
{
- "accessapproval": "1.8.5",
- "accesscontextmanager": "1.9.5",
- "advisorynotifications": "1.5.4",
- "ai": "0.10.1",
- "aiplatform": "1.78.0",
- "alloydb": "1.15.0",
- "analytics": "0.27.1",
- "apigateway": "1.7.5",
- "apigeeconnect": "1.7.5",
- "apigeeregistry": "0.9.5",
- "apihub": "0.1.4",
- "apikeys": "1.2.5",
- "appengine": "1.9.5",
- "apphub": "0.2.4",
- "apps": "0.7.1",
- "area120": "0.9.5",
- "artifactregistry": "1.16.3",
- "asset": "1.20.5",
- "assuredworkloads": "1.12.5",
- "automl": "1.14.6",
- "backupdr": "1.3.1",
- "baremetalsolution": "1.3.5",
- "batch": "1.12.1",
- "beyondcorp": "1.1.5",
- "billing": "1.20.3",
- "binaryauthorization": "1.9.4",
- "certificatemanager": "1.9.4",
- "channel": "1.19.4",
- "chat": "0.12.1",
- "cloudbuild": "1.22.1",
- "cloudcontrolspartner": "1.3.1",
- "clouddms": "1.8.6",
- "cloudprofiler": "0.4.4",
- "cloudquotas": "1.3.2",
- "cloudtasks": "1.13.5",
- "commerce": "1.2.3",
- "compute": "1.35.0",
+ "accessapproval": "1.8.6",
+ "accesscontextmanager": "1.9.6",
+ "advisorynotifications": "1.5.5",
+ "ai": "0.11.1",
+ "aiplatform": "1.86.0",
+ "alloydb": "1.15.2",
+ "analytics": "0.28.1",
+ "apigateway": "1.7.6",
+ "apigeeconnect": "1.7.6",
+ "apigeeregistry": "0.9.6",
+ "apihub": "0.1.5",
+ "apikeys": "1.2.6",
+ "appengine": "1.9.6",
+ "apphub": "0.3.1",
+ "apps": "0.7.2",
+ "area120": "0.9.6",
+ "artifactregistry": "1.17.1",
+ "asset": "1.21.0",
+ "assuredworkloads": "1.12.6",
+ "automl": "1.14.7",
+ "backupdr": "1.3.2",
+ "baremetalsolution": "1.3.6",
+ "batch": "1.12.2",
+ "beyondcorp": "1.1.6",
+ "billing": "1.20.4",
+ "binaryauthorization": "1.9.5",
+ "certificatemanager": "1.9.5",
+ "channel": "1.19.5",
+ "chat": "0.13.0",
+ "chronicle": "0.1.0",
+ "cloudbuild": "1.22.2",
+ "cloudcontrolspartner": "1.4.0",
+ "clouddms": "1.8.7",
+ "cloudprofiler": "0.4.5",
+ "cloudquotas": "1.3.3",
+ "cloudtasks": "1.13.6",
+ "commerce": "1.2.4",
+ "compute": "1.37.0",
"compute/metadata": "0.6.0",
- "confidentialcomputing": "1.9.1",
- "config": "1.3.1",
- "contactcenterinsights": "1.17.2",
- "container": "1.42.3",
- "containeranalysis": "0.13.4",
- "datacatalog": "1.25.0",
- "dataflow": "0.10.5",
- "dataform": "0.11.1",
- "datafusion": "1.8.5",
- "datalabeling": "0.9.5",
- "dataplex": "1.23.1",
- "dataproc": "2.11.1",
- "dataqna": "0.9.5",
- "datastream": "1.13.2",
- "deploy": "1.26.3",
- "developerconnect": "0.3.2",
- "dialogflow": "1.68.1",
- "discoveryengine": "1.16.2",
- "dlp": "1.22.0",
- "documentai": "1.36.0",
- "domains": "0.10.5",
- "edgecontainer": "1.4.2",
- "edgenetwork": "1.2.4",
- "essentialcontacts": "1.7.5",
- "eventarc": "1.15.4",
- "filestore": "1.10.1",
- "financialservices": "0.1.1",
- "functions": "1.19.4",
- "gkebackup": "1.6.4",
- "gkeconnect": "0.12.3",
- "gkehub": "0.15.5",
- "gkemulticloud": "1.5.2",
- "grafeas": "0.3.15",
- "gsuiteaddons": "1.7.6",
- "iam": "1.4.2",
- "iap": "1.10.5",
- "identitytoolkit": "0.2.4",
- "ids": "1.5.5",
- "iot": "1.8.5",
- "kms": "1.21.1",
- "language": "1.14.4",
- "lifesciences": "0.10.5",
- "longrunning": "0.6.6",
- "managedidentities": "1.7.5",
- "managedkafka": "0.5.0",
- "maps": "1.20.1",
- "mediatranslation": "0.9.5",
- "memcache": "1.11.5",
- "memorystore": "0.2.1",
- "metastore": "1.14.5",
- "migrationcenter": "1.1.4",
- "modelarmor": "0.1.0",
- "monitoring": "1.24.1",
- "netapp": "1.7.1",
- "networkconnectivity": "1.16.3",
- "networkmanagement": "1.18.2",
- "networksecurity": "0.10.5",
- "networkservices": "0.2.4",
- "notebooks": "1.12.5",
- "optimization": "1.7.5",
- "oracledatabase": "0.3.0",
- "orchestration": "1.11.7",
- "orgpolicy": "1.14.3",
- "osconfig": "1.14.4",
- "oslogin": "1.14.5",
- "parallelstore": "0.10.1",
- "parametermanager": "0.1.1",
- "phishingprotection": "0.9.5",
- "policysimulator": "0.3.5",
- "policytroubleshooter": "1.11.5",
- "privatecatalog": "0.10.6",
- "privilegedaccessmanager": "0.2.4",
- "rapidmigrationassessment": "1.1.5",
- "recaptchaenterprise": "2.20.2",
- "recommendationengine": "0.9.5",
- "recommender": "1.13.4",
- "redis": "1.18.1",
- "resourcemanager": "1.10.5",
- "retail": "1.19.3",
- "run": "1.9.2",
- "scheduler": "1.11.6",
- "secretmanager": "1.14.6",
- "securesourcemanager": "1.3.2",
- "security": "1.18.4",
- "securitycenter": "1.36.1",
- "securitycentermanagement": "1.1.4",
- "securityposture": "0.2.4",
- "servicecontrol": "1.14.4",
- "servicedirectory": "1.12.5",
- "servicehealth": "1.2.2",
- "servicemanagement": "1.10.5",
- "serviceusage": "1.9.5",
- "shell": "1.8.5",
- "shopping": "0.18.0",
- "speech": "1.26.1",
- "storageinsights": "1.1.5",
- "storagetransfer": "1.12.3",
- "streetview": "0.2.4",
- "support": "1.1.5",
- "talent": "1.8.2",
- "telcoautomation": "1.1.4",
- "texttospeech": "1.11.2",
- "tpu": "1.8.2",
- "trace": "1.11.5",
- "translate": "1.12.4",
- "video": "1.23.4",
- "videointelligence": "1.12.5",
- "vision": "2.9.4",
- "visionai": "0.4.4",
- "vmmigration": "1.8.5",
- "vmwareengine": "1.3.4",
- "vpcaccess": "1.8.5",
- "webrisk": "1.10.5",
- "websecurityscanner": "1.7.5",
- "workflows": "1.14.0",
- "workstations": "1.1.4"
+ "confidentialcomputing": "1.9.2",
+ "config": "1.3.2",
+ "contactcenterinsights": "1.17.3",
+ "container": "1.42.4",
+ "containeranalysis": "0.14.1",
+ "datacatalog": "1.26.0",
+ "dataflow": "0.11.0",
+ "dataform": "0.11.2",
+ "datafusion": "1.8.6",
+ "datalabeling": "0.9.6",
+ "dataplex": "1.25.2",
+ "dataproc": "2.11.2",
+ "dataqna": "0.9.7",
+ "datastream": "1.14.1",
+ "deploy": "1.27.1",
+ "developerconnect": "0.3.3",
+ "devicestreaming": "0.1.0",
+ "dialogflow": "1.68.2",
+ "discoveryengine": "1.17.2",
+ "dlp": "1.22.1",
+ "documentai": "1.37.0",
+ "domains": "0.10.6",
+ "edgecontainer": "1.4.3",
+ "edgenetwork": "1.2.6",
+ "essentialcontacts": "1.7.6",
+ "eventarc": "1.15.5",
+ "filestore": "1.10.2",
+ "financialservices": "0.1.3",
+ "functions": "1.19.6",
+ "gkebackup": "1.7.0",
+ "gkeconnect": "0.12.4",
+ "gkehub": "0.15.6",
+ "gkemulticloud": "1.5.3",
+ "grafeas": "0.3.16",
+ "gsuiteaddons": "1.7.7",
+ "iam": "1.5.2",
+ "iap": "1.11.1",
+ "identitytoolkit": "0.2.5",
+ "ids": "1.5.6",
+ "iot": "1.8.6",
+ "kms": "1.21.2",
+ "language": "1.14.5",
+ "lifesciences": "0.10.6",
+ "longrunning": "0.6.7",
+ "lustre": "0.1.0",
+ "managedidentities": "1.7.6",
+ "managedkafka": "0.5.2",
+ "maps": "1.20.4",
+ "mediatranslation": "0.9.6",
+ "memcache": "1.11.6",
+ "memorystore": "0.3.0",
+ "metastore": "1.14.7",
+ "migrationcenter": "1.1.5",
+ "modelarmor": "0.2.0",
+ "monitoring": "1.24.2",
+ "netapp": "1.8.0",
+ "networkconnectivity": "1.17.1",
+ "networkmanagement": "1.19.1",
+ "networksecurity": "0.10.6",
+ "networkservices": "0.2.5",
+ "notebooks": "1.12.6",
+ "optimization": "1.7.6",
+ "oracledatabase": "0.5.0",
+ "orchestration": "1.11.9",
+ "orgpolicy": "1.15.0",
+ "osconfig": "1.14.6",
+ "oslogin": "1.14.6",
+ "parallelstore": "0.11.2",
+ "parametermanager": "0.2.1",
+ "phishingprotection": "0.9.6",
+ "policysimulator": "0.3.6",
+ "policytroubleshooter": "1.11.6",
+ "privatecatalog": "0.10.7",
+ "privilegedaccessmanager": "0.2.5",
+ "rapidmigrationassessment": "1.1.7",
+ "recaptchaenterprise": "2.20.4",
+ "recommendationengine": "0.9.6",
+ "recommender": "1.13.5",
+ "redis": "1.18.2",
+ "resourcemanager": "1.10.6",
+ "retail": "1.20.0",
+ "run": "1.9.3",
+ "scheduler": "1.11.7",
+ "secretmanager": "1.14.7",
+ "securesourcemanager": "1.3.3",
+ "security": "1.18.5",
+ "securitycenter": "1.36.2",
+ "securitycentermanagement": "1.1.5",
+ "securityposture": "0.2.5",
+ "servicecontrol": "1.14.5",
+ "servicedirectory": "1.12.6",
+ "servicehealth": "1.2.3",
+ "servicemanagement": "1.10.6",
+ "serviceusage": "1.9.6",
+ "shell": "1.8.6",
+ "shopping": "0.20.0",
+ "spanner/benchmarks": "0.1.0",
+ "speech": "1.27.1",
+ "storagebatchoperations": "0.0.0",
+ "storageinsights": "1.1.6",
+ "storagetransfer": "1.12.4",
+ "streetview": "0.2.5",
+ "support": "1.1.6",
+ "talent": "1.8.3",
+ "telcoautomation": "1.1.5",
+ "texttospeech": "1.13.0",
+ "tpu": "1.8.3",
+ "trace": "1.11.6",
+ "translate": "1.12.5",
+ "video": "1.23.5",
+ "videointelligence": "1.12.6",
+ "vision": "2.9.5",
+ "visionai": "0.4.5",
+ "vmmigration": "1.8.6",
+ "vmwareengine": "1.3.5",
+ "vpcaccess": "1.8.6",
+ "webrisk": "1.11.1",
+ "websecurityscanner": "1.7.6",
+ "workflows": "1.14.2",
+ "workstations": "1.1.5"
}
diff --git a/vendor/cloud.google.com/go/.release-please-manifest.json b/vendor/cloud.google.com/go/.release-please-manifest.json
index 441e0825ce..dbbf4e935d 100644
--- a/vendor/cloud.google.com/go/.release-please-manifest.json
+++ b/vendor/cloud.google.com/go/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.120.0"
+ ".": "0.121.1"
}
diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md
index 28a3338a63..8ae24f470d 100644
--- a/vendor/cloud.google.com/go/CHANGES.md
+++ b/vendor/cloud.google.com/go/CHANGES.md
@@ -2,6 +2,27 @@
+## [0.121.1](https://github.com/googleapis/google-cloud-go/compare/v0.121.0...v0.121.1) (2025-05-13)
+
+
+### Bug Fixes
+
+* **civil:** Add support for civil.Date, civil.Time and civil.DateTime arguments to their respective Scan methods ([#12240](https://github.com/googleapis/google-cloud-go/issues/12240)) ([7127ce9](https://github.com/googleapis/google-cloud-go/commit/7127ce9992f890667f2c8f75c924136b0e94f115)), refs [#12060](https://github.com/googleapis/google-cloud-go/issues/12060)
+
+## [0.121.0](https://github.com/googleapis/google-cloud-go/compare/v0.120.1...v0.121.0) (2025-04-28)
+
+
+### Features
+
+* **debugger:** Remove debugger/apiv2 client ([#12050](https://github.com/googleapis/google-cloud-go/issues/12050)) ([af8641e](https://github.com/googleapis/google-cloud-go/commit/af8641e7d011349afa774b668b30a95b007fd076))
+
+## [0.120.1](https://github.com/googleapis/google-cloud-go/compare/v0.120.0...v0.120.1) (2025-04-14)
+
+
+### Bug Fixes
+
+* **readme:** Update authentication section ([#11918](https://github.com/googleapis/google-cloud-go/issues/11918)) ([2fda860](https://github.com/googleapis/google-cloud-go/commit/2fda86031820ad7d29322f03ad6f34871ad5ff59))
+
## [0.120.0](https://github.com/googleapis/google-cloud-go/compare/v0.119.0...v0.120.0) (2025-03-20)
diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md
index 36d1b275e3..26ea7bb285 100644
--- a/vendor/cloud.google.com/go/CONTRIBUTING.md
+++ b/vendor/cloud.google.com/go/CONTRIBUTING.md
@@ -138,23 +138,38 @@ Finally, in the general project, create an API key for the translate API:
#### Local Setup
-Once the three projects are created and configured, set the following environment
-variables:
+Once the three projects are created and configured, set the following
+environment variables:
- `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g.
bamboo-shift-455) for the general project.
- `GCLOUD_TESTS_GOLANG_KEY`: The path to the JSON key file of the general
project's service account.
-- `GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES`: Comma separated list of developer's Datastore databases. If not provided, default database i.e. empty string is used.
+- `GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES`: Comma separated list of developer's
+Datastore databases. If not provided, default database i.e. empty string is used.
- `GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID`: Developers Console project's ID
(e.g. doorway-cliff-677) for the Firestore project.
-- `GCLOUD_TESTS_GOLANG_FIRESTORE_DATABASES` : Comma separated list of developer's Firestore databases. If not provided, default database is used.
+- `GCLOUD_TESTS_GOLANG_FIRESTORE_DATABASES`: Comma separated list of developer's
+Firestore databases. If not provided, default database is used.
- `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the
Firestore project's service account.
- `GCLOUD_TESTS_API_KEY`: API key for using the Translate API created above.
-- `GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID`: Developers Console project's ID (e.g. doorway-cliff-677) for Bigtable optional secondary project. This can be same as Firestore project or any project other than the general project.
-- `GCLOUD_TESTS_BIGTABLE_CLUSTER`: Cluster ID of Bigtable cluster in general project
-- `GCLOUD_TESTS_BIGTABLE_PRI_PROJ_SEC_CLUSTER`: Optional. Cluster ID of Bigtable secondary cluster in general project
+- `GCLOUD_TESTS_GOLANG_SECONDARY_BIGTABLE_PROJECT_ID`: Developers Console
+project's ID (e.g. doorway-cliff-677) for Bigtable optional secondary project.
+This can be same as Firestore project or any project other than the general
+project.
+- `GCLOUD_TESTS_BIGTABLE_CLUSTER`: Cluster ID of Bigtable cluster in general
+project.
+- `GCLOUD_TESTS_BIGTABLE_PRI_PROJ_SEC_CLUSTER`: Optional. Cluster ID of Bigtable
+secondary cluster in general project
+- `TEST_UNIVERSE_DOMAIN`: Optional. Universe domain to test universe domain
+functionality against.
+- `TEST_UNIVERSE_PROJECT_ID`: Optional. Project ID within the universe domain
+for testing.
+- `TEST_UNIVERSE_LOCATION`: Optional. Available location within the universe
+domain.
+- `TEST_UNIVERSE_DOMAIN_CREDENTIAL`: Optional. The path to the JSON key file of
+the universe domain's service account.
As part of the setup that follows, the following variables will be configured:
diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md
index 8f149c8a4a..98d47fa2c4 100644
--- a/vendor/cloud.google.com/go/README.md
+++ b/vendor/cloud.google.com/go/README.md
@@ -27,19 +27,32 @@ programming language follows. This means the currently supported versions are:
- Go 1.23
- Go 1.24
-## Authorization
-
-By default, each API will use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)
-for authorization credentials used in calling the API endpoints. This will allow your
-application to run in many environments without requiring explicit configuration.
+## Authentication
+
+By default, each client library will use [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)
+(ADC) to automatically configure the credentials used in calling the API endpoint.
+When using the libraries in a Google Cloud Platform environment such as Compute
+Engine, Kubernetes Engine, or App Engine, no additional authentication steps are
+necessary. See [Authentication methods at Google](https://cloud.google.com/docs/authentication)
+and [Authenticate for using client libraries](https://cloud.google.com/docs/authentication/client-libraries)
+for more information.
```go
client, err := storage.NewClient(ctx)
```
-To authorize using a
-[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
-pass
+For applications running elsewhere, such as your local development environment,
+you can use the `gcloud auth application-default login` command from the
+[Google Cloud CLI](https://cloud.google.com/cli) to set user credentials in
+your local filesystem. Application Default Credentials will automatically detect
+these credentials. See [Set up ADC for a local development
+environment](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
+for more information.
+
+Alternately, you may need to provide an explicit path to your credentials. To authenticate
+using a [service account](https://cloud.google.com/docs/authentication#service-accounts)
+key file, either set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path
+to your key file, or programmatically pass
[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile)
to the `NewClient` function of the desired package. For example:
@@ -47,14 +60,15 @@ to the `NewClient` function of the desired package. For example:
client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))
```
-You can exert more control over authorization by using the
+You can exert even more control over authentication by using the
[credentials](https://pkg.go.dev/cloud.google.com/go/auth/credentials) package to
create an [auth.Credentials](https://pkg.go.dev/cloud.google.com/go/auth#Credentials).
Then pass [`option.WithAuthCredentials`](https://pkg.go.dev/google.golang.org/api/option#WithAuthCredentials)
to the `NewClient` function:
```go
-creds := ...
+creds, err := credentials.DetectDefault(&credentials.DetectOptions{...})
+...
client, err := storage.NewClient(ctx, option.WithAuthCredentials(creds))
```
diff --git a/vendor/cloud.google.com/go/auth/CHANGES.md b/vendor/cloud.google.com/go/auth/CHANGES.md
index 4bb269f67a..66131916eb 100644
--- a/vendor/cloud.google.com/go/auth/CHANGES.md
+++ b/vendor/cloud.google.com/go/auth/CHANGES.md
@@ -1,5 +1,20 @@
# Changelog
+## [0.16.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.1...auth/v0.16.2) (2025-06-04)
+
+
+### Bug Fixes
+
+* **auth:** Add back DirectPath misconfiguration logging ([#11162](https://github.com/googleapis/google-cloud-go/issues/11162)) ([8d52da5](https://github.com/googleapis/google-cloud-go/commit/8d52da58da5a0ed77a0f6307d1b561bc045406a1))
+* **auth:** Remove s2a fallback option ([#12354](https://github.com/googleapis/google-cloud-go/issues/12354)) ([d5acc59](https://github.com/googleapis/google-cloud-go/commit/d5acc599cd775ddc404349e75906fa02e8ff133e))
+
+## [0.16.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.0...auth/v0.16.1) (2025-04-23)
+
+
+### Bug Fixes
+
+* **auth:** Clone detectopts before assigning TokenBindingType ([#11881](https://github.com/googleapis/google-cloud-go/issues/11881)) ([2167b02](https://github.com/googleapis/google-cloud-go/commit/2167b020fdc43b517c2b6ecca264a10e357ea035))
+
## [0.16.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.15.0...auth/v0.16.0) (2025-04-14)
diff --git a/vendor/cloud.google.com/go/auth/grpctransport/directpath.go b/vendor/cloud.google.com/go/auth/grpctransport/directpath.go
index b3f185f350..69d6d0034e 100644
--- a/vendor/cloud.google.com/go/auth/grpctransport/directpath.go
+++ b/vendor/cloud.google.com/go/auth/grpctransport/directpath.go
@@ -20,14 +20,18 @@ import (
"os"
"strconv"
"strings"
+ "time"
"cloud.google.com/go/auth"
"cloud.google.com/go/auth/credentials"
"cloud.google.com/go/auth/internal/compute"
+ "golang.org/x/time/rate"
"google.golang.org/grpc"
grpcgoogle "google.golang.org/grpc/credentials/google"
)
+var logRateLimiter = rate.Sometimes{Interval: 1 * time.Second}
+
func isDirectPathEnabled(endpoint string, opts *Options) bool {
if opts.InternalOptions != nil && !opts.InternalOptions.EnableDirectPath {
return false
@@ -111,14 +115,16 @@ func isDirectPathBoundTokenEnabled(opts *InternalOptions) bool {
// configuration allows the use of direct path. If it does not the provided
// grpcOpts and endpoint are returned.
func configureDirectPath(grpcOpts []grpc.DialOption, opts *Options, endpoint string, creds *auth.Credentials) ([]grpc.DialOption, string, error) {
+ logRateLimiter.Do(func() {
+ logDirectPathMisconfig(endpoint, creds, opts)
+ })
if isDirectPathEnabled(endpoint, opts) && compute.OnComputeEngine() && isTokenProviderDirectPathCompatible(creds, opts) {
// Overwrite all of the previously specific DialOptions, DirectPath uses its own set of credentials and certificates.
defaultCredetialsOptions := grpcgoogle.DefaultCredentialsOptions{PerRPCCreds: &grpcCredentialsProvider{creds: creds}}
if isDirectPathBoundTokenEnabled(opts.InternalOptions) && isTokenProviderComputeEngine(creds) {
- opts.DetectOpts.TokenBindingType = credentials.ALTSHardBinding
- altsCreds, err := credentials.DetectDefault(opts.resolveDetectOptions())
- // Revert it back since the same opts will be used in subsequent dial() calls.
- opts.DetectOpts.TokenBindingType = credentials.NoBinding
+ optsClone := opts.resolveDetectOptions()
+ optsClone.TokenBindingType = credentials.ALTSHardBinding
+ altsCreds, err := credentials.DetectDefault(optsClone)
if err != nil {
return nil, "", err
}
@@ -152,3 +158,20 @@ func configureDirectPath(grpcOpts []grpc.DialOption, opts *Options, endpoint str
}
return grpcOpts, endpoint, nil
}
+
+func logDirectPathMisconfig(endpoint string, creds *auth.Credentials, o *Options) {
+
+ // Case 1: does not enable DirectPath
+ if !isDirectPathEnabled(endpoint, o) {
+ o.logger().Warn("DirectPath is disabled. To enable, please set the EnableDirectPath option along with the EnableDirectPathXds option.")
+ } else {
+ // Case 2: credential is not correctly set
+ if !isTokenProviderDirectPathCompatible(creds, o) {
+ o.logger().Warn("DirectPath is disabled. Please make sure the token source is fetched from GCE metadata server and the default service account is used.")
+ }
+ // Case 3: not running on GCE
+ if !compute.OnComputeEngine() {
+ o.logger().Warn("DirectPath is disabled. DirectPath is only available in a GCE environment.")
+ }
+ }
+}
diff --git a/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go b/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go
index 90c17f047e..834aef41c8 100644
--- a/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go
+++ b/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go
@@ -304,17 +304,18 @@ func dial(ctx context.Context, secure bool, opts *Options) (*grpc.ClientConn, er
// This condition is only met for non-DirectPath clients because
// TransportTypeMTLSS2A is used only when InternalOptions.EnableDirectPath
// is false.
+ optsClone := opts.resolveDetectOptions()
if transportCreds.TransportType == transport.TransportTypeMTLSS2A {
// Check that the client allows requesting hard-bound token for the transport type mTLS using S2A.
for _, ev := range opts.InternalOptions.AllowHardBoundTokens {
if ev == "MTLS_S2A" {
- opts.DetectOpts.TokenBindingType = credentials.MTLSHardBinding
+ optsClone.TokenBindingType = credentials.MTLSHardBinding
break
}
}
}
var err error
- creds, err = credentials.DetectDefault(opts.resolveDetectOptions())
+ creds, err = credentials.DetectDefault(optsClone)
if err != nil {
return nil, err
}
diff --git a/vendor/cloud.google.com/go/auth/internal/transport/cba.go b/vendor/cloud.google.com/go/auth/internal/transport/cba.go
index b1f0fcf937..14bca966ec 100644
--- a/vendor/cloud.google.com/go/auth/internal/transport/cba.go
+++ b/vendor/cloud.google.com/go/auth/internal/transport/cba.go
@@ -31,7 +31,6 @@ import (
"cloud.google.com/go/auth/internal"
"cloud.google.com/go/auth/internal/transport/cert"
"github.com/google/s2a-go"
- "github.com/google/s2a-go/fallback"
"google.golang.org/grpc/credentials"
)
@@ -170,18 +169,9 @@ func GetGRPCTransportCredsAndEndpoint(opts *Options) (*GRPCTransportCredentials,
return &GRPCTransportCredentials{defaultTransportCreds, config.endpoint, TransportTypeUnknown}, nil
}
- var fallbackOpts *s2a.FallbackOptions
- // In case of S2A failure, fall back to the endpoint that would've been used without S2A.
- if fallbackHandshake, err := fallback.DefaultFallbackClientHandshakeFunc(config.endpoint); err == nil {
- fallbackOpts = &s2a.FallbackOptions{
- FallbackClientHandshakeFunc: fallbackHandshake,
- }
- }
-
s2aTransportCreds, err := s2a.NewClientCreds(&s2a.ClientOptions{
S2AAddress: s2aAddr,
TransportCreds: transportCredsForS2A,
- FallbackOpts: fallbackOpts,
})
if err != nil {
// Use default if we cannot initialize S2A client transport credentials.
@@ -218,23 +208,9 @@ func GetHTTPTransportConfig(opts *Options) (cert.Provider, func(context.Context,
return config.clientCertSource, nil, nil
}
- var fallbackOpts *s2a.FallbackOptions
- // In case of S2A failure, fall back to the endpoint that would've been used without S2A.
- if fallbackURL, err := url.Parse(config.endpoint); err == nil {
- if fallbackDialer, fallbackServerAddr, err := fallback.DefaultFallbackDialerAndAddress(fallbackURL.Hostname()); err == nil {
- fallbackOpts = &s2a.FallbackOptions{
- FallbackDialer: &s2a.FallbackDialer{
- Dialer: fallbackDialer,
- ServerAddr: fallbackServerAddr,
- },
- }
- }
- }
-
dialTLSContextFunc := s2a.NewS2ADialTLSContextFunc(&s2a.ClientOptions{
S2AAddress: s2aAddr,
TransportCreds: transportCredsForS2A,
- FallbackOpts: fallbackOpts,
})
return nil, dialTLSContextFunc, nil
}
diff --git a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
index bcfb5d8165..1f848ce0b3 100644
--- a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
+++ b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
@@ -1,5 +1,12 @@
# Changes
+## [0.7.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.6.0...compute/metadata/v0.7.0) (2025-05-13)
+
+
+### Features
+
+* **compute/metadata:** Allow canceling GCE detection ([#11786](https://github.com/googleapis/google-cloud-go/issues/11786)) ([78100fe](https://github.com/googleapis/google-cloud-go/commit/78100fe7e28cd30f1e10b47191ac3c9839663b64))
+
## [0.6.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.5.2...compute/metadata/v0.6.0) (2024-12-13)
diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go
index 4c18a383a4..322be8032d 100644
--- a/vendor/cloud.google.com/go/compute/metadata/metadata.go
+++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go
@@ -117,80 +117,18 @@ var (
// NOTE: True returned from `OnGCE` does not guarantee that the metadata server
// is accessible from this process and have all the metadata defined.
func OnGCE() bool {
- onGCEOnce.Do(initOnGCE)
- return onGCE
-}
-
-func initOnGCE() {
- onGCE = testOnGCE()
+ return OnGCEWithContext(context.Background())
}
-func testOnGCE() bool {
- // The user explicitly said they're on GCE, so trust them.
- if os.Getenv(metadataHostEnv) != "" {
- return true
- }
-
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- resc := make(chan bool, 2)
-
- // Try two strategies in parallel.
- // See https://github.com/googleapis/google-cloud-go/issues/194
- go func() {
- req, _ := http.NewRequest("GET", "http://"+metadataIP, nil)
- req.Header.Set("User-Agent", userAgent)
- res, err := newDefaultHTTPClient().Do(req.WithContext(ctx))
- if err != nil {
- resc <- false
- return
- }
- defer res.Body.Close()
- resc <- res.Header.Get("Metadata-Flavor") == "Google"
- }()
-
- go func() {
- resolver := &net.Resolver{}
- addrs, err := resolver.LookupHost(ctx, "metadata.google.internal.")
- if err != nil || len(addrs) == 0 {
- resc <- false
- return
- }
- resc <- strsContains(addrs, metadataIP)
- }()
-
- tryHarder := systemInfoSuggestsGCE()
- if tryHarder {
- res := <-resc
- if res {
- // The first strategy succeeded, so let's use it.
- return true
- }
- // Wait for either the DNS or metadata server probe to
- // contradict the other one and say we are running on
- // GCE. Give it a lot of time to do so, since the system
- // info already suggests we're running on a GCE BIOS.
- timer := time.NewTimer(5 * time.Second)
- defer timer.Stop()
- select {
- case res = <-resc:
- return res
- case <-timer.C:
- // Too slow. Who knows what this system is.
- return false
- }
- }
-
- // There's no hint from the system info that we're running on
- // GCE, so use the first probe's result as truth, whether it's
- // true or false. The goal here is to optimize for speed for
- // users who are NOT running on GCE. We can't assume that
- // either a DNS lookup or an HTTP request to a blackholed IP
- // address is fast. Worst case this should return when the
- // metaClient's Transport.ResponseHeaderTimeout or
- // Transport.Dial.Timeout fires (in two seconds).
- return <-resc
+// OnGCEWithContext reports whether this process is running on Google Compute Platforms.
+// This function's return value is memoized for better performance.
+// NOTE: True returned from `OnGCEWithContext` does not guarantee that the metadata server
+// is accessible from this process and have all the metadata defined.
+func OnGCEWithContext(ctx context.Context) bool {
+ onGCEOnce.Do(func() {
+ onGCE = defaultClient.OnGCEWithContext(ctx)
+ })
+ return onGCE
}
// Subscribe calls Client.SubscribeWithContext on the default client.
@@ -450,6 +388,84 @@ func NewWithOptions(opts *Options) *Client {
return &Client{hc: client, logger: logger}
}
+// NOTE: metadataRequestStrategy is assigned to a variable for test stubbing purposes.
+var metadataRequestStrategy = func(ctx context.Context, httpClient *http.Client, resc chan bool) {
+ req, _ := http.NewRequest("GET", "http://"+metadataIP, nil)
+ req.Header.Set("User-Agent", userAgent)
+ res, err := httpClient.Do(req.WithContext(ctx))
+ if err != nil {
+ resc <- false
+ return
+ }
+ defer res.Body.Close()
+ resc <- res.Header.Get("Metadata-Flavor") == "Google"
+}
+
+// NOTE: dnsRequestStrategy is assigned to a variable for test stubbing purposes.
+var dnsRequestStrategy = func(ctx context.Context, resc chan bool) {
+ resolver := &net.Resolver{}
+ addrs, err := resolver.LookupHost(ctx, "metadata.google.internal.")
+ if err != nil || len(addrs) == 0 {
+ resc <- false
+ return
+ }
+ resc <- strsContains(addrs, metadataIP)
+}
+
+// OnGCEWithContext reports whether this process is running on Google Compute Platforms.
+// NOTE: True returned from `OnGCEWithContext` does not guarantee that the metadata server
+// is accessible from this process and have all the metadata defined.
+func (c *Client) OnGCEWithContext(ctx context.Context) bool {
+ // The user explicitly said they're on GCE, so trust them.
+ if os.Getenv(metadataHostEnv) != "" {
+ return true
+ }
+
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+
+ resc := make(chan bool, 2)
+
+ // Try two strategies in parallel.
+ // See https://github.com/googleapis/google-cloud-go/issues/194
+ go metadataRequestStrategy(ctx, c.hc, resc)
+ go dnsRequestStrategy(ctx, resc)
+
+ tryHarder := systemInfoSuggestsGCE()
+ if tryHarder {
+ res := <-resc
+ if res {
+ // The first strategy succeeded, so let's use it.
+ return true
+ }
+
+ // Wait for either the DNS or metadata server probe to
+ // contradict the other one and say we are running on
+ // GCE. Give it a lot of time to do so, since the system
+ // info already suggests we're running on a GCE BIOS.
+ // Ensure cancellations from the calling context are respected.
+ waitContext, cancelWait := context.WithTimeout(ctx, 5*time.Second)
+ defer cancelWait()
+ select {
+ case res = <-resc:
+ return res
+ case <-waitContext.Done():
+ // Too slow. Who knows what this system is.
+ return false
+ }
+ }
+
+ // There's no hint from the system info that we're running on
+ // GCE, so use the first probe's result as truth, whether it's
+ // true or false. The goal here is to optimize for speed for
+ // users who are NOT running on GCE. We can't assume that
+ // either a DNS lookup or an HTTP request to a blackholed IP
+ // address is fast. Worst case this should return when the
+ // metaClient's Transport.ResponseHeaderTimeout or
+ // Transport.Dial.Timeout fires (in two seconds).
+ return <-resc
+}
+
// getETag returns a value from the metadata service as well as the associated ETag.
// This func is otherwise equivalent to Get.
func (c *Client) getETag(ctx context.Context, suffix string) (value, etag string, err error) {
diff --git a/vendor/cloud.google.com/go/compute/metadata/syscheck.go b/vendor/cloud.google.com/go/compute/metadata/syscheck.go
index e0704fa647..d57ae1b27c 100644
--- a/vendor/cloud.google.com/go/compute/metadata/syscheck.go
+++ b/vendor/cloud.google.com/go/compute/metadata/syscheck.go
@@ -20,7 +20,9 @@ package metadata
// doing network requests) suggests that we're running on GCE. If this
// returns true, testOnGCE tries a bit harder to reach its metadata
// server.
-func systemInfoSuggestsGCE() bool {
+//
+// NOTE: systemInfoSuggestsGCE is assigned to a varible for test stubbing purposes.
+var systemInfoSuggestsGCE = func() bool {
// We don't currently have checks for other GOOS
return false
}
diff --git a/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go b/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go
index 74689acbbb..17ba5a3a23 100644
--- a/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go
+++ b/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go
@@ -21,8 +21,10 @@ import (
"strings"
)
-func systemInfoSuggestsGCE() bool {
+// NOTE: systemInfoSuggestsGCE is assigned to a varible for test stubbing purposes.
+var systemInfoSuggestsGCE = func() bool {
b, _ := os.ReadFile("/sys/class/dmi/id/product_name")
+
name := strings.TrimSpace(string(b))
return name == "Google" || name == "Google Compute Engine"
}
diff --git a/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go b/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go
index c0ce627872..f57a5b14e9 100644
--- a/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go
+++ b/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go
@@ -22,7 +22,8 @@ import (
"golang.org/x/sys/windows/registry"
)
-func systemInfoSuggestsGCE() bool {
+// NOTE: systemInfoSuggestsGCE is assigned to a varible for test stubbing purposes.
+var systemInfoSuggestsGCE = func() bool {
k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SYSTEM\HardwareConfig\Current`, registry.QUERY_VALUE)
if err != nil {
return false
diff --git a/vendor/cloud.google.com/go/go.work b/vendor/cloud.google.com/go/go.work
index 5e0a8cad3b..cbf3f83f76 100644
--- a/vendor/cloud.google.com/go/go.work
+++ b/vendor/cloud.google.com/go/go.work
@@ -35,6 +35,7 @@ use (
./certificatemanager
./channel
./chat
+ ./chronicle
./cloudbuild
./cloudcontrolspartner
./clouddms
@@ -61,6 +62,7 @@ use (
./datastream
./deploy
./developerconnect
+ ./devicestreaming
./dialogflow
./discoveryengine
./dlp
@@ -102,6 +104,7 @@ use (
./lifesciences
./logging
./longrunning
+ ./lustre
./managedidentities
./managedkafka
./maps
@@ -157,10 +160,12 @@ use (
./shell
./shopping
./spanner
+ ./spanner/benchmarks
./spanner/test/opentelemetry/test
./speech
./storage
./storage/internal/benchmarks
+ ./storagebatchoperations
./storageinsights
./storagetransfer
./streetview
diff --git a/vendor/cloud.google.com/go/go.work.sum b/vendor/cloud.google.com/go/go.work.sum
index 6546ee83f5..a960384b1c 100644
--- a/vendor/cloud.google.com/go/go.work.sum
+++ b/vendor/cloud.google.com/go/go.work.sum
@@ -118,6 +118,7 @@ github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465 h1:KwWnWVWCNtNq/ewIX7HIKnELmEx2nDP42yskD/pi7QE=
github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
+github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/itchyny/gojq v0.12.9 h1:biKpbKwMxVYhCU1d6mR7qMr3f0Hn9F5k5YykCVb3gmM=
@@ -174,7 +175,6 @@ github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXY
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
-github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
@@ -211,6 +211,7 @@ golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ=
golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk=
+golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
@@ -230,7 +231,6 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20240513163218-0867130af
google.golang.org/genproto/googleapis/bytestream v0.0.0-20250115164207-1a7da9e5054f h1:NtrhicUU5+S4TaE5AurusJUYfAo/QB8a+kbIXipuJeI=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:35wIojE/F1ptq1nfNDNjtowabHoMSA2qQs7+smpCO5s=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230725213213-b022f6e96895/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a/go.mod h1:uRxBH1mhmO8PGhU89cMcHaXKZqO+OfakD8QQO0oYwlQ=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o=
diff --git a/vendor/cloud.google.com/go/iam/CHANGES.md b/vendor/cloud.google.com/go/iam/CHANGES.md
index 1c6498d569..7839f3b895 100644
--- a/vendor/cloud.google.com/go/iam/CHANGES.md
+++ b/vendor/cloud.google.com/go/iam/CHANGES.md
@@ -1,6 +1,22 @@
# Changes
+## [1.5.2](https://github.com/googleapis/google-cloud-go/compare/iam/v1.5.1...iam/v1.5.2) (2025-04-15)
+
+
+### Bug Fixes
+
+* **iam:** Update google.golang.org/api to 0.229.0 ([3319672](https://github.com/googleapis/google-cloud-go/commit/3319672f3dba84a7150772ccb5433e02dab7e201))
+
+## [1.5.1](https://github.com/googleapis/google-cloud-go/compare/iam/v1.5.0...iam/v1.5.1) (2025-04-15)
+
+
+### Documentation
+
+* **iam:** Formatting update for ListPolicyBindingsRequest ([dfdf404](https://github.com/googleapis/google-cloud-go/commit/dfdf404138728724aa6305c5c465ecc6fe5b1264))
+* **iam:** Minor doc update for ListPrincipalAccessBoundaryPoliciesResponse ([20f762c](https://github.com/googleapis/google-cloud-go/commit/20f762c528726a3f038d3e1f37e8a4952118badf))
+* **iam:** Minor doc update for ListPrincipalAccessBoundaryPoliciesResponse ([20f762c](https://github.com/googleapis/google-cloud-go/commit/20f762c528726a3f038d3e1f37e8a4952118badf))
+
## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/iam/v1.4.2...iam/v1.5.0) (2025-03-31)
diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
index d72e823299..2e8cd8993b 100644
--- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
+++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
@@ -589,6 +589,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/bigquery/storage/apiv1beta": {
+ "api_shortname": "bigquerystorage",
+ "distribution_name": "cloud.google.com/go/bigquery/storage/apiv1beta",
+ "description": "BigQuery Storage API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/storage/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/bigquery/storage/apiv1beta1": {
"api_shortname": "bigquerystorage",
"distribution_name": "cloud.google.com/go/bigquery/storage/apiv1beta1",
@@ -719,6 +729,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/chronicle/apiv1": {
+ "api_shortname": "chronicle",
+ "distribution_name": "cloud.google.com/go/chronicle/apiv1",
+ "description": "Chronicle API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/chronicle/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/cloudbuild/apiv1/v2": {
"api_shortname": "cloudbuild",
"distribution_name": "cloud.google.com/go/cloudbuild/apiv1/v2",
@@ -1069,16 +1089,6 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
- "cloud.google.com/go/debugger/apiv2": {
- "api_shortname": "clouddebugger",
- "distribution_name": "cloud.google.com/go/debugger/apiv2",
- "description": "Stackdriver Debugger API",
- "language": "go",
- "client_library_type": "generated",
- "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/debugger/apiv2",
- "release_level": "preview",
- "library_type": "GAPIC_AUTO"
- },
"cloud.google.com/go/deploy/apiv1": {
"api_shortname": "clouddeploy",
"distribution_name": "cloud.google.com/go/deploy/apiv1",
@@ -1099,6 +1109,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/devicestreaming/apiv1": {
+ "api_shortname": "devicestreaming",
+ "distribution_name": "cloud.google.com/go/devicestreaming/apiv1",
+ "description": "Device Streaming API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/devicestreaming/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/dialogflow/apiv2": {
"api_shortname": "dialogflow",
"distribution_name": "cloud.google.com/go/dialogflow/apiv2",
@@ -1459,6 +1479,26 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/iam/apiv3": {
+ "api_shortname": "iam",
+ "distribution_name": "cloud.google.com/go/iam/apiv3",
+ "description": "Identity and Access Management (IAM) API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
+ "cloud.google.com/go/iam/apiv3beta": {
+ "api_shortname": "iam",
+ "distribution_name": "cloud.google.com/go/iam/apiv3beta",
+ "description": "Identity and Access Management (IAM) API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/iam/credentials/apiv1": {
"api_shortname": "iamcredentials",
"distribution_name": "cloud.google.com/go/iam/credentials/apiv1",
@@ -1599,6 +1639,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/lustre/apiv1": {
+ "api_shortname": "lustre",
+ "distribution_name": "cloud.google.com/go/lustre/apiv1",
+ "description": "Google Cloud Managed Lustre API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/lustre/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/managedidentities/apiv1": {
"api_shortname": "managedidentities",
"distribution_name": "cloud.google.com/go/managedidentities/apiv1",
@@ -1632,7 +1682,7 @@
"cloud.google.com/go/maps/areainsights/apiv1": {
"api_shortname": "areainsights",
"distribution_name": "cloud.google.com/go/maps/areainsights/apiv1",
- "description": "Places Insights API",
+ "description": "Places Aggregate API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/areainsights/apiv1",
@@ -2139,13 +2189,13 @@
"release_level": "stable",
"library_type": "GAPIC_MANUAL"
},
- "cloud.google.com/go/pubsub/apiv1": {
+ "cloud.google.com/go/pubsub/v2/apiv1": {
"api_shortname": "pubsub",
- "distribution_name": "cloud.google.com/go/pubsub/apiv1",
+ "distribution_name": "cloud.google.com/go/pubsub/v2/apiv1",
"description": "Cloud Pub/Sub API",
"language": "go",
"client_library_type": "generated",
- "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/latest/apiv1",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/latest/v2/apiv1",
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
@@ -2282,7 +2332,7 @@
"cloud.google.com/go/retail/apiv2": {
"api_shortname": "retail",
"distribution_name": "cloud.google.com/go/retail/apiv2",
- "description": "Vertex AI Search for Retail API",
+ "description": "Vertex AI Search for commerce API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2",
@@ -2292,7 +2342,7 @@
"cloud.google.com/go/retail/apiv2alpha": {
"api_shortname": "retail",
"distribution_name": "cloud.google.com/go/retail/apiv2alpha",
- "description": "Vertex AI Search for Retail API",
+ "description": "Vertex AI Search for commerce API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2alpha",
@@ -2302,7 +2352,7 @@
"cloud.google.com/go/retail/apiv2beta": {
"api_shortname": "retail",
"distribution_name": "cloud.google.com/go/retail/apiv2beta",
- "description": "Vertex AI Search for Retail API",
+ "description": "Vertex AI Search for commerce API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2beta",
@@ -2599,6 +2649,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/issueresolution/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/lfp/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/lfp/apiv1beta",
@@ -2619,6 +2679,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/ordertracking/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/products/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1beta",
@@ -2679,6 +2749,16 @@
"release_level": "stable",
"library_type": "GAPIC_MANUAL"
},
+ "cloud.google.com/go/spanner/adapter/apiv1": {
+ "api_shortname": "spanner",
+ "distribution_name": "cloud.google.com/go/spanner/adapter/apiv1",
+ "description": "Cloud Spanner API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest/adapter/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/spanner/admin/database/apiv1": {
"api_shortname": "spanner",
"distribution_name": "cloud.google.com/go/spanner/admin/database/apiv1",
@@ -2779,6 +2859,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/storagebatchoperations/apiv1": {
+ "api_shortname": "storagebatchoperations",
+ "distribution_name": "cloud.google.com/go/storagebatchoperations/apiv1",
+ "description": "Storage Batch Operations API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storagebatchoperations/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/storageinsights/apiv1": {
"api_shortname": "storageinsights",
"distribution_name": "cloud.google.com/go/storageinsights/apiv1",
diff --git a/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go b/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go
index 22b9eaa141..93e98452e8 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go
@@ -371,7 +371,7 @@ func (c *autokeyAdminGRPCClient) Connection() *grpc.ClientConn {
// use by Google-written clients.
func (c *autokeyAdminGRPCClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version)
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
@@ -446,7 +446,7 @@ func defaultAutokeyAdminRESTClientOptions() []option.ClientOption {
// use by Google-written clients.
func (c *autokeyAdminRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
diff --git a/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go b/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go
index 7986a78e1d..4ba085578b 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go
@@ -401,7 +401,7 @@ func (c *autokeyGRPCClient) Connection() *grpc.ClientConn {
// use by Google-written clients.
func (c *autokeyGRPCClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version)
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
@@ -501,7 +501,7 @@ func defaultAutokeyRESTClientOptions() []option.ClientOption {
// use by Google-written clients.
func (c *autokeyRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
diff --git a/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go b/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go
index f7ef5ac46e..0282a7bacb 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go
@@ -427,7 +427,7 @@ func (c *ekmGRPCClient) Connection() *grpc.ClientConn {
// use by Google-written clients.
func (c *ekmGRPCClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version)
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
@@ -500,7 +500,7 @@ func defaultEkmRESTClientOptions() []option.ClientOption {
// use by Google-written clients.
func (c *ekmRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
diff --git a/vendor/cloud.google.com/go/kms/apiv1/helpers.go b/vendor/cloud.google.com/go/kms/apiv1/helpers.go
index afdc9d0800..3d2c434993 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/helpers.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/helpers.go
@@ -18,6 +18,7 @@ package kms
import (
"context"
+ "fmt"
"io"
"log/slog"
"net/http"
@@ -28,10 +29,13 @@ import (
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/runtime/protoimpl"
)
const serviceName = "cloudkms.googleapis.com"
+var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion)
+
// For more information on implementing a client constructor hook, see
// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors.
type clientHookParams struct{}
diff --git a/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go b/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go
index 2c99b71deb..3246c31c21 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go
@@ -1196,7 +1196,7 @@ func (c *keyManagementGRPCClient) Connection() *grpc.ClientConn {
// use by Google-written clients.
func (c *keyManagementGRPCClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version)
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
@@ -1278,7 +1278,7 @@ func defaultKeyManagementRESTClientOptions() []option.ClientOption {
// use by Google-written clients.
func (c *keyManagementRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
- kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
+ kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion)
c.xGoogHeaders = []string{
"x-goog-api-client", gax.XGoogHeader(kv...),
}
diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go
index 023bc0f679..6f12a2532e 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go
@@ -15,23 +15,22 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
-// protoc v4.25.3
+// protoc v4.25.7
// source: google/cloud/kms/v1/autokey.proto
package kmspb
import (
- context "context"
- reflect "reflect"
- sync "sync"
-
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
+ context "context"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
)
const (
diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go
index adec5faf18..e0569d6114 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go
@@ -15,16 +15,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
-// protoc v4.25.3
+// protoc v4.25.7
// source: google/cloud/kms/v1/autokey_admin.proto
package kmspb
import (
context "context"
- reflect "reflect"
- sync "sync"
-
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -32,6 +29,8 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ reflect "reflect"
+ sync "sync"
)
const (
@@ -232,6 +231,11 @@ type AutokeyConfig struct {
KeyProject string `protobuf:"bytes,2,opt,name=key_project,json=keyProject,proto3" json:"key_project,omitempty"`
// Output only. The state for the AutokeyConfig.
State AutokeyConfig_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.kms.v1.AutokeyConfig_State" json:"state,omitempty"`
+ // Optional. A checksum computed by the server based on the value of other
+ // fields. This may be sent on update requests to ensure that the client has
+ // an up-to-date value before proceeding. The request will be rejected with an
+ // ABORTED error on a mismatched etag.
+ Etag string `protobuf:"bytes,6,opt,name=etag,proto3" json:"etag,omitempty"`
}
func (x *AutokeyConfig) Reset() {
@@ -285,6 +289,13 @@ func (x *AutokeyConfig) GetState() AutokeyConfig_State {
return AutokeyConfig_STATE_UNSPECIFIED
}
+func (x *AutokeyConfig) GetEtag() string {
+ if x != nil {
+ return x.Etag
+ }
+ return ""
+}
+
// Request message for
// [ShowEffectiveAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.ShowEffectiveAutokeyConfig].
type ShowEffectiveAutokeyConfigRequest struct {
@@ -417,7 +428,7 @@ var file_google_cloud_kms_v1_autokey_admin_proto_rawDesc = []byte{
0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41,
0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f,
+ 0x6d, 0x65, 0x22, 0xef, 0x02, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a,
0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01,
@@ -426,82 +437,83 @@ var file_google_cloud_kms_v1_autokey_admin_proto_rawDesc = []byte{
0x28, 0x0e, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41,
- 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x56, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,
- 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
- 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49,
- 0x56, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a,
- 0x45, 0x43, 0x54, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a,
- 0x0d, 0x55, 0x4e, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03,
- 0x3a, 0x69, 0xea, 0x41, 0x66, 0x0a, 0x25, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41,
- 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x66, 0x6f,
- 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x61,
- 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0x0e, 0x61, 0x75,
- 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x32, 0x0d, 0x61, 0x75,
- 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x70, 0x0a, 0x21, 0x53,
- 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f,
- 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72,
- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a,
- 0x22, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75,
- 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x32, 0xc8, 0x05, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79,
- 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0xd2, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65,
- 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d,
- 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x22, 0x66, 0xda, 0x41, 0x1a, 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x5f, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,
- 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x3a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79,
- 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x61, 0x75,
- 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x75, 0x74, 0x6f,
- 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x10, 0x47,
- 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
- 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b,
- 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73,
- 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24,
- 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x66, 0x6f, 0x6c, 0x64,
- 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x7d, 0x12, 0xd2, 0x01, 0x0a, 0x1a, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66,
- 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f,
- 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66,
+ 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61,
+ 0x67, 0x22, 0x56, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54,
+ 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+ 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a,
+ 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x45, 0x4c,
+ 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, 0x4e, 0x49, 0x54,
+ 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x69, 0xea, 0x41, 0x66, 0x0a, 0x25,
+ 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
+ 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b,
+ 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x73, 0x32, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x22, 0x70, 0x0a, 0x21, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65,
+ 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41,
+ 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x22, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66,
0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76,
- 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41,
- 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
- 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73,
- 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f,
- 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x74, 0xca, 0x41, 0x17, 0x63, 0x6c,
- 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
- 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x57, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f,
- 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c,
- 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77,
- 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
- 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x42,
- 0x59, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c,
- 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x41, 0x75, 0x74, 0x6f,
- 0x6b, 0x65, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
- 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f,
- 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x6b,
- 0x6d, 0x73, 0x70, 0x62, 0x3b, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x33,
+ 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0xc8, 0x05,
+ 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0xd2,
+ 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75,
+ 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x66, 0xda, 0x41, 0x1a,
+ 0x61, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2c, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43,
+ 0x3a,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 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x61,
+ 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x7d, 0x12, 0xd2, 0x01,
+ 0x0a, 0x1a, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41,
+ 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e,
+ 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
+ 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c,
+ 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x45,
+ 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0xda,
+ 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32,
+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
+ 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x68, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65,
+ 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x1a, 0x74, 0xca, 0x41, 0x17, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41,
+ 0x57, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68,
+ 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c,
+ 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f,
+ 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x42, 0x59, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73,
+ 0x2e, 0x76, 0x31, 0x42, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x6b, 0x65, 0x79, 0x41, 0x64, 0x6d, 0x69,
+ 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d,
+ 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0x3b, 0x6b, 0x6d,
+ 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go
index a56b41f46b..13f4e25241 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go
@@ -15,16 +15,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
-// protoc v4.25.3
+// protoc v4.25.7
// source: google/cloud/kms/v1/ekm_service.proto
package kmspb
import (
context "context"
- reflect "reflect"
- sync "sync"
-
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -33,6 +30,8 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
)
const (
@@ -239,6 +238,10 @@ type ListEkmConnectionsResponse struct {
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection]
// that matched the query.
+ //
+ // This field is not populated if
+ // [ListEkmConnectionsRequest.filter][google.cloud.kms.v1.ListEkmConnectionsRequest.filter]
+ // is applied.
TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
}
diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go
index 16871b8cd1..4ba8029e40 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go
@@ -15,21 +15,20 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
-// protoc v4.25.3
+// protoc v4.25.7
// source: google/cloud/kms/v1/resources.proto
package kmspb
import (
- reflect "reflect"
- sync "sync"
-
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
)
const (
@@ -404,6 +403,8 @@ func (KeyOperationAttestation_AttestationFormat) EnumDescriptor() ([]byte, []int
// The suffix following `HMAC_` corresponds to the hash algorithm being used
// (eg. SHA256).
//
+// Algorithms beginning with `PQ_` are post-quantum.
+//
// For more information, see [Key purposes and algorithms]
// (https://cloud.google.com/kms/docs/algorithms).
type CryptoKeyVersion_CryptoKeyVersionAlgorithm int32
@@ -627,7 +628,7 @@ const (
// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
// state.
CryptoKeyVersion_DISABLED CryptoKeyVersion_CryptoKeyVersionState = 2
- // This version is destroyed, and the key material is no longer stored.
+ // The key material of this version is destroyed and no longer stored.
// This version may only become
// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
// again if this version is
diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go
index af57a57a3b..0f8a7a94f0 100644
--- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go
+++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go
@@ -15,16 +15,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
-// protoc v4.25.3
+// protoc v4.25.7
// source: google/cloud/kms/v1/service.proto
package kmspb
import (
context "context"
- reflect "reflect"
- sync "sync"
-
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -33,6 +30,8 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
)
const (
@@ -469,6 +468,10 @@ type ListKeyRingsResponse struct {
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched
// the query.
+ //
+ // This field is not populated if
+ // [ListKeyRingsRequest.filter][google.cloud.kms.v1.ListKeyRingsRequest.filter]
+ // is applied.
TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
}
@@ -538,6 +541,10 @@ type ListCryptoKeysResponse struct {
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that
// matched the query.
+ //
+ // This field is not populated if
+ // [ListCryptoKeysRequest.filter][google.cloud.kms.v1.ListCryptoKeysRequest.filter]
+ // is applied.
TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
}
@@ -608,6 +615,10 @@ type ListCryptoKeyVersionsResponse struct {
// The total number of
// [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the
// query.
+ //
+ // This field is not populated if
+ // [ListCryptoKeyVersionsRequest.filter][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.filter]
+ // is applied.
TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
}
@@ -677,6 +688,10 @@ type ListImportJobsResponse struct {
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that
// matched the query.
+ //
+ // This field is not populated if
+ // [ListImportJobsRequest.filter][google.cloud.kms.v1.ListImportJobsRequest.filter]
+ // is applied.
TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
}
diff --git a/vendor/cloud.google.com/go/kms/internal/version.go b/vendor/cloud.google.com/go/kms/internal/version.go
index 670f0797ee..eddfee04b0 100644
--- a/vendor/cloud.google.com/go/kms/internal/version.go
+++ b/vendor/cloud.google.com/go/kms/internal/version.go
@@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
-const Version = "1.21.1"
+const Version = "1.22.0"
diff --git a/vendor/cloud.google.com/go/longrunning/CHANGES.md b/vendor/cloud.google.com/go/longrunning/CHANGES.md
index a71958edb0..ca0d28f167 100644
--- a/vendor/cloud.google.com/go/longrunning/CHANGES.md
+++ b/vendor/cloud.google.com/go/longrunning/CHANGES.md
@@ -1,5 +1,12 @@
# Changes
+## [0.6.7](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.6...longrunning/v0.6.7) (2025-04-15)
+
+
+### Bug Fixes
+
+* **longrunning:** Update google.golang.org/api to 0.229.0 ([3319672](https://github.com/googleapis/google-cloud-go/commit/3319672f3dba84a7150772ccb5433e02dab7e201))
+
## [0.6.6](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.5...longrunning/v0.6.6) (2025-03-13)
diff --git a/vendor/cloud.google.com/go/monitoring/internal/version.go b/vendor/cloud.google.com/go/monitoring/internal/version.go
index 3e6c62c920..e199c1168a 100644
--- a/vendor/cloud.google.com/go/monitoring/internal/version.go
+++ b/vendor/cloud.google.com/go/monitoring/internal/version.go
@@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
-const Version = "1.24.1"
+const Version = "1.24.2"
diff --git a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json
index 4d8d236ed8..157b414912 100644
--- a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json
+++ b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json
@@ -90,6 +90,9 @@
"chat": {
"component": "chat"
},
+ "chronicle": {
+ "component": "chronicle"
+ },
"cloudbuild": {
"component": "cloudbuild"
},
@@ -165,6 +168,9 @@
"developerconnect": {
"component": "developerconnect"
},
+ "devicestreaming": {
+ "component": "devicestreaming"
+ },
"dialogflow": {
"component": "dialogflow"
},
@@ -246,6 +252,9 @@
"longrunning": {
"component": "longrunning"
},
+ "lustre": {
+ "component": "lustre"
+ },
"managedidentities": {
"component": "managedidentities"
},
@@ -399,9 +408,15 @@
"shopping": {
"component": "shopping"
},
+ "spanner/benchmarks": {
+ "component": "spanner/benchmarks"
+ },
"speech": {
"component": "speech"
},
+ "storagebatchoperations": {
+ "component": "storagebatchoperations"
+ },
"storageinsights": {
"component": "storageinsights"
},
diff --git a/vendor/cloud.google.com/go/storage/CHANGES.md b/vendor/cloud.google.com/go/storage/CHANGES.md
index ca5cbb7c25..cc0452c6ac 100644
--- a/vendor/cloud.google.com/go/storage/CHANGES.md
+++ b/vendor/cloud.google.com/go/storage/CHANGES.md
@@ -1,6 +1,27 @@
# Changes
+## [1.53.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.52.0...storage/v1.53.0) (2025-05-02)
+
+
+### Features
+
+* **storage/control:** Add Anywhere cache control APIs ([83ae06c](https://github.com/googleapis/google-cloud-go/commit/83ae06c3ec7d190e38856ba4cfd8a13f08356b4d))
+
+
+### Bug Fixes
+
+* **storage:** Fix append edge cases ([#12074](https://github.com/googleapis/google-cloud-go/issues/12074)) ([0eee1f9](https://github.com/googleapis/google-cloud-go/commit/0eee1f99a7dc0d1bfc36fa43d78933cae47962ee))
+* **storage:** Fix retries for redirection errors. ([#12093](https://github.com/googleapis/google-cloud-go/issues/12093)) ([3e177e7](https://github.com/googleapis/google-cloud-go/commit/3e177e755f5bf6aa96e8712cc4adcba7eb6f04f6))
+* **storage:** Handle gRPC deadlines in tests. ([#12092](https://github.com/googleapis/google-cloud-go/issues/12092)) ([30b7cd2](https://github.com/googleapis/google-cloud-go/commit/30b7cd27771ccbd49b70ee106da36362ba8f1e87))
+* **storage:** Update offset on resumable upload retry ([#12086](https://github.com/googleapis/google-cloud-go/issues/12086)) ([6ce8fe5](https://github.com/googleapis/google-cloud-go/commit/6ce8fe5aec0ec7916eda4d1405cab5f5f65a5de8))
+* **storage:** Validate Bidi option for MRD ([#12033](https://github.com/googleapis/google-cloud-go/issues/12033)) ([d9018cf](https://github.com/googleapis/google-cloud-go/commit/d9018cf640a9ac25e2b23b75b3bcfa734379ab09))
+
+
+### Documentation
+
+* **storage/control:** Added comments for Anywhere cache messages ([83ae06c](https://github.com/googleapis/google-cloud-go/commit/83ae06c3ec7d190e38856ba4cfd8a13f08356b4d))
+
## [1.52.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.51.0...storage/v1.52.0) (2025-04-22)
diff --git a/vendor/cloud.google.com/go/storage/doc.go b/vendor/cloud.google.com/go/storage/doc.go
index 4fcfb73264..ec801fb545 100644
--- a/vendor/cloud.google.com/go/storage/doc.go
+++ b/vendor/cloud.google.com/go/storage/doc.go
@@ -333,12 +333,13 @@ to add a [custom audit logging] header:
# gRPC API
-This package includes support for the Cloud Storage gRPC API. The
-implementation uses gRPC rather than the Default
-JSON & XML APIs to make requests to Cloud Storage.
-The Go Storage gRPC client is generally available.
-The Notifications, Serivce Account HMAC
-and GetServiceAccount RPCs are not supported through the gRPC client.
+This package includes support for the [Cloud Storage gRPC API]. This
+implementation uses gRPC rather than the default JSON & XML APIs
+to make requests to Cloud Storage. All methods on the [Client] support
+the gRPC API, with the exception of [GetServiceAccount], [Notification],
+and [HMACKey] methods.
+
+The Cloud Storage gRPC API is generally available.
To create a client which will use gRPC, use the alternate constructor:
@@ -349,43 +350,31 @@ To create a client which will use gRPC, use the alternate constructor:
}
// Use client as usual.
-Using the gRPC API inside GCP with a bucket in the same region can allow for
-[Direct Connectivity] (enabling requests to skip some proxy steps and reducing
-response latency). A warning is emmitted if gRPC is not used within GCP to
-warn that Direct Connectivity could not be initialized. Direct Connectivity
-is not required to access the gRPC API.
+One major advantage of the gRPC API is that it can use [Direct Connectivity],
+enabling requests to skip some proxy steps and reducing responce latency.
+Requirements to use Direct Connectivity include:
+
+ - Your application must be running inside Google Cloud.
+ - Your Cloud Storage [bucket location] must overlap with your VM or compute
+ environment zone. For example, if your VM is in us-east1a, your bucket
+ must be located in either us-east1 (single region), nam4 (dual region),
+ or us (multi-region).
+ - Your client must use service account authentication.
+
+Additional requirements for Direct Connectivity are documented in the
+[Cloud Storage gRPC docs].
Dependencies for the gRPC API may slightly increase the size of binaries for
applications depending on this package. If you are not using gRPC, you can use
the build tag `disable_grpc_modules` to opt out of these dependencies and
reduce the binary size.
-The gRPC client emits metrics by default and will export the
-gRPC telemetry discussed in [gRFC/66] and [gRFC/78] to
-[Google Cloud Monitoring]. The metrics are accessible through Cloud Monitoring
-API and you incur no additional cost for publishing the metrics. Google Cloud
-Support can use this information to more quickly diagnose problems related to
-GCS and gRPC.
-Sending this data does not incur any billing charges, and requires minimal
-CPU (a single RPC every minute) or memory (a few KiB to batch the
-telemetry).
-
-To access the metrics you can view them through Cloud Monitoring
-[metric explorer] with the prefix `storage.googleapis.com/client`. Metrics are emitted
-every minute.
-
-You can disable metrics using the following example when creating a new gRPC
-client using [WithDisabledClientMetrics].
-
-The metrics exporter uses Cloud Monitoring API which determines
-project ID and credentials doing the following:
-
-* Project ID is determined using OTel Resource Detector for the environment
-otherwise it falls back to the project provided by [google.FindCredentials].
-
-* Credentials are determined using [Application Default Credentials]. The
-principal must have `roles/monitoring.metricWriter` role granted. If not a
-logged warning will be emitted. Subsequent are silenced to prevent noisy logs.
+The gRPC client is instrumented with Open Telemetry metrics which export to
+Cloud Monitoring by default. More information is available in the
+[gRPC client-side metrics] documentation, including information about
+roles which must be enabled in order to do the export successfully. To
+disable this export, you can use the [WithDisabledClientMetrics] client
+option.
# Storage Control API
@@ -394,11 +383,6 @@ and Managed Folder operations) are supported via the autogenerated Storage Contr
client, which is available as a subpackage in this module. See package docs at
[cloud.google.com/go/storage/control/apiv2] or reference the [Storage Control API] docs.
-[Application Default Credentials]: https://cloud.google.com/docs/authentication/application-default-credentials
-[google.FindCredentials]: https://pkg.go.dev/golang.org/x/oauth2/google#FindDefaultCredentials
-[gRFC/66]: https://github.com/grpc/proposal/blob/master/A66-otel-stats.md
-[gRFC/78]: https://github.com/grpc/proposal/blob/master/A78-grpc-metrics-wrr-pf-xds.md
-[Google Cloud Monitoring]: https://cloud.google.com/monitoring/docs
[Cloud Storage IAM docs]: https://cloud.google.com/storage/docs/access-control/iam
[XML POST Object docs]: https://cloud.google.com/storage/docs/xml-api/post-object
[Cloud Storage retry docs]: https://cloud.google.com/storage/docs/retry-strategy
@@ -408,7 +392,10 @@ client, which is available as a subpackage in this module. See package docs at
[IAM Service Account Credentials API]: https://console.developers.google.com/apis/api/iamcredentials.googleapis.com/overview
[custom audit logging]: https://cloud.google.com/storage/docs/audit-logging#add-custom-metadata
[Storage Control API]: https://cloud.google.com/storage/docs/reference/rpc/google.storage.control.v2
-[metric explorer]: https://console.cloud.google.com/projectselector/monitoring/metrics-explorer
+[Cloud Storage gRPC API]: https://cloud.google.com/storage/docs/enable-grpc-api
[Direct Connectivity]: https://cloud.google.com/vpc-service-controls/docs/set-up-private-connectivity#direct-connectivity
+[bucket location]: https://cloud.google.com/storage/docs/locations
+[Cloud Storage gRPC docs]: https://cloud.google.com/storage/docs/enable-grpc-api#limitations
+[gRPC client-side metrics]: https://cloud.google.com/storage/docs/client-side-metrics
*/
package storage // import "cloud.google.com/go/storage"
diff --git a/vendor/cloud.google.com/go/storage/grpc_client.go b/vendor/cloud.google.com/go/storage/grpc_client.go
index 1dd564cda6..2b0a4b4f9e 100644
--- a/vendor/cloud.google.com/go/storage/grpc_client.go
+++ b/vendor/cloud.google.com/go/storage/grpc_client.go
@@ -22,7 +22,6 @@ import (
"hash/crc32"
"io"
"log"
- "net/url"
"os"
"sync"
@@ -31,7 +30,6 @@ import (
gapic "cloud.google.com/go/storage/internal/apiv2"
"cloud.google.com/go/storage/internal/apiv2/storagepb"
"github.com/googleapis/gax-go/v2"
- "google.golang.org/api/googleapi"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/option/internaloption"
@@ -57,12 +55,6 @@ const (
// This is only used for the gRPC client.
defaultConnPoolSize = 1
- // maxPerMessageWriteSize is the maximum amount of content that can be sent
- // per WriteObjectRequest message. A buffer reaching this amount will
- // precipitate a flush of the buffer. It is only used by the gRPC Writer
- // implementation.
- maxPerMessageWriteSize int = int(storagepb.ServiceConstants_MAX_WRITE_CHUNK_BYTES)
-
// globalProjectAlias is the project ID alias used for global buckets.
//
// This is only used for the gRPC API.
@@ -1063,6 +1055,10 @@ func contextMetadataFromBidiReadObject(req *storagepb.BidiReadObjectRequest) []s
}
func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params *newMultiRangeDownloaderParams, opts ...storageOption) (mr *MultiRangeDownloader, err error) {
+ if !c.config.grpcBidiReads {
+ return nil, errors.New("storage: MultiRangeDownloader requires the experimental.WithGRPCBidiReads option")
+ }
+
ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewMultiRangeDownloader")
defer func() { trace.EndSpan(ctx, err) }()
s := callSettings(c.settings, opts...)
@@ -1423,11 +1419,7 @@ func (mrd *gRPCBidiReader) activeRange() []mrdRange {
// retryStream cancel's stream and reopen the stream again.
func (mrd *gRPCBidiReader) retryStream(err error) error {
- var shouldRetry = ShouldRetry
- if mrd.settings.retry != nil && mrd.settings.retry.shouldRetry != nil {
- shouldRetry = mrd.settings.retry.shouldRetry
- }
- if shouldRetry(err) {
+ if mrd.settings.retry.runShouldRetry(err) {
// This will "close" the existing stream and immediately attempt to
// reopen the stream, but will backoff if further attempts are necessary.
// When Reopening the stream only failed readID will be added to stream.
@@ -1736,116 +1728,6 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange
return r, nil
}
-func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (*io.PipeWriter, error) {
- var offset int64
- errorf := params.setError
- setObj := params.setObj
- setFlush := params.setFlush
- pr, pw := io.Pipe()
-
- s := callSettings(c.settings, opts...)
-
- retryDeadline := defaultWriteChunkRetryDeadline
- if params.chunkRetryDeadline != 0 {
- retryDeadline = params.chunkRetryDeadline
- }
- if s.retry == nil {
- s.retry = defaultRetry.clone()
- }
- s.retry.maxRetryDuration = retryDeadline
-
- // Set Flush func for use by exported Writer.Flush.
- var gw *gRPCWriter
- setFlush(func() (int64, error) {
- return gw.flush()
- })
- gw, err := newGRPCWriter(c, s, params, pr, pw, params.setPipeWriter)
- if err != nil {
- errorf(err)
- pr.CloseWithError(err)
- close(params.donec)
- return nil, err
- }
-
- var o *storagepb.Object
-
- // If we are taking over an appendable object, send the first message here
- // to get the append offset.
- if params.appendGen > 0 {
- // Create the buffer sender. This opens a stream and blocks until we
- // get a response that tells us what offset to write from.
- wbs, err := gw.newGRPCAppendTakeoverWriteBufferSender(params.ctx)
- if err != nil {
- return nil, fmt.Errorf("storage: creating buffer sender: %w", err)
- }
- // Propagate append offset to caller and buffer sending logic below.
- params.setTakeoverOffset(wbs.takeoverOffset)
- offset = wbs.takeoverOffset
- gw.streamSender = wbs
- o = wbs.objResource
- setObj(newObjectFromProto(o))
- }
-
- // This function reads the data sent to the pipe and sends sets of messages
- // on the gRPC client-stream as the buffer is filled.
- go func() {
- err := func() error {
- // Unless the user told us the content type, we have to determine it from
- // the first read.
- if params.attrs.ContentType == "" && !params.forceEmptyContentType {
- gw.reader, gw.spec.Resource.ContentType = gax.DetermineContentType(gw.reader)
- }
-
- // Loop until there is an error or the Object has been finalized.
- for {
- // Note: This blocks until either the buffer is full or EOF is read.
- recvd, doneReading, err := gw.read()
- if err != nil {
- return err
- }
-
- uploadBuff := func(ctx context.Context) error {
- obj, err := gw.uploadBuffer(ctx, recvd, offset, doneReading)
- if obj != nil {
- o = obj
- setObj(newObjectFromProto(o))
- }
- return err
- }
-
- // Add routing headers to the context metadata for single-shot and resumable
- // writes. Append writes need to set this at a lower level to pass the routing
- // token.
- bctx := gw.ctx
- if !gw.append {
- bctx = bucketContext(bctx, gw.bucket)
- }
- err = run(bctx, uploadBuff, gw.settings.retry, s.idempotent)
- if err != nil {
- return err
- }
- offset += int64(recvd)
-
- // When we are done reading data without errors, set the object and
- // finish.
- if doneReading {
- // Build Object from server's response.
- setObj(newObjectFromProto(o))
- return nil
- }
- }
- }()
-
- // These calls are still valid if err is nil
- err = checkCanceled(err)
- errorf(err)
- pr.CloseWithError(err)
- close(params.donec)
- }()
-
- return pw, nil
-}
-
// IAM methods.
func (c *grpcStorageClient) GetIamPolicy(ctx context.Context, resource string, version int32, opts ...storageOption) (*iampb.Policy, error) {
@@ -2146,11 +2028,7 @@ func (r *gRPCReader) Close() error {
func (r *gRPCReader) recv() error {
databufs := mem.BufferSlice{}
err := r.stream.RecvMsg(&databufs)
- var shouldRetry = ShouldRetry
- if r.settings.retry != nil && r.settings.retry.shouldRetry != nil {
- shouldRetry = r.settings.retry.shouldRetry
- }
- if err != nil && shouldRetry(err) {
+ if err != nil && r.settings.retry.runShouldRetry(err) {
// This will "close" the existing stream and immediately attempt to
// reopen the stream, but will backoff if further attempts are necessary.
// Reopening the stream Recvs the first message, so if retrying is
@@ -2613,467 +2491,3 @@ func (r *gRPCReader) reopenStream() error {
r.cancel = cancel
return nil
}
-
-func newGRPCWriter(c *grpcStorageClient, s *settings, params *openWriterParams, r io.Reader, pw *io.PipeWriter, setPipeWriter func(*io.PipeWriter)) (*gRPCWriter, error) {
- if params.attrs.Retention != nil {
- // TO-DO: remove once ObjectRetention is available - see b/308194853
- return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
- }
-
- size := googleapi.MinUploadChunkSize
- // A completely bufferless upload (params.chunkSize <= 0) is not possible in
- // gRPC because the buffer must be provided to the message. Use the minimum
- // size possible.
- if params.chunkSize > 0 {
- size = params.chunkSize
- }
-
- // Round up chunksize to nearest 256KiB
- if size%googleapi.MinUploadChunkSize != 0 {
- size += googleapi.MinUploadChunkSize - (size % googleapi.MinUploadChunkSize)
- }
-
- if s.userProject != "" {
- params.ctx = setUserProjectMetadata(params.ctx, s.userProject)
- }
-
- spec := &storagepb.WriteObjectSpec{
- Resource: params.attrs.toProtoObject(params.bucket),
- Appendable: proto.Bool(params.append),
- }
- var appendSpec *storagepb.AppendObjectSpec
- if params.appendGen > 0 {
- appendSpec = &storagepb.AppendObjectSpec{
- Bucket: bucketResourceName(globalProjectAlias, params.bucket),
- Object: params.attrs.Name,
- Generation: params.appendGen,
- }
- }
- // WriteObject doesn't support the generation condition, so use default.
- if err := applyCondsProto("WriteObject", defaultGen, params.conds, spec); err != nil {
- return nil, err
- }
-
- return &gRPCWriter{
- buf: make([]byte, size),
- c: c,
- ctx: params.ctx,
- reader: r,
- pw: pw,
- bucket: params.bucket,
- attrs: params.attrs,
- conds: params.conds,
- spec: spec,
- appendSpec: appendSpec,
- encryptionKey: params.encryptionKey,
- settings: s,
- progress: params.progress,
- setSize: params.setSize,
- sendCRC32C: params.sendCRC32C,
- forceOneShot: params.chunkSize <= 0,
- forceEmptyContentType: params.forceEmptyContentType,
- append: params.append,
- finalizeOnClose: params.finalizeOnClose,
- setPipeWriter: setPipeWriter,
- flushComplete: make(chan int64),
- }, nil
-}
-
-// gRPCWriter is a wrapper around the the gRPC client-stream API that manages
-// sending chunks of data provided by the user over the stream.
-type gRPCWriter struct {
- c *grpcStorageClient
- buf []byte
- reader io.Reader
- pw *io.PipeWriter
- setPipeWriter func(*io.PipeWriter) // used to set in parent storage.Writer
-
- ctx context.Context
-
- bucket string
- attrs *ObjectAttrs
- conds *Conditions
- spec *storagepb.WriteObjectSpec
- appendSpec *storagepb.AppendObjectSpec
- encryptionKey []byte
- settings *settings
- progress func(int64)
- setSize func(int64)
-
- sendCRC32C bool
- forceOneShot bool
- forceEmptyContentType bool
- append bool
- finalizeOnClose bool
-
- streamSender gRPCBidiWriteBufferSender
- flushInProgress bool // true when the pipe is being recreated for a flush.
- flushComplete chan int64 // use to signal back to flush call that flush to server was completed.
-}
-
-func bucketContext(ctx context.Context, bucket string) context.Context {
- hds := []string{"x-goog-request-params", fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(bucket))}
- return gax.InsertMetadataIntoOutgoingContext(ctx, hds...)
-}
-
-// drainInboundStream calls stream.Recv() repeatedly until an error is returned.
-// It returns the last Resource received on the stream, or nil if no Resource
-// was returned. drainInboundStream always returns a non-nil error. io.EOF
-// indicates all messages were successfully read.
-func drainInboundStream(stream storagepb.Storage_BidiWriteObjectClient) (object *storagepb.Object, err error) {
- for err == nil {
- var resp *storagepb.BidiWriteObjectResponse
- resp, err = stream.Recv()
- // GetResource() returns nil on a nil response
- if resp.GetResource() != nil {
- object = resp.GetResource()
- }
- }
- return object, err
-}
-
-func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *storagepb.BidiWriteObjectRequest {
- var data *storagepb.BidiWriteObjectRequest_ChecksummedData
- if buf != nil {
- data = &storagepb.BidiWriteObjectRequest_ChecksummedData{
- ChecksummedData: &storagepb.ChecksummedData{
- Content: buf,
- },
- }
- }
- req := &storagepb.BidiWriteObjectRequest{
- Data: data,
- WriteOffset: offset,
- FinishWrite: finishWrite,
- Flush: flush,
- StateLookup: flush,
- }
- return req
-}
-
-type gRPCBidiWriteBufferSender interface {
- // sendBuffer implementations should upload buf, respecting flush and
- // finishWrite. Callers must guarantee that buf is not too long to fit in a
- // gRPC message.
- //
- // If flush is true, implementations must not return until the data in buf is
- // stable. If finishWrite is true, implementations must return the object on
- // success.
- sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (*storagepb.Object, error)
-}
-
-type gRPCOneshotBidiWriteBufferSender struct {
- firstMessage *storagepb.BidiWriteObjectRequest
- raw *gapic.Client
- stream storagepb.Storage_BidiWriteObjectClient
- settings *settings
-}
-
-func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() (*gRPCOneshotBidiWriteBufferSender, error) {
- firstMessage := &storagepb.BidiWriteObjectRequest{
- FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{
- WriteObjectSpec: w.spec,
- },
- CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
- // For a non-resumable upload, checksums must be sent in this message.
- // TODO: Currently the checksums are only sent on the first message
- // of the stream, but in the future, we must also support sending it
- // on the *last* message of the stream (instead of the first).
- ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
- }
-
- return &gRPCOneshotBidiWriteBufferSender{
- firstMessage: firstMessage,
- raw: w.c.raw,
- settings: w.settings,
- }, nil
-}
-
-func (s *gRPCOneshotBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
- var firstMessage *storagepb.BidiWriteObjectRequest
- if s.stream == nil {
- s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...)
- if err != nil {
- return
- }
- firstMessage = s.firstMessage
- }
- req := bidiWriteObjectRequest(buf, offset, flush, finishWrite)
- if firstMessage != nil {
- proto.Merge(req, firstMessage)
- }
-
- sendErr := s.stream.Send(req)
- if sendErr != nil {
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if sendErr != io.EOF {
- err = sendErr
- }
- return
- }
- // Oneshot uploads assume all flushes succeed
-
- if finishWrite {
- s.stream.CloseSend()
- // Oneshot uploads only read from the response stream on completion or
- // failure
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if err == io.EOF {
- err = nil
- }
- }
- return
-}
-
-type gRPCResumableBidiWriteBufferSender struct {
- queryRetry *retryConfig
- upid string
- progress func(int64)
- raw *gapic.Client
- forceFirstMessage bool
- stream storagepb.Storage_BidiWriteObjectClient
- flushOffset int64
- settings *settings
-}
-
-func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender(ctx context.Context) (*gRPCResumableBidiWriteBufferSender, error) {
- req := &storagepb.StartResumableWriteRequest{
- WriteObjectSpec: w.spec,
- CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
- // TODO: Currently the checksums are only sent on the request to initialize
- // the upload, but in the future, we must also support sending it
- // on the *last* message of the stream.
- ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
- }
-
- var upid string
- err := run(ctx, func(ctx context.Context) error {
- upres, err := w.c.raw.StartResumableWrite(ctx, req, w.settings.gax...)
- upid = upres.GetUploadId()
- return err
- }, w.settings.retry, w.settings.idempotent)
- if err != nil {
- return nil, err
- }
-
- // Set up an initial connection for the 0 offset, so we don't query state
- // unnecessarily for the first buffer. If we fail, we'll just retry in the
- // normal connect path.
- stream, err := w.c.raw.BidiWriteObject(ctx, w.settings.gax...)
- if err != nil {
- stream = nil
- }
-
- return &gRPCResumableBidiWriteBufferSender{
- queryRetry: w.settings.retry,
- upid: upid,
- progress: w.progress,
- raw: w.c.raw,
- forceFirstMessage: true,
- stream: stream,
- settings: w.settings,
- }, nil
-}
-
-// queryProgress is a helper that queries the status of the resumable upload
-// associated with the given upload ID.
-func (s *gRPCResumableBidiWriteBufferSender) queryProgress(ctx context.Context) (int64, error) {
- var persistedSize int64
- err := run(ctx, func(ctx context.Context) error {
- q, err := s.raw.QueryWriteStatus(ctx, &storagepb.QueryWriteStatusRequest{
- UploadId: s.upid,
- }, s.settings.gax...)
- // q.GetPersistedSize() will return 0 if q is nil.
- persistedSize = q.GetPersistedSize()
- return err
- }, s.queryRetry, true)
-
- return persistedSize, err
-}
-
-func (s *gRPCResumableBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
- if s.stream == nil {
- // Determine offset and reconnect
- s.flushOffset, err = s.queryProgress(ctx)
- if err != nil {
- return
- }
- s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...)
- if err != nil {
- return
- }
- s.forceFirstMessage = true
- }
-
- // clean up buf. We'll still write the message if a flush/finishWrite was
- // requested.
- if offset < s.flushOffset {
- trim := s.flushOffset - offset
- if int64(len(buf)) <= trim {
- trim = int64(len(buf))
- }
- buf = buf[trim:]
- }
- if len(buf) == 0 && !flush && !finishWrite {
- // no need to send anything
- return nil, nil
- }
-
- req := bidiWriteObjectRequest(buf, offset, flush, finishWrite)
- if s.forceFirstMessage {
- req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid}
- s.forceFirstMessage = false
- }
-
- sendErr := s.stream.Send(req)
- if sendErr != nil {
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if err == io.EOF {
- // This is unexpected - we got an error on Send(), but not on Recv().
- // Bubble up the sendErr.
- err = sendErr
- }
- return
- }
-
- if finishWrite {
- s.stream.CloseSend()
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if err == io.EOF {
- err = nil
- if obj.GetSize() > s.flushOffset {
- s.progress(obj.GetSize())
- }
- }
- return
- }
-
- if flush {
- resp, err := s.stream.Recv()
- if err != nil {
- return nil, err
- }
- persistedOffset := resp.GetPersistedSize()
- if persistedOffset > s.flushOffset {
- s.flushOffset = persistedOffset
- s.progress(s.flushOffset)
- }
- }
- return
-}
-
-// uploadBuffer uploads the buffer at the given offset using a bi-directional
-// Write stream. It will open a new stream if necessary (on the first call or
-// after resuming from failure) and chunk the buffer per maxPerMessageWriteSize.
-// The final Object is returned on success if doneReading is true.
-//
-// Returns object and any error that is not retriable.
-func (w *gRPCWriter) uploadBuffer(ctx context.Context, recvd int, start int64, doneReading bool) (obj *storagepb.Object, err error) {
- if w.streamSender == nil {
- if w.append {
- // Appendable object semantics
- w.streamSender, err = w.newGRPCAppendableObjectBufferSender()
- } else if doneReading || w.forceOneShot {
- // One shot semantics
- w.streamSender, err = w.newGRPCOneshotBidiWriteBufferSender()
- } else {
- // Resumable write semantics
- w.streamSender, err = w.newGRPCResumableBidiWriteBufferSender(ctx)
- }
- if err != nil {
- return
- }
- }
-
- data := w.buf[:recvd]
- offset := start
- // We want to go through this loop at least once, in case we have to
- // finishWrite with an empty buffer.
- for {
- // Send as much as we can fit into a single gRPC message. Only flush once,
- // when sending the very last message.
- l := maxPerMessageWriteSize
- flush := false
- if len(data) <= l {
- l = len(data)
- flush = true
- }
- obj, err = w.streamSender.sendBuffer(ctx, data[:l], offset, flush, flush && doneReading)
- if err != nil {
- return nil, err
- }
- data = data[l:]
- offset += int64(l)
- if len(data) == 0 {
- // Update object size to match persisted offset.
- if obj != nil {
- obj.Size = offset
- }
- break
- }
- }
- if w.flushInProgress {
- w.setSize(offset)
- w.flushInProgress = false
- w.flushComplete <- offset
- }
- return
-}
-
-// read copies the data in the reader to the given buffer and reports how much
-// data was read into the buffer and if there is no more data to read (EOF).
-// read returns when either 1. the buffer is full, 2. Writer.Flush was called,
-// or 3. Writer.Close was called.
-func (w *gRPCWriter) read() (int, bool, error) {
- // Set n to -1 to start the Read loop.
- var n, recvd int = -1, 0
- var err error
- for err == nil && n != 0 {
- // The routine blocks here until data is received.
- n, err = w.reader.Read(w.buf[recvd:])
- recvd += n
- }
- var done bool
- if err == io.EOF {
- err = nil
- // EOF can come from Writer.Flush or Writer.Close.
- if w.flushInProgress {
- // Reset pipe for additional writes after the flush.
- pr, pw := io.Pipe()
- w.reader = pr
- w.pw = pw
- w.setPipeWriter(pw)
- } else {
- done = true
- }
- }
- return recvd, done, err
-}
-
-// flush flushes the current buffer regardless of whether it is full or not.
-// It's the implementation for Writer.Flush.
-func (w *gRPCWriter) flush() (int64, error) {
- if !w.append {
- return 0, errors.New("Flush is supported only if Writer.Append is set to true")
- }
-
- // Close PipeWriter to trigger EOF on read side of the stream.
- w.flushInProgress = true
- w.pw.Close()
-
- // Wait for flush to complete
- offset := <-w.flushComplete
- return offset, nil
-}
-
-func checkCanceled(err error) error {
- if status.Code(err) == codes.Canceled {
- return context.Canceled
- }
-
- return err
-}
diff --git a/vendor/cloud.google.com/go/storage/grpc_reader.go b/vendor/cloud.google.com/go/storage/grpc_reader.go
index e1aecad653..099e6a6155 100644
--- a/vendor/cloud.google.com/go/storage/grpc_reader.go
+++ b/vendor/cloud.google.com/go/storage/grpc_reader.go
@@ -424,11 +424,7 @@ func (r *gRPCReadObjectReader) recv() error {
databufs := mem.BufferSlice{}
err := r.stream.RecvMsg(&databufs)
- var shouldRetry = ShouldRetry
- if r.settings.retry != nil && r.settings.retry.shouldRetry != nil {
- shouldRetry = r.settings.retry.shouldRetry
- }
- if err != nil && shouldRetry(err) {
+ if err != nil && r.settings.retry.runShouldRetry(err) {
// This will "close" the existing stream and immediately attempt to
// reopen the stream, but will backoff if further attempts are necessary.
// Reopening the stream Recvs the first message, so if retrying is
diff --git a/vendor/cloud.google.com/go/storage/grpc_writer.go b/vendor/cloud.google.com/go/storage/grpc_writer.go
index 83d2c9e3e8..c74d1ff316 100644
--- a/vendor/cloud.google.com/go/storage/grpc_writer.go
+++ b/vendor/cloud.google.com/go/storage/grpc_writer.go
@@ -19,17 +19,646 @@ import (
"errors"
"fmt"
"io"
+ "net/url"
"time"
gapic "cloud.google.com/go/storage/internal/apiv2"
"cloud.google.com/go/storage/internal/apiv2/storagepb"
gax "github.com/googleapis/gax-go/v2"
+ "google.golang.org/api/googleapi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
-const defaultWriteChunkRetryDeadline = 32 * time.Second
+const (
+ // defaultWriteChunkRetryDeadline is the default deadline for the upload
+ // of a single chunk. It can be overwritten by Writer.ChunkRetryDeadline.
+ defaultWriteChunkRetryDeadline = 32 * time.Second
+ // maxPerMessageWriteSize is the maximum amount of content that can be sent
+ // per WriteObjectRequest message. A buffer reaching this amount will
+ // precipitate a flush of the buffer. It is only used by the gRPC Writer
+ // implementation.
+ maxPerMessageWriteSize int = int(storagepb.ServiceConstants_MAX_WRITE_CHUNK_BYTES)
+)
+
+func withBidiWriteObjectRedirectionErrorRetries(s *settings) (newr *retryConfig) {
+ oldr := s.retry
+ newr = oldr.clone()
+ if newr == nil {
+ newr = &retryConfig{}
+ }
+ if (oldr.policy == RetryIdempotent && !s.idempotent) || oldr.policy == RetryNever {
+ // We still retry redirection errors even when settings indicate not to
+ // retry.
+ //
+ // The protocol requires us to respect redirection errors, so RetryNever has
+ // to ignore them.
+ //
+ // Idempotency is always protected by redirection errors: they either
+ // contain a handle which can be used as idempotency information, or they do
+ // not contain a handle and are "affirmative failures" which indicate that
+ // no server-side action occurred.
+ newr.policy = RetryAlways
+ newr.shouldRetry = func(err error) bool {
+ return errors.Is(err, bidiWriteObjectRedirectionError{})
+ }
+ return newr
+ }
+ // If retry settings allow retries normally, fall back to that behavior.
+ newr.shouldRetry = func(err error) bool {
+ if errors.Is(err, bidiWriteObjectRedirectionError{}) {
+ return true
+ }
+ v := oldr.runShouldRetry(err)
+ return v
+ }
+ return newr
+}
+
+func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (*io.PipeWriter, error) {
+ var offset int64
+ errorf := params.setError
+ setObj := params.setObj
+ setFlush := params.setFlush
+ pr, pw := io.Pipe()
+
+ s := callSettings(c.settings, opts...)
+
+ retryDeadline := defaultWriteChunkRetryDeadline
+ if params.chunkRetryDeadline != 0 {
+ retryDeadline = params.chunkRetryDeadline
+ }
+ if s.retry == nil {
+ s.retry = defaultRetry.clone()
+ }
+ if params.append {
+ s.retry = withBidiWriteObjectRedirectionErrorRetries(s)
+ }
+ s.retry.maxRetryDuration = retryDeadline
+
+ // Set Flush func for use by exported Writer.Flush.
+ var gw *gRPCWriter
+ setFlush(func() (int64, error) {
+ return gw.flush()
+ })
+ gw, err := newGRPCWriter(c, s, params, pr, pw, params.setPipeWriter)
+ if err != nil {
+ errorf(err)
+ pr.CloseWithError(err)
+ close(params.donec)
+ return nil, err
+ }
+
+ var o *storagepb.Object
+
+ // If we are taking over an appendable object, send the first message here
+ // to get the append offset.
+ if params.appendGen > 0 {
+ // Create the buffer sender. This opens a stream and blocks until we
+ // get a response that tells us what offset to write from.
+ wbs, err := gw.newGRPCAppendTakeoverWriteBufferSender(params.ctx)
+ if err != nil {
+ return nil, fmt.Errorf("storage: creating buffer sender: %w", err)
+ }
+ // Propagate append offset to caller and buffer sending logic below.
+ params.setTakeoverOffset(wbs.takeoverOffset)
+ offset = wbs.takeoverOffset
+ gw.streamSender = wbs
+ o = wbs.objResource
+ setObj(newObjectFromProto(o))
+ }
+
+ // This function reads the data sent to the pipe and sends sets of messages
+ // on the gRPC client-stream as the buffer is filled.
+ go func() {
+ err := func() error {
+ // Unless the user told us the content type, we have to determine it from
+ // the first read.
+ if params.attrs.ContentType == "" && !params.forceEmptyContentType {
+ gw.reader, gw.spec.Resource.ContentType = gax.DetermineContentType(gw.reader)
+ }
+
+ // Loop until there is an error or the Object has been finalized.
+ for {
+ // Note: This blocks until either the buffer is full or EOF is read.
+ recvd, doneReading, err := gw.read()
+ if err != nil {
+ return err
+ }
+
+ uploadBuff := func(ctx context.Context) error {
+ obj, err := gw.uploadBuffer(ctx, recvd, offset, doneReading)
+ if obj != nil {
+ o = obj
+ setObj(newObjectFromProto(o))
+ }
+ return err
+ }
+
+ // Add routing headers to the context metadata for single-shot and resumable
+ // writes. Append writes need to set this at a lower level to pass the routing
+ // token.
+ bctx := gw.ctx
+ if !gw.append {
+ bctx = bucketContext(bctx, gw.bucket)
+ }
+ err = run(bctx, uploadBuff, gw.settings.retry, s.idempotent)
+ offset += int64(recvd)
+ // If this buffer upload was triggered by a flush, reset and
+ // communicate back the result.
+ if gw.flushInProgress {
+ gw.setSize(offset)
+ gw.flushInProgress = false
+ gw.flushComplete <- flushResult{offset: offset, err: err}
+ }
+ if err != nil {
+ return err
+ }
+ // When we are done reading data without errors, set the object and
+ // finish.
+ if doneReading {
+ // Build Object from server's response.
+ setObj(newObjectFromProto(o))
+ return nil
+ }
+ }
+ }()
+
+ // These calls are still valid if err is nil
+ err = checkCanceled(err)
+ errorf(err)
+ pr.CloseWithError(err)
+ close(params.donec)
+ }()
+
+ return pw, nil
+}
+
+func newGRPCWriter(c *grpcStorageClient, s *settings, params *openWriterParams, r io.Reader, pw *io.PipeWriter, setPipeWriter func(*io.PipeWriter)) (*gRPCWriter, error) {
+ if params.attrs.Retention != nil {
+ // TO-DO: remove once ObjectRetention is available - see b/308194853
+ return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
+ }
+
+ size := googleapi.MinUploadChunkSize
+ // A completely bufferless upload (params.chunkSize <= 0) is not possible in
+ // gRPC because the buffer must be provided to the message. Use the minimum
+ // size possible.
+ if params.chunkSize > 0 {
+ size = params.chunkSize
+ }
+
+ // Round up chunksize to nearest 256KiB
+ if size%googleapi.MinUploadChunkSize != 0 {
+ size += googleapi.MinUploadChunkSize - (size % googleapi.MinUploadChunkSize)
+ }
+
+ if s.userProject != "" {
+ params.ctx = setUserProjectMetadata(params.ctx, s.userProject)
+ }
+
+ spec := &storagepb.WriteObjectSpec{
+ Resource: params.attrs.toProtoObject(params.bucket),
+ Appendable: proto.Bool(params.append),
+ }
+ var appendSpec *storagepb.AppendObjectSpec
+ if params.appendGen > 0 {
+ appendSpec = &storagepb.AppendObjectSpec{
+ Bucket: bucketResourceName(globalProjectAlias, params.bucket),
+ Object: params.attrs.Name,
+ Generation: params.appendGen,
+ }
+ }
+ // WriteObject doesn't support the generation condition, so use default.
+ if err := applyCondsProto("WriteObject", defaultGen, params.conds, spec); err != nil {
+ return nil, err
+ }
+
+ return &gRPCWriter{
+ buf: make([]byte, size),
+ c: c,
+ ctx: params.ctx,
+ reader: r,
+ pw: pw,
+ bucket: params.bucket,
+ attrs: params.attrs,
+ conds: params.conds,
+ spec: spec,
+ appendSpec: appendSpec,
+ encryptionKey: params.encryptionKey,
+ settings: s,
+ progress: params.progress,
+ setSize: params.setSize,
+ sendCRC32C: params.sendCRC32C,
+ forceOneShot: params.chunkSize <= 0,
+ forceEmptyContentType: params.forceEmptyContentType,
+ append: params.append,
+ finalizeOnClose: params.finalizeOnClose,
+ setPipeWriter: setPipeWriter,
+ flushComplete: make(chan flushResult),
+ }, nil
+}
+
+// gRPCWriter is a wrapper around the the gRPC client-stream API that manages
+// sending chunks of data provided by the user over the stream.
+type gRPCWriter struct {
+ c *grpcStorageClient
+ buf []byte
+ reader io.Reader
+ pw *io.PipeWriter
+ setPipeWriter func(*io.PipeWriter) // used to set in parent storage.Writer
+
+ ctx context.Context
+
+ bucket string
+ attrs *ObjectAttrs
+ conds *Conditions
+ spec *storagepb.WriteObjectSpec
+ appendSpec *storagepb.AppendObjectSpec
+ encryptionKey []byte
+ settings *settings
+ progress func(int64)
+ setSize func(int64)
+
+ sendCRC32C bool
+ forceOneShot bool
+ forceEmptyContentType bool
+ append bool
+ finalizeOnClose bool
+
+ streamSender gRPCBidiWriteBufferSender
+ flushInProgress bool // true when the pipe is being recreated for a flush.
+ flushComplete chan flushResult // use to signal back to flush call that flush to server was completed.
+}
+
+type flushResult struct {
+ err error
+ offset int64
+}
+
+func bucketContext(ctx context.Context, bucket string) context.Context {
+ hds := []string{"x-goog-request-params", fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(bucket))}
+ return gax.InsertMetadataIntoOutgoingContext(ctx, hds...)
+}
+
+// drainInboundStream calls stream.Recv() repeatedly until an error is returned.
+// It returns the last Resource received on the stream, or nil if no Resource
+// was returned. drainInboundStream always returns a non-nil error. io.EOF
+// indicates all messages were successfully read.
+func drainInboundStream(stream storagepb.Storage_BidiWriteObjectClient) (object *storagepb.Object, err error) {
+ for err == nil {
+ var resp *storagepb.BidiWriteObjectResponse
+ resp, err = stream.Recv()
+ // GetResource() returns nil on a nil response
+ if resp.GetResource() != nil {
+ object = resp.GetResource()
+ }
+ }
+ return object, err
+}
+
+func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *storagepb.BidiWriteObjectRequest {
+ var data *storagepb.BidiWriteObjectRequest_ChecksummedData
+ if buf != nil {
+ data = &storagepb.BidiWriteObjectRequest_ChecksummedData{
+ ChecksummedData: &storagepb.ChecksummedData{
+ Content: buf,
+ },
+ }
+ }
+ req := &storagepb.BidiWriteObjectRequest{
+ Data: data,
+ WriteOffset: offset,
+ FinishWrite: finishWrite,
+ Flush: flush,
+ StateLookup: flush,
+ }
+ return req
+}
+
+type gRPCBidiWriteBufferSender interface {
+ // sendBuffer implementations should upload buf, respecting flush and
+ // finishWrite. Callers must guarantee that buf is not too long to fit in a
+ // gRPC message.
+ //
+ // If flush is true, implementations must not return until the data in buf is
+ // stable. If finishWrite is true, implementations must return the object on
+ // success.
+ sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (*storagepb.Object, error)
+}
+
+type gRPCOneshotBidiWriteBufferSender struct {
+ firstMessage *storagepb.BidiWriteObjectRequest
+ raw *gapic.Client
+ stream storagepb.Storage_BidiWriteObjectClient
+ settings *settings
+}
+
+func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() (*gRPCOneshotBidiWriteBufferSender, error) {
+ firstMessage := &storagepb.BidiWriteObjectRequest{
+ FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{
+ WriteObjectSpec: w.spec,
+ },
+ CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
+ // For a non-resumable upload, checksums must be sent in this message.
+ // TODO: Currently the checksums are only sent on the first message
+ // of the stream, but in the future, we must also support sending it
+ // on the *last* message of the stream (instead of the first).
+ ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
+ }
+
+ return &gRPCOneshotBidiWriteBufferSender{
+ firstMessage: firstMessage,
+ raw: w.c.raw,
+ settings: w.settings,
+ }, nil
+}
+
+func (s *gRPCOneshotBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
+ var firstMessage *storagepb.BidiWriteObjectRequest
+ if s.stream == nil {
+ s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...)
+ if err != nil {
+ return
+ }
+ firstMessage = s.firstMessage
+ }
+ req := bidiWriteObjectRequest(buf, offset, flush, finishWrite)
+ if firstMessage != nil {
+ proto.Merge(req, firstMessage)
+ }
+
+ sendErr := s.stream.Send(req)
+ if sendErr != nil {
+ obj, err = drainInboundStream(s.stream)
+ s.stream = nil
+ if sendErr != io.EOF {
+ err = sendErr
+ }
+ return
+ }
+ // Oneshot uploads assume all flushes succeed
+
+ if finishWrite {
+ s.stream.CloseSend()
+ // Oneshot uploads only read from the response stream on completion or
+ // failure
+ obj, err = drainInboundStream(s.stream)
+ s.stream = nil
+ if err == io.EOF {
+ err = nil
+ }
+ }
+ return
+}
+
+type gRPCResumableBidiWriteBufferSender struct {
+ queryRetry *retryConfig
+ upid string
+ progress func(int64)
+ raw *gapic.Client
+ forceFirstMessage bool
+ stream storagepb.Storage_BidiWriteObjectClient
+ flushOffset int64
+ settings *settings
+}
+
+func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender(ctx context.Context) (*gRPCResumableBidiWriteBufferSender, error) {
+ req := &storagepb.StartResumableWriteRequest{
+ WriteObjectSpec: w.spec,
+ CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
+ // TODO: Currently the checksums are only sent on the request to initialize
+ // the upload, but in the future, we must also support sending it
+ // on the *last* message of the stream.
+ ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
+ }
+
+ var upid string
+ err := run(ctx, func(ctx context.Context) error {
+ upres, err := w.c.raw.StartResumableWrite(ctx, req, w.settings.gax...)
+ upid = upres.GetUploadId()
+ return err
+ }, w.settings.retry, w.settings.idempotent)
+ if err != nil {
+ return nil, err
+ }
+
+ // Set up an initial connection for the 0 offset, so we don't query state
+ // unnecessarily for the first buffer. If we fail, we'll just retry in the
+ // normal connect path.
+ stream, err := w.c.raw.BidiWriteObject(ctx, w.settings.gax...)
+ if err != nil {
+ stream = nil
+ }
+
+ return &gRPCResumableBidiWriteBufferSender{
+ queryRetry: w.settings.retry,
+ upid: upid,
+ progress: w.progress,
+ raw: w.c.raw,
+ forceFirstMessage: true,
+ stream: stream,
+ settings: w.settings,
+ }, nil
+}
+
+// queryProgress is a helper that queries the status of the resumable upload
+// associated with the given upload ID.
+func (s *gRPCResumableBidiWriteBufferSender) queryProgress(ctx context.Context) (int64, error) {
+ var persistedSize int64
+ err := run(ctx, func(ctx context.Context) error {
+ q, err := s.raw.QueryWriteStatus(ctx, &storagepb.QueryWriteStatusRequest{
+ UploadId: s.upid,
+ }, s.settings.gax...)
+ // q.GetPersistedSize() will return 0 if q is nil.
+ persistedSize = q.GetPersistedSize()
+ return err
+ }, s.queryRetry, true)
+
+ return persistedSize, err
+}
+
+func (s *gRPCResumableBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
+ if s.stream == nil {
+ // Determine offset and reconnect
+ s.flushOffset, err = s.queryProgress(ctx)
+ if err != nil {
+ return
+ }
+ s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...)
+ if err != nil {
+ return
+ }
+ s.forceFirstMessage = true
+ }
+
+ // clean up buf. We'll still write the message if a flush/finishWrite was
+ // requested.
+ if offset < s.flushOffset {
+ trim := s.flushOffset - offset
+ if int64(len(buf)) <= trim {
+ trim = int64(len(buf))
+ }
+ buf = buf[trim:]
+ offset += trim
+ }
+ if len(buf) == 0 && !flush && !finishWrite {
+ // no need to send anything
+ return nil, nil
+ }
+
+ req := bidiWriteObjectRequest(buf, offset, flush, finishWrite)
+ if s.forceFirstMessage {
+ req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid}
+ s.forceFirstMessage = false
+ }
+
+ sendErr := s.stream.Send(req)
+ if sendErr != nil {
+ obj, err = drainInboundStream(s.stream)
+ s.stream = nil
+ if err == io.EOF {
+ // This is unexpected - we got an error on Send(), but not on Recv().
+ // Bubble up the sendErr.
+ err = sendErr
+ }
+ return
+ }
+
+ if finishWrite {
+ s.stream.CloseSend()
+ obj, err = drainInboundStream(s.stream)
+ s.stream = nil
+ if err == io.EOF {
+ err = nil
+ if obj.GetSize() > s.flushOffset {
+ s.progress(obj.GetSize())
+ }
+ }
+ return
+ }
+
+ if flush {
+ resp, err := s.stream.Recv()
+ if err != nil {
+ return nil, err
+ }
+ persistedOffset := resp.GetPersistedSize()
+ if persistedOffset > s.flushOffset {
+ s.flushOffset = persistedOffset
+ s.progress(s.flushOffset)
+ }
+ }
+ return
+}
+
+// uploadBuffer uploads the buffer at the given offset using a bi-directional
+// Write stream. It will open a new stream if necessary (on the first call or
+// after resuming from failure) and chunk the buffer per maxPerMessageWriteSize.
+// The final Object is returned on success if doneReading is true.
+//
+// Returns object and any error that is not retriable.
+func (w *gRPCWriter) uploadBuffer(ctx context.Context, recvd int, start int64, doneReading bool) (obj *storagepb.Object, err error) {
+ if w.streamSender == nil {
+ if w.append {
+ // Appendable object semantics
+ w.streamSender, err = w.newGRPCAppendableObjectBufferSender()
+ } else if doneReading || w.forceOneShot {
+ // One shot semantics
+ w.streamSender, err = w.newGRPCOneshotBidiWriteBufferSender()
+ } else {
+ // Resumable write semantics
+ w.streamSender, err = w.newGRPCResumableBidiWriteBufferSender(ctx)
+ }
+ if err != nil {
+ return
+ }
+ }
+
+ data := w.buf[:recvd]
+ offset := start
+ // We want to go through this loop at least once, in case we have to
+ // finishWrite with an empty buffer.
+ for {
+ // Send as much as we can fit into a single gRPC message. Only flush once,
+ // when sending the very last message.
+ l := maxPerMessageWriteSize
+ flush := false
+ if len(data) <= l {
+ l = len(data)
+ flush = true
+ }
+ obj, err = w.streamSender.sendBuffer(ctx, data[:l], offset, flush, flush && doneReading)
+ if err != nil {
+ return nil, err
+ }
+ data = data[l:]
+ offset += int64(l)
+ if len(data) == 0 {
+ // Update object size to match persisted offset.
+ if obj != nil {
+ obj.Size = offset
+ }
+ break
+ }
+ }
+ return
+}
+
+// read copies the data in the reader to the given buffer and reports how much
+// data was read into the buffer and if there is no more data to read (EOF).
+// read returns when either 1. the buffer is full, 2. Writer.Flush was called,
+// or 3. Writer.Close was called.
+func (w *gRPCWriter) read() (int, bool, error) {
+ // Set n to -1 to start the Read loop.
+ var n, recvd int = -1, 0
+ var err error
+ for err == nil && n != 0 {
+ // The routine blocks here until data is received.
+ n, err = w.reader.Read(w.buf[recvd:])
+ recvd += n
+ }
+ var done bool
+ if err == io.EOF {
+ err = nil
+ // EOF can come from Writer.Flush or Writer.Close.
+ if w.flushInProgress {
+ // Reset pipe for additional writes after the flush.
+ pr, pw := io.Pipe()
+ w.reader = pr
+ w.pw = pw
+ w.setPipeWriter(pw)
+ } else {
+ done = true
+ }
+ }
+ return recvd, done, err
+}
+
+// flush flushes the current buffer regardless of whether it is full or not.
+// It's the implementation for Writer.Flush.
+func (w *gRPCWriter) flush() (int64, error) {
+ if !w.append {
+ return 0, errors.New("Flush is supported only if Writer.Append is set to true")
+ }
+
+ // Close PipeWriter to trigger EOF on read side of the stream.
+ w.flushInProgress = true
+ w.pw.Close()
+
+ // Wait for flush to complete
+ result := <-w.flushComplete
+ return result.offset, result.err
+}
+
+func checkCanceled(err error) error {
+ if status.Code(err) == codes.Canceled {
+ return context.Canceled
+ }
+
+ return err
+}
type gRPCAppendBidiWriteBufferSender struct {
bucket string
@@ -60,7 +689,7 @@ func (w *gRPCWriter) newGRPCAppendableObjectBufferSender() (*gRPCAppendBidiWrite
s := &gRPCAppendBidiWriteBufferSender{
bucket: w.spec.GetResource().GetBucket(),
raw: w.c.raw,
- settings: w.c.settings,
+ settings: w.settings,
firstMessage: &storagepb.BidiWriteObjectRequest{
FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{
WriteObjectSpec: w.spec,
@@ -82,7 +711,7 @@ func (w *gRPCWriter) newGRPCAppendTakeoverWriteBufferSender(ctx context.Context)
s := &gRPCAppendBidiWriteBufferSender{
bucket: w.spec.GetResource().GetBucket(),
raw: w.c.raw,
- settings: w.c.settings,
+ settings: w.settings,
firstMessage: &storagepb.BidiWriteObjectRequest{
FirstMessage: &storagepb.BidiWriteObjectRequest_AppendObjectSpec{
AppendObjectSpec: w.appendSpec,
@@ -101,6 +730,11 @@ func (w *gRPCWriter) newGRPCAppendTakeoverWriteBufferSender(ctx context.Context)
return nil, err
}
firstResp := <-s.recvs
+ // Check recvErr after getting the response.
+ if s.recvErr != nil {
+ return nil, s.recvErr
+ }
+
// Object resource is returned in the first response on takeover, so capture
// this now.
s.objResource = firstResp.GetResource()
@@ -126,6 +760,10 @@ func (s *gRPCAppendBidiWriteBufferSender) connect(ctx context.Context) (err erro
if s.firstMessage.GetAppendObjectSpec().GetGeneration() != 0 {
return nil
}
+ // Also always ok to reconnect if we've seen a redirect token
+ if s.routingToken != nil {
+ return nil
+ }
// We can also reconnect if the first message has an if_generation_match or
// if_metageneration_match condition. Note that negative conditions like
@@ -208,7 +846,7 @@ func (s *gRPCAppendBidiWriteBufferSender) maybeUpdateFirstMessage(resp *storagep
type bidiWriteObjectRedirectionError struct{}
func (e bidiWriteObjectRedirectionError) Error() string {
- return "BidiWriteObjectRedirectedError"
+ return ""
}
func (s *gRPCAppendBidiWriteBufferSender) handleRedirectionError(e *storagepb.BidiWriteObjectRedirectedError) bool {
@@ -253,10 +891,10 @@ func (s *gRPCAppendBidiWriteBufferSender) receiveMessages(resps chan<- *storagep
if st, ok := status.FromError(err); ok && st.Code() == codes.Aborted {
for _, d := range st.Details() {
if e, ok := d.(*storagepb.BidiWriteObjectRedirectedError); ok {
- // If we can handle this error, replace it with the sentinel. Otherwise,
- // report it to the user.
+ // If we can handle this error, wrap it with the sentinel so it gets
+ // retried.
if ok := s.handleRedirectionError(e); ok {
- err = bidiWriteObjectRedirectionError{}
+ err = fmt.Errorf("%w%w", bidiWriteObjectRedirectionError{}, err)
}
}
}
@@ -374,12 +1012,6 @@ func (s *gRPCAppendBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []
err = s.recvErr
}
s.stream = nil
-
- // Retry transparently on a redirection error
- if _, ok := err.(bidiWriteObjectRedirectionError); ok {
- s.forceFirstMessage = true
- continue
- }
return
}
}
diff --git a/vendor/cloud.google.com/go/storage/internal/version.go b/vendor/cloud.google.com/go/storage/internal/version.go
index 7651272b2f..215f04cde0 100644
--- a/vendor/cloud.google.com/go/storage/internal/version.go
+++ b/vendor/cloud.google.com/go/storage/internal/version.go
@@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
-const Version = "1.52.0"
+const Version = "1.53.0"
diff --git a/vendor/cloud.google.com/go/storage/invoke.go b/vendor/cloud.google.com/go/storage/invoke.go
index 34b676c5fa..609d012230 100644
--- a/vendor/cloud.google.com/go/storage/invoke.go
+++ b/vendor/cloud.google.com/go/storage/invoke.go
@@ -53,6 +53,13 @@ var (
})
)
+func (r *retryConfig) runShouldRetry(err error) bool {
+ if r == nil || r.shouldRetry == nil {
+ return ShouldRetry(err)
+ }
+ return r.shouldRetry(err)
+}
+
// run determines whether a retry is necessary based on the config and
// idempotency information. It then calls the function with or without retries
// as appropriate, using the configured settings.
@@ -73,10 +80,6 @@ func run(ctx context.Context, call func(ctx context.Context) error, retry *retry
bo.Initial = retry.backoff.Initial
bo.Max = retry.backoff.Max
}
- var errorFunc func(err error) bool = ShouldRetry
- if retry.shouldRetry != nil {
- errorFunc = retry.shouldRetry
- }
var quitAfterTimer *time.Timer
if retry.maxRetryDuration != 0 {
@@ -103,7 +106,7 @@ func run(ctx context.Context, call func(ctx context.Context) error, retry *retry
return true, fmt.Errorf("storage: retry failed after %v attempts; last error: %w", *retry.maxAttempts, lastErr)
}
attempts++
- retryable := errorFunc(lastErr)
+ retryable := retry.runShouldRetry(lastErr)
// Explicitly check context cancellation so that we can distinguish between a
// DEADLINE_EXCEEDED error from the server and a user-set context deadline.
// Unfortunately gRPC will codes.DeadlineExceeded (which may be retryable if it's
diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go
index c3109f8b11..e1a8b9b674 100644
--- a/vendor/cloud.google.com/go/storage/reader.go
+++ b/vendor/cloud.google.com/go/storage/reader.go
@@ -161,7 +161,8 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
// Must be called on a gRPC client created using [NewGRPCClient].
//
// This uses the gRPC-specific bi-directional read API, which is in private
-// preview; please contact your account manager if interested.
+// preview; please contact your account manager if interested. The option
+// [experimental.WithGRPCBidiReads] must be selected in order to use this API.
func (o *ObjectHandle) NewMultiRangeDownloader(ctx context.Context) (mrd *MultiRangeDownloader, err error) {
// This span covers the life of the reader. It is closed via the context
// in Reader.Close.
diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go
index 18f461802c..a820666a48 100644
--- a/vendor/cloud.google.com/go/storage/storage.go
+++ b/vendor/cloud.google.com/go/storage/storage.go
@@ -1267,7 +1267,7 @@ func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer {
// This feature is in preview and is not yet available for general use.
func (o *ObjectHandle) NewWriterFromAppendableObject(ctx context.Context, opts *AppendableWriterOpts) (*Writer, int64, error) {
ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Writer")
- if o.gen == 0 {
+ if o.gen < 0 {
return nil, 0, errors.New("storage: ObjectHandle.Generation must be set to use NewWriterFromAppendableObject")
}
w := &Writer{
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
index bd9667d99f..926ed3882c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
@@ -1,5 +1,12 @@
# Release History
+## 1.18.0 (2025-04-03)
+
+### Features Added
+
+* Added `AccessToken.RefreshOn` and updated `BearerTokenPolicy` to consider nonzero values of it when deciding whether to request a new token
+
+
## 1.17.1 (2025-03-20)
### Other Changes
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go
index f2b296b6dc..460170034a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go
@@ -47,8 +47,13 @@ func HasStatusCode(resp *http.Response, statusCodes ...int) bool {
// AccessToken represents an Azure service bearer access token with expiry information.
// Exported as azcore.AccessToken.
type AccessToken struct {
- Token string
+ // Token is the access token
+ Token string
+ // ExpiresOn indicates when the token expires
ExpiresOn time.Time
+ // RefreshOn is a suggested time to refresh the token.
+ // Clients should ignore this value when it's zero.
+ RefreshOn time.Time
}
// TokenRequestOptions contain specific parameter that may be used by credentials types when attempting to get a token.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
index c8929e5969..85514db3b8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
@@ -40,5 +40,5 @@ const (
Module = "azcore"
// Version is the semantic version (see http://semver.org) of this module.
- Version = "v1.17.1"
+ Version = "v1.18.0"
)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go
index b26db920b0..1950a2e5b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go
@@ -51,6 +51,15 @@ func acquire(state acquiringResourceState) (newResource exported.AccessToken, ne
return tk, tk.ExpiresOn, nil
}
+// shouldRefresh determines whether the token should be refreshed. It's a variable so tests can replace it.
+var shouldRefresh = func(tk exported.AccessToken, _ acquiringResourceState) bool {
+ if tk.RefreshOn.IsZero() {
+ return tk.ExpiresOn.Add(-5 * time.Minute).Before(time.Now())
+ }
+ // no offset in this case because the authority suggested a refresh window--between RefreshOn and ExpiresOn
+ return tk.RefreshOn.Before(time.Now())
+}
+
// NewBearerTokenPolicy creates a policy object that authorizes requests with bearer tokens.
// cred: an azcore.TokenCredential implementation such as a credential object from azidentity
// scopes: the list of permission scopes required for the token.
@@ -69,11 +78,14 @@ func NewBearerTokenPolicy(cred exported.TokenCredential, scopes []string, opts *
return authNZ(policy.TokenRequestOptions{Scopes: scopes})
}
}
+ mr := temporal.NewResourceWithOptions(acquire, temporal.ResourceOptions[exported.AccessToken, acquiringResourceState]{
+ ShouldRefresh: shouldRefresh,
+ })
return &BearerTokenPolicy{
authzHandler: ah,
cred: cred,
scopes: scopes,
- mainResource: temporal.NewResource(acquire),
+ mainResource: mr,
allowHTTP: opts.InsecureAllowCredentialWithHTTP,
}
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
index 11c64eb294..84e7941e4f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
@@ -1,5 +1,29 @@
# Release History
+## 1.10.1 (2025-06-10)
+
+### Bugs Fixed
+- `AzureCLICredential` and `AzureDeveloperCLICredential` could wait indefinitely for subprocess output
+
+## 1.10.0 (2025-05-14)
+
+### Features Added
+- `DefaultAzureCredential` reads environment variable `AZURE_TOKEN_CREDENTIALS` to enable a subset of its credentials:
+ - `dev` selects `AzureCLICredential` and `AzureDeveloperCLICredential`
+ - `prod` selects `EnvironmentCredential`, `WorkloadIdentityCredential` and `ManagedIdentityCredential`
+
+## 1.9.0 (2025-04-08)
+
+### Features Added
+* `GetToken()` sets `AccessToken.RefreshOn` when the token provider specifies a value
+
+### Other Changes
+* `NewManagedIdentityCredential` logs the configured user-assigned identity, if any
+* Deprecated `UsernamePasswordCredential` because it can't support multifactor
+ authentication (MFA), which Microsoft Entra ID requires for most tenants. See
+ https://aka.ms/azsdk/identity/mfa for migration guidance.
+* Updated dependencies
+
## 1.8.2 (2025-02-12)
### Other Changes
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
index 5cc64c08f2..069bc688d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
@@ -21,7 +21,7 @@ go get -u github.com/Azure/azure-sdk-for-go/sdk/azidentity
## Prerequisites
- an [Azure subscription](https://azure.microsoft.com/free/)
-- Go 1.18
+- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go
### Authenticating during local development
@@ -146,7 +146,6 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|-|-
|[InteractiveBrowserCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#InteractiveBrowserCredential)|Interactively authenticate a user with the default web browser
|[DeviceCodeCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#DeviceCodeCredential)|Interactively authenticate a user on a device with limited UI
-|[UsernamePasswordCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#UsernamePasswordCredential)|Authenticate a user with a username and password
### Authenticating via Development Tools
@@ -159,7 +158,7 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
`DefaultAzureCredential` and `EnvironmentCredential` can be configured with environment variables. Each type of authentication requires values for specific variables:
-#### Service principal with secret
+### Service principal with secret
|variable name|value
|-|-
@@ -167,7 +166,7 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant
|`AZURE_CLIENT_SECRET`|one of the application's client secrets
-#### Service principal with certificate
+### Service principal with certificate
|variable name|value
|-|-
@@ -176,16 +175,7 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|`AZURE_CLIENT_CERTIFICATE_PATH`|path to a certificate file including private key
|`AZURE_CLIENT_CERTIFICATE_PASSWORD`|password of the certificate file, if any
-#### Username and password
-
-|variable name|value
-|-|-
-|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
-|`AZURE_USERNAME`|a username (usually an email address)
-|`AZURE_PASSWORD`|that user's password
-
-Configuration is attempted in the above order. For example, if values for a
-client secret and certificate are both present, the client secret will be used.
+Configuration is attempted in the above order. For example, if values for a client secret and certificate are both present, the client secret will be used.
## Token caching
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
index 8fc7c64aa3..da2094e36b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
@@ -22,11 +22,11 @@ Some credential types support opt-in persistent token caching (see [the below ta
Persistent caches are encrypted at rest using a mechanism that depends on the operating system:
-| Operating system | Encryption facility |
-| ---------------- | ---------------------------------------------- |
-| Linux | kernel key retention service (keyctl) |
-| macOS | Keychain (requires cgo and native build tools) |
-| Windows | Data Protection API (DPAPI) |
+| Operating system | Encryption facility | Limitations |
+| ---------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| Linux | kernel key retention service (keyctl) | Cache data is lost on system shutdown because kernel keys are stored in memory. Depending on kernel compile options, data may also be lost on logout, or storage may be impossible because the key retention service isn't available. |
+| macOS | Keychain | Building requires cgo and native build tools. Keychain access requires a graphical session, so persistent caching isn't possible in a headless environment such as an SSH session (macOS as host). |
+| Windows | Data Protection API (DPAPI) | No specific limitations. |
Persistent caching requires encryption. When the required encryption facility is unuseable, or the application is running on an unsupported OS, the persistent cache constructor returns an error. This doesn't mean that authentication is impossible, only that credentials can't persist authentication data and the application will need to reauthenticate the next time it runs. See the package documentation for examples showing how to configure persistent caching and access cached data for [users][user_example] and [service principals][sp_example].
@@ -50,7 +50,6 @@ The following table indicates the state of in-memory and persistent caching in e
| `InteractiveBrowserCredential` | Supported | Supported |
| `ManagedIdentityCredential` | Supported | Not Supported |
| `OnBehalfOfCredential` | Supported | Not Supported |
-| `UsernamePasswordCredential` | Supported | Supported |
| `WorkloadIdentityCredential` | Supported | Supported |
[sp_example]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#example-package-PersistentServicePrincipalAuthentication
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
index 9c4b1cd71c..91f4f05cc0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
@@ -20,7 +20,6 @@ This troubleshooting guide covers failure investigation techniques, common error
- [Azure App Service and Azure Functions managed identity](#azure-app-service-and-azure-functions-managed-identity)
- [Azure Kubernetes Service managed identity](#azure-kubernetes-service-managed-identity)
- [Azure Virtual Machine managed identity](#azure-virtual-machine-managed-identity)
-- [Troubleshoot UsernamePasswordCredential authentication issues](#troubleshoot-usernamepasswordcredential-authentication-issues)
- [Troubleshoot WorkloadIdentityCredential authentication issues](#troubleshoot-workloadidentitycredential-authentication-issues)
- [Get additional help](#get-additional-help)
@@ -111,13 +110,6 @@ azlog.SetEvents(azidentity.EventAuthentication)
|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the application registration as described in [Microsoft Entra ID documentation](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal#option-1-upload-a-certificate).|
|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the client and tenant IDs provided to the credential constructor are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the [Microsoft Entra ID instructions](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal).|
-
-## Troubleshoot UsernamePasswordCredential authentication issues
-
-| Error Code | Issue | Mitigation |
-|---|---|---|
-|AADSTS50126|The provided username or password is invalid.|Ensure the username and password provided to the credential constructor are valid.|
-
## Troubleshoot ManagedIdentityCredential authentication issues
@@ -181,6 +173,7 @@ curl "$IDENTITY_ENDPOINT?resource=https://management.core.windows.net&api-versio
|---|---|---|
|Azure CLI not found on path|The Azure CLI isn’t installed or isn't on the application's path.|
- Ensure the Azure CLI is installed as described in [Azure CLI documentation](https://learn.microsoft.com/cli/azure/install-azure-cli).
- Validate the installation location is in the application's `PATH` environment variable.
|
|Please run 'az login' to set up account|No account is currently logged into the Azure CLI, or the login has expired.|- Run `az login` to log into the Azure CLI. More information about Azure CLI authentication is available in the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli).
- Verify that the Azure CLI can obtain tokens. See [below](#verify-the-azure-cli-can-obtain-tokens) for instructions.
|
+|Subscription "[your subscription]" contains invalid characters. If this is the name of a subscription, use its ID instead|The subscription name contains a character that may not be safe in a command line.|Use the subscription's ID instead of its name. You can get this from the Azure CLI: `az account show --name "[your subscription]" --query "id"`
#### Verify the Azure CLI can obtain tokens
@@ -226,7 +219,7 @@ azd auth token --output json --scope https://management.core.windows.net/.defaul
| Error Message |Description| Mitigation |
|---|---|---|
-|no client ID/tenant ID/token file specified|Incomplete configuration|In most cases these values are provided via environment variables set by Azure Workload Identity.- If your application runs on Azure Kubernetes Servide (AKS) or a cluster that has deployed the Azure Workload Identity admission webhook, check pod labels and service account configuration. See the [AKS documentation](https://learn.microsoft.com/azure/aks/workload-identity-deploy-cluster#disable-workload-identity) and [Azure Workload Identity troubleshooting guide](https://azure.github.io/azure-workload-identity/docs/troubleshooting.html) for more details.
- If your application isn't running on AKS or your cluster hasn't deployed the Workload Identity admission webhook, set these values in `WorkloadIdentityCredentialOptions`
+|no client ID/tenant ID/token file specified|Incomplete configuration|In most cases these values are provided via environment variables set by Azure Workload Identity.
- If your application runs on Azure Kubernetes Service (AKS) or a cluster that has deployed the Azure Workload Identity admission webhook, check pod labels and service account configuration. See the [AKS documentation](https://learn.microsoft.com/azure/aks/workload-identity-deploy-cluster#disable-workload-identity) and [Azure Workload Identity troubleshooting guide](https://azure.github.io/azure-workload-identity/docs/troubleshooting.html) for more details.
- If your application isn't running on AKS or your cluster hasn't deployed the Workload Identity admission webhook, set these values in `WorkloadIdentityCredentialOptions`
## Troubleshoot AzurePipelinesCredential authentication issues
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
index 045f87acd5..4118f99ef2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/azidentity",
- "Tag": "go/azidentity_c55452bbf6"
+ "Tag": "go/azidentity_191110b0dd"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
index 40a94154c6..bd196ddd32 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal"
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity"
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/public"
)
@@ -208,6 +209,10 @@ type msalConfidentialClient interface {
AcquireTokenOnBehalfOf(ctx context.Context, userAssertion string, scopes []string, options ...confidential.AcquireOnBehalfOfOption) (confidential.AuthResult, error)
}
+type msalManagedIdentityClient interface {
+ AcquireToken(context.Context, string, ...managedidentity.AcquireTokenOption) (managedidentity.AuthResult, error)
+}
+
// enables fakes for test scenarios
type msalPublicClient interface {
AcquireTokenSilent(ctx context.Context, scopes []string, options ...public.AcquireSilentOption) (public.AuthResult, error)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
index 36e359a099..0fd03f4563 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
@@ -148,8 +148,14 @@ var defaultAzTokenProvider azTokenProvider = func(ctx context.Context, scopes []
cliCmd.Env = os.Environ()
var stderr bytes.Buffer
cliCmd.Stderr = &stderr
+ cliCmd.WaitDelay = 100 * time.Millisecond
- output, err := cliCmd.Output()
+ stdout, err := cliCmd.Output()
+ if errors.Is(err, exec.ErrWaitDelay) && len(stdout) > 0 {
+ // The child process wrote to stdout and exited without closing it.
+ // Swallow this error and return stdout because it may contain a token.
+ return stdout, nil
+ }
if err != nil {
msg := stderr.String()
var exErr *exec.ExitError
@@ -162,7 +168,7 @@ var defaultAzTokenProvider azTokenProvider = func(ctx context.Context, scopes []
return nil, newCredentialUnavailableError(credNameAzureCLI, msg)
}
- return output, nil
+ return stdout, nil
}
func (c *AzureCLICredential) createAccessToken(tk []byte) (azcore.AccessToken, error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_developer_cli_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_developer_cli_credential.go
index 46d0b55192..1bd3720b64 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_developer_cli_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_developer_cli_credential.go
@@ -130,7 +130,14 @@ var defaultAzdTokenProvider azdTokenProvider = func(ctx context.Context, scopes
cliCmd.Env = os.Environ()
var stderr bytes.Buffer
cliCmd.Stderr = &stderr
- output, err := cliCmd.Output()
+ cliCmd.WaitDelay = 100 * time.Millisecond
+
+ stdout, err := cliCmd.Output()
+ if errors.Is(err, exec.ErrWaitDelay) && len(stdout) > 0 {
+ // The child process wrote to stdout and exited without closing it.
+ // Swallow this error and return stdout because it may contain a token.
+ return stdout, nil
+ }
if err != nil {
msg := stderr.String()
var exErr *exec.ExitError
@@ -144,7 +151,7 @@ var defaultAzdTokenProvider azdTokenProvider = func(ctx context.Context, scopes
}
return nil, newCredentialUnavailableError(credNameAzureDeveloperCLI, msg)
}
- return output, nil
+ return stdout, nil
}
func (c *AzureDeveloperCLICredential) createAccessToken(tk []byte) (azcore.AccessToken, error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
index 92f508094d..58c4b585c1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
@@ -118,7 +118,7 @@ func (c *confidentialClient) GetToken(ctx context.Context, tro policy.TokenReque
msg := fmt.Sprintf(scopeLogFmt, c.name, strings.Join(ar.GrantedScopes, ", "))
log.Write(EventAuthentication, msg)
}
- return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC()}, err
+ return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC(), RefreshOn: ar.Metadata.RefreshOn.UTC()}, err
}
func (c *confidentialClient) client(tro policy.TokenRequestOptions) (msalConfidentialClient, *sync.Mutex, error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
index 14af271f6a..f2a31ee6ac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
@@ -8,6 +8,7 @@ package azidentity
import (
"context"
+ "fmt"
"os"
"strings"
@@ -16,6 +17,8 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
)
+const azureTokenCredentials = "AZURE_TOKEN_CREDENTIALS"
+
// DefaultAzureCredentialOptions contains optional parameters for DefaultAzureCredential.
// These options may not apply to all credentials in the chain.
type DefaultAzureCredentialOptions struct {
@@ -36,7 +39,7 @@ type DefaultAzureCredentialOptions struct {
// the application responsible for ensuring the configured authority is valid and trustworthy.
DisableInstanceDiscovery bool
- // TenantID sets the default tenant for authentication via the Azure CLI and workload identity.
+ // TenantID sets the default tenant for authentication via the Azure CLI, Azure Developer CLI, and workload identity.
TenantID string
}
@@ -67,8 +70,22 @@ type DefaultAzureCredential struct {
// NewDefaultAzureCredential creates a DefaultAzureCredential. Pass nil for options to accept defaults.
func NewDefaultAzureCredential(options *DefaultAzureCredentialOptions) (*DefaultAzureCredential, error) {
- var creds []azcore.TokenCredential
- var errorMessages []string
+ var (
+ creds []azcore.TokenCredential
+ errorMessages []string
+ includeDev, includeProd = true, true
+ )
+
+ if c, ok := os.LookupEnv(azureTokenCredentials); ok {
+ switch c {
+ case "dev":
+ includeProd = false
+ case "prod":
+ includeDev = false
+ default:
+ return nil, fmt.Errorf(`invalid %s value %q. Valid values are "dev" and "prod"`, azureTokenCredentials, c)
+ }
+ }
if options == nil {
options = &DefaultAzureCredentialOptions{}
@@ -80,60 +97,63 @@ func NewDefaultAzureCredential(options *DefaultAzureCredentialOptions) (*Default
}
}
- envCred, err := NewEnvironmentCredential(&EnvironmentCredentialOptions{
- ClientOptions: options.ClientOptions,
- DisableInstanceDiscovery: options.DisableInstanceDiscovery,
- additionallyAllowedTenants: additionalTenants,
- })
- if err == nil {
- creds = append(creds, envCred)
- } else {
- errorMessages = append(errorMessages, "EnvironmentCredential: "+err.Error())
- creds = append(creds, &defaultCredentialErrorReporter{credType: "EnvironmentCredential", err: err})
- }
-
- wic, err := NewWorkloadIdentityCredential(&WorkloadIdentityCredentialOptions{
- AdditionallyAllowedTenants: additionalTenants,
- ClientOptions: options.ClientOptions,
- DisableInstanceDiscovery: options.DisableInstanceDiscovery,
- TenantID: options.TenantID,
- })
- if err == nil {
- creds = append(creds, wic)
- } else {
- errorMessages = append(errorMessages, credNameWorkloadIdentity+": "+err.Error())
- creds = append(creds, &defaultCredentialErrorReporter{credType: credNameWorkloadIdentity, err: err})
- }
+ if includeProd {
+ envCred, err := NewEnvironmentCredential(&EnvironmentCredentialOptions{
+ ClientOptions: options.ClientOptions,
+ DisableInstanceDiscovery: options.DisableInstanceDiscovery,
+ additionallyAllowedTenants: additionalTenants,
+ })
+ if err == nil {
+ creds = append(creds, envCred)
+ } else {
+ errorMessages = append(errorMessages, "EnvironmentCredential: "+err.Error())
+ creds = append(creds, &defaultCredentialErrorReporter{credType: "EnvironmentCredential", err: err})
+ }
- o := &ManagedIdentityCredentialOptions{ClientOptions: options.ClientOptions, dac: true}
- if ID, ok := os.LookupEnv(azureClientID); ok {
- o.ID = ClientID(ID)
- }
- miCred, err := NewManagedIdentityCredential(o)
- if err == nil {
- creds = append(creds, miCred)
- } else {
- errorMessages = append(errorMessages, credNameManagedIdentity+": "+err.Error())
- creds = append(creds, &defaultCredentialErrorReporter{credType: credNameManagedIdentity, err: err})
- }
+ wic, err := NewWorkloadIdentityCredential(&WorkloadIdentityCredentialOptions{
+ AdditionallyAllowedTenants: additionalTenants,
+ ClientOptions: options.ClientOptions,
+ DisableInstanceDiscovery: options.DisableInstanceDiscovery,
+ TenantID: options.TenantID,
+ })
+ if err == nil {
+ creds = append(creds, wic)
+ } else {
+ errorMessages = append(errorMessages, credNameWorkloadIdentity+": "+err.Error())
+ creds = append(creds, &defaultCredentialErrorReporter{credType: credNameWorkloadIdentity, err: err})
+ }
- cliCred, err := NewAzureCLICredential(&AzureCLICredentialOptions{AdditionallyAllowedTenants: additionalTenants, TenantID: options.TenantID})
- if err == nil {
- creds = append(creds, cliCred)
- } else {
- errorMessages = append(errorMessages, credNameAzureCLI+": "+err.Error())
- creds = append(creds, &defaultCredentialErrorReporter{credType: credNameAzureCLI, err: err})
+ o := &ManagedIdentityCredentialOptions{ClientOptions: options.ClientOptions, dac: true}
+ if ID, ok := os.LookupEnv(azureClientID); ok {
+ o.ID = ClientID(ID)
+ }
+ miCred, err := NewManagedIdentityCredential(o)
+ if err == nil {
+ creds = append(creds, miCred)
+ } else {
+ errorMessages = append(errorMessages, credNameManagedIdentity+": "+err.Error())
+ creds = append(creds, &defaultCredentialErrorReporter{credType: credNameManagedIdentity, err: err})
+ }
}
+ if includeDev {
+ azCred, err := NewAzureCLICredential(&AzureCLICredentialOptions{AdditionallyAllowedTenants: additionalTenants, TenantID: options.TenantID})
+ if err == nil {
+ creds = append(creds, azCred)
+ } else {
+ errorMessages = append(errorMessages, credNameAzureCLI+": "+err.Error())
+ creds = append(creds, &defaultCredentialErrorReporter{credType: credNameAzureCLI, err: err})
+ }
- azdCred, err := NewAzureDeveloperCLICredential(&AzureDeveloperCLICredentialOptions{
- AdditionallyAllowedTenants: additionalTenants,
- TenantID: options.TenantID,
- })
- if err == nil {
- creds = append(creds, azdCred)
- } else {
- errorMessages = append(errorMessages, credNameAzureDeveloperCLI+": "+err.Error())
- creds = append(creds, &defaultCredentialErrorReporter{credType: credNameAzureDeveloperCLI, err: err})
+ azdCred, err := NewAzureDeveloperCLICredential(&AzureDeveloperCLICredentialOptions{
+ AdditionallyAllowedTenants: additionalTenants,
+ TenantID: options.TenantID,
+ })
+ if err == nil {
+ creds = append(creds, azdCred)
+ } else {
+ errorMessages = append(errorMessages, credNameAzureDeveloperCLI+": "+err.Error())
+ creds = append(creds, &defaultCredentialErrorReporter{credType: credNameAzureDeveloperCLI, err: err})
+ }
}
if len(errorMessages) > 0 {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/environment_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/environment_credential.go
index b30f5474f5..9b5e17dcde 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/environment_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/environment_credential.go
@@ -60,21 +60,13 @@ type EnvironmentCredentialOptions struct {
// Note that this credential uses [ParseCertificates] to load the certificate and key from the file. If this
// function isn't able to parse your certificate, use [ClientCertificateCredential] instead.
//
-// # User with username and password
-//
-// AZURE_TENANT_ID: (optional) tenant to authenticate in. Defaults to "organizations".
-//
-// AZURE_CLIENT_ID: client ID of the application the user will authenticate to
-//
-// AZURE_USERNAME: a username (usually an email address)
-//
-// AZURE_PASSWORD: the user's password
-//
// # Configuration for multitenant applications
//
// To enable multitenant authentication, set AZURE_ADDITIONALLY_ALLOWED_TENANTS with a semicolon delimited list of tenants
// the credential may request tokens from in addition to the tenant specified by AZURE_TENANT_ID. Set
// AZURE_ADDITIONALLY_ALLOWED_TENANTS to "*" to enable the credential to request a token from any tenant.
+//
+// [Entra ID documentation]: https://aka.ms/azsdk/identity/mfa
type EnvironmentCredential struct {
cred azcore.TokenCredential
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
index b05cb035a8..a6d7c6cbc7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
@@ -103,8 +103,6 @@ func (e *AuthenticationFailedError) Error() string {
anchor = "client-secret"
case credNameManagedIdentity:
anchor = "managed-id"
- case credNameUserPassword:
- anchor = "username-password"
case credNameWorkloadIdentity:
anchor = "workload"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work
index 04ea962b42..6dd5b3d64d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work
@@ -1,4 +1,4 @@
-go 1.18
+go 1.23.0
use (
.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed-identity-matrix.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed-identity-matrix.json
index 1c3791777a..edd56f9d57 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed-identity-matrix.json
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed-identity-matrix.json
@@ -9,7 +9,7 @@
}
},
"GoVersion": [
- "1.22.1"
+ "env:GO_VERSION_PREVIOUS"
],
"IDENTITY_IMDS_AVAILABLE": "1"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
index cc07fd7015..b3a0f85883 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
@@ -8,24 +8,18 @@ package azidentity
import (
"context"
- "encoding/json"
"errors"
"fmt"
"net/http"
- "net/url"
- "os"
- "path/filepath"
- "runtime"
- "strconv"
"strings"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
azruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming"
"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
- "github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
+ msalerrors "github.com/AzureAD/microsoft-authentication-library-for-go/apps/errors"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity"
)
const (
@@ -41,59 +35,20 @@ const (
msiResID = "msi_res_id"
msiSecret = "MSI_SECRET"
imdsAPIVersion = "2018-02-01"
- azureArcAPIVersion = "2019-08-15"
+ azureArcAPIVersion = "2020-06-01"
qpClientID = "client_id"
serviceFabricAPIVersion = "2019-07-01-preview"
)
var imdsProbeTimeout = time.Second
-type msiType int
-
-const (
- msiTypeAppService msiType = iota
- msiTypeAzureArc
- msiTypeAzureML
- msiTypeCloudShell
- msiTypeIMDS
- msiTypeServiceFabric
-)
-
type managedIdentityClient struct {
- azClient *azcore.Client
- endpoint string
- id ManagedIDKind
- msiType msiType
- probeIMDS bool
+ azClient *azcore.Client
+ imds, probeIMDS, userAssigned bool
// chained indicates whether the client is part of a credential chain. If true, the client will return
// a credentialUnavailableError instead of an AuthenticationFailedError for an unexpected IMDS response.
- chained bool
-}
-
-// arcKeyDirectory returns the directory expected to contain Azure Arc keys
-var arcKeyDirectory = func() (string, error) {
- switch runtime.GOOS {
- case "linux":
- return "/var/opt/azcmagent/tokens", nil
- case "windows":
- pd := os.Getenv("ProgramData")
- if pd == "" {
- return "", errors.New("environment variable ProgramData has no value")
- }
- return filepath.Join(pd, "AzureConnectedMachineAgent", "Tokens"), nil
- default:
- return "", fmt.Errorf("unsupported OS %q", runtime.GOOS)
- }
-}
-
-type wrappedNumber json.Number
-
-func (n *wrappedNumber) UnmarshalJSON(b []byte) error {
- c := string(b)
- if c == "\"\"" {
- return nil
- }
- return json.Unmarshal(b, (*json.Number)(n))
+ chained bool
+ msalClient msalManagedIdentityClient
}
// setIMDSRetryOptionDefaults sets zero-valued fields to default values appropriate for IMDS
@@ -141,51 +96,20 @@ func newManagedIdentityClient(options *ManagedIdentityCredentialOptions) (*manag
options = &ManagedIdentityCredentialOptions{}
}
cp := options.ClientOptions
- c := managedIdentityClient{id: options.ID, endpoint: imdsEndpoint, msiType: msiTypeIMDS}
- env := "IMDS"
- if endpoint, ok := os.LookupEnv(identityEndpoint); ok {
- if _, ok := os.LookupEnv(identityHeader); ok {
- if _, ok := os.LookupEnv(identityServerThumbprint); ok {
- if options.ID != nil {
- return nil, errors.New("the Service Fabric API doesn't support specifying a user-assigned identity at runtime. The identity is determined by cluster resource configuration. See https://aka.ms/servicefabricmi")
- }
- env = "Service Fabric"
- c.endpoint = endpoint
- c.msiType = msiTypeServiceFabric
- } else {
- env = "App Service"
- c.endpoint = endpoint
- c.msiType = msiTypeAppService
- }
- } else if _, ok := os.LookupEnv(arcIMDSEndpoint); ok {
- if options.ID != nil {
- return nil, errors.New("the Azure Arc API doesn't support specifying a user-assigned managed identity at runtime")
- }
- env = "Azure Arc"
- c.endpoint = endpoint
- c.msiType = msiTypeAzureArc
- }
- } else if endpoint, ok := os.LookupEnv(msiEndpoint); ok {
- c.endpoint = endpoint
- if _, ok := os.LookupEnv(msiSecret); ok {
- if options.ID != nil && options.ID.idKind() != miClientID {
- return nil, errors.New("the Azure ML API supports specifying a user-assigned managed identity by client ID only")
- }
- env = "Azure ML"
- c.msiType = msiTypeAzureML
- } else {
- if options.ID != nil {
- return nil, errors.New("the Cloud Shell API doesn't support user-assigned managed identities")
- }
- env = "Cloud Shell"
- c.msiType = msiTypeCloudShell
- }
- } else {
+ c := managedIdentityClient{}
+ source, err := managedidentity.GetSource()
+ if err != nil {
+ return nil, err
+ }
+ env := string(source)
+ if source == managedidentity.DefaultToIMDS {
+ env = "IMDS"
+ c.imds = true
c.probeIMDS = options.dac
setIMDSRetryOptionDefaults(&cp.Retry)
}
- client, err := azcore.NewClient(module, version, azruntime.PipelineOptions{
+ c.azClient, err = azcore.NewClient(module, version, azruntime.PipelineOptions{
Tracing: azruntime.TracingOptions{
Namespace: traceNamespace,
},
@@ -193,28 +117,53 @@ func newManagedIdentityClient(options *ManagedIdentityCredentialOptions) (*manag
if err != nil {
return nil, err
}
- c.azClient = client
+
+ id := managedidentity.SystemAssigned()
+ if options.ID != nil {
+ c.userAssigned = true
+ switch s := options.ID.String(); options.ID.idKind() {
+ case miClientID:
+ id = managedidentity.UserAssignedClientID(s)
+ case miObjectID:
+ id = managedidentity.UserAssignedObjectID(s)
+ case miResourceID:
+ id = managedidentity.UserAssignedResourceID(s)
+ }
+ }
+ msalClient, err := managedidentity.New(id, managedidentity.WithHTTPClient(&c), managedidentity.WithRetryPolicyDisabled())
+ if err != nil {
+ return nil, err
+ }
+ c.msalClient = &msalClient
if log.Should(EventAuthentication) {
- log.Writef(EventAuthentication, "Managed Identity Credential will use %s managed identity", env)
+ msg := fmt.Sprintf("%s will use %s managed identity", credNameManagedIdentity, env)
+ if options.ID != nil {
+ kind := "client"
+ switch options.ID.(type) {
+ case ObjectID:
+ kind = "object"
+ case ResourceID:
+ kind = "resource"
+ }
+ msg += fmt.Sprintf(" with %s ID %q", kind, options.ID.String())
+ }
+ log.Write(EventAuthentication, msg)
}
return &c, nil
}
-// provideToken acquires a token for MSAL's confidential.Client, which caches the token
-func (c *managedIdentityClient) provideToken(ctx context.Context, params confidential.TokenProviderParameters) (confidential.TokenProviderResult, error) {
- result := confidential.TokenProviderResult{}
- tk, err := c.authenticate(ctx, c.id, params.Scopes)
- if err == nil {
- result.AccessToken = tk.Token
- result.ExpiresInSeconds = int(time.Until(tk.ExpiresOn).Seconds())
- }
- return result, err
+func (*managedIdentityClient) CloseIdleConnections() {
+ // do nothing
+}
+
+func (c *managedIdentityClient) Do(r *http.Request) (*http.Response, error) {
+ return doForClient(c.azClient, r)
}
// authenticate acquires an access token
-func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKind, scopes []string) (azcore.AccessToken, error) {
+func (c *managedIdentityClient) GetToken(ctx context.Context, tro policy.TokenRequestOptions) (azcore.AccessToken, error) {
// no need to synchronize around this value because it's true only when DefaultAzureCredential constructed the client,
// and in that case ChainedTokenCredential.GetToken synchronizes goroutines that would execute this block
if c.probeIMDS {
@@ -222,7 +171,7 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
cx, cancel := context.WithTimeout(ctx, imdsProbeTimeout)
defer cancel()
cx = policy.WithRetryOptions(cx, policy.RetryOptions{MaxRetries: -1})
- req, err := azruntime.NewRequest(cx, http.MethodGet, c.endpoint)
+ req, err := azruntime.NewRequest(cx, http.MethodGet, imdsEndpoint)
if err != nil {
return azcore.AccessToken{}, fmt.Errorf("failed to create IMDS probe request: %s", err)
}
@@ -237,32 +186,26 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
c.probeIMDS = false
}
- msg, err := c.createAuthRequest(ctx, id, scopes)
- if err != nil {
- return azcore.AccessToken{}, err
- }
-
- resp, err := c.azClient.Pipeline().Do(msg)
- if err != nil {
- return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, err.Error(), nil)
- }
-
- if azruntime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) {
- tk, err := c.createAccessToken(resp)
- if err != nil && c.chained && c.msiType == msiTypeIMDS {
- // failure to unmarshal a 2xx implies the response is from something other than IMDS such as a proxy listening at
+ ar, err := c.msalClient.AcquireToken(ctx, tro.Scopes[0], managedidentity.WithClaims(tro.Claims))
+ if err == nil {
+ msg := fmt.Sprintf(scopeLogFmt, credNameManagedIdentity, strings.Join(ar.GrantedScopes, ", "))
+ log.Write(EventAuthentication, msg)
+ return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC(), RefreshOn: ar.Metadata.RefreshOn.UTC()}, err
+ }
+ if c.imds {
+ var ije msalerrors.InvalidJsonErr
+ if c.chained && errors.As(err, &ije) {
+ // an unmarshaling error implies the response is from something other than IMDS such as a proxy listening at
// the same address. Return a credentialUnavailableError so credential chains continue to their next credential
- err = newCredentialUnavailableError(credNameManagedIdentity, err.Error())
+ return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, err.Error())
+ }
+ resp := getResponseFromError(err)
+ if resp == nil {
+ return azcore.AccessToken{}, newAuthenticationFailedErrorFromMSAL(credNameManagedIdentity, err)
}
- return tk, err
- }
-
- if c.msiType == msiTypeIMDS {
switch resp.StatusCode {
case http.StatusBadRequest:
- if id != nil {
- // return authenticationFailedError, halting any encompassing credential chain,
- // because the explicit user-assigned identity implies the developer expected this to work
+ if c.userAssigned {
return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "the requested identity isn't assigned to this resource", resp)
}
msg := "failed to authenticate a system assigned identity"
@@ -278,237 +221,7 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, fmt.Sprintf("unexpected response %q", string(body)))
}
}
- if c.chained {
- // the response may be from something other than IMDS, for example a proxy returning
- // 404. Return credentialUnavailableError so credential chains continue to their
- // next credential, include the response in the error message to help debugging
- err = newAuthenticationFailedError(credNameManagedIdentity, "", resp)
- return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, err.Error())
- }
- }
-
- return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "", resp)
-}
-
-func (c *managedIdentityClient) createAccessToken(res *http.Response) (azcore.AccessToken, error) {
- value := struct {
- // these are the only fields that we use
- Token string `json:"access_token,omitempty"`
- RefreshToken string `json:"refresh_token,omitempty"`
- ExpiresIn wrappedNumber `json:"expires_in,omitempty"` // this field should always return the number of seconds for which a token is valid
- ExpiresOn interface{} `json:"expires_on,omitempty"` // the value returned in this field varies between a number and a date string
- }{}
- if err := azruntime.UnmarshalAsJSON(res, &value); err != nil {
- return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "Unexpected response content", res)
- }
- if value.ExpiresIn != "" {
- expiresIn, err := json.Number(value.ExpiresIn).Int64()
- if err != nil {
- return azcore.AccessToken{}, err
- }
- return azcore.AccessToken{Token: value.Token, ExpiresOn: time.Now().Add(time.Second * time.Duration(expiresIn)).UTC()}, nil
- }
- switch v := value.ExpiresOn.(type) {
- case float64:
- return azcore.AccessToken{Token: value.Token, ExpiresOn: time.Unix(int64(v), 0).UTC()}, nil
- case string:
- if expiresOn, err := strconv.Atoi(v); err == nil {
- return azcore.AccessToken{Token: value.Token, ExpiresOn: time.Unix(int64(expiresOn), 0).UTC()}, nil
- }
- return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "unexpected expires_on value: "+v, res)
- default:
- msg := fmt.Sprintf("unsupported type received in expires_on: %T, %v", v, v)
- return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, msg, res)
- }
-}
-
-func (c *managedIdentityClient) createAuthRequest(ctx context.Context, id ManagedIDKind, scopes []string) (*policy.Request, error) {
- switch c.msiType {
- case msiTypeIMDS:
- return c.createIMDSAuthRequest(ctx, id, scopes)
- case msiTypeAppService:
- return c.createAppServiceAuthRequest(ctx, id, scopes)
- case msiTypeAzureArc:
- // need to perform preliminary request to retreive the secret key challenge provided by the HIMDS service
- key, err := c.getAzureArcSecretKey(ctx, scopes)
- if err != nil {
- msg := fmt.Sprintf("failed to retreive secret key from the identity endpoint: %v", err)
- return nil, newAuthenticationFailedError(credNameManagedIdentity, msg, nil)
- }
- return c.createAzureArcAuthRequest(ctx, scopes, key)
- case msiTypeAzureML:
- return c.createAzureMLAuthRequest(ctx, id, scopes)
- case msiTypeServiceFabric:
- return c.createServiceFabricAuthRequest(ctx, scopes)
- case msiTypeCloudShell:
- return c.createCloudShellAuthRequest(ctx, scopes)
- default:
- return nil, newCredentialUnavailableError(credNameManagedIdentity, "managed identity isn't supported in this environment")
- }
-}
-
-func (c *managedIdentityClient) createIMDSAuthRequest(ctx context.Context, id ManagedIDKind, scopes []string) (*policy.Request, error) {
- request, err := azruntime.NewRequest(ctx, http.MethodGet, c.endpoint)
- if err != nil {
- return nil, err
- }
- request.Raw().Header.Set(headerMetadata, "true")
- q := request.Raw().URL.Query()
- q.Set("api-version", imdsAPIVersion)
- q.Set("resource", strings.Join(scopes, " "))
- if id != nil {
- switch id.idKind() {
- case miClientID:
- q.Set(qpClientID, id.String())
- case miObjectID:
- q.Set("object_id", id.String())
- case miResourceID:
- q.Set(msiResID, id.String())
- }
- }
- request.Raw().URL.RawQuery = q.Encode()
- return request, nil
-}
-
-func (c *managedIdentityClient) createAppServiceAuthRequest(ctx context.Context, id ManagedIDKind, scopes []string) (*policy.Request, error) {
- request, err := azruntime.NewRequest(ctx, http.MethodGet, c.endpoint)
- if err != nil {
- return nil, err
- }
- request.Raw().Header.Set("X-IDENTITY-HEADER", os.Getenv(identityHeader))
- q := request.Raw().URL.Query()
- q.Set("api-version", "2019-08-01")
- q.Set("resource", scopes[0])
- if id != nil {
- switch id.idKind() {
- case miClientID:
- q.Set(qpClientID, id.String())
- case miObjectID:
- q.Set("principal_id", id.String())
- case miResourceID:
- q.Set(miResID, id.String())
- }
- }
- request.Raw().URL.RawQuery = q.Encode()
- return request, nil
-}
-
-func (c *managedIdentityClient) createAzureMLAuthRequest(ctx context.Context, id ManagedIDKind, scopes []string) (*policy.Request, error) {
- request, err := azruntime.NewRequest(ctx, http.MethodGet, c.endpoint)
- if err != nil {
- return nil, err
- }
- request.Raw().Header.Set("secret", os.Getenv(msiSecret))
- q := request.Raw().URL.Query()
- q.Set("api-version", "2017-09-01")
- q.Set("resource", strings.Join(scopes, " "))
- q.Set("clientid", os.Getenv(defaultIdentityClientID))
- if id != nil {
- switch id.idKind() {
- case miClientID:
- q.Set("clientid", id.String())
- case miObjectID:
- return nil, newAuthenticationFailedError(credNameManagedIdentity, "Azure ML doesn't support specifying a managed identity by object ID", nil)
- case miResourceID:
- return nil, newAuthenticationFailedError(credNameManagedIdentity, "Azure ML doesn't support specifying a managed identity by resource ID", nil)
- }
- }
- request.Raw().URL.RawQuery = q.Encode()
- return request, nil
-}
-
-func (c *managedIdentityClient) createServiceFabricAuthRequest(ctx context.Context, scopes []string) (*policy.Request, error) {
- request, err := azruntime.NewRequest(ctx, http.MethodGet, c.endpoint)
- if err != nil {
- return nil, err
- }
- q := request.Raw().URL.Query()
- request.Raw().Header.Set("Accept", "application/json")
- request.Raw().Header.Set("Secret", os.Getenv(identityHeader))
- q.Set("api-version", serviceFabricAPIVersion)
- q.Set("resource", strings.Join(scopes, " "))
- request.Raw().URL.RawQuery = q.Encode()
- return request, nil
-}
-
-func (c *managedIdentityClient) getAzureArcSecretKey(ctx context.Context, resources []string) (string, error) {
- // create the request to retreive the secret key challenge provided by the HIMDS service
- request, err := azruntime.NewRequest(ctx, http.MethodGet, c.endpoint)
- if err != nil {
- return "", err
- }
- request.Raw().Header.Set(headerMetadata, "true")
- q := request.Raw().URL.Query()
- q.Set("api-version", azureArcAPIVersion)
- q.Set("resource", strings.Join(resources, " "))
- request.Raw().URL.RawQuery = q.Encode()
- // send the initial request to get the short-lived secret key
- response, err := c.azClient.Pipeline().Do(request)
- if err != nil {
- return "", err
- }
- // the endpoint is expected to return a 401 with the WWW-Authenticate header set to the location
- // of the secret key file. Any other status code indicates an error in the request.
- if response.StatusCode != 401 {
- msg := fmt.Sprintf("expected a 401 response, received %d", response.StatusCode)
- return "", newAuthenticationFailedError(credNameManagedIdentity, msg, response)
- }
- header := response.Header.Get("WWW-Authenticate")
- if len(header) == 0 {
- return "", newAuthenticationFailedError(credNameManagedIdentity, "HIMDS response has no WWW-Authenticate header", nil)
- }
- // the WWW-Authenticate header is expected in the following format: Basic realm=/some/file/path.key
- _, p, found := strings.Cut(header, "=")
- if !found {
- return "", newAuthenticationFailedError(credNameManagedIdentity, "unexpected WWW-Authenticate header from HIMDS: "+header, nil)
- }
- expected, err := arcKeyDirectory()
- if err != nil {
- return "", err
- }
- if filepath.Dir(p) != expected || !strings.HasSuffix(p, ".key") {
- return "", newAuthenticationFailedError(credNameManagedIdentity, "unexpected file path from HIMDS service: "+p, nil)
- }
- f, err := os.Stat(p)
- if err != nil {
- return "", newAuthenticationFailedError(credNameManagedIdentity, fmt.Sprintf("could not stat %q: %v", p, err), nil)
- }
- if s := f.Size(); s > 4096 {
- return "", newAuthenticationFailedError(credNameManagedIdentity, fmt.Sprintf("key is too large (%d bytes)", s), nil)
- }
- key, err := os.ReadFile(p)
- if err != nil {
- return "", newAuthenticationFailedError(credNameManagedIdentity, fmt.Sprintf("could not read %q: %v", p, err), nil)
- }
- return string(key), nil
-}
-
-func (c *managedIdentityClient) createAzureArcAuthRequest(ctx context.Context, resources []string, key string) (*policy.Request, error) {
- request, err := azruntime.NewRequest(ctx, http.MethodGet, c.endpoint)
- if err != nil {
- return nil, err
- }
- request.Raw().Header.Set(headerMetadata, "true")
- request.Raw().Header.Set("Authorization", fmt.Sprintf("Basic %s", key))
- q := request.Raw().URL.Query()
- q.Set("api-version", azureArcAPIVersion)
- q.Set("resource", strings.Join(resources, " "))
- request.Raw().URL.RawQuery = q.Encode()
- return request, nil
-}
-
-func (c *managedIdentityClient) createCloudShellAuthRequest(ctx context.Context, scopes []string) (*policy.Request, error) {
- request, err := azruntime.NewRequest(ctx, http.MethodPost, c.endpoint)
- if err != nil {
- return nil, err
- }
- request.Raw().Header.Set(headerMetadata, "true")
- data := url.Values{}
- data.Set("resource", strings.Join(scopes, " "))
- dataEncoded := data.Encode()
- body := streaming.NopCloser(strings.NewReader(dataEncoded))
- if err := request.SetBody(body, "application/x-www-form-urlencoded"); err != nil {
- return nil, err
}
- return request, nil
+ err = newAuthenticationFailedErrorFromMSAL(credNameManagedIdentity, err)
+ return azcore.AccessToken{}, err
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_credential.go
index 1d53579cf3..11b686ccda 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_credential.go
@@ -14,7 +14,6 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
- "github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
)
const credNameManagedIdentity = "ManagedIdentityCredential"
@@ -110,8 +109,7 @@ type ManagedIdentityCredentialOptions struct {
//
// [Azure managed identity]: https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview
type ManagedIdentityCredential struct {
- client *confidentialClient
- mic *managedIdentityClient
+ mic *managedIdentityClient
}
// NewManagedIdentityCredential creates a ManagedIdentityCredential. Pass nil to accept default options.
@@ -123,38 +121,22 @@ func NewManagedIdentityCredential(options *ManagedIdentityCredentialOptions) (*M
if err != nil {
return nil, err
}
- cred := confidential.NewCredFromTokenProvider(mic.provideToken)
-
- // It's okay to give MSAL an invalid client ID because MSAL will use it only as part of a cache key.
- // ManagedIdentityClient handles all the details of authentication and won't receive this value from MSAL.
- clientID := "SYSTEM-ASSIGNED-MANAGED-IDENTITY"
- if options.ID != nil {
- clientID = options.ID.String()
- }
- // similarly, it's okay to give MSAL an incorrect tenant because MSAL won't use the value
- c, err := newConfidentialClient("common", clientID, credNameManagedIdentity, cred, confidentialClientOptions{
- ClientOptions: options.ClientOptions,
- })
- if err != nil {
- return nil, err
- }
- return &ManagedIdentityCredential{client: c, mic: mic}, nil
+ return &ManagedIdentityCredential{mic: mic}, nil
}
// GetToken requests an access token from the hosting environment. This method is called automatically by Azure SDK clients.
func (c *ManagedIdentityCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
var err error
- ctx, endSpan := runtime.StartSpan(ctx, credNameManagedIdentity+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
+ ctx, endSpan := runtime.StartSpan(ctx, credNameManagedIdentity+"."+traceOpGetToken, c.mic.azClient.Tracer(), nil)
defer func() { endSpan(err) }()
if len(opts.Scopes) != 1 {
err = fmt.Errorf("%s.GetToken() requires exactly one scope", credNameManagedIdentity)
return azcore.AccessToken{}, err
}
- // managed identity endpoints require a Microsoft Entra ID v1 resource (i.e. token audience), not a v2 scope, so we remove "/.default" here
+ // managed identity endpoints require a v1 resource (i.e. token audience), not a v2 scope, so we remove "/.default" here
opts.Scopes = []string{strings.TrimSuffix(opts.Scopes[0], defaultSuffix)}
- tk, err := c.client.GetToken(ctx, opts)
- return tk, err
+ return c.mic.GetToken(ctx, opts)
}
var _ azcore.TokenCredential = (*ManagedIdentityCredential)(nil)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
index ef5e4d7212..053d1785f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
@@ -243,7 +243,7 @@ func (p *publicClient) token(ar public.AuthResult, err error) (azcore.AccessToke
} else {
err = newAuthenticationFailedErrorFromMSAL(p.name, err)
}
- return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC()}, err
+ return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC(), RefreshOn: ar.Metadata.RefreshOn.UTC()}, err
}
// resolveTenant returns the correct WithTenantID() argument for a token request given the client's
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/test-resources-post.ps1 b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/test-resources-post.ps1
index efa8c6d3eb..67f97fbb2b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/test-resources-post.ps1
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/test-resources-post.ps1
@@ -72,6 +72,7 @@ az container create -g $rg -n $aciName --image $image `
--acr-identity $($DeploymentOutputs['AZIDENTITY_USER_ASSIGNED_IDENTITY']) `
--assign-identity [system] $($DeploymentOutputs['AZIDENTITY_USER_ASSIGNED_IDENTITY']) `
--cpu 1 `
+ --ip-address Public `
--memory 1.0 `
--os-type Linux `
--role "Storage Blob Data Reader" `
@@ -82,7 +83,8 @@ az container create -g $rg -n $aciName --image $image `
AZIDENTITY_USER_ASSIGNED_IDENTITY_CLIENT_ID=$($DeploymentOutputs['AZIDENTITY_USER_ASSIGNED_IDENTITY_CLIENT_ID']) `
AZIDENTITY_USER_ASSIGNED_IDENTITY_OBJECT_ID=$($DeploymentOutputs['AZIDENTITY_USER_ASSIGNED_IDENTITY_OBJECT_ID']) `
FUNCTIONS_CUSTOMHANDLER_PORT=80
-Write-Host "##vso[task.setvariable variable=AZIDENTITY_ACI_NAME;]$aciName"
+$aciIP = az container show -g $rg -n $aciName --query ipAddress.ip --output tsv
+Write-Host "##vso[task.setvariable variable=AZIDENTITY_ACI_IP;]$aciIP"
# Azure Functions deployment: copy the Windows binary from the Docker image, deploy it in a zip
Write-Host "Deploying to Azure Functions"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/username_password_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/username_password_credential.go
index 740abd4709..5791e7d224 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/username_password_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/username_password_credential.go
@@ -17,6 +17,11 @@ import (
const credNameUserPassword = "UsernamePasswordCredential"
// UsernamePasswordCredentialOptions contains optional parameters for UsernamePasswordCredential.
+//
+// Deprecated: UsernamePasswordCredential is deprecated because it can't support multifactor
+// authentication. See [Entra ID documentation] for migration guidance.
+//
+// [Entra ID documentation]: https://aka.ms/azsdk/identity/mfa
type UsernamePasswordCredentialOptions struct {
azcore.ClientOptions
@@ -43,8 +48,13 @@ type UsernamePasswordCredentialOptions struct {
// UsernamePasswordCredential authenticates a user with a password. Microsoft doesn't recommend this kind of authentication,
// because it's less secure than other authentication flows. This credential is not interactive, so it isn't compatible
-// with any form of multi-factor authentication, and the application must already have user or admin consent.
+// with any form of multifactor authentication, and the application must already have user or admin consent.
// This credential can only authenticate work and school accounts; it can't authenticate Microsoft accounts.
+//
+// Deprecated: this credential is deprecated because it can't support multifactor authentication. See [Entra ID documentation]
+// for migration guidance.
+//
+// [Entra ID documentation]: https://aka.ms/azsdk/identity/mfa
type UsernamePasswordCredential struct {
client *publicClient
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
index fec0419ca7..2b767762fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
@@ -14,5 +14,5 @@ const (
module = "github.com/Azure/azure-sdk-for-go/sdk/" + component
// Version is the semantic version (see http://semver.org) of this module.
- version = "v1.8.2"
+ version = "v1.10.1"
)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go
index 4f1dcf1b78..76dadf7d35 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go
@@ -44,7 +44,7 @@ func Should(cls Event) bool {
if log.lst == nil {
return false
}
- if log.cls == nil || len(log.cls) == 0 {
+ if len(log.cls) == 0 {
return true
}
for _, c := range log.cls {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go
index 238ef42ed0..02aa1fb3bc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go
@@ -11,9 +11,17 @@ import (
"time"
)
+// backoff sets a minimum wait time between eager update attempts. It's a variable so tests can manipulate it.
+var backoff = func(now, lastAttempt time.Time) bool {
+ return lastAttempt.Add(30 * time.Second).After(now)
+}
+
// AcquireResource abstracts a method for refreshing a temporal resource.
type AcquireResource[TResource, TState any] func(state TState) (newResource TResource, newExpiration time.Time, err error)
+// ShouldRefresh abstracts a method for indicating whether a resource should be refreshed before expiration.
+type ShouldRefresh[TResource, TState any] func(TResource, TState) bool
+
// Resource is a temporal resource (usually a credential) that requires periodic refreshing.
type Resource[TResource, TState any] struct {
// cond is used to synchronize access to the shared resource embodied by the remaining fields
@@ -31,24 +39,43 @@ type Resource[TResource, TState any] struct {
// lastAttempt indicates when a thread/goroutine last attempted to acquire/update the resource
lastAttempt time.Time
+ // shouldRefresh indicates whether the resource should be refreshed before expiration
+ shouldRefresh ShouldRefresh[TResource, TState]
+
// acquireResource is the callback function that actually acquires the resource
acquireResource AcquireResource[TResource, TState]
}
// NewResource creates a new Resource that uses the specified AcquireResource for refreshing.
func NewResource[TResource, TState any](ar AcquireResource[TResource, TState]) *Resource[TResource, TState] {
- return &Resource[TResource, TState]{cond: sync.NewCond(&sync.Mutex{}), acquireResource: ar}
+ r := &Resource[TResource, TState]{acquireResource: ar, cond: sync.NewCond(&sync.Mutex{})}
+ r.shouldRefresh = r.expiringSoon
+ return r
+}
+
+// ResourceOptions contains optional configuration for Resource
+type ResourceOptions[TResource, TState any] struct {
+ // ShouldRefresh indicates whether [Resource.Get] should acquire an updated resource despite
+ // the currently held resource not having expired. [Resource.Get] ignores all errors from
+ // refresh attempts triggered by ShouldRefresh returning true, and doesn't call ShouldRefresh
+ // when the resource has expired (it unconditionally updates expired resources). When
+ // ShouldRefresh is nil, [Resource.Get] refreshes the resource if it will expire within 5
+ // minutes.
+ ShouldRefresh ShouldRefresh[TResource, TState]
+}
+
+// NewResourceWithOptions creates a new Resource that uses the specified AcquireResource for refreshing.
+func NewResourceWithOptions[TResource, TState any](ar AcquireResource[TResource, TState], opts ResourceOptions[TResource, TState]) *Resource[TResource, TState] {
+ r := NewResource(ar)
+ if opts.ShouldRefresh != nil {
+ r.shouldRefresh = opts.ShouldRefresh
+ }
+ return r
}
// Get returns the underlying resource.
// If the resource is fresh, no refresh is performed.
func (er *Resource[TResource, TState]) Get(state TState) (TResource, error) {
- // If the resource is expiring within this time window, update it eagerly.
- // This allows other threads/goroutines to keep running by using the not-yet-expired
- // resource value while one thread/goroutine updates the resource.
- const window = 5 * time.Minute // This example updates the resource 5 minutes prior to expiration
- const backoff = 30 * time.Second // Minimum wait time between eager update attempts
-
now, acquire, expired := time.Now(), false, false
// acquire exclusive lock
@@ -65,9 +92,8 @@ func (er *Resource[TResource, TState]) Get(state TState) (TResource, error) {
break
}
// Getting here means that this thread/goroutine will wait for the updated resource
- } else if er.expiration.Add(-window).Before(now) {
- // The resource is valid but is expiring within the time window
- if !er.acquiring && er.lastAttempt.Add(backoff).Before(now) {
+ } else if er.shouldRefresh(resource, state) {
+ if !(er.acquiring || backoff(now, er.lastAttempt)) {
// If another thread/goroutine is not acquiring/renewing the resource, and none has attempted
// to do so within the last 30 seconds, this thread/goroutine will do it
er.acquiring, acquire = true, true
@@ -121,3 +147,8 @@ func (er *Resource[TResource, TState]) Expire() {
// Reset the expiration as if we never got this resource to begin with
er.expiration = time.Time{}
}
+
+func (er *Resource[TResource, TState]) expiringSoon(TResource, TState) bool {
+ // call time.Now() instead of using Get's value so ShouldRefresh doesn't need a time.Time parameter
+ return er.expiration.Add(-5 * time.Minute).Before(time.Now())
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/azure_ml.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/azure_ml.go
new file mode 100644
index 0000000000..d7cffc295e
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/azure_ml.go
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package managedidentity
+
+import (
+ "context"
+ "net/http"
+ "os"
+)
+
+func createAzureMLAuthRequest(ctx context.Context, id ID, resource string) (*http.Request, error) {
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, os.Getenv(msiEndpointEnvVar), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Set("secret", os.Getenv(msiSecretEnvVar))
+ q := req.URL.Query()
+ q.Set(apiVersionQueryParameterName, azureMLAPIVersion)
+ q.Set(resourceQueryParameterName, resource)
+ q.Set("clientid", os.Getenv("DEFAULT_IDENTITY_CLIENT_ID"))
+ if cid, ok := id.(UserAssignedClientID); ok {
+ q.Set("clientid", string(cid))
+ }
+ req.URL.RawQuery = q.Encode()
+ return req, nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/cloud_shell.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/cloud_shell.go
new file mode 100644
index 0000000000..be9a0bca38
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/cloud_shell.go
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package managedidentity
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "os"
+ "strings"
+)
+
+func createCloudShellAuthRequest(ctx context.Context, resource string) (*http.Request, error) {
+ msiEndpoint := os.Getenv(msiEndpointEnvVar)
+ msiEndpointParsed, err := url.Parse(msiEndpoint)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't parse %q: %s", msiEndpoint, err)
+ }
+
+ data := url.Values{}
+ data.Set(resourceQueryParameterName, resource)
+ msiDataEncoded := data.Encode()
+ body := io.NopCloser(strings.NewReader(msiDataEncoded))
+
+ req, err := http.NewRequestWithContext(ctx, http.MethodPost, msiEndpointParsed.String(), body)
+ if err != nil {
+ return nil, fmt.Errorf("error creating http request %s", err)
+ }
+
+ req.Header.Set(metaHTTPHeaderName, "true")
+ req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+
+ return req, nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/managedidentity.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/managedidentity.go
new file mode 100644
index 0000000000..ca3de4325f
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/managedidentity.go
@@ -0,0 +1,717 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+/*
+Package managedidentity provides a client for retrieval of Managed Identity applications.
+The Managed Identity Client is used to acquire a token for managed identity assigned to
+an azure resource such as Azure function, app service, virtual machine, etc. to acquire a token
+without using credentials.
+*/
+package managedidentity
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "os"
+ "path/filepath"
+ "runtime"
+ "strings"
+ "sync/atomic"
+ "time"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/errors"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared"
+)
+
+// AuthResult contains the results of one token acquisition operation.
+// For details see https://aka.ms/msal-net-authenticationresult
+type AuthResult = base.AuthResult
+
+type TokenSource = base.TokenSource
+
+const (
+ TokenSourceIdentityProvider = base.TokenSourceIdentityProvider
+ TokenSourceCache = base.TokenSourceCache
+)
+
+const (
+ // DefaultToIMDS indicates that the source is defaulted to IMDS when no environment variables are set.
+ DefaultToIMDS Source = "DefaultToIMDS"
+ AzureArc Source = "AzureArc"
+ ServiceFabric Source = "ServiceFabric"
+ CloudShell Source = "CloudShell"
+ AzureML Source = "AzureML"
+ AppService Source = "AppService"
+
+ // General request query parameter names
+ metaHTTPHeaderName = "Metadata"
+ apiVersionQueryParameterName = "api-version"
+ resourceQueryParameterName = "resource"
+ wwwAuthenticateHeaderName = "www-authenticate"
+
+ // UAMI query parameter name
+ miQueryParameterClientId = "client_id"
+ miQueryParameterObjectId = "object_id"
+ miQueryParameterPrincipalId = "principal_id"
+ miQueryParameterResourceIdIMDS = "msi_res_id"
+ miQueryParameterResourceId = "mi_res_id"
+
+ // IMDS
+ imdsDefaultEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token"
+ imdsAPIVersion = "2018-02-01"
+ systemAssignedManagedIdentity = "system_assigned_managed_identity"
+
+ // Azure Arc
+ azureArcEndpoint = "http://127.0.0.1:40342/metadata/identity/oauth2/token"
+ azureArcAPIVersion = "2020-06-01"
+ azureArcFileExtension = ".key"
+ azureArcMaxFileSizeBytes int64 = 4096
+ linuxTokenPath = "/var/opt/azcmagent/tokens" // #nosec G101
+ linuxHimdsPath = "/opt/azcmagent/bin/himds"
+ azureConnectedMachine = "AzureConnectedMachineAgent"
+ himdsExecutableName = "himds.exe"
+ tokenName = "Tokens"
+
+ // App Service
+ appServiceAPIVersion = "2019-08-01"
+
+ // AzureML
+ azureMLAPIVersion = "2017-09-01"
+ // Service Fabric
+ serviceFabricAPIVersion = "2019-07-01-preview"
+
+ // Environment Variables
+ identityEndpointEnvVar = "IDENTITY_ENDPOINT"
+ identityHeaderEnvVar = "IDENTITY_HEADER"
+ azurePodIdentityAuthorityHostEnvVar = "AZURE_POD_IDENTITY_AUTHORITY_HOST"
+ imdsEndVar = "IMDS_ENDPOINT"
+ msiEndpointEnvVar = "MSI_ENDPOINT"
+ msiSecretEnvVar = "MSI_SECRET"
+ identityServerThumbprintEnvVar = "IDENTITY_SERVER_THUMBPRINT"
+
+ defaultRetryCount = 3
+)
+
+var retryCodesForIMDS = []int{
+ http.StatusNotFound, // 404
+ http.StatusGone, // 410
+ http.StatusTooManyRequests, // 429
+ http.StatusInternalServerError, // 500
+ http.StatusNotImplemented, // 501
+ http.StatusBadGateway, // 502
+ http.StatusServiceUnavailable, // 503
+ http.StatusGatewayTimeout, // 504
+ http.StatusHTTPVersionNotSupported, // 505
+ http.StatusVariantAlsoNegotiates, // 506
+ http.StatusInsufficientStorage, // 507
+ http.StatusLoopDetected, // 508
+ http.StatusNotExtended, // 510
+ http.StatusNetworkAuthenticationRequired, // 511
+}
+
+var retryStatusCodes = []int{
+ http.StatusRequestTimeout, // 408
+ http.StatusTooManyRequests, // 429
+ http.StatusInternalServerError, // 500
+ http.StatusBadGateway, // 502
+ http.StatusServiceUnavailable, // 503
+ http.StatusGatewayTimeout, // 504
+}
+
+var getAzureArcPlatformPath = func(platform string) string {
+ switch platform {
+ case "windows":
+ return filepath.Join(os.Getenv("ProgramData"), azureConnectedMachine, tokenName)
+ case "linux":
+ return linuxTokenPath
+ default:
+ return ""
+ }
+}
+
+var getAzureArcHimdsFilePath = func(platform string) string {
+ switch platform {
+ case "windows":
+ return filepath.Join(os.Getenv("ProgramData"), azureConnectedMachine, himdsExecutableName)
+ case "linux":
+ return linuxHimdsPath
+ default:
+ return ""
+ }
+}
+
+type Source string
+
+type ID interface {
+ value() string
+}
+
+type systemAssignedValue string // its private for a reason to make the input consistent.
+type UserAssignedClientID string
+type UserAssignedObjectID string
+type UserAssignedResourceID string
+
+func (s systemAssignedValue) value() string { return string(s) }
+func (c UserAssignedClientID) value() string { return string(c) }
+func (o UserAssignedObjectID) value() string { return string(o) }
+func (r UserAssignedResourceID) value() string { return string(r) }
+func SystemAssigned() ID {
+ return systemAssignedValue(systemAssignedManagedIdentity)
+}
+
+// cache never uses the client because instance discovery is always disabled.
+var cacheManager *storage.Manager = storage.New(nil)
+
+type Client struct {
+ httpClient ops.HTTPClient
+ miType ID
+ source Source
+ authParams authority.AuthParams
+ retryPolicyEnabled bool
+ canRefresh *atomic.Value
+}
+
+type AcquireTokenOptions struct {
+ claims string
+}
+
+type ClientOption func(*Client)
+
+type AcquireTokenOption func(o *AcquireTokenOptions)
+
+// WithClaims sets additional claims to request for the token, such as those required by token revocation or conditional access policies.
+// Use this option when Azure AD returned a claims challenge for a prior request. The argument must be decoded.
+func WithClaims(claims string) AcquireTokenOption {
+ return func(o *AcquireTokenOptions) {
+ o.claims = claims
+ }
+}
+
+// WithHTTPClient allows for a custom HTTP client to be set.
+func WithHTTPClient(httpClient ops.HTTPClient) ClientOption {
+ return func(c *Client) {
+ c.httpClient = httpClient
+ }
+}
+
+func WithRetryPolicyDisabled() ClientOption {
+ return func(c *Client) {
+ c.retryPolicyEnabled = false
+ }
+}
+
+// Client to be used to acquire tokens for managed identity.
+// ID: [SystemAssigned], [UserAssignedClientID], [UserAssignedResourceID], [UserAssignedObjectID]
+//
+// Options: [WithHTTPClient]
+func New(id ID, options ...ClientOption) (Client, error) {
+ source, err := GetSource()
+ if err != nil {
+ return Client{}, err
+ }
+
+ // Check for user-assigned restrictions based on the source
+ switch source {
+ case AzureArc:
+ switch id.(type) {
+ case UserAssignedClientID, UserAssignedResourceID, UserAssignedObjectID:
+ return Client{}, errors.New("Azure Arc doesn't support user-assigned managed identities")
+ }
+ case AzureML:
+ switch id.(type) {
+ case UserAssignedObjectID, UserAssignedResourceID:
+ return Client{}, errors.New("Azure ML supports specifying a user-assigned managed identity by client ID only")
+ }
+ case CloudShell:
+ switch id.(type) {
+ case UserAssignedClientID, UserAssignedResourceID, UserAssignedObjectID:
+ return Client{}, errors.New("Cloud Shell doesn't support user-assigned managed identities")
+ }
+ case ServiceFabric:
+ switch id.(type) {
+ case UserAssignedClientID, UserAssignedResourceID, UserAssignedObjectID:
+ return Client{}, errors.New("Service Fabric API doesn't support specifying a user-assigned identity. The identity is determined by cluster resource configuration. See https://aka.ms/servicefabricmi")
+ }
+ }
+
+ switch t := id.(type) {
+ case UserAssignedClientID:
+ if len(string(t)) == 0 {
+ return Client{}, fmt.Errorf("empty %T", t)
+ }
+ case UserAssignedResourceID:
+ if len(string(t)) == 0 {
+ return Client{}, fmt.Errorf("empty %T", t)
+ }
+ case UserAssignedObjectID:
+ if len(string(t)) == 0 {
+ return Client{}, fmt.Errorf("empty %T", t)
+ }
+ case systemAssignedValue:
+ default:
+ return Client{}, fmt.Errorf("unsupported type %T", id)
+ }
+ zero := atomic.Value{}
+ zero.Store(false)
+ client := Client{
+ miType: id,
+ httpClient: shared.DefaultClient,
+ retryPolicyEnabled: true,
+ source: source,
+ canRefresh: &zero,
+ }
+ for _, option := range options {
+ option(&client)
+ }
+ fakeAuthInfo, err := authority.NewInfoFromAuthorityURI("https://login.microsoftonline.com/managed_identity", false, true)
+ if err != nil {
+ return Client{}, err
+ }
+ client.authParams = authority.NewAuthParams(client.miType.value(), fakeAuthInfo)
+ return client, nil
+}
+
+// GetSource detects and returns the managed identity source available on the environment.
+func GetSource() (Source, error) {
+ identityEndpoint := os.Getenv(identityEndpointEnvVar)
+ identityHeader := os.Getenv(identityHeaderEnvVar)
+ identityServerThumbprint := os.Getenv(identityServerThumbprintEnvVar)
+ msiEndpoint := os.Getenv(msiEndpointEnvVar)
+ msiSecret := os.Getenv(msiSecretEnvVar)
+ imdsEndpoint := os.Getenv(imdsEndVar)
+
+ if identityEndpoint != "" && identityHeader != "" {
+ if identityServerThumbprint != "" {
+ return ServiceFabric, nil
+ }
+ return AppService, nil
+ } else if msiEndpoint != "" {
+ if msiSecret != "" {
+ return AzureML, nil
+ } else {
+ return CloudShell, nil
+ }
+ } else if isAzureArcEnvironment(identityEndpoint, imdsEndpoint) {
+ return AzureArc, nil
+ }
+
+ return DefaultToIMDS, nil
+}
+
+// This function wraps time.Now() and is used for refreshing the application
+// was created to test the function against refreshin
+var now = time.Now
+
+// Acquires tokens from the configured managed identity on an azure resource.
+//
+// Resource: scopes application is requesting access to
+// Options: [WithClaims]
+func (c Client) AcquireToken(ctx context.Context, resource string, options ...AcquireTokenOption) (AuthResult, error) {
+ resource = strings.TrimSuffix(resource, "/.default")
+ o := AcquireTokenOptions{}
+ for _, option := range options {
+ option(&o)
+ }
+ c.authParams.Scopes = []string{resource}
+
+ // ignore cached access tokens when given claims
+ if o.claims == "" {
+ stResp, err := cacheManager.Read(ctx, c.authParams)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ ar, err := base.AuthResultFromStorage(stResp)
+ if err == nil {
+ if !stResp.AccessToken.RefreshOn.T.IsZero() && !stResp.AccessToken.RefreshOn.T.After(now()) && c.canRefresh.CompareAndSwap(false, true) {
+ defer c.canRefresh.Store(false)
+ if tr, er := c.getToken(ctx, resource); er == nil {
+ return tr, nil
+ }
+ }
+ ar.AccessToken, err = c.authParams.AuthnScheme.FormatAccessToken(ar.AccessToken)
+ return ar, err
+ }
+ }
+ return c.getToken(ctx, resource)
+}
+
+func (c Client) getToken(ctx context.Context, resource string) (AuthResult, error) {
+ switch c.source {
+ case AzureArc:
+ return c.acquireTokenForAzureArc(ctx, resource)
+ case AzureML:
+ return c.acquireTokenForAzureML(ctx, resource)
+ case CloudShell:
+ return c.acquireTokenForCloudShell(ctx, resource)
+ case DefaultToIMDS:
+ return c.acquireTokenForIMDS(ctx, resource)
+ case AppService:
+ return c.acquireTokenForAppService(ctx, resource)
+ case ServiceFabric:
+ return c.acquireTokenForServiceFabric(ctx, resource)
+ default:
+ return AuthResult{}, fmt.Errorf("unsupported source %q", c.source)
+ }
+}
+
+func (c Client) acquireTokenForAppService(ctx context.Context, resource string) (AuthResult, error) {
+ req, err := createAppServiceAuthRequest(ctx, c.miType, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ tokenResponse, err := c.getTokenForRequest(req, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return authResultFromToken(c.authParams, tokenResponse)
+}
+
+func (c Client) acquireTokenForIMDS(ctx context.Context, resource string) (AuthResult, error) {
+ req, err := createIMDSAuthRequest(ctx, c.miType, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ tokenResponse, err := c.getTokenForRequest(req, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return authResultFromToken(c.authParams, tokenResponse)
+}
+
+func (c Client) acquireTokenForCloudShell(ctx context.Context, resource string) (AuthResult, error) {
+ req, err := createCloudShellAuthRequest(ctx, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ tokenResponse, err := c.getTokenForRequest(req, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return authResultFromToken(c.authParams, tokenResponse)
+}
+
+func (c Client) acquireTokenForAzureML(ctx context.Context, resource string) (AuthResult, error) {
+ req, err := createAzureMLAuthRequest(ctx, c.miType, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ tokenResponse, err := c.getTokenForRequest(req, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return authResultFromToken(c.authParams, tokenResponse)
+}
+
+func (c Client) acquireTokenForServiceFabric(ctx context.Context, resource string) (AuthResult, error) {
+ req, err := createServiceFabricAuthRequest(ctx, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ tokenResponse, err := c.getTokenForRequest(req, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return authResultFromToken(c.authParams, tokenResponse)
+}
+
+func (c Client) acquireTokenForAzureArc(ctx context.Context, resource string) (AuthResult, error) {
+ req, err := createAzureArcAuthRequest(ctx, resource, "")
+ if err != nil {
+ return AuthResult{}, err
+ }
+
+ response, err := c.httpClient.Do(req)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ defer response.Body.Close()
+
+ if response.StatusCode != http.StatusUnauthorized {
+ return AuthResult{}, fmt.Errorf("expected a 401 response, received %d", response.StatusCode)
+ }
+
+ secret, err := c.getAzureArcSecretKey(response, runtime.GOOS)
+ if err != nil {
+ return AuthResult{}, err
+ }
+
+ secondRequest, err := createAzureArcAuthRequest(ctx, resource, string(secret))
+ if err != nil {
+ return AuthResult{}, err
+ }
+
+ tokenResponse, err := c.getTokenForRequest(secondRequest, resource)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return authResultFromToken(c.authParams, tokenResponse)
+}
+
+func authResultFromToken(authParams authority.AuthParams, token accesstokens.TokenResponse) (AuthResult, error) {
+ if cacheManager == nil {
+ return AuthResult{}, errors.New("cache instance is nil")
+ }
+ account, err := cacheManager.Write(authParams, token)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ // if refreshOn is not set, set it to half of the time until expiry if expiry is more than 2 hours away
+ if token.RefreshOn.T.IsZero() {
+ if lifetime := time.Until(token.ExpiresOn); lifetime > 2*time.Hour {
+ token.RefreshOn.T = time.Now().Add(lifetime / 2)
+ }
+ }
+ ar, err := base.NewAuthResult(token, account)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ ar.AccessToken, err = authParams.AuthnScheme.FormatAccessToken(ar.AccessToken)
+ return ar, err
+}
+
+// contains checks if the element is present in the list.
+func contains[T comparable](list []T, element T) bool {
+ for _, v := range list {
+ if v == element {
+ return true
+ }
+ }
+ return false
+}
+
+// retry performs an HTTP request with retries based on the provided options.
+func (c Client) retry(maxRetries int, req *http.Request) (*http.Response, error) {
+ var resp *http.Response
+ var err error
+ for attempt := 0; attempt < maxRetries; attempt++ {
+ tryCtx, tryCancel := context.WithTimeout(req.Context(), time.Minute)
+ defer tryCancel()
+ if resp != nil && resp.Body != nil {
+ _, _ = io.Copy(io.Discard, resp.Body)
+ resp.Body.Close()
+ }
+ cloneReq := req.Clone(tryCtx)
+ resp, err = c.httpClient.Do(cloneReq)
+ retrylist := retryStatusCodes
+ if c.source == DefaultToIMDS {
+ retrylist = retryCodesForIMDS
+ }
+ if err == nil && !contains(retrylist, resp.StatusCode) {
+ return resp, nil
+ }
+ select {
+ case <-time.After(time.Second):
+ case <-req.Context().Done():
+ err = req.Context().Err()
+ return resp, err
+ }
+ }
+ return resp, err
+}
+
+func (c Client) getTokenForRequest(req *http.Request, resource string) (accesstokens.TokenResponse, error) {
+ r := accesstokens.TokenResponse{}
+ var resp *http.Response
+ var err error
+
+ if c.retryPolicyEnabled {
+ resp, err = c.retry(defaultRetryCount, req)
+ } else {
+ resp, err = c.httpClient.Do(req)
+ }
+ if err != nil {
+ return r, err
+ }
+ responseBytes, err := io.ReadAll(resp.Body)
+ defer resp.Body.Close()
+ if err != nil {
+ return r, err
+ }
+ switch resp.StatusCode {
+ case http.StatusOK, http.StatusAccepted:
+ default:
+ sd := strings.TrimSpace(string(responseBytes))
+ if sd != "" {
+ return r, errors.CallErr{
+ Req: req,
+ Resp: resp,
+ Err: fmt.Errorf("http call(%s)(%s) error: reply status code was %d:\n%s",
+ req.URL.String(),
+ req.Method,
+ resp.StatusCode,
+ sd),
+ }
+ }
+ return r, errors.CallErr{
+ Req: req,
+ Resp: resp,
+ Err: fmt.Errorf("http call(%s)(%s) error: reply status code was %d", req.URL.String(), req.Method, resp.StatusCode),
+ }
+ }
+
+ err = json.Unmarshal(responseBytes, &r)
+ if err != nil {
+ return r, errors.InvalidJsonErr{
+ Err: fmt.Errorf("error parsing the json error: %s", err),
+ }
+ }
+ r.GrantedScopes.Slice = append(r.GrantedScopes.Slice, resource)
+
+ return r, err
+}
+
+func createAppServiceAuthRequest(ctx context.Context, id ID, resource string) (*http.Request, error) {
+ identityEndpoint := os.Getenv(identityEndpointEnvVar)
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, identityEndpoint, nil)
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Set("X-IDENTITY-HEADER", os.Getenv(identityHeaderEnvVar))
+ q := req.URL.Query()
+ q.Set("api-version", appServiceAPIVersion)
+ q.Set("resource", resource)
+ switch t := id.(type) {
+ case UserAssignedClientID:
+ q.Set(miQueryParameterClientId, string(t))
+ case UserAssignedResourceID:
+ q.Set(miQueryParameterResourceId, string(t))
+ case UserAssignedObjectID:
+ q.Set(miQueryParameterObjectId, string(t))
+ case systemAssignedValue:
+ default:
+ return nil, fmt.Errorf("unsupported type %T", id)
+ }
+ req.URL.RawQuery = q.Encode()
+ return req, nil
+}
+
+func createIMDSAuthRequest(ctx context.Context, id ID, resource string) (*http.Request, error) {
+ msiEndpoint, err := url.Parse(imdsDefaultEndpoint)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't parse %q: %s", imdsDefaultEndpoint, err)
+ }
+ msiParameters := msiEndpoint.Query()
+ msiParameters.Set(apiVersionQueryParameterName, imdsAPIVersion)
+ msiParameters.Set(resourceQueryParameterName, resource)
+
+ switch t := id.(type) {
+ case UserAssignedClientID:
+ msiParameters.Set(miQueryParameterClientId, string(t))
+ case UserAssignedResourceID:
+ msiParameters.Set(miQueryParameterResourceIdIMDS, string(t))
+ case UserAssignedObjectID:
+ msiParameters.Set(miQueryParameterObjectId, string(t))
+ case systemAssignedValue: // not adding anything
+ default:
+ return nil, fmt.Errorf("unsupported type %T", id)
+ }
+
+ msiEndpoint.RawQuery = msiParameters.Encode()
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, msiEndpoint.String(), nil)
+ if err != nil {
+ return nil, fmt.Errorf("error creating http request %s", err)
+ }
+ req.Header.Set(metaHTTPHeaderName, "true")
+ return req, nil
+}
+
+func createAzureArcAuthRequest(ctx context.Context, resource string, key string) (*http.Request, error) {
+ identityEndpoint := os.Getenv(identityEndpointEnvVar)
+ if identityEndpoint == "" {
+ identityEndpoint = azureArcEndpoint
+ }
+ msiEndpoint, parseErr := url.Parse(identityEndpoint)
+
+ if parseErr != nil {
+ return nil, fmt.Errorf("couldn't parse %q: %s", identityEndpoint, parseErr)
+ }
+
+ msiParameters := msiEndpoint.Query()
+ msiParameters.Set(apiVersionQueryParameterName, azureArcAPIVersion)
+ msiParameters.Set(resourceQueryParameterName, resource)
+
+ msiEndpoint.RawQuery = msiParameters.Encode()
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, msiEndpoint.String(), nil)
+ if err != nil {
+ return nil, fmt.Errorf("error creating http request %s", err)
+ }
+ req.Header.Set(metaHTTPHeaderName, "true")
+
+ if key != "" {
+ req.Header.Set("Authorization", fmt.Sprintf("Basic %s", key))
+ }
+
+ return req, nil
+}
+
+func isAzureArcEnvironment(identityEndpoint, imdsEndpoint string) bool {
+ if identityEndpoint != "" && imdsEndpoint != "" {
+ return true
+ }
+ himdsFilePath := getAzureArcHimdsFilePath(runtime.GOOS)
+ if himdsFilePath != "" {
+ if _, err := os.Stat(himdsFilePath); err == nil {
+ return true
+ }
+ }
+ return false
+}
+
+func (c *Client) getAzureArcSecretKey(response *http.Response, platform string) (string, error) {
+ wwwAuthenticateHeader := response.Header.Get(wwwAuthenticateHeaderName)
+
+ if len(wwwAuthenticateHeader) == 0 {
+ return "", errors.New("response has no www-authenticate header")
+ }
+
+ // check if the platform is supported
+ expectedSecretFilePath := getAzureArcPlatformPath(platform)
+ if expectedSecretFilePath == "" {
+ return "", errors.New("platform not supported, expected linux or windows")
+ }
+
+ parts := strings.Split(wwwAuthenticateHeader, "Basic realm=")
+ if len(parts) < 2 {
+ return "", fmt.Errorf("basic realm= not found in the string, instead found: %s", wwwAuthenticateHeader)
+ }
+
+ secretFilePath := parts
+
+ // check that the file in the file path is a .key file
+ fileName := filepath.Base(secretFilePath[1])
+ if !strings.HasSuffix(fileName, azureArcFileExtension) {
+ return "", fmt.Errorf("invalid file extension, expected %s, got %s", azureArcFileExtension, filepath.Ext(fileName))
+ }
+
+ // check that file path from header matches the expected file path for the platform
+ if expectedSecretFilePath != filepath.Dir(secretFilePath[1]) {
+ return "", fmt.Errorf("invalid file path, expected %s, got %s", expectedSecretFilePath, filepath.Dir(secretFilePath[1]))
+ }
+
+ fileInfo, err := os.Stat(secretFilePath[1])
+ if err != nil {
+ return "", fmt.Errorf("failed to get metadata for %s due to error: %s", secretFilePath[1], err)
+ }
+
+ // Throw an error if the secret file's size is greater than 4096 bytes
+ if s := fileInfo.Size(); s > azureArcMaxFileSizeBytes {
+ return "", fmt.Errorf("invalid secret file size, expected %d, file size was %d", azureArcMaxFileSizeBytes, s)
+ }
+
+ // Attempt to read the contents of the secret file
+ secret, err := os.ReadFile(secretFilePath[1])
+ if err != nil {
+ return "", fmt.Errorf("failed to read %q due to error: %s", secretFilePath[1], err)
+ }
+
+ return string(secret), nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/servicefabric.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/servicefabric.go
new file mode 100644
index 0000000000..535065e9d9
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity/servicefabric.go
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package managedidentity
+
+import (
+ "context"
+ "net/http"
+ "os"
+)
+
+func createServiceFabricAuthRequest(ctx context.Context, resource string) (*http.Request, error) {
+ identityEndpoint := os.Getenv(identityEndpointEnvVar)
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, identityEndpoint, nil)
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Set("Accept", "application/json")
+ req.Header.Set("Secret", os.Getenv(identityHeaderEnvVar))
+ q := req.URL.Query()
+ q.Set("api-version", serviceFabricAPIVersion)
+ q.Set("resource", resource)
+ req.URL.RawQuery = q.Encode()
+ return req, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/AUTHORS b/vendor/github.com/ProtonMail/go-crypto/AUTHORS
deleted file mode 100644
index 2b00ddba0d..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at https://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/ProtonMail/go-crypto/CONTRIBUTORS b/vendor/github.com/ProtonMail/go-crypto/CONTRIBUTORS
deleted file mode 100644
index 1fbd3e976f..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/ProtonMail/go-crypto/LICENSE b/vendor/github.com/ProtonMail/go-crypto/LICENSE
deleted file mode 100644
index 6a66aea5ea..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/ProtonMail/go-crypto/PATENTS b/vendor/github.com/ProtonMail/go-crypto/PATENTS
deleted file mode 100644
index 733099041f..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/ProtonMail/go-crypto/bitcurves/bitcurve.go b/vendor/github.com/ProtonMail/go-crypto/bitcurves/bitcurve.go
deleted file mode 100644
index c85e6befec..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/bitcurves/bitcurve.go
+++ /dev/null
@@ -1,381 +0,0 @@
-package bitcurves
-
-// Copyright 2010 The Go Authors. All rights reserved.
-// Copyright 2011 ThePiachu. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package bitelliptic implements several Koblitz elliptic curves over prime
-// fields.
-
-// This package operates, internally, on Jacobian coordinates. For a given
-// (x, y) position on the curve, the Jacobian coordinates are (x1, y1, z1)
-// where x = x1/z1² and y = y1/z1³. The greatest speedups come when the whole
-// calculation can be performed within the transform (as in ScalarMult and
-// ScalarBaseMult). But even for Add and Double, it's faster to apply and
-// reverse the transform than to operate in affine coordinates.
-
-import (
- "crypto/elliptic"
- "io"
- "math/big"
- "sync"
-)
-
-// A BitCurve represents a Koblitz Curve with a=0.
-// See http://www.hyperelliptic.org/EFD/g1p/auto-shortw.html
-type BitCurve struct {
- Name string
- P *big.Int // the order of the underlying field
- N *big.Int // the order of the base point
- B *big.Int // the constant of the BitCurve equation
- Gx, Gy *big.Int // (x,y) of the base point
- BitSize int // the size of the underlying field
-}
-
-// Params returns the parameters of the given BitCurve (see BitCurve struct)
-func (bitCurve *BitCurve) Params() (cp *elliptic.CurveParams) {
- cp = new(elliptic.CurveParams)
- cp.Name = bitCurve.Name
- cp.P = bitCurve.P
- cp.N = bitCurve.N
- cp.Gx = bitCurve.Gx
- cp.Gy = bitCurve.Gy
- cp.BitSize = bitCurve.BitSize
- return cp
-}
-
-// IsOnCurve returns true if the given (x,y) lies on the BitCurve.
-func (bitCurve *BitCurve) IsOnCurve(x, y *big.Int) bool {
- // y² = x³ + b
- y2 := new(big.Int).Mul(y, y) //y²
- y2.Mod(y2, bitCurve.P) //y²%P
-
- x3 := new(big.Int).Mul(x, x) //x²
- x3.Mul(x3, x) //x³
-
- x3.Add(x3, bitCurve.B) //x³+B
- x3.Mod(x3, bitCurve.P) //(x³+B)%P
-
- return x3.Cmp(y2) == 0
-}
-
-// affineFromJacobian reverses the Jacobian transform. See the comment at the
-// top of the file.
-func (bitCurve *BitCurve) affineFromJacobian(x, y, z *big.Int) (xOut, yOut *big.Int) {
- if z.Cmp(big.NewInt(0)) == 0 {
- panic("bitcurve: Can't convert to affine with Jacobian Z = 0")
- }
- // x = YZ^2 mod P
- zinv := new(big.Int).ModInverse(z, bitCurve.P)
- zinvsq := new(big.Int).Mul(zinv, zinv)
-
- xOut = new(big.Int).Mul(x, zinvsq)
- xOut.Mod(xOut, bitCurve.P)
- // y = YZ^3 mod P
- zinvsq.Mul(zinvsq, zinv)
- yOut = new(big.Int).Mul(y, zinvsq)
- yOut.Mod(yOut, bitCurve.P)
- return xOut, yOut
-}
-
-// Add returns the sum of (x1,y1) and (x2,y2)
-func (bitCurve *BitCurve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) {
- z := new(big.Int).SetInt64(1)
- x, y, z := bitCurve.addJacobian(x1, y1, z, x2, y2, z)
- return bitCurve.affineFromJacobian(x, y, z)
-}
-
-// addJacobian takes two points in Jacobian coordinates, (x1, y1, z1) and
-// (x2, y2, z2) and returns their sum, also in Jacobian form.
-func (bitCurve *BitCurve) addJacobian(x1, y1, z1, x2, y2, z2 *big.Int) (*big.Int, *big.Int, *big.Int) {
- // See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#addition-add-2007-bl
- z1z1 := new(big.Int).Mul(z1, z1)
- z1z1.Mod(z1z1, bitCurve.P)
- z2z2 := new(big.Int).Mul(z2, z2)
- z2z2.Mod(z2z2, bitCurve.P)
-
- u1 := new(big.Int).Mul(x1, z2z2)
- u1.Mod(u1, bitCurve.P)
- u2 := new(big.Int).Mul(x2, z1z1)
- u2.Mod(u2, bitCurve.P)
- h := new(big.Int).Sub(u2, u1)
- if h.Sign() == -1 {
- h.Add(h, bitCurve.P)
- }
- i := new(big.Int).Lsh(h, 1)
- i.Mul(i, i)
- j := new(big.Int).Mul(h, i)
-
- s1 := new(big.Int).Mul(y1, z2)
- s1.Mul(s1, z2z2)
- s1.Mod(s1, bitCurve.P)
- s2 := new(big.Int).Mul(y2, z1)
- s2.Mul(s2, z1z1)
- s2.Mod(s2, bitCurve.P)
- r := new(big.Int).Sub(s2, s1)
- if r.Sign() == -1 {
- r.Add(r, bitCurve.P)
- }
- r.Lsh(r, 1)
- v := new(big.Int).Mul(u1, i)
-
- x3 := new(big.Int).Set(r)
- x3.Mul(x3, x3)
- x3.Sub(x3, j)
- x3.Sub(x3, v)
- x3.Sub(x3, v)
- x3.Mod(x3, bitCurve.P)
-
- y3 := new(big.Int).Set(r)
- v.Sub(v, x3)
- y3.Mul(y3, v)
- s1.Mul(s1, j)
- s1.Lsh(s1, 1)
- y3.Sub(y3, s1)
- y3.Mod(y3, bitCurve.P)
-
- z3 := new(big.Int).Add(z1, z2)
- z3.Mul(z3, z3)
- z3.Sub(z3, z1z1)
- if z3.Sign() == -1 {
- z3.Add(z3, bitCurve.P)
- }
- z3.Sub(z3, z2z2)
- if z3.Sign() == -1 {
- z3.Add(z3, bitCurve.P)
- }
- z3.Mul(z3, h)
- z3.Mod(z3, bitCurve.P)
-
- return x3, y3, z3
-}
-
-// Double returns 2*(x,y)
-func (bitCurve *BitCurve) Double(x1, y1 *big.Int) (*big.Int, *big.Int) {
- z1 := new(big.Int).SetInt64(1)
- return bitCurve.affineFromJacobian(bitCurve.doubleJacobian(x1, y1, z1))
-}
-
-// doubleJacobian takes a point in Jacobian coordinates, (x, y, z), and
-// returns its double, also in Jacobian form.
-func (bitCurve *BitCurve) doubleJacobian(x, y, z *big.Int) (*big.Int, *big.Int, *big.Int) {
- // See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l
-
- a := new(big.Int).Mul(x, x) //X1²
- b := new(big.Int).Mul(y, y) //Y1²
- c := new(big.Int).Mul(b, b) //B²
-
- d := new(big.Int).Add(x, b) //X1+B
- d.Mul(d, d) //(X1+B)²
- d.Sub(d, a) //(X1+B)²-A
- d.Sub(d, c) //(X1+B)²-A-C
- d.Mul(d, big.NewInt(2)) //2*((X1+B)²-A-C)
-
- e := new(big.Int).Mul(big.NewInt(3), a) //3*A
- f := new(big.Int).Mul(e, e) //E²
-
- x3 := new(big.Int).Mul(big.NewInt(2), d) //2*D
- x3.Sub(f, x3) //F-2*D
- x3.Mod(x3, bitCurve.P)
-
- y3 := new(big.Int).Sub(d, x3) //D-X3
- y3.Mul(e, y3) //E*(D-X3)
- y3.Sub(y3, new(big.Int).Mul(big.NewInt(8), c)) //E*(D-X3)-8*C
- y3.Mod(y3, bitCurve.P)
-
- z3 := new(big.Int).Mul(y, z) //Y1*Z1
- z3.Mul(big.NewInt(2), z3) //3*Y1*Z1
- z3.Mod(z3, bitCurve.P)
-
- return x3, y3, z3
-}
-
-// TODO: double check if it is okay
-// ScalarMult returns k*(Bx,By) where k is a number in big-endian form.
-func (bitCurve *BitCurve) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int) {
- // We have a slight problem in that the identity of the group (the
- // point at infinity) cannot be represented in (x, y) form on a finite
- // machine. Thus the standard add/double algorithm has to be tweaked
- // slightly: our initial state is not the identity, but x, and we
- // ignore the first true bit in |k|. If we don't find any true bits in
- // |k|, then we return nil, nil, because we cannot return the identity
- // element.
-
- Bz := new(big.Int).SetInt64(1)
- x := Bx
- y := By
- z := Bz
-
- seenFirstTrue := false
- for _, byte := range k {
- for bitNum := 0; bitNum < 8; bitNum++ {
- if seenFirstTrue {
- x, y, z = bitCurve.doubleJacobian(x, y, z)
- }
- if byte&0x80 == 0x80 {
- if !seenFirstTrue {
- seenFirstTrue = true
- } else {
- x, y, z = bitCurve.addJacobian(Bx, By, Bz, x, y, z)
- }
- }
- byte <<= 1
- }
- }
-
- if !seenFirstTrue {
- return nil, nil
- }
-
- return bitCurve.affineFromJacobian(x, y, z)
-}
-
-// ScalarBaseMult returns k*G, where G is the base point of the group and k is
-// an integer in big-endian form.
-func (bitCurve *BitCurve) ScalarBaseMult(k []byte) (*big.Int, *big.Int) {
- return bitCurve.ScalarMult(bitCurve.Gx, bitCurve.Gy, k)
-}
-
-var mask = []byte{0xff, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f}
-
-// TODO: double check if it is okay
-// GenerateKey returns a public/private key pair. The private key is generated
-// using the given reader, which must return random data.
-func (bitCurve *BitCurve) GenerateKey(rand io.Reader) (priv []byte, x, y *big.Int, err error) {
- byteLen := (bitCurve.BitSize + 7) >> 3
- priv = make([]byte, byteLen)
-
- for x == nil {
- _, err = io.ReadFull(rand, priv)
- if err != nil {
- return
- }
- // We have to mask off any excess bits in the case that the size of the
- // underlying field is not a whole number of bytes.
- priv[0] &= mask[bitCurve.BitSize%8]
- // This is because, in tests, rand will return all zeros and we don't
- // want to get the point at infinity and loop forever.
- priv[1] ^= 0x42
- x, y = bitCurve.ScalarBaseMult(priv)
- }
- return
-}
-
-// Marshal converts a point into the form specified in section 4.3.6 of ANSI
-// X9.62.
-func (bitCurve *BitCurve) Marshal(x, y *big.Int) []byte {
- byteLen := (bitCurve.BitSize + 7) >> 3
-
- ret := make([]byte, 1+2*byteLen)
- ret[0] = 4 // uncompressed point
-
- xBytes := x.Bytes()
- copy(ret[1+byteLen-len(xBytes):], xBytes)
- yBytes := y.Bytes()
- copy(ret[1+2*byteLen-len(yBytes):], yBytes)
- return ret
-}
-
-// Unmarshal converts a point, serialised by Marshal, into an x, y pair. On
-// error, x = nil.
-func (bitCurve *BitCurve) Unmarshal(data []byte) (x, y *big.Int) {
- byteLen := (bitCurve.BitSize + 7) >> 3
- if len(data) != 1+2*byteLen {
- return
- }
- if data[0] != 4 { // uncompressed form
- return
- }
- x = new(big.Int).SetBytes(data[1 : 1+byteLen])
- y = new(big.Int).SetBytes(data[1+byteLen:])
- return
-}
-
-//curve parameters taken from:
-//http://www.secg.org/collateral/sec2_final.pdf
-
-var initonce sync.Once
-var secp160k1 *BitCurve
-var secp192k1 *BitCurve
-var secp224k1 *BitCurve
-var secp256k1 *BitCurve
-
-func initAll() {
- initS160()
- initS192()
- initS224()
- initS256()
-}
-
-func initS160() {
- // See SEC 2 section 2.4.1
- secp160k1 = new(BitCurve)
- secp160k1.Name = "secp160k1"
- secp160k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", 16)
- secp160k1.N, _ = new(big.Int).SetString("0100000000000000000001B8FA16DFAB9ACA16B6B3", 16)
- secp160k1.B, _ = new(big.Int).SetString("0000000000000000000000000000000000000007", 16)
- secp160k1.Gx, _ = new(big.Int).SetString("3B4C382CE37AA192A4019E763036F4F5DD4D7EBB", 16)
- secp160k1.Gy, _ = new(big.Int).SetString("938CF935318FDCED6BC28286531733C3F03C4FEE", 16)
- secp160k1.BitSize = 160
-}
-
-func initS192() {
- // See SEC 2 section 2.5.1
- secp192k1 = new(BitCurve)
- secp192k1.Name = "secp192k1"
- secp192k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", 16)
- secp192k1.N, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 16)
- secp192k1.B, _ = new(big.Int).SetString("000000000000000000000000000000000000000000000003", 16)
- secp192k1.Gx, _ = new(big.Int).SetString("DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D", 16)
- secp192k1.Gy, _ = new(big.Int).SetString("9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", 16)
- secp192k1.BitSize = 192
-}
-
-func initS224() {
- // See SEC 2 section 2.6.1
- secp224k1 = new(BitCurve)
- secp224k1.Name = "secp224k1"
- secp224k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D", 16)
- secp224k1.N, _ = new(big.Int).SetString("010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 16)
- secp224k1.B, _ = new(big.Int).SetString("00000000000000000000000000000000000000000000000000000005", 16)
- secp224k1.Gx, _ = new(big.Int).SetString("A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C", 16)
- secp224k1.Gy, _ = new(big.Int).SetString("7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5", 16)
- secp224k1.BitSize = 224
-}
-
-func initS256() {
- // See SEC 2 section 2.7.1
- secp256k1 = new(BitCurve)
- secp256k1.Name = "secp256k1"
- secp256k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16)
- secp256k1.N, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 16)
- secp256k1.B, _ = new(big.Int).SetString("0000000000000000000000000000000000000000000000000000000000000007", 16)
- secp256k1.Gx, _ = new(big.Int).SetString("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16)
- secp256k1.Gy, _ = new(big.Int).SetString("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", 16)
- secp256k1.BitSize = 256
-}
-
-// S160 returns a BitCurve which implements secp160k1 (see SEC 2 section 2.4.1)
-func S160() *BitCurve {
- initonce.Do(initAll)
- return secp160k1
-}
-
-// S192 returns a BitCurve which implements secp192k1 (see SEC 2 section 2.5.1)
-func S192() *BitCurve {
- initonce.Do(initAll)
- return secp192k1
-}
-
-// S224 returns a BitCurve which implements secp224k1 (see SEC 2 section 2.6.1)
-func S224() *BitCurve {
- initonce.Do(initAll)
- return secp224k1
-}
-
-// S256 returns a BitCurve which implements bitcurves (see SEC 2 section 2.7.1)
-func S256() *BitCurve {
- initonce.Do(initAll)
- return secp256k1
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/brainpool/brainpool.go b/vendor/github.com/ProtonMail/go-crypto/brainpool/brainpool.go
deleted file mode 100644
index cb6676de24..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/brainpool/brainpool.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Package brainpool implements Brainpool elliptic curves.
-// Implementation of rcurves is from github.com/ebfe/brainpool
-// Note that these curves are implemented with naive, non-constant time operations
-// and are likely not suitable for environments where timing attacks are a concern.
-package brainpool
-
-import (
- "crypto/elliptic"
- "math/big"
- "sync"
-)
-
-var (
- once sync.Once
- p256t1, p384t1, p512t1 *elliptic.CurveParams
- p256r1, p384r1, p512r1 *rcurve
-)
-
-func initAll() {
- initP256t1()
- initP384t1()
- initP512t1()
- initP256r1()
- initP384r1()
- initP512r1()
-}
-
-func initP256t1() {
- p256t1 = &elliptic.CurveParams{Name: "brainpoolP256t1"}
- p256t1.P, _ = new(big.Int).SetString("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", 16)
- p256t1.N, _ = new(big.Int).SetString("A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", 16)
- p256t1.B, _ = new(big.Int).SetString("662C61C430D84EA4FE66A7733D0B76B7BF93EBC4AF2F49256AE58101FEE92B04", 16)
- p256t1.Gx, _ = new(big.Int).SetString("A3E8EB3CC1CFE7B7732213B23A656149AFA142C47AAFBC2B79A191562E1305F4", 16)
- p256t1.Gy, _ = new(big.Int).SetString("2D996C823439C56D7F7B22E14644417E69BCB6DE39D027001DABE8F35B25C9BE", 16)
- p256t1.BitSize = 256
-}
-
-func initP256r1() {
- twisted := p256t1
- params := &elliptic.CurveParams{
- Name: "brainpoolP256r1",
- P: twisted.P,
- N: twisted.N,
- BitSize: twisted.BitSize,
- }
- params.Gx, _ = new(big.Int).SetString("8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", 16)
- params.Gy, _ = new(big.Int).SetString("547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", 16)
- z, _ := new(big.Int).SetString("3E2D4BD9597B58639AE7AA669CAB9837CF5CF20A2C852D10F655668DFC150EF0", 16)
- p256r1 = newrcurve(twisted, params, z)
-}
-
-func initP384t1() {
- p384t1 = &elliptic.CurveParams{Name: "brainpoolP384t1"}
- p384t1.P, _ = new(big.Int).SetString("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53", 16)
- p384t1.N, _ = new(big.Int).SetString("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565", 16)
- p384t1.B, _ = new(big.Int).SetString("7F519EADA7BDA81BD826DBA647910F8C4B9346ED8CCDC64E4B1ABD11756DCE1D2074AA263B88805CED70355A33B471EE", 16)
- p384t1.Gx, _ = new(big.Int).SetString("18DE98B02DB9A306F2AFCD7235F72A819B80AB12EBD653172476FECD462AABFFC4FF191B946A5F54D8D0AA2F418808CC", 16)
- p384t1.Gy, _ = new(big.Int).SetString("25AB056962D30651A114AFD2755AD336747F93475B7A1FCA3B88F2B6A208CCFE469408584DC2B2912675BF5B9E582928", 16)
- p384t1.BitSize = 384
-}
-
-func initP384r1() {
- twisted := p384t1
- params := &elliptic.CurveParams{
- Name: "brainpoolP384r1",
- P: twisted.P,
- N: twisted.N,
- BitSize: twisted.BitSize,
- }
- params.Gx, _ = new(big.Int).SetString("1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E", 16)
- params.Gy, _ = new(big.Int).SetString("8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315", 16)
- z, _ := new(big.Int).SetString("41DFE8DD399331F7166A66076734A89CD0D2BCDB7D068E44E1F378F41ECBAE97D2D63DBC87BCCDDCCC5DA39E8589291C", 16)
- p384r1 = newrcurve(twisted, params, z)
-}
-
-func initP512t1() {
- p512t1 = &elliptic.CurveParams{Name: "brainpoolP512t1"}
- p512t1.P, _ = new(big.Int).SetString("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3", 16)
- p512t1.N, _ = new(big.Int).SetString("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069", 16)
- p512t1.B, _ = new(big.Int).SetString("7CBBBCF9441CFAB76E1890E46884EAE321F70C0BCB4981527897504BEC3E36A62BCDFA2304976540F6450085F2DAE145C22553B465763689180EA2571867423E", 16)
- p512t1.Gx, _ = new(big.Int).SetString("640ECE5C12788717B9C1BA06CBC2A6FEBA85842458C56DDE9DB1758D39C0313D82BA51735CDB3EA499AA77A7D6943A64F7A3F25FE26F06B51BAA2696FA9035DA", 16)
- p512t1.Gy, _ = new(big.Int).SetString("5B534BD595F5AF0FA2C892376C84ACE1BB4E3019B71634C01131159CAE03CEE9D9932184BEEF216BD71DF2DADF86A627306ECFF96DBB8BACE198B61E00F8B332", 16)
- p512t1.BitSize = 512
-}
-
-func initP512r1() {
- twisted := p512t1
- params := &elliptic.CurveParams{
- Name: "brainpoolP512r1",
- P: twisted.P,
- N: twisted.N,
- BitSize: twisted.BitSize,
- }
- params.Gx, _ = new(big.Int).SetString("81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822", 16)
- params.Gy, _ = new(big.Int).SetString("7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892", 16)
- z, _ := new(big.Int).SetString("12EE58E6764838B69782136F0F2D3BA06E27695716054092E60A80BEDB212B64E585D90BCE13761F85C3F1D2A64E3BE8FEA2220F01EBA5EEB0F35DBD29D922AB", 16)
- p512r1 = newrcurve(twisted, params, z)
-}
-
-// P256t1 returns a Curve which implements Brainpool P256t1 (see RFC 5639, section 3.4)
-func P256t1() elliptic.Curve {
- once.Do(initAll)
- return p256t1
-}
-
-// P256r1 returns a Curve which implements Brainpool P256r1 (see RFC 5639, section 3.4)
-func P256r1() elliptic.Curve {
- once.Do(initAll)
- return p256r1
-}
-
-// P384t1 returns a Curve which implements Brainpool P384t1 (see RFC 5639, section 3.6)
-func P384t1() elliptic.Curve {
- once.Do(initAll)
- return p384t1
-}
-
-// P384r1 returns a Curve which implements Brainpool P384r1 (see RFC 5639, section 3.6)
-func P384r1() elliptic.Curve {
- once.Do(initAll)
- return p384r1
-}
-
-// P512t1 returns a Curve which implements Brainpool P512t1 (see RFC 5639, section 3.7)
-func P512t1() elliptic.Curve {
- once.Do(initAll)
- return p512t1
-}
-
-// P512r1 returns a Curve which implements Brainpool P512r1 (see RFC 5639, section 3.7)
-func P512r1() elliptic.Curve {
- once.Do(initAll)
- return p512r1
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/brainpool/rcurve.go b/vendor/github.com/ProtonMail/go-crypto/brainpool/rcurve.go
deleted file mode 100644
index 7e291d6aa4..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/brainpool/rcurve.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package brainpool
-
-import (
- "crypto/elliptic"
- "math/big"
-)
-
-var _ elliptic.Curve = (*rcurve)(nil)
-
-type rcurve struct {
- twisted elliptic.Curve
- params *elliptic.CurveParams
- z *big.Int
- zinv *big.Int
- z2 *big.Int
- z3 *big.Int
- zinv2 *big.Int
- zinv3 *big.Int
-}
-
-var (
- two = big.NewInt(2)
- three = big.NewInt(3)
-)
-
-func newrcurve(twisted elliptic.Curve, params *elliptic.CurveParams, z *big.Int) *rcurve {
- zinv := new(big.Int).ModInverse(z, params.P)
- return &rcurve{
- twisted: twisted,
- params: params,
- z: z,
- zinv: zinv,
- z2: new(big.Int).Exp(z, two, params.P),
- z3: new(big.Int).Exp(z, three, params.P),
- zinv2: new(big.Int).Exp(zinv, two, params.P),
- zinv3: new(big.Int).Exp(zinv, three, params.P),
- }
-}
-
-func (curve *rcurve) toTwisted(x, y *big.Int) (*big.Int, *big.Int) {
- var tx, ty big.Int
- tx.Mul(x, curve.z2)
- tx.Mod(&tx, curve.params.P)
- ty.Mul(y, curve.z3)
- ty.Mod(&ty, curve.params.P)
- return &tx, &ty
-}
-
-func (curve *rcurve) fromTwisted(tx, ty *big.Int) (*big.Int, *big.Int) {
- var x, y big.Int
- x.Mul(tx, curve.zinv2)
- x.Mod(&x, curve.params.P)
- y.Mul(ty, curve.zinv3)
- y.Mod(&y, curve.params.P)
- return &x, &y
-}
-
-func (curve *rcurve) Params() *elliptic.CurveParams {
- return curve.params
-}
-
-func (curve *rcurve) IsOnCurve(x, y *big.Int) bool {
- return curve.twisted.IsOnCurve(curve.toTwisted(x, y))
-}
-
-func (curve *rcurve) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int) {
- tx1, ty1 := curve.toTwisted(x1, y1)
- tx2, ty2 := curve.toTwisted(x2, y2)
- return curve.fromTwisted(curve.twisted.Add(tx1, ty1, tx2, ty2))
-}
-
-func (curve *rcurve) Double(x1, y1 *big.Int) (x, y *big.Int) {
- return curve.fromTwisted(curve.twisted.Double(curve.toTwisted(x1, y1)))
-}
-
-func (curve *rcurve) ScalarMult(x1, y1 *big.Int, scalar []byte) (x, y *big.Int) {
- tx1, ty1 := curve.toTwisted(x1, y1)
- return curve.fromTwisted(curve.twisted.ScalarMult(tx1, ty1, scalar))
-}
-
-func (curve *rcurve) ScalarBaseMult(scalar []byte) (x, y *big.Int) {
- return curve.fromTwisted(curve.twisted.ScalarBaseMult(scalar))
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/eax/eax.go b/vendor/github.com/ProtonMail/go-crypto/eax/eax.go
deleted file mode 100644
index 3ae91d594c..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/eax/eax.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-
-// Package eax provides an implementation of the EAX
-// (encrypt-authenticate-translate) mode of operation, as described in
-// Bellare, Rogaway, and Wagner "THE EAX MODE OF OPERATION: A TWO-PASS
-// AUTHENTICATED-ENCRYPTION SCHEME OPTIMIZED FOR SIMPLICITY AND EFFICIENCY."
-// In FSE'04, volume 3017 of LNCS, 2004
-package eax
-
-import (
- "crypto/cipher"
- "crypto/subtle"
- "errors"
- "github.com/ProtonMail/go-crypto/internal/byteutil"
-)
-
-const (
- defaultTagSize = 16
- defaultNonceSize = 16
-)
-
-type eax struct {
- block cipher.Block // Only AES-{128, 192, 256} supported
- tagSize int // At least 12 bytes recommended
- nonceSize int
-}
-
-func (e *eax) NonceSize() int {
- return e.nonceSize
-}
-
-func (e *eax) Overhead() int {
- return e.tagSize
-}
-
-// NewEAX returns an EAX instance with AES-{KEYLENGTH} and default nonce and
-// tag lengths. Supports {128, 192, 256}- bit key length.
-func NewEAX(block cipher.Block) (cipher.AEAD, error) {
- return NewEAXWithNonceAndTagSize(block, defaultNonceSize, defaultTagSize)
-}
-
-// NewEAXWithNonceAndTagSize returns an EAX instance with AES-{keyLength} and
-// given nonce and tag lengths in bytes. Panics on zero nonceSize and
-// exceedingly long tags.
-//
-// It is recommended to use at least 12 bytes as tag length (see, for instance,
-// NIST SP 800-38D).
-//
-// Only to be used for compatibility with existing cryptosystems with
-// non-standard parameters. For all other cases, prefer NewEAX.
-func NewEAXWithNonceAndTagSize(
- block cipher.Block, nonceSize, tagSize int) (cipher.AEAD, error) {
- if nonceSize < 1 {
- return nil, eaxError("Cannot initialize EAX with nonceSize = 0")
- }
- if tagSize > block.BlockSize() {
- return nil, eaxError("Custom tag length exceeds blocksize")
- }
- return &eax{
- block: block,
- tagSize: tagSize,
- nonceSize: nonceSize,
- }, nil
-}
-
-func (e *eax) Seal(dst, nonce, plaintext, adata []byte) []byte {
- if len(nonce) > e.nonceSize {
- panic("crypto/eax: Nonce too long for this instance")
- }
- ret, out := byteutil.SliceForAppend(dst, len(plaintext)+e.tagSize)
- omacNonce := e.omacT(0, nonce)
- omacAdata := e.omacT(1, adata)
-
- // Encrypt message using CTR mode and omacNonce as IV
- ctr := cipher.NewCTR(e.block, omacNonce)
- ciphertextData := out[:len(plaintext)]
- ctr.XORKeyStream(ciphertextData, plaintext)
-
- omacCiphertext := e.omacT(2, ciphertextData)
-
- tag := out[len(plaintext):]
- for i := 0; i < e.tagSize; i++ {
- tag[i] = omacCiphertext[i] ^ omacNonce[i] ^ omacAdata[i]
- }
- return ret
-}
-
-func (e *eax) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
- if len(nonce) > e.nonceSize {
- panic("crypto/eax: Nonce too long for this instance")
- }
- if len(ciphertext) < e.tagSize {
- return nil, eaxError("Ciphertext shorter than tag length")
- }
- sep := len(ciphertext) - e.tagSize
-
- // Compute tag
- omacNonce := e.omacT(0, nonce)
- omacAdata := e.omacT(1, adata)
- omacCiphertext := e.omacT(2, ciphertext[:sep])
-
- tag := make([]byte, e.tagSize)
- for i := 0; i < e.tagSize; i++ {
- tag[i] = omacCiphertext[i] ^ omacNonce[i] ^ omacAdata[i]
- }
-
- // Compare tags
- if subtle.ConstantTimeCompare(ciphertext[sep:], tag) != 1 {
- return nil, eaxError("Tag authentication failed")
- }
-
- // Decrypt ciphertext
- ret, out := byteutil.SliceForAppend(dst, len(ciphertext))
- ctr := cipher.NewCTR(e.block, omacNonce)
- ctr.XORKeyStream(out, ciphertext[:sep])
-
- return ret[:sep], nil
-}
-
-// Tweakable OMAC - Calls OMAC_K([t]_n || plaintext)
-func (e *eax) omacT(t byte, plaintext []byte) []byte {
- blockSize := e.block.BlockSize()
- byteT := make([]byte, blockSize)
- byteT[blockSize-1] = t
- concat := append(byteT, plaintext...)
- return e.omac(concat)
-}
-
-func (e *eax) omac(plaintext []byte) []byte {
- blockSize := e.block.BlockSize()
- // L ← E_K(0^n); B ← 2L; P ← 4L
- L := make([]byte, blockSize)
- e.block.Encrypt(L, L)
- B := byteutil.GfnDouble(L)
- P := byteutil.GfnDouble(B)
-
- // CBC with IV = 0
- cbc := cipher.NewCBCEncrypter(e.block, make([]byte, blockSize))
- padded := e.pad(plaintext, B, P)
- cbcCiphertext := make([]byte, len(padded))
- cbc.CryptBlocks(cbcCiphertext, padded)
-
- return cbcCiphertext[len(cbcCiphertext)-blockSize:]
-}
-
-func (e *eax) pad(plaintext, B, P []byte) []byte {
- // if |M| in {n, 2n, 3n, ...}
- blockSize := e.block.BlockSize()
- if len(plaintext) != 0 && len(plaintext)%blockSize == 0 {
- return byteutil.RightXor(plaintext, B)
- }
-
- // else return (M || 1 || 0^(n−1−(|M| % n))) xor→ P
- ending := make([]byte, blockSize-len(plaintext)%blockSize)
- ending[0] = 0x80
- padded := append(plaintext, ending...)
- return byteutil.RightXor(padded, P)
-}
-
-func eaxError(err string) error {
- return errors.New("crypto/eax: " + err)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/eax/eax_test_vectors.go b/vendor/github.com/ProtonMail/go-crypto/eax/eax_test_vectors.go
deleted file mode 100644
index ddb53d0790..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/eax/eax_test_vectors.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package eax
-
-// Test vectors from
-// https://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf
-var testVectors = []struct {
- msg, key, nonce, header, ciphertext string
-}{
- {"",
- "233952DEE4D5ED5F9B9C6D6FF80FF478",
- "62EC67F9C3A4A407FCB2A8C49031A8B3",
- "6BFB914FD07EAE6B",
- "E037830E8389F27B025A2D6527E79D01"},
- {"F7FB",
- "91945D3F4DCBEE0BF45EF52255F095A4",
- "BECAF043B0A23D843194BA972C66DEBD",
- "FA3BFD4806EB53FA",
- "19DD5C4C9331049D0BDAB0277408F67967E5"},
- {"1A47CB4933",
- "01F74AD64077F2E704C0F60ADA3DD523",
- "70C3DB4F0D26368400A10ED05D2BFF5E",
- "234A3463C1264AC6",
- "D851D5BAE03A59F238A23E39199DC9266626C40F80"},
- {"481C9E39B1",
- "D07CF6CBB7F313BDDE66B727AFD3C5E8",
- "8408DFFF3C1A2B1292DC199E46B7D617",
- "33CCE2EABFF5A79D",
- "632A9D131AD4C168A4225D8E1FF755939974A7BEDE"},
- {"40D0C07DA5E4",
- "35B6D0580005BBC12B0587124557D2C2",
- "FDB6B06676EEDC5C61D74276E1F8E816",
- "AEB96EAEBE2970E9",
- "071DFE16C675CB0677E536F73AFE6A14B74EE49844DD"},
- {"4DE3B35C3FC039245BD1FB7D",
- "BD8E6E11475E60B268784C38C62FEB22",
- "6EAC5C93072D8E8513F750935E46DA1B",
- "D4482D1CA78DCE0F",
- "835BB4F15D743E350E728414ABB8644FD6CCB86947C5E10590210A4F"},
- {"8B0A79306C9CE7ED99DAE4F87F8DD61636",
- "7C77D6E813BED5AC98BAA417477A2E7D",
- "1A8C98DCD73D38393B2BF1569DEEFC19",
- "65D2017990D62528",
- "02083E3979DA014812F59F11D52630DA30137327D10649B0AA6E1C181DB617D7F2"},
- {"1BDA122BCE8A8DBAF1877D962B8592DD2D56",
- "5FFF20CAFAB119CA2FC73549E20F5B0D",
- "DDE59B97D722156D4D9AFF2BC7559826",
- "54B9F04E6A09189A",
- "2EC47B2C4954A489AFC7BA4897EDCDAE8CC33B60450599BD02C96382902AEF7F832A"},
- {"6CF36720872B8513F6EAB1A8A44438D5EF11",
- "A4A4782BCFFD3EC5E7EF6D8C34A56123",
- "B781FCF2F75FA5A8DE97A9CA48E522EC",
- "899A175897561D7E",
- "0DE18FD0FDD91E7AF19F1D8EE8733938B1E8E7F6D2231618102FDB7FE55FF1991700"},
- {"CA40D7446E545FFAED3BD12A740A659FFBBB3CEAB7",
- "8395FCF1E95BEBD697BD010BC766AAC3",
- "22E7ADD93CFC6393C57EC0B3C17D6B44",
- "126735FCC320D25A",
- "CB8920F87A6C75CFF39627B56E3ED197C552D295A7CFC46AFC253B4652B1AF3795B124AB6E"},
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/eax/random_vectors.go b/vendor/github.com/ProtonMail/go-crypto/eax/random_vectors.go
deleted file mode 100644
index 4eb19f28d9..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/eax/random_vectors.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// These vectors include key length in {128, 192, 256}, tag size 128, and
-// random nonce, header, and plaintext lengths.
-
-// This file was automatically generated.
-
-package eax
-
-var randomVectors = []struct {
- key, nonce, header, plaintext, ciphertext string
-}{
- {"DFDE093F36B0356E5A81F609786982E3",
- "1D8AC604419001816905BA72B14CED7E",
- "152A1517A998D7A24163FCDD146DE81AC347C8B97088F502093C1ABB8F6E33D9A219C34D7603A18B1F5ABE02E56661B7D7F67E81EC08C1302EF38D80A859486D450E94A4F26AD9E68EEBBC0C857A0FC5CF9E641D63D565A7E361BC8908F5A8DC8FD6",
- "1C8EAAB71077FE18B39730A3156ADE29C5EE824C7EE86ED2A253B775603FB237116E654F6FEC588DD27F523A0E01246FE73FE348491F2A8E9ABC6CA58D663F71CDBCF4AD798BE46C42AE6EE8B599DB44A1A48D7BBBBA0F7D2750181E1C5E66967F7D57CBD30AFBDA5727",
- "79E7E150934BBEBF7013F61C60462A14D8B15AF7A248AFB8A344EF021C1500E16666891D6E973D8BB56B71A371F12CA34660C4410C016982B20F547E3762A58B7BF4F20236CADCF559E2BE7D783B13723B2741FC7CDC8997D839E39A3DDD2BADB96743DD7049F1BDB0516A262869915B3F70498AFB7B191BF960"},
- {"F10619EF02E5D94D7550EB84ED364A21",
- "8DC0D4F2F745BBAE835CC5574B942D20",
- "FE561358F2E8DF7E1024FF1AE9A8D36EBD01352214505CB99D644777A8A1F6027FA2BDBFC529A9B91136D5F2416CFC5F0F4EC3A1AFD32BDDA23CA504C5A5CB451785FABF4DFE4CD50D817491991A60615B30286361C100A95D1712F2A45F8E374461F4CA2B",
- "D7B5A971FC219631D30EFC3664AE3127D9CF3097DAD9C24AC7905D15E8D9B25B026B31D68CAE00975CDB81EB1FD96FD5E1A12E2BB83FA25F1B1D91363457657FC03875C27F2946C5",
- "2F336ED42D3CC38FC61660C4CD60BA4BD438B05F5965D8B7B399D2E7167F5D34F792D318F94DB15D67463AC449E13D568CC09BFCE32A35EE3EE96A041927680AE329811811E27F2D1E8E657707AF99BA96D13A478D695D59"},
- {"429F514EFC64D98A698A9247274CFF45",
- "976AA5EB072F912D126ACEBC954FEC38",
- "A71D89DC5B6CEDBB7451A27C3C2CAE09126DB4C421",
- "5632FE62AB1DC549D54D3BC3FC868ACCEDEFD9ECF5E9F8",
- "848AE4306CA8C7F416F8707625B7F55881C0AB430353A5C967CDA2DA787F581A70E34DBEBB2385"},
- {"398138F309085F47F8457CDF53895A63",
- "F8A8A7F2D28E5FFF7BBC2F24353F7A36",
- "5D633C21BA7764B8855CAB586F3746E236AD486039C83C6B56EFA9C651D38A41D6B20DAEE3418BFEA44B8BD6",
- "A3BBAA91920AF5E10659818B1B3B300AC79BFC129C8329E75251F73A66D3AE0128EB91D5031E0A65C329DB7D1E9C0493E268",
- "D078097267606E5FB07CFB7E2B4B718172A82C6A4CEE65D549A4DFB9838003BD2FBF64A7A66988AC1A632FD88F9E9FBB57C5A78AD2E086EACBA3DB68511D81C2970A"},
- {"7A4151EBD3901B42CBA45DAFB2E931BA",
- "0FC88ACEE74DD538040321C330974EB8",
- "250464FB04733BAB934C59E6AD2D6AE8D662CBCFEFBE61E5A308D4211E58C4C25935B72C69107722E946BFCBF416796600542D76AEB73F2B25BF53BAF97BDEB36ED3A7A51C31E7F170EB897457E7C17571D1BA0A908954E9",
- "88C41F3EBEC23FAB8A362D969CAC810FAD4F7CA6A7F7D0D44F060F92E37E1183768DD4A8C733F71C96058D362A39876D183B86C103DE",
- "74A25B2182C51096D48A870D80F18E1CE15867778E34FCBA6BD7BFB3739FDCD42AD0F2D9F4EBA29085285C6048C15BCE5E5166F1F962D3337AA88E6062F05523029D0A7F0BF9"},
- {"BFB147E1CD5459424F8C0271FC0E0DC5",
- "EABCC126442BF373969EA3015988CC45",
- "4C0880E1D71AA2C7",
- "BE1B5EC78FBF73E7A6682B21BA7E0E5D2D1C7ABE",
- "5660D7C1380E2F306895B1402CB2D6C37876504276B414D120F4CF92FDDDBB293A238EA0"},
- {"595DD6F52D18BC2CA8EB4EDAA18D9FA3",
- "0F84B5D36CF4BC3B863313AF3B4D2E97",
- "30AE6CC5F99580F12A779D98BD379A60948020C0B6FBD5746B30BA3A15C6CD33DAF376C70A9F15B6C0EB410A93161F7958AE23",
- "8EF3687A1642B070970B0B91462229D1D76ABC154D18211F7152AA9FF368",
- "317C1DDB11417E5A9CC4DDE7FDFF6659A5AC4B31DE025212580A05CDAC6024D3E4AE7C2966E52B9129E9ECDBED86"},
- {"44E6F2DC8FDC778AD007137D11410F50",
- "270A237AD977F7187AA6C158A0BAB24F",
- "509B0F0EB12E2AA5C5BA2DE553C07FAF4CE0C9E926531AA709A3D6224FCB783ACCF1559E10B1123EBB7D52E8AB54E6B5352A9ED0D04124BF0E9D9BACFD7E32B817B2E625F5EE94A64EDE9E470DE7FE6886C19B294F9F828209FE257A78",
- "8B3D7815DF25618A5D0C55A601711881483878F113A12EC36CF64900549A3199555528559DC118F789788A55FAFD944E6E99A9CA3F72F238CD3F4D88223F7A745992B3FAED1848",
- "1CC00D79F7AD82FDA71B58D286E5F34D0CC4CEF30704E771CC1E50746BDF83E182B078DB27149A42BAE619DF0F85B0B1090AD55D3B4471B0D6F6ECCD09C8F876B30081F0E7537A9624F8AAF29DA85E324122EFB4D68A56"},
- {"BB7BC352A03044B4428D8DBB4B0701FDEC4649FD17B81452",
- "8B4BBE26CCD9859DCD84884159D6B0A4",
- "2212BEB0E78E0F044A86944CF33C8D5C80D9DBE1034BF3BCF73611835C7D3A52F5BD2D81B68FD681B68540A496EE5DA16FD8AC8824E60E1EC2042BE28FB0BFAD4E4B03596446BDD8C37D936D9B3D5295BE19F19CF5ACE1D33A46C952CE4DE5C12F92C1DD051E04AEED",
- "9037234CC44FFF828FABED3A7084AF40FA7ABFF8E0C0EFB57A1CC361E18FC4FAC1AB54F3ABFE9FF77263ACE16C3A",
- "A9391B805CCD956081E0B63D282BEA46E7025126F1C1631239C33E92AA6F92CD56E5A4C56F00FF9658E93D48AF4EF0EF81628E34AD4DB0CDAEDCD2A17EE7"},
- {"99C0AD703196D2F60A74E6B378B838B31F82EA861F06FC4E",
- "92745C018AA708ECFEB1667E9F3F1B01",
- "828C69F376C0C0EC651C67749C69577D589EE39E51404D80EBF70C8660A8F5FD375473F4A7C611D59CB546A605D67446CE2AA844135FCD78BB5FBC90222A00D42920BB1D7EEDFB0C4672554F583EF23184F89063CDECBE482367B5F9AF3ACBC3AF61392BD94CBCD9B64677",
- "A879214658FD0A5B0E09836639BF82E05EC7A5EF71D4701934BDA228435C68AC3D5CEB54997878B06A655EEACEFB1345C15867E7FE6C6423660C8B88DF128EBD6BCD85118DBAE16E9252FFB204324E5C8F38CA97759BDBF3CB0083",
- "51FE87996F194A2585E438B023B345439EA60D1AEBED4650CDAF48A4D4EEC4FC77DC71CC4B09D3BEEF8B7B7AF716CE2B4EFFB3AC9E6323C18AC35E0AA6E2BBBC8889490EB6226C896B0D105EAB42BFE7053CCF00ED66BA94C1BA09A792AA873F0C3B26C5C5F9A936E57B25"},
- {"7086816D00D648FB8304AA8C9E552E1B69A9955FB59B25D1",
- "0F45CF7F0BF31CCEB85D9DA10F4D749F",
- "93F27C60A417D9F0669E86ACC784FC8917B502DAF30A6338F11B30B94D74FEFE2F8BE1BBE2EAD10FAB7EED3C6F72B7C3ECEE1937C32ED4970A6404E139209C05",
- "877F046601F3CBE4FB1491943FA29487E738F94B99AF206262A1D6FF856C9AA0B8D4D08A54370C98F8E88FA3DCC2B14C1F76D71B2A4C7963AEE8AF960464C5BEC8357AD00DC8",
- "FE96906B895CE6A8E72BC72344E2C8BB3C63113D70EAFA26C299BAFE77A8A6568172EB447FB3E86648A0AF3512DEB1AAC0819F3EC553903BF28A9FB0F43411237A774BF9EE03E445D280FBB9CD12B9BAAB6EF5E52691"},
- {"062F65A896D5BF1401BADFF70E91B458E1F9BD4888CB2E4D",
- "5B11EA1D6008EBB41CF892FCA5B943D1",
- "BAF4FF5C8242",
- "A8870E091238355984EB2F7D61A865B9170F440BFF999A5993DD41A10F4440D21FF948DDA2BF663B2E03AC3324492DC5E40262ECC6A65C07672353BE23E7FB3A9D79FF6AA38D97960905A38DECC312CB6A59E5467ECF06C311CD43ADC0B543EDF34FE8BE611F176460D5627CA51F8F8D9FED71F55C",
- "B10E127A632172CF8AA7539B140D2C9C2590E6F28C3CB892FC498FCE56A34F732FBFF32E79C7B9747D9094E8635A0C084D6F0247F9768FB5FF83493799A9BEC6C39572120C40E9292C8C947AE8573462A9108C36D9D7112E6995AE5867E6C8BB387D1C5D4BEF524F391B9FD9F0A3B4BFA079E915BCD920185CFD38D114C558928BD7D47877"},
- {"38A8E45D6D705A11AF58AED5A1344896998EACF359F2E26A",
- "FD82B5B31804FF47D44199B533D0CF84",
- "DE454D4E62FE879F2050EE3E25853623D3E9AC52EEC1A1779A48CFAF5ECA0BFDE44749391866D1",
- "B804",
- "164BB965C05EBE0931A1A63293EDF9C38C27"},
- {"34C33C97C6D7A0850DA94D78A58DC61EC717CD7574833068",
- "343BE00DA9483F05C14F2E9EB8EA6AE8",
- "78312A43EFDE3CAE34A65796FF059A3FE15304EEA5CF1D9306949FE5BF3349D4977D4EBE76C040FE894C5949E4E4D6681153DA87FB9AC5062063CA2EA183566343362370944CE0362D25FC195E124FD60E8682E665D13F2229DDA3E4B2CB1DCA",
- "CC11BB284B1153578E4A5ED9D937B869DAF00F5B1960C23455CA9CC43F486A3BE0B66254F1041F04FDF459C8640465B6E1D2CF899A381451E8E7FCB50CF87823BE77E24B132BBEEDC72E53369B275E1D8F49ECE59F4F215230AC4FE133FC80E4F634EE80BA4682B62C86",
- "E7F703DC31A95E3A4919FF957836CB76C063D81702AEA4703E1C2BF30831E58C4609D626EC6810E12EAA5B930F049FF9EFC22C3E3F1EBD4A1FB285CB02A1AC5AD46B425199FC0A85670A5C4E3DAA9636C8F64C199F42F18AAC8EA7457FD377F322DD7752D7D01B946C8F0A97E6113F0D50106F319AFD291AAACE"},
- {"C6ECF7F053573E403E61B83052A343D93CBCC179D1E835BE",
- "E280E13D7367042E3AA09A80111B6184",
- "21486C9D7A9647",
- "5F2639AFA6F17931853791CD8C92382BBB677FD72D0AB1A080D0E49BFAA21810E963E4FACD422E92F65CBFAD5884A60CD94740DF31AF02F95AA57DA0C4401B0ED906",
- "5C51DB20755302070C45F52E50128A67C8B2E4ED0EACB7E29998CCE2E8C289DD5655913EC1A51CC3AABE5CDC2402B2BE7D6D4BF6945F266FBD70BA9F37109067157AE7530678B45F64475D4EBFCB5FFF46A5"},
- {"5EC6CF7401BC57B18EF154E8C38ACCA8959E57D2F3975FF5",
- "656B41CB3F9CF8C08BAD7EBFC80BD225",
- "6B817C2906E2AF425861A7EF59BA5801F143EE2A139EE72697CDE168B4",
- "2C0E1DDC9B1E5389BA63845B18B1F8A1DB062037151BCC56EF7C21C0BB4DAE366636BBA975685D7CC5A94AFBE89C769016388C56FB7B57CE750A12B718A8BDCF70E80E8659A8330EFC8F86640F21735E8C80E23FE43ABF23507CE3F964AE4EC99D",
- "ED780CF911E6D1AA8C979B889B0B9DC1ABE261832980BDBFB576901D9EF5AB8048998E31A15BE54B3E5845A4D136AD24D0BDA1C3006168DF2F8AC06729CB0818867398150020131D8F04EDF1923758C9EABB5F735DE5EA1758D4BC0ACFCA98AFD202E9839B8720253693B874C65586C6F0"},
- {"C92F678EB2208662F5BCF3403EC05F5961E957908A3E79421E1D25FC19054153",
- "DA0F3A40983D92F2D4C01FED33C7A192",
- "2B6E9D26DB406A0FAB47608657AA10EFC2B4AA5F459B29FF85AC9A40BFFE7AEB04F77E9A11FAAA116D7F6D4DA417671A9AB02C588E0EF59CB1BFB4B1CC931B63A3B3A159FCEC97A04D1E6F0C7E6A9CEF6B0ABB04758A69F1FE754DF4C2610E8C46B6CF413BDB31351D55BEDCB7B4A13A1C98E10984475E0F2F957853",
- "F37326A80E08",
- "83519E53E321D334F7C10B568183775C0E9AAE55F806"},
- {"6847E0491BE57E72995D186D50094B0B3593957A5146798FCE68B287B2FB37B5",
- "3EE1182AEBB19A02B128F28E1D5F7F99",
- "D9F35ABB16D776CE",
- "DB7566ED8EA95BDF837F23DB277BAFBC5E70D1105ADFD0D9EF15475051B1EF94709C67DCA9F8D5",
- "2CDCED0C9EBD6E2A508822A685F7DCD1CDD99E7A5FCA786C234E7F7F1D27EC49751AD5DCFA30C5EDA87C43CAE3B919B6BBCFE34C8EDA59"},
- {"82B019673642C08388D3E42075A4D5D587558C229E4AB8F660E37650C4C41A0A",
- "336F5D681E0410FAE7B607246092C6DC",
- "D430CBD8FE435B64214E9E9CDC5DE99D31CFCFB8C10AA0587A49DF276611",
- "998404153AD77003E1737EDE93ED79859EE6DCCA93CB40C4363AA817ABF2DBBD46E42A14A7183B6CC01E12A577888141363D0AE011EB6E8D28C0B235",
- "9BEF69EEB60BD3D6065707B7557F25292A8872857CFBD24F2F3C088E4450995333088DA50FD9121221C504DF1D0CD5EFE6A12666C5D5BB12282CF4C19906E9CFAB97E9BDF7F49DC17CFC384B"},
- {"747B2E269B1859F0622C15C8BAD6A725028B1F94B8DB7326948D1E6ED663A8BC",
- "AB91F7245DDCE3F1C747872D47BE0A8A",
- "3B03F786EF1DDD76E1D42646DA4CD2A5165DC5383CE86D1A0B5F13F910DC278A4E451EE0192CBA178E13B3BA27FDC7840DF73D2E104B",
- "6B803F4701114F3E5FE21718845F8416F70F626303F545BE197189E0A2BA396F37CE06D389EB2658BC7D56D67868708F6D0D32",
- "1570DDB0BCE75AA25D1957A287A2C36B1A5F2270186DA81BA6112B7F43B0F3D1D0ED072591DCF1F1C99BBB25621FC39B896FF9BD9413A2845363A9DCD310C32CF98E57"},
- {"02E59853FB29AEDA0FE1C5F19180AD99A12FF2F144670BB2B8BADF09AD812E0A",
- "C691294EF67CD04D1B9242AF83DD1421",
- "879334DAE3",
- "1E17F46A98FEF5CBB40759D95354",
- "FED8C3FF27DDF6313AED444A2985B36CBA268AAD6AAC563C0BA28F6DB5DB"},
- {"F6C1FB9B4188F2288FF03BD716023198C3582CF2A037FC2F29760916C2B7FCDB",
- "4228DA0678CA3534588859E77DFF014C",
- "D8153CAF35539A61DD8D05B3C9B44F01E564FB9348BCD09A1C23B84195171308861058F0A3CD2A55B912A3AAEE06FF4D356C77275828F2157C2FC7C115DA39E443210CCC56BEDB0CC99BBFB227ABD5CC454F4E7F547C7378A659EEB6A7E809101A84F866503CB18D4484E1FA09B3EC7FC75EB2E35270800AA7",
- "23B660A779AD285704B12EC1C580387A47BEC7B00D452C6570",
- "5AA642BBABA8E49849002A2FAF31DB8FC7773EFDD656E469CEC19B3206D4174C9A263D0A05484261F6"},
- {"8FF6086F1FADB9A3FBE245EAC52640C43B39D43F89526BB5A6EBA47710931446",
- "943188480C99437495958B0AE4831AA9",
- "AD5CD0BDA426F6EBA23C8EB23DC73FF9FEC173355EDBD6C9344C4C4383F211888F7CE6B29899A6801DF6B38651A7C77150941A",
- "80CD5EA8D7F81DDF5070B934937912E8F541A5301877528EB41AB60C020968D459960ED8FB73083329841A",
- "ABAE8EB7F36FCA2362551E72DAC890BA1BB6794797E0FC3B67426EC9372726ED4725D379EA0AC9147E48DCD0005C502863C2C5358A38817C8264B5"},
- {"A083B54E6B1FE01B65D42FCD248F97BB477A41462BBFE6FD591006C022C8FD84",
- "B0490F5BD68A52459556B3749ACDF40E",
- "8892E047DA5CFBBDF7F3CFCBD1BD21C6D4C80774B1826999234394BD3E513CC7C222BB40E1E3140A152F19B3802F0D036C24A590512AD0E8",
- "D7B15752789DC94ED0F36778A5C7BBB207BEC32BAC66E702B39966F06E381E090C6757653C3D26A81EC6AD6C364D66867A334C91BB0B8A8A4B6EACDF0783D09010AEBA2DD2062308FE99CC1F",
- "C071280A732ADC93DF272BF1E613B2BB7D46FC6665EF2DC1671F3E211D6BDE1D6ADDD28DF3AA2E47053FC8BB8AE9271EC8BC8B2CFFA320D225B451685B6D23ACEFDD241FE284F8ADC8DB07F456985B14330BBB66E0FB212213E05B3E"},
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go b/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
deleted file mode 100644
index d558b9bd82..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-// This file contains necessary tools for the aex and ocb packages.
-//
-// These functions SHOULD NOT be used elsewhere, since they are optimized for
-// specific input nature in the EAX and OCB modes of operation.
-
-package byteutil
-
-// GfnDouble computes 2 * input in the field of 2^n elements.
-// The irreducible polynomial in the finite field for n=128 is
-// x^128 + x^7 + x^2 + x + 1 (equals 0x87)
-// Constant-time execution in order to avoid side-channel attacks
-func GfnDouble(input []byte) []byte {
- if len(input) != 16 {
- panic("Doubling in GFn only implemented for n = 128")
- }
- // If the first bit is zero, return 2L = L << 1
- // Else return (L << 1) xor 0^120 10000111
- shifted := ShiftBytesLeft(input)
- shifted[15] ^= ((input[0] >> 7) * 0x87)
- return shifted
-}
-
-// ShiftBytesLeft outputs the byte array corresponding to x << 1 in binary.
-func ShiftBytesLeft(x []byte) []byte {
- l := len(x)
- dst := make([]byte, l)
- for i := 0; i < l-1; i++ {
- dst[i] = (x[i] << 1) | (x[i+1] >> 7)
- }
- dst[l-1] = x[l-1] << 1
- return dst
-}
-
-// ShiftNBytesLeft puts in dst the byte array corresponding to x << n in binary.
-func ShiftNBytesLeft(dst, x []byte, n int) {
- // Erase first n / 8 bytes
- copy(dst, x[n/8:])
-
- // Shift the remaining n % 8 bits
- bits := uint(n % 8)
- l := len(dst)
- for i := 0; i < l-1; i++ {
- dst[i] = (dst[i] << bits) | (dst[i+1] >> uint(8-bits))
- }
- dst[l-1] = dst[l-1] << bits
-
- // Append trailing zeroes
- dst = append(dst, make([]byte, n/8)...)
-}
-
-// XorBytesMut replaces X with X XOR Y. len(X) must be >= len(Y).
-func XorBytesMut(X, Y []byte) {
- for i := 0; i < len(Y); i++ {
- X[i] ^= Y[i]
- }
-}
-
-// XorBytes puts X XOR Y into Z. len(Z) and len(X) must be >= len(Y).
-func XorBytes(Z, X, Y []byte) {
- for i := 0; i < len(Y); i++ {
- Z[i] = X[i] ^ Y[i]
- }
-}
-
-// RightXor XORs smaller input (assumed Y) at the right of the larger input (assumed X)
-func RightXor(X, Y []byte) []byte {
- offset := len(X) - len(Y)
- xored := make([]byte, len(X))
- copy(xored, X)
- for i := 0; i < len(Y); i++ {
- xored[offset+i] ^= Y[i]
- }
- return xored
-}
-
-// SliceForAppend takes a slice and a requested number of bytes. It returns a
-// slice with the contents of the given slice followed by that many bytes and a
-// second slice that aliases into it and contains only the extra bytes. If the
-// original slice has sufficient capacity then no allocation is performed.
-func SliceForAppend(in []byte, n int) (head, tail []byte) {
- if total := len(in) + n; cap(in) >= total {
- head = in[:total]
- } else {
- head = make([]byte, total)
- copy(head, in)
- }
- tail = head[len(in):]
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go b/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
deleted file mode 100644
index 24f893017b..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-
-// Package ocb provides an implementation of the OCB (offset codebook) mode of
-// operation, as described in RFC-7253 of the IRTF and in Rogaway, Bellare,
-// Black and Krovetz - OCB: A BLOCK-CIPHER MODE OF OPERATION FOR EFFICIENT
-// AUTHENTICATED ENCRYPTION (2003).
-// Security considerations (from RFC-7253): A private key MUST NOT be used to
-// encrypt more than 2^48 blocks. Tag length should be at least 12 bytes (a
-// brute-force forging adversary succeeds after 2^{tag length} attempts). A
-// single key SHOULD NOT be used to decrypt ciphertext with different tag
-// lengths. Nonces need not be secret, but MUST NOT be reused.
-// This package only supports underlying block ciphers with 128-bit blocks,
-// such as AES-{128, 192, 256}, but may be extended to other sizes.
-package ocb
-
-import (
- "bytes"
- "crypto/cipher"
- "crypto/subtle"
- "errors"
- "math/bits"
-
- "github.com/ProtonMail/go-crypto/internal/byteutil"
-)
-
-type ocb struct {
- block cipher.Block
- tagSize int
- nonceSize int
- mask mask
- // Optimized en/decrypt: For each nonce N used to en/decrypt, the 'Ktop'
- // internal variable can be reused for en/decrypting with nonces sharing
- // all but the last 6 bits with N. The prefix of the first nonce used to
- // compute the new Ktop, and the Ktop value itself, are stored in
- // reusableKtop. If using incremental nonces, this saves one block cipher
- // call every 63 out of 64 OCB encryptions, and stores one nonce and one
- // output of the block cipher in memory only.
- reusableKtop reusableKtop
-}
-
-type mask struct {
- // L_*, L_$, (L_i)_{i ∈ N}
- lAst []byte
- lDol []byte
- L [][]byte
-}
-
-type reusableKtop struct {
- noncePrefix []byte
- Ktop []byte
-}
-
-const (
- defaultTagSize = 16
- defaultNonceSize = 15
-)
-
-const (
- enc = iota
- dec
-)
-
-func (o *ocb) NonceSize() int {
- return o.nonceSize
-}
-
-func (o *ocb) Overhead() int {
- return o.tagSize
-}
-
-// NewOCB returns an OCB instance with the given block cipher and default
-// tag and nonce sizes.
-func NewOCB(block cipher.Block) (cipher.AEAD, error) {
- return NewOCBWithNonceAndTagSize(block, defaultNonceSize, defaultTagSize)
-}
-
-// NewOCBWithNonceAndTagSize returns an OCB instance with the given block
-// cipher, nonce length, and tag length. Panics on zero nonceSize and
-// exceedingly long tag size.
-//
-// It is recommended to use at least 12 bytes as tag length.
-func NewOCBWithNonceAndTagSize(
- block cipher.Block, nonceSize, tagSize int) (cipher.AEAD, error) {
- if block.BlockSize() != 16 {
- return nil, ocbError("Block cipher must have 128-bit blocks")
- }
- if nonceSize < 1 {
- return nil, ocbError("Incorrect nonce length")
- }
- if nonceSize >= block.BlockSize() {
- return nil, ocbError("Nonce length exceeds blocksize - 1")
- }
- if tagSize > block.BlockSize() {
- return nil, ocbError("Custom tag length exceeds blocksize")
- }
- return &ocb{
- block: block,
- tagSize: tagSize,
- nonceSize: nonceSize,
- mask: initializeMaskTable(block),
- reusableKtop: reusableKtop{
- noncePrefix: nil,
- Ktop: nil,
- },
- }, nil
-}
-
-func (o *ocb) Seal(dst, nonce, plaintext, adata []byte) []byte {
- if len(nonce) > o.nonceSize {
- panic("crypto/ocb: Incorrect nonce length given to OCB")
- }
- sep := len(plaintext)
- ret, out := byteutil.SliceForAppend(dst, sep+o.tagSize)
- tag := o.crypt(enc, out[:sep], nonce, adata, plaintext)
- copy(out[sep:], tag)
- return ret
-}
-
-func (o *ocb) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
- if len(nonce) > o.nonceSize {
- panic("Nonce too long for this instance")
- }
- if len(ciphertext) < o.tagSize {
- return nil, ocbError("Ciphertext shorter than tag length")
- }
- sep := len(ciphertext) - o.tagSize
- ret, out := byteutil.SliceForAppend(dst, sep)
- ciphertextData := ciphertext[:sep]
- tag := o.crypt(dec, out, nonce, adata, ciphertextData)
- if subtle.ConstantTimeCompare(tag, ciphertext[sep:]) == 1 {
- return ret, nil
- }
- for i := range out {
- out[i] = 0
- }
- return nil, ocbError("Tag authentication failed")
-}
-
-// On instruction enc (resp. dec), crypt is the encrypt (resp. decrypt)
-// function. It writes the resulting plain/ciphertext into Y and returns
-// the tag.
-func (o *ocb) crypt(instruction int, Y, nonce, adata, X []byte) []byte {
- //
- // Consider X as a sequence of 128-bit blocks
- //
- // Note: For encryption (resp. decryption), X is the plaintext (resp., the
- // ciphertext without the tag).
- blockSize := o.block.BlockSize()
-
- //
- // Nonce-dependent and per-encryption variables
- //
- // Zero out the last 6 bits of the nonce into truncatedNonce to see if Ktop
- // is already computed.
- truncatedNonce := make([]byte, len(nonce))
- copy(truncatedNonce, nonce)
- truncatedNonce[len(truncatedNonce)-1] &= 192
- var Ktop []byte
- if bytes.Equal(truncatedNonce, o.reusableKtop.noncePrefix) {
- Ktop = o.reusableKtop.Ktop
- } else {
- // Nonce = num2str(TAGLEN mod 128, 7) || zeros(120 - bitlen(N)) || 1 || N
- paddedNonce := append(make([]byte, blockSize-1-len(nonce)), 1)
- paddedNonce = append(paddedNonce, truncatedNonce...)
- paddedNonce[0] |= byte(((8 * o.tagSize) % (8 * blockSize)) << 1)
- // Last 6 bits of paddedNonce are already zero. Encrypt into Ktop
- paddedNonce[blockSize-1] &= 192
- Ktop = paddedNonce
- o.block.Encrypt(Ktop, Ktop)
- o.reusableKtop.noncePrefix = truncatedNonce
- o.reusableKtop.Ktop = Ktop
- }
-
- // Stretch = Ktop || ((lower half of Ktop) XOR (lower half of Ktop << 8))
- xorHalves := make([]byte, blockSize/2)
- byteutil.XorBytes(xorHalves, Ktop[:blockSize/2], Ktop[1:1+blockSize/2])
- stretch := append(Ktop, xorHalves...)
- bottom := int(nonce[len(nonce)-1] & 63)
- offset := make([]byte, len(stretch))
- byteutil.ShiftNBytesLeft(offset, stretch, bottom)
- offset = offset[:blockSize]
-
- //
- // Process any whole blocks
- //
- // Note: For encryption Y is ciphertext || tag, for decryption Y is
- // plaintext || tag.
- checksum := make([]byte, blockSize)
- m := len(X) / blockSize
- for i := 0; i < m; i++ {
- index := bits.TrailingZeros(uint(i + 1))
- if len(o.mask.L)-1 < index {
- o.mask.extendTable(index)
- }
- byteutil.XorBytesMut(offset, o.mask.L[bits.TrailingZeros(uint(i+1))])
- blockX := X[i*blockSize : (i+1)*blockSize]
- blockY := Y[i*blockSize : (i+1)*blockSize]
- switch instruction {
- case enc:
- byteutil.XorBytesMut(checksum, blockX)
- byteutil.XorBytes(blockY, blockX, offset)
- o.block.Encrypt(blockY, blockY)
- byteutil.XorBytesMut(blockY, offset)
- case dec:
- byteutil.XorBytes(blockY, blockX, offset)
- o.block.Decrypt(blockY, blockY)
- byteutil.XorBytesMut(blockY, offset)
- byteutil.XorBytesMut(checksum, blockY)
- }
- }
- //
- // Process any final partial block and compute raw tag
- //
- tag := make([]byte, blockSize)
- if len(X)%blockSize != 0 {
- byteutil.XorBytesMut(offset, o.mask.lAst)
- pad := make([]byte, blockSize)
- o.block.Encrypt(pad, offset)
- chunkX := X[blockSize*m:]
- chunkY := Y[blockSize*m : len(X)]
- switch instruction {
- case enc:
- byteutil.XorBytesMut(checksum, chunkX)
- checksum[len(chunkX)] ^= 128
- byteutil.XorBytes(chunkY, chunkX, pad[:len(chunkX)])
- // P_* || bit(1) || zeroes(127) - len(P_*)
- case dec:
- byteutil.XorBytes(chunkY, chunkX, pad[:len(chunkX)])
- // P_* || bit(1) || zeroes(127) - len(P_*)
- byteutil.XorBytesMut(checksum, chunkY)
- checksum[len(chunkY)] ^= 128
- }
- }
- byteutil.XorBytes(tag, checksum, offset)
- byteutil.XorBytesMut(tag, o.mask.lDol)
- o.block.Encrypt(tag, tag)
- byteutil.XorBytesMut(tag, o.hash(adata))
- return tag[:o.tagSize]
-}
-
-// This hash function is used to compute the tag. Per design, on empty input it
-// returns a slice of zeros, of the same length as the underlying block cipher
-// block size.
-func (o *ocb) hash(adata []byte) []byte {
- //
- // Consider A as a sequence of 128-bit blocks
- //
- A := make([]byte, len(adata))
- copy(A, adata)
- blockSize := o.block.BlockSize()
-
- //
- // Process any whole blocks
- //
- sum := make([]byte, blockSize)
- offset := make([]byte, blockSize)
- m := len(A) / blockSize
- for i := 0; i < m; i++ {
- chunk := A[blockSize*i : blockSize*(i+1)]
- index := bits.TrailingZeros(uint(i + 1))
- // If the mask table is too short
- if len(o.mask.L)-1 < index {
- o.mask.extendTable(index)
- }
- byteutil.XorBytesMut(offset, o.mask.L[index])
- byteutil.XorBytesMut(chunk, offset)
- o.block.Encrypt(chunk, chunk)
- byteutil.XorBytesMut(sum, chunk)
- }
-
- //
- // Process any final partial block; compute final hash value
- //
- if len(A)%blockSize != 0 {
- byteutil.XorBytesMut(offset, o.mask.lAst)
- // Pad block with 1 || 0 ^ 127 - bitlength(a)
- ending := make([]byte, blockSize-len(A)%blockSize)
- ending[0] = 0x80
- encrypted := append(A[blockSize*m:], ending...)
- byteutil.XorBytesMut(encrypted, offset)
- o.block.Encrypt(encrypted, encrypted)
- byteutil.XorBytesMut(sum, encrypted)
- }
- return sum
-}
-
-func initializeMaskTable(block cipher.Block) mask {
- //
- // Key-dependent variables
- //
- lAst := make([]byte, block.BlockSize())
- block.Encrypt(lAst, lAst)
- lDol := byteutil.GfnDouble(lAst)
- L := make([][]byte, 1)
- L[0] = byteutil.GfnDouble(lDol)
-
- return mask{
- lAst: lAst,
- lDol: lDol,
- L: L,
- }
-}
-
-// Extends the L array of mask m up to L[limit], with L[i] = GfnDouble(L[i-1])
-func (m *mask) extendTable(limit int) {
- for i := len(m.L); i <= limit; i++ {
- m.L = append(m.L, byteutil.GfnDouble(m.L[i-1]))
- }
-}
-
-func ocbError(err string) error {
- return errors.New("crypto/ocb: " + err)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/random_vectors.go b/vendor/github.com/ProtonMail/go-crypto/ocb/random_vectors.go
deleted file mode 100644
index 0efaf344fd..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/ocb/random_vectors.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// In the test vectors provided by RFC 7253, the "bottom"
-// internal variable, which defines "offset" for the first time, does not
-// exceed 15. However, it can attain values up to 63.
-
-// These vectors include key length in {128, 192, 256}, tag size 128, and
-// random nonce, header, and plaintext lengths.
-
-// This file was automatically generated.
-
-package ocb
-
-var randomVectors = []struct {
- key, nonce, header, plaintext, ciphertext string
-}{
-
- {"9438C5D599308EAF13F800D2D31EA7F0",
- "C38EE4801BEBFFA1CD8635BE",
- "0E507B7DADD8A98CDFE272D3CB6B3E8332B56AE583FB049C0874D4200BED16BD1A044182434E9DA0E841F182DFD5B3016B34641CED0784F1745F63AB3D0DA22D3351C9EF9A658B8081E24498EBF61FCE40DA6D8E184536",
- "962D227786FB8913A8BAD5DC3250",
- "EEDEF5FFA5986D1E3BF86DDD33EF9ADC79DCA06E215FA772CCBA814F63AD"},
- {"BA7DE631C7D6712167C6724F5B9A2B1D",
- "35263EBDA05765DC0E71F1F5",
- "0103257B4224507C0242FEFE821EA7FA42E0A82863E5F8B68F7D881B4B44FA428A2B6B21D2F591260802D8AB6D83",
- "9D6D1FC93AE8A64E7889B7B2E3521EFA9B920A8DDB692E6F833DDC4A38AFA535E5E2A3ED82CB7E26404AB86C54D01C4668F28398C2DF33D5D561CBA1C8DCFA7A912F5048E545B59483C0E3221F54B14DAA2E4EB657B3BEF9554F34CAD69B2724AE962D3D8A",
- "E93852D1985C5E775655E937FA79CE5BF28A585F2AF53A5018853B9634BE3C84499AC0081918FDCE0624494D60E25F76ACD6853AC7576E3C350F332249BFCABD4E73CEABC36BE4EDDA40914E598AE74174A0D7442149B26990899491BDDFE8FC54D6C18E83AE9E9A6FFBF5D376565633862EEAD88D"},
- {"2E74B25289F6FD3E578C24866E9C72A5",
- "FD912F15025AF8414642BA1D1D",
- "FB5FB8C26F365EEDAB5FE260C6E3CCD27806729C8335F146063A7F9EA93290E56CF84576EB446350D22AD730547C267B1F0BBB97EB34E1E2C41A",
- "6C092EBF78F76EE8C1C6E592277D9545BA16EDB67BC7D8480B9827702DC2F8A129E2B08A2CE710CA7E1DA45CE162BB6CD4B512E632116E2211D3C90871EFB06B8D4B902681C7FB",
- "6AC0A77F26531BF4F354A1737F99E49BE32ECD909A7A71AD69352906F54B08A9CE9B8CA5D724CBFFC5673437F23F630697F3B84117A1431D6FA8CC13A974FB4AD360300522E09511B99E71065D5AC4BBCB1D791E864EF4"},
- {"E7EC507C802528F790AFF5303A017B17",
- "4B97A7A568940A9E3CE7A99E93031E",
- "28349BDC5A09390C480F9B8AA3EDEA3DDB8B9D64BCA322C570B8225DF0E31190DAB25A4014BA39519E02ABFB12B89AA28BBFD29E486E7FB28734258C817B63CED9912DBAFEBB93E2798AB2890DE3B0ACFCFF906AB15563EF7823CE83D27CDB251195E22BD1337BCBDE65E7C2C427321C463C2777BFE5AEAA",
- "9455B3EA706B74",
- "7F33BA3EA848D48A96B9530E26888F43EBD4463C9399B6"},
- {"6C928AA3224736F28EE7378DE0090191",
- "8936138E2E4C6A13280017A1622D",
- "6202717F2631565BDCDC57C6584543E72A7C8BD444D0D108ED35069819633C",
- "DA0691439E5F035F3E455269D14FE5C201C8C9B0A3FE2D3F86BCC59387C868FE65733D388360B31E3CE28B4BF6A8BE636706B536D5720DB66B47CF1C7A5AFD6F61E0EF90F1726D6B0E169F9A768B2B7AE4EE00A17F630AC905FCAAA1B707FFF25B3A1AAE83B504837C64A5639B2A34002B300EC035C9B43654DA55",
- "B8804D182AB0F0EEB464FA7BD1329AD6154F982013F3765FEDFE09E26DAC078C9C1439BFC1159D6C02A25E3FF83EF852570117B315852AD5EE20E0FA3AA0A626B0E43BC0CEA38B44579DD36803455FB46989B90E6D229F513FD727AF8372517E9488384C515D6067704119C931299A0982EDDFB9C2E86A90C450C077EB222511EC9CCABC9FCFDB19F70088"},
- {"ECEA315CA4B3F425B0C9957A17805EA4",
- "664CDAE18403F4F9BA13015A44FC",
- "642AFB090D6C6DB46783F08B01A3EF2A8FEB5736B531EAC226E7888FCC8505F396818F83105065FACB3267485B9E5E4A0261F621041C08FCCB2A809A49AB5252A91D0971BCC620B9D614BD77E57A0EED2FA5",
- "6852C31F8083E20E364CEA21BB7854D67CEE812FE1C9ED2425C0932A90D3780728D1BB",
- "2ECEF962A9695A463ADABB275BDA9FF8B2BA57AEC2F52EFFB700CD9271A74D2A011C24AEA946051BD6291776429B7E681BA33E"},
- {"4EE616C4A58AAA380878F71A373461F6",
- "91B8C9C176D9C385E9C47E52",
- "CDA440B7F9762C572A718AC754EDEECC119E5EE0CCB9FEA4FFB22EEE75087C032EBF3DA9CDD8A28CC010B99ED45143B41A4BA50EA2A005473F89639237838867A57F23B0F0ED3BF22490E4501DAC9C658A9B9F",
- "D6E645FA9AE410D15B8123FD757FA356A8DBE9258DDB5BE88832E615910993F497EC",
- "B70ED7BF959FB2AAED4F36174A2A99BFB16992C8CDF369C782C4DB9C73DE78C5DB8E0615F647243B97ACDB24503BC9CADC48"},
- {"DCD475773136C830D5E3D0C5FE05B7FF",
- "BB8E1FBB483BE7616A922C4A",
- "36FEF2E1CB29E76A6EA663FC3AF66ECD7404F466382F7B040AABED62293302B56E8783EF7EBC21B4A16C3E78A7483A0A403F253A2CDC5BBF79DC3DAE6C73F39A961D8FBBE8D41B",
- "441E886EA38322B2437ECA7DEB5282518865A66780A454E510878E61BFEC3106A3CD93D2A02052E6F9E1832F9791053E3B76BF4C07EFDD6D4106E3027FABB752E60C1AA425416A87D53938163817A1051EBA1D1DEEB4B9B25C7E97368B52E5911A31810B0EC5AF547559B6142D9F4C4A6EF24A4CF75271BF9D48F62B",
- "1BE4DD2F4E25A6512C2CC71D24BBB07368589A94C2714962CD0ACE5605688F06342587521E75F0ACAFFD86212FB5C34327D238DB36CF2B787794B9A4412E7CD1410EA5DDD2450C265F29CF96013CD213FD2880657694D718558964BC189B4A84AFCF47EB012935483052399DBA5B088B0A0477F20DFE0E85DCB735E21F22A439FB837DD365A93116D063E607"},
- {"3FBA2B3D30177FFE15C1C59ED2148BB2C091F5615FBA7C07",
- "FACF804A4BEBF998505FF9DE",
- "8213B9263B2971A5BDA18DBD02208EE1",
- "15B323926993B326EA19F892D704439FC478828322AF72118748284A1FD8A6D814E641F70512FD706980337379F31DC63355974738D7FEA87AD2858C0C2EBBFBE74371C21450072373C7B651B334D7C4D43260B9D7CCD3AF9EDB",
- "6D35DC1469B26E6AAB26272A41B46916397C24C485B61162E640A062D9275BC33DDCFD3D9E1A53B6C8F51AC89B66A41D59B3574197A40D9B6DCF8A4E2A001409C8112F16B9C389E0096179DB914E05D6D11ED0005AD17E1CE105A2F0BAB8F6B1540DEB968B7A5428FF44"},
- {"53B52B8D4D748BCDF1DDE68857832FA46227FA6E2F32EFA1",
- "0B0EF53D4606B28D1398355F",
- "F23882436349094AF98BCACA8218E81581A043B19009E28EFBF2DE37883E04864148CC01D240552CA8844EC1456F42034653067DA67E80F87105FD06E14FF771246C9612867BE4D215F6D761",
- "F15030679BD4088D42CAC9BF2E9606EAD4798782FA3ED8C57EBE7F84A53236F51B25967C6489D0CD20C9EEA752F9BC",
- "67B96E2D67C3729C96DAEAEDF821D61C17E648643A2134C5621FEC621186915AD80864BFD1EB5B238BF526A679385E012A457F583AFA78134242E9D9C1B4E4"},
- {"0272DD80F23399F49BFC320381A5CD8225867245A49A7D41",
- "5C83F4896D0738E1366B1836",
- "69B0337289B19F73A12BAEEA857CCAF396C11113715D9500CCCF48BA08CFF12BC8B4BADB3084E63B85719DB5058FA7C2C11DEB096D7943CFA7CAF5",
- "C01AD10FC8B562CD17C7BC2FAB3E26CBDFF8D7F4DEA816794BBCC12336991712972F52816AABAB244EB43B0137E2BAC1DD413CE79531E78BEF782E6B439612BB3AEF154DE3502784F287958EBC159419F9EBA27916A28D6307324129F506B1DE80C1755A929F87",
- "FEFE52DD7159C8DD6E8EC2D3D3C0F37AB6CB471A75A071D17EC4ACDD8F3AA4D7D4F7BB559F3C09099E3D9003E5E8AA1F556B79CECDE66F85B08FA5955E6976BF2695EA076388A62D2AD5BAB7CBF1A7F3F4C8D5CDF37CDE99BD3E30B685D9E5EEE48C7C89118EF4878EB89747F28271FA2CC45F8E9E7601"},
- {"3EEAED04A455D6E5E5AB53CFD5AFD2F2BC625C7BF4BE49A5",
- "36B88F63ADBB5668588181D774",
- "D367E3CB3703E762D23C6533188EF7028EFF9D935A3977150361997EC9DEAF1E4794BDE26AA8B53C124980B1362EC86FCDDFC7A90073171C1BAEE351A53234B86C66E8AB92FAE99EC6967A6D3428892D80",
- "573454C719A9A55E04437BF7CBAAF27563CCCD92ADD5E515CD63305DFF0687E5EEF790C5DCA5C0033E9AB129505E2775438D92B38F08F3B0356BA142C6F694",
- "E9F79A5B432D9E682C9AAA5661CFC2E49A0FCB81A431E54B42EB73DD3BED3F377FEC556ABA81624BA64A5D739AD41467460088F8D4F442180A9382CA635745473794C382FCDDC49BA4EB6D8A44AE3C"},
- {"B695C691538F8CBD60F039D0E28894E3693CC7C36D92D79D",
- "BC099AEB637361BAC536B57618",
- "BFFF1A65AE38D1DC142C71637319F5F6508E2CB33C9DCB94202B359ED5A5ED8042E7F4F09231D32A7242976677E6F4C549BF65FADC99E5AF43F7A46FD95E16C2",
- "081DF3FD85B415D803F0BE5AC58CFF0023FDDED99788296C3731D8",
- "E50C64E3614D94FE69C47092E46ACC9957C6FEA2CCBF96BC62FBABE7424753C75F9C147C42AE26FE171531"},
- {"C9ACBD2718F0689A1BE9802A551B6B8D9CF5614DAF5E65ED",
- "B1B0AAF373B8B026EB80422051D8",
- "6648C0E61AC733C76119D23FB24548D637751387AA2EAE9D80E912B7BD486CAAD9EAF4D7A5FE2B54AAD481E8EC94BB4D558000896E2010462B70C9FED1E7273080D1",
- "189F591F6CB6D59AFEDD14C341741A8F1037DC0DF00FC57CE65C30F49E860255CEA5DC6019380CC0FE8880BC1A9E685F41C239C38F36E3F2A1388865C5C311059C0A",
- "922A5E949B61D03BE34AB5F4E58607D4504EA14017BB363DAE3C873059EA7A1C77A746FB78981671D26C2CF6D9F24952D510044CE02A10177E9DB42D0145211DFE6E84369C5E3BC2669EAB4147B2822895F9"},
- {"7A832BD2CF5BF4919F353CE2A8C86A5E406DA2D52BE16A72",
- "2F2F17CECF7E5A756D10785A3CB9DB",
- "61DA05E3788CC2D8405DBA70C7A28E5AF699863C9F72E6C6770126929F5D6FA267F005EBCF49495CB46400958A3AE80D1289D1C671",
- "44E91121195A41AF14E8CFDBD39A4B517BE0DF1A72977ED8A3EEF8EEDA1166B2EB6DB2C4AE2E74FA0F0C74537F659BFBD141E5DDEC67E64EDA85AABD3F52C85A785B9FB3CECD70E7DF",
- "BEDF596EA21288D2B84901E188F6EE1468B14D5161D3802DBFE00D60203A24E2AB62714BF272A45551489838C3A7FEAADC177B591836E73684867CCF4E12901DCF2064058726BBA554E84ADC5136F507E961188D4AF06943D3"},
- {"1508E8AE9079AA15F1CEC4F776B4D11BCCB061B58AA56C18",
- "BCA625674F41D1E3AB47672DC0C3",
- "8B12CF84F16360F0EAD2A41BC021530FFCEC7F3579CAE658E10E2D3D81870F65AFCED0C77C6C4C6E6BA424FF23088C796BA6195ABA35094BF1829E089662E7A95FC90750AE16D0C8AFA55DAC789D7735B970B58D4BE7CEC7341DA82A0179A01929C27A59C5063215B859EA43",
- "E525422519ECE070E82C",
- "B47BC07C3ED1C0A43BA52C43CBACBCDBB29CAF1001E09FDF7107"},
- {"7550C2761644E911FE9ADD119BAC07376BEA442845FEAD876D7E7AC1B713E464",
- "36D2EC25ADD33CDEDF495205BBC923",
- "7FCFE81A3790DE97FFC3DE160C470847EA7E841177C2F759571CBD837EA004A6CA8C6F4AEBFF2E9FD552D73EB8A30705D58D70C0B67AEEA280CBBF0A477358ACEF1E7508F2735CD9A0E4F9AC92B8C008F575D3B6278F1C18BD01227E3502E5255F3AB1893632AD00C717C588EF652A51A43209E7EE90",
- "2B1A62F8FDFAA3C16470A21AD307C9A7D03ADE8EF72C69B06F8D738CDE578D7AEFD0D40BD9C022FB9F580DF5394C998ACCCEFC5471A3996FB8F1045A81FDC6F32D13502EA65A211390C8D882B8E0BEFD8DD8CBEF51D1597B124E9F7F",
- "C873E02A22DB89EB0787DB6A60B99F7E4A0A085D5C4232A81ADCE2D60AA36F92DDC33F93DD8640AC0E08416B187FB382B3EC3EE85A64B0E6EE41C1366A5AD2A282F66605E87031CCBA2FA7B2DA201D975994AADE3DD1EE122AE09604AD489B84BF0C1AB7129EE16C6934850E"},
- {"A51300285E554FDBDE7F771A9A9A80955639DD87129FAEF74987C91FB9687C71",
- "81691D5D20EC818FCFF24B33DECC",
- "C948093218AA9EB2A8E44A87EEA73FC8B6B75A196819A14BD83709EA323E8DF8B491045220E1D88729A38DBCFFB60D3056DAD4564498FD6574F74512945DEB34B69329ACED9FFC05D5D59DFCD5B973E2ACAFE6AD1EF8BBBC49351A2DD12508ED89ED",
- "EB861165DAF7625F827C6B574ED703F03215",
- "C6CD1CE76D2B3679C1B5AA1CFD67CCB55444B6BFD3E22C81CBC9BB738796B83E54E3"},
- {"8CE0156D26FAEB7E0B9B800BBB2E9D4075B5EAC5C62358B0E7F6FCE610223282",
- "D2A7B94DD12CDACA909D3AD7",
- "E021A78F374FC271389AB9A3E97077D755",
- "7C26000B58929F5095E1CEE154F76C2A299248E299F9B5ADE6C403AA1FD4A67FD4E0232F214CE7B919EE7A1027D2B76C57475715CD078461",
- "C556FB38DF069B56F337B5FF5775CE6EAA16824DFA754F20B78819028EA635C3BB7AA731DE8776B2DCB67DCA2D33EEDF3C7E52EA450013722A41755A0752433ED17BDD5991AAE77A"},
- {"1E8000A2CE00A561C9920A30BF0D7B983FEF8A1014C8F04C35CA6970E6BA02BD",
- "65ED3D63F79F90BBFD19775E",
- "336A8C0B7243582A46B221AA677647FCAE91",
- "134A8B34824A290E7B",
- "914FBEF80D0E6E17F8BDBB6097EBF5FBB0554952DC2B9E5151"},
- {"53D5607BBE690B6E8D8F6D97F3DF2BA853B682597A214B8AA0EA6E598650AF15",
- "C391A856B9FE234E14BA1AC7BB40FF",
- "479682BC21349C4BE1641D5E78FE2C79EC1B9CF5470936DCAD9967A4DCD7C4EFADA593BC9EDE71E6A08829B8580901B61E274227E9D918502DE3",
- "EAD154DC09C5E26C5D26FF33ED148B27120C7F2C23225CC0D0631B03E1F6C6D96FEB88C1A4052ACB4CE746B884B6502931F407021126C6AAB8C514C077A5A38438AE88EE",
- "938821286EBB671D999B87C032E1D6055392EB564E57970D55E545FC5E8BAB90E6E3E3C0913F6320995FC636D72CD9919657CC38BD51552F4A502D8D1FE56DB33EBAC5092630E69EBB986F0E15CEE9FC8C052501"},
- {"294362FCC984F440CEA3E9F7D2C06AF20C53AAC1B3738CA2186C914A6E193ABB",
- "B15B61C8BB39261A8F55AB178EC3",
- "D0729B6B75BB",
- "2BD089ADCE9F334BAE3B065996C7D616DD0C27DF4218DCEEA0FBCA0F968837CE26B0876083327E25681FDDD620A32EC0DA12F73FAE826CC94BFF2B90A54D2651",
- "AC94B25E4E21DE2437B806966CCD5D9385EF0CD4A51AB9FA6DE675C7B8952D67802E9FEC1FDE9F5D1EAB06057498BC0EEA454804FC9D2068982A3E24182D9AC2E7AB9994DDC899A604264583F63D066B"},
- {"959DBFEB039B1A5B8CE6A44649B602AAA5F98A906DB96143D202CD2024F749D9",
- "01D7BDB1133E9C347486C1EFA6",
- "F3843955BD741F379DD750585EDC55E2CDA05CCBA8C1F4622AC2FE35214BC3A019B8BD12C4CC42D9213D1E1556941E8D8450830287FFB3B763A13722DD4140ED9846FB5FFF745D7B0B967D810A068222E10B259AF1D392035B0D83DC1498A6830B11B2418A840212599171E0258A1C203B05362978",
- "A21811232C950FA8B12237C2EBD6A7CD2C3A155905E9E0C7C120",
- "63C1CE397B22F1A03F1FA549B43178BC405B152D3C95E977426D519B3DFCA28498823240592B6EEE7A14"},
- {"096AE499F5294173F34FF2B375F0E5D5AB79D0D03B33B1A74D7D576826345DF4",
- "0C52B3D11D636E5910A4DD76D32C",
- "229E9ECA3053789E937447BC719467075B6138A142DA528DA8F0CF8DDF022FD9AF8E74779BA3AC306609",
- "8B7A00038783E8BAF6EDEAE0C4EAB48FC8FD501A588C7E4A4DB71E3604F2155A97687D3D2FFF8569261375A513CF4398CE0F87CA1658A1050F6EF6C4EA3E25",
- "C20B6CF8D3C8241825FD90B2EDAC7593600646E579A8D8DAAE9E2E40C3835FE801B2BE4379131452BC5182C90307B176DFBE2049544222FE7783147B690774F6D9D7CEF52A91E61E298E9AA15464AC"},
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_a.go b/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_a.go
deleted file mode 100644
index 330309ff5f..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_a.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package ocb
-
-import (
- "encoding/hex"
-)
-
-// Test vectors from https://tools.ietf.org/html/rfc7253. Note that key is
-// shared across tests.
-var testKey, _ = hex.DecodeString("000102030405060708090A0B0C0D0E0F")
-
-var rfc7253testVectors = []struct {
- nonce, header, plaintext, ciphertext string
-}{
- {"BBAA99887766554433221100",
- "",
- "",
- "785407BFFFC8AD9EDCC5520AC9111EE6"},
- {"BBAA99887766554433221101",
- "0001020304050607",
- "0001020304050607",
- "6820B3657B6F615A5725BDA0D3B4EB3A257C9AF1F8F03009"},
- {"BBAA99887766554433221102",
- "0001020304050607",
- "",
- "81017F8203F081277152FADE694A0A00"},
- {"BBAA99887766554433221103",
- "",
- "0001020304050607",
- "45DD69F8F5AAE72414054CD1F35D82760B2CD00D2F99BFA9"},
- {"BBAA99887766554433221104",
- "000102030405060708090A0B0C0D0E0F",
- "000102030405060708090A0B0C0D0E0F",
- "571D535B60B277188BE5147170A9A22C3AD7A4FF3835B8C5701C1CCEC8FC3358"},
- {"BBAA99887766554433221105",
- "000102030405060708090A0B0C0D0E0F",
- "",
- "8CF761B6902EF764462AD86498CA6B97"},
- {"BBAA99887766554433221106",
- "",
- "000102030405060708090A0B0C0D0E0F",
- "5CE88EC2E0692706A915C00AEB8B2396F40E1C743F52436BDF06D8FA1ECA343D"},
- {"BBAA99887766554433221107",
- "000102030405060708090A0B0C0D0E0F1011121314151617",
- "000102030405060708090A0B0C0D0E0F1011121314151617",
- "1CA2207308C87C010756104D8840CE1952F09673A448A122C92C62241051F57356D7F3C90BB0E07F"},
- {"BBAA99887766554433221108",
- "000102030405060708090A0B0C0D0E0F1011121314151617",
- "",
- "6DC225A071FC1B9F7C69F93B0F1E10DE"},
- {"BBAA99887766554433221109",
- "",
- "000102030405060708090A0B0C0D0E0F1011121314151617",
- "221BD0DE7FA6FE993ECCD769460A0AF2D6CDED0C395B1C3CE725F32494B9F914D85C0B1EB38357FF"},
- {"BBAA9988776655443322110A",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
- "BD6F6C496201C69296C11EFD138A467ABD3C707924B964DEAFFC40319AF5A48540FBBA186C5553C68AD9F592A79A4240"},
- {"BBAA9988776655443322110B",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
- "",
- "FE80690BEE8A485D11F32965BC9D2A32"},
- {"BBAA9988776655443322110C",
- "",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
- "2942BFC773BDA23CABC6ACFD9BFD5835BD300F0973792EF46040C53F1432BCDFB5E1DDE3BC18A5F840B52E653444D5DF"},
- {"BBAA9988776655443322110D",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
- "D5CA91748410C1751FF8A2F618255B68A0A12E093FF454606E59F9C1D0DDC54B65E8628E568BAD7AED07BA06A4A69483A7035490C5769E60"},
- {"BBAA9988776655443322110E",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
- "",
- "C5CD9D1850C141E358649994EE701B68"},
- {"BBAA9988776655443322110F",
- "",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
- "4412923493C57D5DE0D700F753CCE0D1D2D95060122E9F15A5DDBFC5787E50B5CC55EE507BCB084E479AD363AC366B95A98CA5F3000B1479"},
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go b/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go
deleted file mode 100644
index 14a3c336fb..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package ocb
-
-// Second set of test vectors from https://tools.ietf.org/html/rfc7253
-var rfc7253TestVectorTaglen96 = struct {
- key, nonce, header, plaintext, ciphertext string
-}{"0F0E0D0C0B0A09080706050403020100",
- "BBAA9988776655443322110D",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
- "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
- "1792A4E31E0755FB03E31B22116E6C2DDF9EFD6E33D536F1A0124B0A55BAE884ED93481529C76B6AD0C515F4D1CDD4FDAC4F02AA"}
-
-var rfc7253AlgorithmTest = []struct {
- KEYLEN, TAGLEN int
- OUTPUT string
-}{
- {128, 128, "67E944D23256C5E0B6C61FA22FDF1EA2"},
- {192, 128, "F673F2C3E7174AAE7BAE986CA9F29E17"},
- {256, 128, "D90EB8E9C977C88B79DD793D7FFA161C"},
- {128, 96, "77A3D8E73589158D25D01209"},
- {192, 96, "05D56EAD2752C86BE6932C5E"},
- {256, 96, "5458359AC23B0CBA9E6330DD"},
- {128, 64, "192C9B7BD90BA06A"},
- {192, 64, "0066BC6E0EF34E24"},
- {256, 64, "7D4EA5D445501CBE"},
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap/keywrap.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap/keywrap.go
deleted file mode 100644
index 3c6251d1ce..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap/keywrap.go
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2014 Matthew Endsley
-// All rights reserved
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted providing that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-// IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-// Package keywrap is an implementation of the RFC 3394 AES key wrapping
-// algorithm. This is used in OpenPGP with elliptic curve keys.
-package keywrap
-
-import (
- "crypto/aes"
- "encoding/binary"
- "errors"
-)
-
-var (
- // ErrWrapPlaintext is returned if the plaintext is not a multiple
- // of 64 bits.
- ErrWrapPlaintext = errors.New("keywrap: plainText must be a multiple of 64 bits")
-
- // ErrUnwrapCiphertext is returned if the ciphertext is not a
- // multiple of 64 bits.
- ErrUnwrapCiphertext = errors.New("keywrap: cipherText must by a multiple of 64 bits")
-
- // ErrUnwrapFailed is returned if unwrapping a key fails.
- ErrUnwrapFailed = errors.New("keywrap: failed to unwrap key")
-
- // NB: the AES NewCipher call only fails if the key is an invalid length.
-
- // ErrInvalidKey is returned when the AES key is invalid.
- ErrInvalidKey = errors.New("keywrap: invalid AES key")
-)
-
-// Wrap a key using the RFC 3394 AES Key Wrap Algorithm.
-func Wrap(key, plainText []byte) ([]byte, error) {
- if len(plainText)%8 != 0 {
- return nil, ErrWrapPlaintext
- }
-
- c, err := aes.NewCipher(key)
- if err != nil {
- return nil, ErrInvalidKey
- }
-
- nblocks := len(plainText) / 8
-
- // 1) Initialize variables.
- var block [aes.BlockSize]byte
- // - Set A = IV, an initial value (see 2.2.3)
- for ii := 0; ii < 8; ii++ {
- block[ii] = 0xA6
- }
-
- // - For i = 1 to n
- // - Set R[i] = P[i]
- intermediate := make([]byte, len(plainText))
- copy(intermediate, plainText)
-
- // 2) Calculate intermediate values.
- for ii := 0; ii < 6; ii++ {
- for jj := 0; jj < nblocks; jj++ {
- // - B = AES(K, A | R[i])
- copy(block[8:], intermediate[jj*8:jj*8+8])
- c.Encrypt(block[:], block[:])
-
- // - A = MSB(64, B) ^ t where t = (n*j)+1
- t := uint64(ii*nblocks + jj + 1)
- val := binary.BigEndian.Uint64(block[:8]) ^ t
- binary.BigEndian.PutUint64(block[:8], val)
-
- // - R[i] = LSB(64, B)
- copy(intermediate[jj*8:jj*8+8], block[8:])
- }
- }
-
- // 3) Output results.
- // - Set C[0] = A
- // - For i = 1 to n
- // - C[i] = R[i]
- return append(block[:8], intermediate...), nil
-}
-
-// Unwrap a key using the RFC 3394 AES Key Wrap Algorithm.
-func Unwrap(key, cipherText []byte) ([]byte, error) {
- if len(cipherText)%8 != 0 {
- return nil, ErrUnwrapCiphertext
- }
-
- c, err := aes.NewCipher(key)
- if err != nil {
- return nil, ErrInvalidKey
- }
-
- nblocks := len(cipherText)/8 - 1
-
- // 1) Initialize variables.
- var block [aes.BlockSize]byte
- // - Set A = C[0]
- copy(block[:8], cipherText[:8])
-
- // - For i = 1 to n
- // - Set R[i] = C[i]
- intermediate := make([]byte, len(cipherText)-8)
- copy(intermediate, cipherText[8:])
-
- // 2) Compute intermediate values.
- for jj := 5; jj >= 0; jj-- {
- for ii := nblocks - 1; ii >= 0; ii-- {
- // - B = AES-1(K, (A ^ t) | R[i]) where t = n*j+1
- // - A = MSB(64, B)
- t := uint64(jj*nblocks + ii + 1)
- val := binary.BigEndian.Uint64(block[:8]) ^ t
- binary.BigEndian.PutUint64(block[:8], val)
-
- copy(block[8:], intermediate[ii*8:ii*8+8])
- c.Decrypt(block[:], block[:])
-
- // - R[i] = LSB(B, 64)
- copy(intermediate[ii*8:ii*8+8], block[8:])
- }
- }
-
- // 3) Output results.
- // - If A is an appropriate initial value (see 2.2.3),
- for ii := 0; ii < 8; ii++ {
- if block[ii] != 0xA6 {
- return nil, ErrUnwrapFailed
- }
- }
-
- // - For i = 1 to n
- // - P[i] = R[i]
- return intermediate, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/armor.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/armor.go
deleted file mode 100644
index e0a677f284..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/armor.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is
-// very similar to PEM except that it has an additional CRC checksum.
-package armor // import "github.com/ProtonMail/go-crypto/openpgp/armor"
-
-import (
- "bufio"
- "bytes"
- "encoding/base64"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// A Block represents an OpenPGP armored structure.
-//
-// The encoded form is:
-//
-// -----BEGIN Type-----
-// Headers
-//
-// base64-encoded Bytes
-// '=' base64 encoded checksum (optional) not checked anymore
-// -----END Type-----
-//
-// where Headers is a possibly empty sequence of Key: Value lines.
-//
-// Since the armored data can be very large, this package presents a streaming
-// interface.
-type Block struct {
- Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE").
- Header map[string]string // Optional headers.
- Body io.Reader // A Reader from which the contents can be read
- lReader lineReader
- oReader openpgpReader
-}
-
-var ArmorCorrupt error = errors.StructuralError("armor invalid")
-
-var armorStart = []byte("-----BEGIN ")
-var armorEnd = []byte("-----END ")
-var armorEndOfLine = []byte("-----")
-
-// lineReader wraps a line based reader. It watches for the end of an armor block
-type lineReader struct {
- in *bufio.Reader
- buf []byte
- eof bool
-}
-
-func (l *lineReader) Read(p []byte) (n int, err error) {
- if l.eof {
- return 0, io.EOF
- }
-
- if len(l.buf) > 0 {
- n = copy(p, l.buf)
- l.buf = l.buf[n:]
- return
- }
-
- line, isPrefix, err := l.in.ReadLine()
- if err != nil {
- return
- }
- if isPrefix {
- return 0, ArmorCorrupt
- }
-
- if bytes.HasPrefix(line, armorEnd) {
- l.eof = true
- return 0, io.EOF
- }
-
- if len(line) == 5 && line[0] == '=' {
- // This is the checksum line
- // Don't check the checksum
-
- l.eof = true
- return 0, io.EOF
- }
-
- if len(line) > 96 {
- return 0, ArmorCorrupt
- }
-
- n = copy(p, line)
- bytesToSave := len(line) - n
- if bytesToSave > 0 {
- if cap(l.buf) < bytesToSave {
- l.buf = make([]byte, 0, bytesToSave)
- }
- l.buf = l.buf[0:bytesToSave]
- copy(l.buf, line[n:])
- }
-
- return
-}
-
-// openpgpReader passes Read calls to the underlying base64 decoder.
-type openpgpReader struct {
- lReader *lineReader
- b64Reader io.Reader
-}
-
-func (r *openpgpReader) Read(p []byte) (n int, err error) {
- n, err = r.b64Reader.Read(p)
- return
-}
-
-// Decode reads a PGP armored block from the given Reader. It will ignore
-// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The
-// given Reader is not usable after calling this function: an arbitrary amount
-// of data may have been read past the end of the block.
-func Decode(in io.Reader) (p *Block, err error) {
- r := bufio.NewReaderSize(in, 100)
- var line []byte
- ignoreNext := false
-
-TryNextBlock:
- p = nil
-
- // Skip leading garbage
- for {
- ignoreThis := ignoreNext
- line, ignoreNext, err = r.ReadLine()
- if err != nil {
- return
- }
- if ignoreNext || ignoreThis {
- continue
- }
- line = bytes.TrimSpace(line)
- if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) {
- break
- }
- }
-
- p = new(Block)
- p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)])
- p.Header = make(map[string]string)
- nextIsContinuation := false
- var lastKey string
-
- // Read headers
- for {
- isContinuation := nextIsContinuation
- line, nextIsContinuation, err = r.ReadLine()
- if err != nil {
- p = nil
- return
- }
- if isContinuation {
- p.Header[lastKey] += string(line)
- continue
- }
- line = bytes.TrimSpace(line)
- if len(line) == 0 {
- break
- }
-
- i := bytes.Index(line, []byte(":"))
- if i == -1 {
- goto TryNextBlock
- }
- lastKey = string(line[:i])
- var value string
- if len(line) > i+2 {
- value = string(line[i+2:])
- }
- p.Header[lastKey] = value
- }
-
- p.lReader.in = r
- p.oReader.lReader = &p.lReader
- p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader)
- p.Body = &p.oReader
-
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
deleted file mode 100644
index 550efddf05..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package armor
-
-import (
- "encoding/base64"
- "io"
- "sort"
-)
-
-var armorHeaderSep = []byte(": ")
-var blockEnd = []byte("\n=")
-var newline = []byte("\n")
-var armorEndOfLineOut = []byte("-----\n")
-
-const crc24Init = 0xb704ce
-const crc24Poly = 0x1864cfb
-
-// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1
-func crc24(crc uint32, d []byte) uint32 {
- for _, b := range d {
- crc ^= uint32(b) << 16
- for i := 0; i < 8; i++ {
- crc <<= 1
- if crc&0x1000000 != 0 {
- crc ^= crc24Poly
- }
- }
- }
- return crc
-}
-
-// writeSlices writes its arguments to the given Writer.
-func writeSlices(out io.Writer, slices ...[]byte) (err error) {
- for _, s := range slices {
- _, err = out.Write(s)
- if err != nil {
- return err
- }
- }
- return
-}
-
-// lineBreaker breaks data across several lines, all of the same byte length
-// (except possibly the last). Lines are broken with a single '\n'.
-type lineBreaker struct {
- lineLength int
- line []byte
- used int
- out io.Writer
- haveWritten bool
-}
-
-func newLineBreaker(out io.Writer, lineLength int) *lineBreaker {
- return &lineBreaker{
- lineLength: lineLength,
- line: make([]byte, lineLength),
- used: 0,
- out: out,
- }
-}
-
-func (l *lineBreaker) Write(b []byte) (n int, err error) {
- n = len(b)
-
- if n == 0 {
- return
- }
-
- if l.used == 0 && l.haveWritten {
- _, err = l.out.Write([]byte{'\n'})
- if err != nil {
- return
- }
- }
-
- if l.used+len(b) < l.lineLength {
- l.used += copy(l.line[l.used:], b)
- return
- }
-
- l.haveWritten = true
- _, err = l.out.Write(l.line[0:l.used])
- if err != nil {
- return
- }
- excess := l.lineLength - l.used
- l.used = 0
-
- _, err = l.out.Write(b[0:excess])
- if err != nil {
- return
- }
-
- _, err = l.Write(b[excess:])
- return
-}
-
-func (l *lineBreaker) Close() (err error) {
- if l.used > 0 {
- _, err = l.out.Write(l.line[0:l.used])
- if err != nil {
- return
- }
- }
-
- return
-}
-
-// encoding keeps track of a running CRC24 over the data which has been written
-// to it and outputs a OpenPGP checksum when closed, followed by an armor
-// trailer.
-//
-// It's built into a stack of io.Writers:
-//
-// encoding -> base64 encoder -> lineBreaker -> out
-type encoding struct {
- out io.Writer
- breaker *lineBreaker
- b64 io.WriteCloser
- crc uint32
- crcEnabled bool
- blockType []byte
-}
-
-func (e *encoding) Write(data []byte) (n int, err error) {
- if e.crcEnabled {
- e.crc = crc24(e.crc, data)
- }
- return e.b64.Write(data)
-}
-
-func (e *encoding) Close() (err error) {
- err = e.b64.Close()
- if err != nil {
- return
- }
- e.breaker.Close()
-
- if e.crcEnabled {
- var checksumBytes [3]byte
- checksumBytes[0] = byte(e.crc >> 16)
- checksumBytes[1] = byte(e.crc >> 8)
- checksumBytes[2] = byte(e.crc)
-
- var b64ChecksumBytes [4]byte
- base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:])
-
- return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine)
- }
- return writeSlices(e.out, newline, armorEnd, e.blockType, armorEndOfLine)
-}
-
-func encode(out io.Writer, blockType string, headers map[string]string, checksum bool) (w io.WriteCloser, err error) {
- bType := []byte(blockType)
- err = writeSlices(out, armorStart, bType, armorEndOfLineOut)
- if err != nil {
- return
- }
-
- keys := make([]string, len(headers))
- i := 0
- for k := range headers {
- keys[i] = k
- i++
- }
- sort.Strings(keys)
- for _, k := range keys {
- err = writeSlices(out, []byte(k), armorHeaderSep, []byte(headers[k]), newline)
- if err != nil {
- return
- }
- }
-
- _, err = out.Write(newline)
- if err != nil {
- return
- }
-
- e := &encoding{
- out: out,
- breaker: newLineBreaker(out, 64),
- blockType: bType,
- crc: crc24Init,
- crcEnabled: checksum,
- }
- e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker)
- return e, nil
-}
-
-// Encode returns a WriteCloser which will encode the data written to it in
-// OpenPGP armor.
-func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) {
- return encode(out, blockType, headers, true)
-}
-
-// EncodeWithChecksumOption returns a WriteCloser which will encode the data written to it in
-// OpenPGP armor and provides the option to include a checksum.
-// When forming ASCII Armor, the CRC24 footer SHOULD NOT be generated,
-// unless interoperability with implementations that require the CRC24 footer
-// to be present is a concern.
-func EncodeWithChecksumOption(out io.Writer, blockType string, headers map[string]string, doChecksum bool) (w io.WriteCloser, err error) {
- return encode(out, blockType, headers, doChecksum)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/canonical_text.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/canonical_text.go
deleted file mode 100644
index 5b40e1375d..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/canonical_text.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package openpgp
-
-import (
- "hash"
- "io"
-)
-
-// NewCanonicalTextHash reformats text written to it into the canonical
-// form and then applies the hash h. See RFC 4880, section 5.2.1.
-func NewCanonicalTextHash(h hash.Hash) hash.Hash {
- return &canonicalTextHash{h, 0}
-}
-
-type canonicalTextHash struct {
- h hash.Hash
- s int
-}
-
-var newline = []byte{'\r', '\n'}
-
-func writeCanonical(cw io.Writer, buf []byte, s *int) (int, error) {
- start := 0
- for i, c := range buf {
- switch *s {
- case 0:
- if c == '\r' {
- *s = 1
- } else if c == '\n' {
- if _, err := cw.Write(buf[start:i]); err != nil {
- return 0, err
- }
- if _, err := cw.Write(newline); err != nil {
- return 0, err
- }
- start = i + 1
- }
- case 1:
- *s = 0
- }
- }
-
- if _, err := cw.Write(buf[start:]); err != nil {
- return 0, err
- }
- return len(buf), nil
-}
-
-func (cth *canonicalTextHash) Write(buf []byte) (int, error) {
- return writeCanonical(cth.h, buf, &cth.s)
-}
-
-func (cth *canonicalTextHash) Sum(in []byte) []byte {
- return cth.h.Sum(in)
-}
-
-func (cth *canonicalTextHash) Reset() {
- cth.h.Reset()
- cth.s = 0
-}
-
-func (cth *canonicalTextHash) Size() int {
- return cth.h.Size()
-}
-
-func (cth *canonicalTextHash) BlockSize() int {
- return cth.h.BlockSize()
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
deleted file mode 100644
index db8fb163b6..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package ecdh implements ECDH encryption, suitable for OpenPGP,
-// as specified in RFC 6637, section 8.
-package ecdh
-
-import (
- "bytes"
- "errors"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/aes/keywrap"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
-)
-
-type KDF struct {
- Hash algorithm.Hash
- Cipher algorithm.Cipher
-}
-
-type PublicKey struct {
- curve ecc.ECDHCurve
- Point []byte
- KDF
-}
-
-type PrivateKey struct {
- PublicKey
- D []byte
-}
-
-func NewPublicKey(curve ecc.ECDHCurve, kdfHash algorithm.Hash, kdfCipher algorithm.Cipher) *PublicKey {
- return &PublicKey{
- curve: curve,
- KDF: KDF{
- Hash: kdfHash,
- Cipher: kdfCipher,
- },
- }
-}
-
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-func (pk *PublicKey) GetCurve() ecc.ECDHCurve {
- return pk.curve
-}
-
-func (pk *PublicKey) MarshalPoint() []byte {
- return pk.curve.MarshalBytePoint(pk.Point)
-}
-
-func (pk *PublicKey) UnmarshalPoint(p []byte) error {
- pk.Point = pk.curve.UnmarshalBytePoint(p)
- if pk.Point == nil {
- return errors.New("ecdh: failed to parse EC point")
- }
- return nil
-}
-
-func (sk *PrivateKey) MarshalByteSecret() []byte {
- return sk.curve.MarshalByteSecret(sk.D)
-}
-
-func (sk *PrivateKey) UnmarshalByteSecret(d []byte) error {
- sk.D = sk.curve.UnmarshalByteSecret(d)
-
- if sk.D == nil {
- return errors.New("ecdh: failed to parse scalar")
- }
- return nil
-}
-
-func GenerateKey(rand io.Reader, c ecc.ECDHCurve, kdf KDF) (priv *PrivateKey, err error) {
- priv = new(PrivateKey)
- priv.PublicKey.curve = c
- priv.PublicKey.KDF = kdf
- priv.PublicKey.Point, priv.D, err = c.GenerateECDH(rand)
- return
-}
-
-func Encrypt(random io.Reader, pub *PublicKey, msg, curveOID, fingerprint []byte) (vsG, c []byte, err error) {
- if len(msg) > 40 {
- return nil, nil, errors.New("ecdh: message too long")
- }
- // the sender MAY use 21, 13, and 5 bytes of padding for AES-128,
- // AES-192, and AES-256, respectively, to provide the same number of
- // octets, 40 total, as an input to the key wrapping method.
- padding := make([]byte, 40-len(msg))
- for i := range padding {
- padding[i] = byte(40 - len(msg))
- }
- m := append(msg, padding...)
-
- ephemeral, zb, err := pub.curve.Encaps(random, pub.Point)
- if err != nil {
- return nil, nil, err
- }
-
- vsG = pub.curve.MarshalBytePoint(ephemeral)
-
- z, err := buildKey(pub, zb, curveOID, fingerprint, false, false)
- if err != nil {
- return nil, nil, err
- }
-
- if c, err = keywrap.Wrap(z, m); err != nil {
- return nil, nil, err
- }
-
- return vsG, c, nil
-
-}
-
-func Decrypt(priv *PrivateKey, vsG, c, curveOID, fingerprint []byte) (msg []byte, err error) {
- var m []byte
- zb, err := priv.PublicKey.curve.Decaps(priv.curve.UnmarshalBytePoint(vsG), priv.D)
-
- // Try buildKey three times to workaround an old bug, see comments in buildKey.
- for i := 0; i < 3; i++ {
- var z []byte
- // RFC6637 §8: "Compute Z = KDF( S, Z_len, Param );"
- z, err = buildKey(&priv.PublicKey, zb, curveOID, fingerprint, i == 1, i == 2)
- if err != nil {
- return nil, err
- }
-
- // RFC6637 §8: "Compute C = AESKeyWrap( Z, c ) as per [RFC3394]"
- m, err = keywrap.Unwrap(z, c)
- if err == nil {
- break
- }
- }
-
- // Only return an error after we've tried all (required) variants of buildKey.
- if err != nil {
- return nil, err
- }
-
- // RFC6637 §8: "m = symm_alg_ID || session key || checksum || pkcs5_padding"
- // The last byte should be the length of the padding, as per PKCS5; strip it off.
- return m[:len(m)-int(m[len(m)-1])], nil
-}
-
-func buildKey(pub *PublicKey, zb []byte, curveOID, fingerprint []byte, stripLeading, stripTrailing bool) ([]byte, error) {
- // Param = curve_OID_len || curve_OID || public_key_alg_ID || 03
- // || 01 || KDF_hash_ID || KEK_alg_ID for AESKeyWrap
- // || "Anonymous Sender " || recipient_fingerprint;
- param := new(bytes.Buffer)
- if _, err := param.Write(curveOID); err != nil {
- return nil, err
- }
- algKDF := []byte{18, 3, 1, pub.KDF.Hash.Id(), pub.KDF.Cipher.Id()}
- if _, err := param.Write(algKDF); err != nil {
- return nil, err
- }
- if _, err := param.Write([]byte("Anonymous Sender ")); err != nil {
- return nil, err
- }
- if _, err := param.Write(fingerprint[:]); err != nil {
- return nil, err
- }
-
- // MB = Hash ( 00 || 00 || 00 || 01 || ZB || Param );
- h := pub.KDF.Hash.New()
- if _, err := h.Write([]byte{0x0, 0x0, 0x0, 0x1}); err != nil {
- return nil, err
- }
- zbLen := len(zb)
- i := 0
- j := zbLen - 1
- if stripLeading {
- // Work around old go crypto bug where the leading zeros are missing.
- for i < zbLen && zb[i] == 0 {
- i++
- }
- }
- if stripTrailing {
- // Work around old OpenPGP.js bug where insignificant trailing zeros in
- // this little-endian number are missing.
- // (See https://github.com/openpgpjs/openpgpjs/pull/853.)
- for j >= 0 && zb[j] == 0 {
- j--
- }
- }
- if _, err := h.Write(zb[i : j+1]); err != nil {
- return nil, err
- }
- if _, err := h.Write(param.Bytes()); err != nil {
- return nil, err
- }
- mb := h.Sum(nil)
-
- return mb[:pub.KDF.Cipher.KeySize()], nil // return oBits leftmost bits of MB.
-
-}
-
-func Validate(priv *PrivateKey) error {
- return priv.curve.ValidateECDH(priv.Point, priv.D)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdsa/ecdsa.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdsa/ecdsa.go
deleted file mode 100644
index f94ae1b2f5..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdsa/ecdsa.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Package ecdsa implements ECDSA signature, suitable for OpenPGP,
-// as specified in RFC 6637, section 5.
-package ecdsa
-
-import (
- "errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
- "io"
- "math/big"
-)
-
-type PublicKey struct {
- X, Y *big.Int
- curve ecc.ECDSACurve
-}
-
-type PrivateKey struct {
- PublicKey
- D *big.Int
-}
-
-func NewPublicKey(curve ecc.ECDSACurve) *PublicKey {
- return &PublicKey{
- curve: curve,
- }
-}
-
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-func (pk *PublicKey) GetCurve() ecc.ECDSACurve {
- return pk.curve
-}
-
-func (pk *PublicKey) MarshalPoint() []byte {
- return pk.curve.MarshalIntegerPoint(pk.X, pk.Y)
-}
-
-func (pk *PublicKey) UnmarshalPoint(p []byte) error {
- pk.X, pk.Y = pk.curve.UnmarshalIntegerPoint(p)
- if pk.X == nil {
- return errors.New("ecdsa: failed to parse EC point")
- }
- return nil
-}
-
-func (sk *PrivateKey) MarshalIntegerSecret() []byte {
- return sk.curve.MarshalIntegerSecret(sk.D)
-}
-
-func (sk *PrivateKey) UnmarshalIntegerSecret(d []byte) error {
- sk.D = sk.curve.UnmarshalIntegerSecret(d)
-
- if sk.D == nil {
- return errors.New("ecdsa: failed to parse scalar")
- }
- return nil
-}
-
-func GenerateKey(rand io.Reader, c ecc.ECDSACurve) (priv *PrivateKey, err error) {
- priv = new(PrivateKey)
- priv.PublicKey.curve = c
- priv.PublicKey.X, priv.PublicKey.Y, priv.D, err = c.GenerateECDSA(rand)
- return
-}
-
-func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) {
- return priv.PublicKey.curve.Sign(rand, priv.X, priv.Y, priv.D, hash)
-}
-
-func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool {
- return pub.curve.Verify(pub.X, pub.Y, hash, r, s)
-}
-
-func Validate(priv *PrivateKey) error {
- return priv.curve.ValidateECDSA(priv.X, priv.Y, priv.D.Bytes())
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ed25519/ed25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ed25519/ed25519.go
deleted file mode 100644
index 6abdf7c446..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/ed25519/ed25519.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Package ed25519 implements the ed25519 signature algorithm for OpenPGP
-// as defined in the Open PGP crypto refresh.
-package ed25519
-
-import (
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- ed25519lib "github.com/cloudflare/circl/sign/ed25519"
-)
-
-const (
- // PublicKeySize is the size, in bytes, of public keys in this package.
- PublicKeySize = ed25519lib.PublicKeySize
- // SeedSize is the size, in bytes, of private key seeds.
- // The private key representation used by RFC 8032.
- SeedSize = ed25519lib.SeedSize
- // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
- SignatureSize = ed25519lib.SignatureSize
-)
-
-type PublicKey struct {
- // Point represents the elliptic curve point of the public key.
- Point []byte
-}
-
-type PrivateKey struct {
- PublicKey
- // Key the private key representation by RFC 8032,
- // encoded as seed | pub key point.
- Key []byte
-}
-
-// NewPublicKey creates a new empty ed25519 public key.
-func NewPublicKey() *PublicKey {
- return &PublicKey{}
-}
-
-// NewPrivateKey creates a new empty private key referencing the public key.
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-// Seed returns the ed25519 private key secret seed.
-// The private key representation by RFC 8032.
-func (pk *PrivateKey) Seed() []byte {
- return pk.Key[:SeedSize]
-}
-
-// MarshalByteSecret returns the underlying 32 byte seed of the private key.
-func (pk *PrivateKey) MarshalByteSecret() []byte {
- return pk.Seed()
-}
-
-// UnmarshalByteSecret computes the private key from the secret seed
-// and stores it in the private key object.
-func (sk *PrivateKey) UnmarshalByteSecret(seed []byte) error {
- sk.Key = ed25519lib.NewKeyFromSeed(seed)
- return nil
-}
-
-// GenerateKey generates a fresh private key with the provided randomness source.
-func GenerateKey(rand io.Reader) (*PrivateKey, error) {
- publicKey, privateKey, err := ed25519lib.GenerateKey(rand)
- if err != nil {
- return nil, err
- }
- privateKeyOut := new(PrivateKey)
- privateKeyOut.PublicKey.Point = publicKey[:]
- privateKeyOut.Key = privateKey[:]
- return privateKeyOut, nil
-}
-
-// Sign signs a message with the ed25519 algorithm.
-// priv MUST be a valid key! Check this with Validate() before use.
-func Sign(priv *PrivateKey, message []byte) ([]byte, error) {
- return ed25519lib.Sign(priv.Key, message), nil
-}
-
-// Verify verifies an ed25519 signature.
-func Verify(pub *PublicKey, message []byte, signature []byte) bool {
- return ed25519lib.Verify(pub.Point, message, signature)
-}
-
-// Validate checks if the ed25519 private key is valid.
-func Validate(priv *PrivateKey) error {
- expectedPrivateKey := ed25519lib.NewKeyFromSeed(priv.Seed())
- if subtle.ConstantTimeCompare(priv.Key, expectedPrivateKey) == 0 {
- return errors.KeyInvalidError("ed25519: invalid ed25519 secret")
- }
- if subtle.ConstantTimeCompare(priv.PublicKey.Point, expectedPrivateKey[SeedSize:]) == 0 {
- return errors.KeyInvalidError("ed25519: invalid ed25519 public key")
- }
- return nil
-}
-
-// ENCODING/DECODING signature:
-
-// WriteSignature encodes and writes an ed25519 signature to writer.
-func WriteSignature(writer io.Writer, signature []byte) error {
- _, err := writer.Write(signature)
- return err
-}
-
-// ReadSignature decodes an ed25519 signature from a reader.
-func ReadSignature(reader io.Reader) ([]byte, error) {
- signature := make([]byte, SignatureSize)
- if _, err := io.ReadFull(reader, signature); err != nil {
- return nil, err
- }
- return signature, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ed448/ed448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ed448/ed448.go
deleted file mode 100644
index b11fb4fb17..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/ed448/ed448.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Package ed448 implements the ed448 signature algorithm for OpenPGP
-// as defined in the Open PGP crypto refresh.
-package ed448
-
-import (
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- ed448lib "github.com/cloudflare/circl/sign/ed448"
-)
-
-const (
- // PublicKeySize is the size, in bytes, of public keys in this package.
- PublicKeySize = ed448lib.PublicKeySize
- // SeedSize is the size, in bytes, of private key seeds.
- // The private key representation used by RFC 8032.
- SeedSize = ed448lib.SeedSize
- // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
- SignatureSize = ed448lib.SignatureSize
-)
-
-type PublicKey struct {
- // Point represents the elliptic curve point of the public key.
- Point []byte
-}
-
-type PrivateKey struct {
- PublicKey
- // Key the private key representation by RFC 8032,
- // encoded as seed | public key point.
- Key []byte
-}
-
-// NewPublicKey creates a new empty ed448 public key.
-func NewPublicKey() *PublicKey {
- return &PublicKey{}
-}
-
-// NewPrivateKey creates a new empty private key referencing the public key.
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-// Seed returns the ed448 private key secret seed.
-// The private key representation by RFC 8032.
-func (pk *PrivateKey) Seed() []byte {
- return pk.Key[:SeedSize]
-}
-
-// MarshalByteSecret returns the underlying seed of the private key.
-func (pk *PrivateKey) MarshalByteSecret() []byte {
- return pk.Seed()
-}
-
-// UnmarshalByteSecret computes the private key from the secret seed
-// and stores it in the private key object.
-func (sk *PrivateKey) UnmarshalByteSecret(seed []byte) error {
- sk.Key = ed448lib.NewKeyFromSeed(seed)
- return nil
-}
-
-// GenerateKey generates a fresh private key with the provided randomness source.
-func GenerateKey(rand io.Reader) (*PrivateKey, error) {
- publicKey, privateKey, err := ed448lib.GenerateKey(rand)
- if err != nil {
- return nil, err
- }
- privateKeyOut := new(PrivateKey)
- privateKeyOut.PublicKey.Point = publicKey[:]
- privateKeyOut.Key = privateKey[:]
- return privateKeyOut, nil
-}
-
-// Sign signs a message with the ed448 algorithm.
-// priv MUST be a valid key! Check this with Validate() before use.
-func Sign(priv *PrivateKey, message []byte) ([]byte, error) {
- // Ed448 is used with the empty string as a context string.
- // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-08#section-13.7
- return ed448lib.Sign(priv.Key, message, ""), nil
-}
-
-// Verify verifies a ed448 signature
-func Verify(pub *PublicKey, message []byte, signature []byte) bool {
- // Ed448 is used with the empty string as a context string.
- // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-08#section-13.7
- return ed448lib.Verify(pub.Point, message, signature, "")
-}
-
-// Validate checks if the ed448 private key is valid
-func Validate(priv *PrivateKey) error {
- expectedPrivateKey := ed448lib.NewKeyFromSeed(priv.Seed())
- if subtle.ConstantTimeCompare(priv.Key, expectedPrivateKey) == 0 {
- return errors.KeyInvalidError("ed448: invalid ed448 secret")
- }
- if subtle.ConstantTimeCompare(priv.PublicKey.Point, expectedPrivateKey[SeedSize:]) == 0 {
- return errors.KeyInvalidError("ed448: invalid ed448 public key")
- }
- return nil
-}
-
-// ENCODING/DECODING signature:
-
-// WriteSignature encodes and writes an ed448 signature to writer.
-func WriteSignature(writer io.Writer, signature []byte) error {
- _, err := writer.Write(signature)
- return err
-}
-
-// ReadSignature decodes an ed448 signature from a reader.
-func ReadSignature(reader io.Reader) ([]byte, error) {
- signature := make([]byte, SignatureSize)
- if _, err := io.ReadFull(reader, signature); err != nil {
- return nil, err
- }
- return signature, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/eddsa/eddsa.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/eddsa/eddsa.go
deleted file mode 100644
index 99ecfc7f12..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/eddsa/eddsa.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Package eddsa implements EdDSA signature, suitable for OpenPGP, as specified in
-// https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7
-package eddsa
-
-import (
- "errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
- "io"
-)
-
-type PublicKey struct {
- X []byte
- curve ecc.EdDSACurve
-}
-
-type PrivateKey struct {
- PublicKey
- D []byte
-}
-
-func NewPublicKey(curve ecc.EdDSACurve) *PublicKey {
- return &PublicKey{
- curve: curve,
- }
-}
-
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-func (pk *PublicKey) GetCurve() ecc.EdDSACurve {
- return pk.curve
-}
-
-func (pk *PublicKey) MarshalPoint() []byte {
- return pk.curve.MarshalBytePoint(pk.X)
-}
-
-func (pk *PublicKey) UnmarshalPoint(x []byte) error {
- pk.X = pk.curve.UnmarshalBytePoint(x)
-
- if pk.X == nil {
- return errors.New("eddsa: failed to parse EC point")
- }
- return nil
-}
-
-func (sk *PrivateKey) MarshalByteSecret() []byte {
- return sk.curve.MarshalByteSecret(sk.D)
-}
-
-func (sk *PrivateKey) UnmarshalByteSecret(d []byte) error {
- sk.D = sk.curve.UnmarshalByteSecret(d)
-
- if sk.D == nil {
- return errors.New("eddsa: failed to parse scalar")
- }
- return nil
-}
-
-func GenerateKey(rand io.Reader, c ecc.EdDSACurve) (priv *PrivateKey, err error) {
- priv = new(PrivateKey)
- priv.PublicKey.curve = c
- priv.PublicKey.X, priv.D, err = c.GenerateEdDSA(rand)
- return
-}
-
-func Sign(priv *PrivateKey, message []byte) (r, s []byte, err error) {
- sig, err := priv.PublicKey.curve.Sign(priv.PublicKey.X, priv.D, message)
- if err != nil {
- return nil, nil, err
- }
-
- r, s = priv.PublicKey.curve.MarshalSignature(sig)
- return
-}
-
-func Verify(pub *PublicKey, message, r, s []byte) bool {
- sig := pub.curve.UnmarshalSignature(r, s)
- if sig == nil {
- return false
- }
-
- return pub.curve.Verify(pub.X, message, sig)
-}
-
-func Validate(priv *PrivateKey) error {
- return priv.curve.ValidateEdDSA(priv.PublicKey.X, priv.D)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/elgamal/elgamal.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/elgamal/elgamal.go
deleted file mode 100644
index bad2774344..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/elgamal/elgamal.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package elgamal implements ElGamal encryption, suitable for OpenPGP,
-// as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on
-// Discrete Logarithms," IEEE Transactions on Information Theory, v. IT-31,
-// n. 4, 1985, pp. 469-472.
-//
-// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it
-// unsuitable for other protocols. RSA should be used in preference in any
-// case.
-package elgamal // import "github.com/ProtonMail/go-crypto/openpgp/elgamal"
-
-import (
- "crypto/rand"
- "crypto/subtle"
- "errors"
- "io"
- "math/big"
-)
-
-// PublicKey represents an ElGamal public key.
-type PublicKey struct {
- G, P, Y *big.Int
-}
-
-// PrivateKey represents an ElGamal private key.
-type PrivateKey struct {
- PublicKey
- X *big.Int
-}
-
-// Encrypt encrypts the given message to the given public key. The result is a
-// pair of integers. Errors can result from reading random, or because msg is
-// too large to be encrypted to the public key.
-func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) {
- pLen := (pub.P.BitLen() + 7) / 8
- if len(msg) > pLen-11 {
- err = errors.New("elgamal: message too long")
- return
- }
-
- // EM = 0x02 || PS || 0x00 || M
- em := make([]byte, pLen-1)
- em[0] = 2
- ps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):]
- err = nonZeroRandomBytes(ps, random)
- if err != nil {
- return
- }
- em[len(em)-len(msg)-1] = 0
- copy(mm, msg)
-
- m := new(big.Int).SetBytes(em)
-
- k, err := rand.Int(random, pub.P)
- if err != nil {
- return
- }
-
- c1 = new(big.Int).Exp(pub.G, k, pub.P)
- s := new(big.Int).Exp(pub.Y, k, pub.P)
- c2 = s.Mul(s, m)
- c2.Mod(c2, pub.P)
-
- return
-}
-
-// Decrypt takes two integers, resulting from an ElGamal encryption, and
-// returns the plaintext of the message. An error can result only if the
-// ciphertext is invalid. Users should keep in mind that this is a padding
-// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can
-// be used to break the cryptosystem. See “Chosen Ciphertext Attacks
-// Against Protocols Based on the RSA Encryption Standard PKCS #1”, Daniel
-// Bleichenbacher, Advances in Cryptology (Crypto '98),
-func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) {
- s := new(big.Int).Exp(c1, priv.X, priv.P)
- if s.ModInverse(s, priv.P) == nil {
- return nil, errors.New("elgamal: invalid private key")
- }
- s.Mul(s, c2)
- s.Mod(s, priv.P)
- em := s.Bytes()
-
- firstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2)
-
- // The remainder of the plaintext must be a string of non-zero random
- // octets, followed by a 0, followed by the message.
- // lookingForIndex: 1 iff we are still looking for the zero.
- // index: the offset of the first zero byte.
- var lookingForIndex, index int
- lookingForIndex = 1
-
- for i := 1; i < len(em); i++ {
- equals0 := subtle.ConstantTimeByteEq(em[i], 0)
- index = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index)
- lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex)
- }
-
- if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 {
- return nil, errors.New("elgamal: decryption error")
- }
- return em[index+1:], nil
-}
-
-// nonZeroRandomBytes fills the given slice with non-zero random octets.
-func nonZeroRandomBytes(s []byte, rand io.Reader) (err error) {
- _, err = io.ReadFull(rand, s)
- if err != nil {
- return
- }
-
- for i := 0; i < len(s); i++ {
- for s[i] == 0 {
- _, err = io.ReadFull(rand, s[i:i+1])
- if err != nil {
- return
- }
- }
- }
-
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
deleted file mode 100644
index 0eb3937b39..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package errors contains common error types for the OpenPGP packages.
-package errors // import "github.com/ProtonMail/go-crypto/openpgp/errors"
-
-import (
- "strconv"
-)
-
-var (
- // ErrDecryptSessionKeyParsing is a generic error message for parsing errors in decrypted data
- // to reduce the risk of oracle attacks.
- ErrDecryptSessionKeyParsing = DecryptWithSessionKeyError("parsing error")
- // ErrAEADTagVerification is returned if one of the tag verifications in SEIPDv2 fails
- ErrAEADTagVerification error = DecryptWithSessionKeyError("AEAD tag verification failed")
- // ErrMDCHashMismatch
- ErrMDCHashMismatch error = SignatureError("MDC hash mismatch")
- // ErrMDCMissing
- ErrMDCMissing error = SignatureError("MDC packet not found")
-)
-
-// A StructuralError is returned when OpenPGP data is found to be syntactically
-// invalid.
-type StructuralError string
-
-func (s StructuralError) Error() string {
- return "openpgp: invalid data: " + string(s)
-}
-
-// A DecryptWithSessionKeyError is returned when a failure occurs when reading from symmetrically decrypted data or
-// an authentication tag verification fails.
-// Such an error indicates that the supplied session key is likely wrong or the data got corrupted.
-type DecryptWithSessionKeyError string
-
-func (s DecryptWithSessionKeyError) Error() string {
- return "openpgp: decryption with session key failed: " + string(s)
-}
-
-// HandleSensitiveParsingError handles parsing errors when reading data from potentially decrypted data.
-// The function makes parsing errors generic to reduce the risk of oracle attacks in SEIPDv1.
-func HandleSensitiveParsingError(err error, decrypted bool) error {
- if !decrypted {
- // Data was not encrypted so we return the inner error.
- return err
- }
- // The data is read from a stream that decrypts using a session key;
- // therefore, we need to handle parsing errors appropriately.
- // This is essential to mitigate the risk of oracle attacks.
- if decError, ok := err.(*DecryptWithSessionKeyError); ok {
- return decError
- }
- if decError, ok := err.(DecryptWithSessionKeyError); ok {
- return decError
- }
- return ErrDecryptSessionKeyParsing
-}
-
-// UnsupportedError indicates that, although the OpenPGP data is valid, it
-// makes use of currently unimplemented features.
-type UnsupportedError string
-
-func (s UnsupportedError) Error() string {
- return "openpgp: unsupported feature: " + string(s)
-}
-
-// InvalidArgumentError indicates that the caller is in error and passed an
-// incorrect value.
-type InvalidArgumentError string
-
-func (i InvalidArgumentError) Error() string {
- return "openpgp: invalid argument: " + string(i)
-}
-
-// SignatureError indicates that a syntactically valid signature failed to
-// validate.
-type SignatureError string
-
-func (b SignatureError) Error() string {
- return "openpgp: invalid signature: " + string(b)
-}
-
-type signatureExpiredError int
-
-func (se signatureExpiredError) Error() string {
- return "openpgp: signature expired"
-}
-
-var ErrSignatureExpired error = signatureExpiredError(0)
-
-type keyExpiredError int
-
-func (ke keyExpiredError) Error() string {
- return "openpgp: key expired"
-}
-
-var ErrSignatureOlderThanKey error = signatureOlderThanKeyError(0)
-
-type signatureOlderThanKeyError int
-
-func (ske signatureOlderThanKeyError) Error() string {
- return "openpgp: signature is older than the key"
-}
-
-var ErrKeyExpired error = keyExpiredError(0)
-
-type keyIncorrectError int
-
-func (ki keyIncorrectError) Error() string {
- return "openpgp: incorrect key"
-}
-
-var ErrKeyIncorrect error = keyIncorrectError(0)
-
-// KeyInvalidError indicates that the public key parameters are invalid
-// as they do not match the private ones
-type KeyInvalidError string
-
-func (e KeyInvalidError) Error() string {
- return "openpgp: invalid key: " + string(e)
-}
-
-type unknownIssuerError int
-
-func (unknownIssuerError) Error() string {
- return "openpgp: signature made by unknown entity"
-}
-
-var ErrUnknownIssuer error = unknownIssuerError(0)
-
-type keyRevokedError int
-
-func (keyRevokedError) Error() string {
- return "openpgp: signature made by revoked key"
-}
-
-var ErrKeyRevoked error = keyRevokedError(0)
-
-type WeakAlgorithmError string
-
-func (e WeakAlgorithmError) Error() string {
- return "openpgp: weak algorithms are rejected: " + string(e)
-}
-
-type UnknownPacketTypeError uint8
-
-func (upte UnknownPacketTypeError) Error() string {
- return "openpgp: unknown packet type: " + strconv.Itoa(int(upte))
-}
-
-type CriticalUnknownPacketTypeError uint8
-
-func (upte CriticalUnknownPacketTypeError) Error() string {
- return "openpgp: unknown critical packet type: " + strconv.Itoa(int(upte))
-}
-
-// AEADError indicates that there is a problem when initializing or using a
-// AEAD instance, configuration struct, nonces or index values.
-type AEADError string
-
-func (ae AEADError) Error() string {
- return "openpgp: aead error: " + string(ae)
-}
-
-// ErrDummyPrivateKey results when operations are attempted on a private key
-// that is just a dummy key. See
-// https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=fe55ae16ab4e26d8356dc574c9e8bc935e71aef1;hb=23191d7851eae2217ecdac6484349849a24fd94a#l1109
-type ErrDummyPrivateKey string
-
-func (dke ErrDummyPrivateKey) Error() string {
- return "openpgp: s2k GNU dummy key: " + string(dke)
-}
-
-// ErrMalformedMessage results when the packet sequence is incorrect
-type ErrMalformedMessage string
-
-func (dke ErrMalformedMessage) Error() string {
- return "openpgp: malformed message " + string(dke)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/hash.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/hash.go
deleted file mode 100644
index 526bd7777f..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/hash.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package openpgp
-
-import (
- "crypto"
-
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
-)
-
-// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP
-// hash id.
-func HashIdToHash(id byte) (h crypto.Hash, ok bool) {
- return algorithm.HashIdToHash(id)
-}
-
-// HashIdToString returns the name of the hash function corresponding to the
-// given OpenPGP hash id.
-func HashIdToString(id byte) (name string, ok bool) {
- return algorithm.HashIdToString(id)
-}
-
-// HashToHashId returns an OpenPGP hash id which corresponds the given Hash.
-func HashToHashId(h crypto.Hash) (id byte, ok bool) {
- return algorithm.HashToHashId(h)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/aead.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/aead.go
deleted file mode 100644
index d067065186..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/aead.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-
-package algorithm
-
-import (
- "crypto/cipher"
- "github.com/ProtonMail/go-crypto/eax"
- "github.com/ProtonMail/go-crypto/ocb"
-)
-
-// AEADMode defines the Authenticated Encryption with Associated Data mode of
-// operation.
-type AEADMode uint8
-
-// Supported modes of operation (see RFC4880bis [EAX] and RFC7253)
-const (
- AEADModeEAX = AEADMode(1)
- AEADModeOCB = AEADMode(2)
- AEADModeGCM = AEADMode(3)
-)
-
-// TagLength returns the length in bytes of authentication tags.
-func (mode AEADMode) TagLength() int {
- switch mode {
- case AEADModeEAX:
- return 16
- case AEADModeOCB:
- return 16
- case AEADModeGCM:
- return 16
- default:
- return 0
- }
-}
-
-// NonceLength returns the length in bytes of nonces.
-func (mode AEADMode) NonceLength() int {
- switch mode {
- case AEADModeEAX:
- return 16
- case AEADModeOCB:
- return 15
- case AEADModeGCM:
- return 12
- default:
- return 0
- }
-}
-
-// New returns a fresh instance of the given mode
-func (mode AEADMode) New(block cipher.Block) (alg cipher.AEAD) {
- var err error
- switch mode {
- case AEADModeEAX:
- alg, err = eax.NewEAX(block)
- case AEADModeOCB:
- alg, err = ocb.NewOCB(block)
- case AEADModeGCM:
- alg, err = cipher.NewGCM(block)
- }
- if err != nil {
- panic(err.Error())
- }
- return alg
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/cipher.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/cipher.go
deleted file mode 100644
index c76a75bcda..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/cipher.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package algorithm
-
-import (
- "crypto/aes"
- "crypto/cipher"
- "crypto/des"
-
- "golang.org/x/crypto/cast5"
-)
-
-// Cipher is an official symmetric key cipher algorithm. See RFC 4880,
-// section 9.2.
-type Cipher interface {
- // Id returns the algorithm ID, as a byte, of the cipher.
- Id() uint8
- // KeySize returns the key size, in bytes, of the cipher.
- KeySize() int
- // BlockSize returns the block size, in bytes, of the cipher.
- BlockSize() int
- // New returns a fresh instance of the given cipher.
- New(key []byte) cipher.Block
-}
-
-// The following constants mirror the OpenPGP standard (RFC 4880).
-const (
- TripleDES = CipherFunction(2)
- CAST5 = CipherFunction(3)
- AES128 = CipherFunction(7)
- AES192 = CipherFunction(8)
- AES256 = CipherFunction(9)
-)
-
-// CipherById represents the different block ciphers specified for OpenPGP. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13
-var CipherById = map[uint8]Cipher{
- TripleDES.Id(): TripleDES,
- CAST5.Id(): CAST5,
- AES128.Id(): AES128,
- AES192.Id(): AES192,
- AES256.Id(): AES256,
-}
-
-type CipherFunction uint8
-
-// ID returns the algorithm Id, as a byte, of cipher.
-func (sk CipherFunction) Id() uint8 {
- return uint8(sk)
-}
-
-// KeySize returns the key size, in bytes, of cipher.
-func (cipher CipherFunction) KeySize() int {
- switch cipher {
- case CAST5:
- return cast5.KeySize
- case AES128:
- return 16
- case AES192, TripleDES:
- return 24
- case AES256:
- return 32
- }
- return 0
-}
-
-// BlockSize returns the block size, in bytes, of cipher.
-func (cipher CipherFunction) BlockSize() int {
- switch cipher {
- case TripleDES:
- return des.BlockSize
- case CAST5:
- return 8
- case AES128, AES192, AES256:
- return 16
- }
- return 0
-}
-
-// New returns a fresh instance of the given cipher.
-func (cipher CipherFunction) New(key []byte) (block cipher.Block) {
- var err error
- switch cipher {
- case TripleDES:
- block, err = des.NewTripleDESCipher(key)
- case CAST5:
- block, err = cast5.NewCipher(key)
- case AES128, AES192, AES256:
- block, err = aes.NewCipher(key)
- }
- if err != nil {
- panic(err.Error())
- }
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/hash.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/hash.go
deleted file mode 100644
index d1a00fc749..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/hash.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package algorithm
-
-import (
- "crypto"
- "fmt"
- "hash"
-)
-
-// Hash is an official hash function algorithm. See RFC 4880, section 9.4.
-type Hash interface {
- // Id returns the algorithm ID, as a byte, of Hash.
- Id() uint8
- // Available reports whether the given hash function is linked into the binary.
- Available() bool
- // HashFunc simply returns the value of h so that Hash implements SignerOpts.
- HashFunc() crypto.Hash
- // New returns a new hash.Hash calculating the given hash function. New
- // panics if the hash function is not linked into the binary.
- New() hash.Hash
- // Size returns the length, in bytes, of a digest resulting from the given
- // hash function. It doesn't require that the hash function in question be
- // linked into the program.
- Size() int
- // String is the name of the hash function corresponding to the given
- // OpenPGP hash id.
- String() string
-}
-
-// The following vars mirror the crypto/Hash supported hash functions.
-var (
- SHA1 Hash = cryptoHash{2, crypto.SHA1}
- SHA256 Hash = cryptoHash{8, crypto.SHA256}
- SHA384 Hash = cryptoHash{9, crypto.SHA384}
- SHA512 Hash = cryptoHash{10, crypto.SHA512}
- SHA224 Hash = cryptoHash{11, crypto.SHA224}
- SHA3_256 Hash = cryptoHash{12, crypto.SHA3_256}
- SHA3_512 Hash = cryptoHash{14, crypto.SHA3_512}
-)
-
-// HashById represents the different hash functions specified for OpenPGP. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-14
-var (
- HashById = map[uint8]Hash{
- SHA256.Id(): SHA256,
- SHA384.Id(): SHA384,
- SHA512.Id(): SHA512,
- SHA224.Id(): SHA224,
- SHA3_256.Id(): SHA3_256,
- SHA3_512.Id(): SHA3_512,
- }
-)
-
-// cryptoHash contains pairs relating OpenPGP's hash identifier with
-// Go's crypto.Hash type. See RFC 4880, section 9.4.
-type cryptoHash struct {
- id uint8
- crypto.Hash
-}
-
-// Id returns the algorithm ID, as a byte, of cryptoHash.
-func (h cryptoHash) Id() uint8 {
- return h.id
-}
-
-var hashNames = map[uint8]string{
- SHA256.Id(): "SHA256",
- SHA384.Id(): "SHA384",
- SHA512.Id(): "SHA512",
- SHA224.Id(): "SHA224",
- SHA3_256.Id(): "SHA3-256",
- SHA3_512.Id(): "SHA3-512",
-}
-
-func (h cryptoHash) String() string {
- s, ok := hashNames[h.id]
- if !ok {
- panic(fmt.Sprintf("Unsupported hash function %d", h.id))
- }
- return s
-}
-
-// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP
-// hash id.
-func HashIdToHash(id byte) (h crypto.Hash, ok bool) {
- if hash, ok := HashById[id]; ok {
- return hash.HashFunc(), true
- }
- return 0, false
-}
-
-// HashIdToHashWithSha1 returns a crypto.Hash which corresponds to the given OpenPGP
-// hash id, allowing sha1.
-func HashIdToHashWithSha1(id byte) (h crypto.Hash, ok bool) {
- if hash, ok := HashById[id]; ok {
- return hash.HashFunc(), true
- }
-
- if id == SHA1.Id() {
- return SHA1.HashFunc(), true
- }
-
- return 0, false
-}
-
-// HashIdToString returns the name of the hash function corresponding to the
-// given OpenPGP hash id.
-func HashIdToString(id byte) (name string, ok bool) {
- if hash, ok := HashById[id]; ok {
- return hash.String(), true
- }
- return "", false
-}
-
-// HashToHashId returns an OpenPGP hash id which corresponds the given Hash.
-func HashToHashId(h crypto.Hash) (id byte, ok bool) {
- for id, hash := range HashById {
- if hash.HashFunc() == h {
- return id, true
- }
- }
-
- return 0, false
-}
-
-// HashToHashIdWithSha1 returns an OpenPGP hash id which corresponds the given Hash,
-// allowing instances of SHA1
-func HashToHashIdWithSha1(h crypto.Hash) (id byte, ok bool) {
- for id, hash := range HashById {
- if hash.HashFunc() == h {
- return id, true
- }
- }
-
- if h == SHA1.HashFunc() {
- return SHA1.Id(), true
- }
-
- return 0, false
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.go
deleted file mode 100644
index 888767c4e4..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.go
+++ /dev/null
@@ -1,171 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- x25519lib "github.com/cloudflare/circl/dh/x25519"
-)
-
-type curve25519 struct{}
-
-func NewCurve25519() *curve25519 {
- return &curve25519{}
-}
-
-func (c *curve25519) GetCurveName() string {
- return "curve25519"
-}
-
-// MarshalBytePoint encodes the public point from native format, adding the prefix.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
-func (c *curve25519) MarshalBytePoint(point []byte) []byte {
- return append([]byte{0x40}, point...)
-}
-
-// UnmarshalBytePoint decodes the public point to native format, removing the prefix.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
-func (c *curve25519) UnmarshalBytePoint(point []byte) []byte {
- if len(point) != x25519lib.Size+1 {
- return nil
- }
-
- // Remove prefix
- return point[1:]
-}
-
-// MarshalByteSecret encodes the secret scalar from native format.
-// Note that the EC secret scalar differs from the definition of public keys in
-// [Curve25519] in two ways: (1) the byte-ordering is big-endian, which is
-// more uniform with how big integers are represented in OpenPGP, and (2) the
-// leading zeros are truncated.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.1
-// Note that leading zero bytes are stripped later when encoding as an MPI.
-func (c *curve25519) MarshalByteSecret(secret []byte) []byte {
- d := make([]byte, x25519lib.Size)
- copyReversed(d, secret)
-
- // The following ensures that the private key is a number of the form
- // 2^{254} + 8 * [0, 2^{251}), in order to avoid the small subgroup of
- // the curve.
- //
- // This masking is done internally in the underlying lib and so is unnecessary
- // for security, but OpenPGP implementations require that private keys be
- // pre-masked.
- d[0] &= 127
- d[0] |= 64
- d[31] &= 248
-
- return d
-}
-
-// UnmarshalByteSecret decodes the secret scalar from native format.
-// Note that the EC secret scalar differs from the definition of public keys in
-// [Curve25519] in two ways: (1) the byte-ordering is big-endian, which is
-// more uniform with how big integers are represented in OpenPGP, and (2) the
-// leading zeros are truncated.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.1
-func (c *curve25519) UnmarshalByteSecret(d []byte) []byte {
- if len(d) > x25519lib.Size {
- return nil
- }
-
- // Ensure truncated leading bytes are re-added
- secret := make([]byte, x25519lib.Size)
- copyReversed(secret, d)
-
- return secret
-}
-
-// generateKeyPairBytes Generates a private-public key-pair.
-// 'priv' is a private key; a little-endian scalar belonging to the set
-// 2^{254} + 8 * [0, 2^{251}), in order to avoid the small subgroup of the
-// curve. 'pub' is simply 'priv' * G where G is the base point.
-// See https://cr.yp.to/ecdh.html and RFC7748, sec 5.
-func (c *curve25519) generateKeyPairBytes(rand io.Reader) (priv, pub x25519lib.Key, err error) {
- _, err = io.ReadFull(rand, priv[:])
- if err != nil {
- return
- }
-
- x25519lib.KeyGen(&pub, &priv)
- return
-}
-
-func (c *curve25519) GenerateECDH(rand io.Reader) (point []byte, secret []byte, err error) {
- priv, pub, err := c.generateKeyPairBytes(rand)
- if err != nil {
- return
- }
-
- return pub[:], priv[:], nil
-}
-
-func (c *genericCurve) MaskSecret(secret []byte) []byte {
- return secret
-}
-
-func (c *curve25519) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
- // RFC6637 §8: "Generate an ephemeral key pair {v, V=vG}"
- // ephemeralPrivate corresponds to `v`.
- // ephemeralPublic corresponds to `V`.
- ephemeralPrivate, ephemeralPublic, err := c.generateKeyPairBytes(rand)
- if err != nil {
- return nil, nil, err
- }
-
- // RFC6637 §8: "Obtain the authenticated recipient public key R"
- // pubKey corresponds to `R`.
- var pubKey x25519lib.Key
- copy(pubKey[:], point)
-
- // RFC6637 §8: "Compute the shared point S = vR"
- // "VB = convert point V to the octet string"
- // sharedPoint corresponds to `VB`.
- var sharedPoint x25519lib.Key
- x25519lib.Shared(&sharedPoint, &ephemeralPrivate, &pubKey)
-
- return ephemeralPublic[:], sharedPoint[:], nil
-}
-
-func (c *curve25519) Decaps(vsG, secret []byte) (sharedSecret []byte, err error) {
- var ephemeralPublic, decodedPrivate, sharedPoint x25519lib.Key
- // RFC6637 §8: "The decryption is the inverse of the method given."
- // All quoted descriptions in comments below describe encryption, and
- // the reverse is performed.
- // vsG corresponds to `VB` in RFC6637 §8 .
-
- // RFC6637 §8: "VB = convert point V to the octet string"
- copy(ephemeralPublic[:], vsG)
-
- // decodedPrivate corresponds to `r` in RFC6637 §8 .
- copy(decodedPrivate[:], secret)
-
- // RFC6637 §8: "Note that the recipient obtains the shared secret by calculating
- // S = rV = rvG, where (r,R) is the recipient's key pair."
- // sharedPoint corresponds to `S`.
- x25519lib.Shared(&sharedPoint, &decodedPrivate, &ephemeralPublic)
-
- return sharedPoint[:], nil
-}
-
-func (c *curve25519) ValidateECDH(point []byte, secret []byte) (err error) {
- var pk, sk x25519lib.Key
- copy(sk[:], secret)
- x25519lib.KeyGen(&pk, &sk)
-
- if subtle.ConstantTimeCompare(point, pk[:]) == 0 {
- return errors.KeyInvalidError("ecc: invalid curve25519 public point")
- }
-
- return nil
-}
-
-func copyReversed(out []byte, in []byte) {
- l := len(in)
- for i := 0; i < l; i++ {
- out[i] = in[l-i-1]
- }
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
deleted file mode 100644
index 0da2d0d852..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "bytes"
- "crypto/elliptic"
-
- "github.com/ProtonMail/go-crypto/bitcurves"
- "github.com/ProtonMail/go-crypto/brainpool"
- "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
-)
-
-const Curve25519GenName = "Curve25519"
-
-type CurveInfo struct {
- GenName string
- Oid *encoding.OID
- Curve Curve
-}
-
-var Curves = []CurveInfo{
- {
- // NIST P-256
- GenName: "P256",
- Oid: encoding.NewOID([]byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07}),
- Curve: NewGenericCurve(elliptic.P256()),
- },
- {
- // NIST P-384
- GenName: "P384",
- Oid: encoding.NewOID([]byte{0x2B, 0x81, 0x04, 0x00, 0x22}),
- Curve: NewGenericCurve(elliptic.P384()),
- },
- {
- // NIST P-521
- GenName: "P521",
- Oid: encoding.NewOID([]byte{0x2B, 0x81, 0x04, 0x00, 0x23}),
- Curve: NewGenericCurve(elliptic.P521()),
- },
- {
- // SecP256k1
- GenName: "SecP256k1",
- Oid: encoding.NewOID([]byte{0x2B, 0x81, 0x04, 0x00, 0x0A}),
- Curve: NewGenericCurve(bitcurves.S256()),
- },
- {
- // Curve25519
- GenName: Curve25519GenName,
- Oid: encoding.NewOID([]byte{0x2B, 0x06, 0x01, 0x04, 0x01, 0x97, 0x55, 0x01, 0x05, 0x01}),
- Curve: NewCurve25519(),
- },
- {
- // x448
- GenName: "Curve448",
- Oid: encoding.NewOID([]byte{0x2B, 0x65, 0x6F}),
- Curve: NewX448(),
- },
- {
- // Ed25519
- GenName: Curve25519GenName,
- Oid: encoding.NewOID([]byte{0x2B, 0x06, 0x01, 0x04, 0x01, 0xDA, 0x47, 0x0F, 0x01}),
- Curve: NewEd25519(),
- },
- {
- // Ed448
- GenName: "Curve448",
- Oid: encoding.NewOID([]byte{0x2B, 0x65, 0x71}),
- Curve: NewEd448(),
- },
- {
- // BrainpoolP256r1
- GenName: "BrainpoolP256",
- Oid: encoding.NewOID([]byte{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x07}),
- Curve: NewGenericCurve(brainpool.P256r1()),
- },
- {
- // BrainpoolP384r1
- GenName: "BrainpoolP384",
- Oid: encoding.NewOID([]byte{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0B}),
- Curve: NewGenericCurve(brainpool.P384r1()),
- },
- {
- // BrainpoolP512r1
- GenName: "BrainpoolP512",
- Oid: encoding.NewOID([]byte{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0D}),
- Curve: NewGenericCurve(brainpool.P512r1()),
- },
-}
-
-func FindByCurve(curve Curve) *CurveInfo {
- for _, curveInfo := range Curves {
- if curveInfo.Curve.GetCurveName() == curve.GetCurveName() {
- return &curveInfo
- }
- }
- return nil
-}
-
-func FindByOid(oid encoding.Field) *CurveInfo {
- var rawBytes = oid.Bytes()
- for _, curveInfo := range Curves {
- if bytes.Equal(curveInfo.Oid.Bytes(), rawBytes) {
- return &curveInfo
- }
- }
- return nil
-}
-
-func FindEdDSAByGenName(curveGenName string) EdDSACurve {
- for _, curveInfo := range Curves {
- if curveInfo.GenName == curveGenName {
- curve, ok := curveInfo.Curve.(EdDSACurve)
- if ok {
- return curve
- }
- }
- }
- return nil
-}
-
-func FindECDSAByGenName(curveGenName string) ECDSACurve {
- for _, curveInfo := range Curves {
- if curveInfo.GenName == curveGenName {
- curve, ok := curveInfo.Curve.(ECDSACurve)
- if ok {
- return curve
- }
- }
- }
- return nil
-}
-
-func FindECDHByGenName(curveGenName string) ECDHCurve {
- for _, curveInfo := range Curves {
- if curveInfo.GenName == curveGenName {
- curve, ok := curveInfo.Curve.(ECDHCurve)
- if ok {
- return curve
- }
- }
- }
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curves.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curves.go
deleted file mode 100644
index 5ed9c93b3d..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curves.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "io"
- "math/big"
-)
-
-type Curve interface {
- GetCurveName() string
-}
-
-type ECDSACurve interface {
- Curve
- MarshalIntegerPoint(x, y *big.Int) []byte
- UnmarshalIntegerPoint([]byte) (x, y *big.Int)
- MarshalIntegerSecret(d *big.Int) []byte
- UnmarshalIntegerSecret(d []byte) *big.Int
- GenerateECDSA(rand io.Reader) (x, y, secret *big.Int, err error)
- Sign(rand io.Reader, x, y, d *big.Int, hash []byte) (r, s *big.Int, err error)
- Verify(x, y *big.Int, hash []byte, r, s *big.Int) bool
- ValidateECDSA(x, y *big.Int, secret []byte) error
-}
-
-type EdDSACurve interface {
- Curve
- MarshalBytePoint(x []byte) []byte
- UnmarshalBytePoint([]byte) (x []byte)
- MarshalByteSecret(d []byte) []byte
- UnmarshalByteSecret(d []byte) []byte
- MarshalSignature(sig []byte) (r, s []byte)
- UnmarshalSignature(r, s []byte) (sig []byte)
- GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error)
- Sign(publicKey, privateKey, message []byte) (sig []byte, err error)
- Verify(publicKey, message, sig []byte) bool
- ValidateEdDSA(publicKey, privateKey []byte) (err error)
-}
-type ECDHCurve interface {
- Curve
- MarshalBytePoint([]byte) (encoded []byte)
- UnmarshalBytePoint(encoded []byte) []byte
- MarshalByteSecret(d []byte) []byte
- UnmarshalByteSecret(d []byte) []byte
- GenerateECDH(rand io.Reader) (point []byte, secret []byte, err error)
- Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error)
- Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error)
- ValidateECDH(public []byte, secret []byte) error
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
deleted file mode 100644
index 5a4c3a8596..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "bytes"
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- ed25519lib "github.com/cloudflare/circl/sign/ed25519"
-)
-
-const ed25519Size = 32
-
-type ed25519 struct{}
-
-func NewEd25519() *ed25519 {
- return &ed25519{}
-}
-
-func (c *ed25519) GetCurveName() string {
- return "ed25519"
-}
-
-// MarshalBytePoint encodes the public point from native format, adding the prefix.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed25519) MarshalBytePoint(x []byte) []byte {
- return append([]byte{0x40}, x...)
-}
-
-// UnmarshalBytePoint decodes a point from prefixed format to native.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed25519) UnmarshalBytePoint(point []byte) (x []byte) {
- if len(point) != ed25519lib.PublicKeySize+1 {
- return nil
- }
-
- // Return unprefixed
- return point[1:]
-}
-
-// MarshalByteSecret encodes a scalar in native format.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed25519) MarshalByteSecret(d []byte) []byte {
- return d
-}
-
-// UnmarshalByteSecret decodes a scalar in native format and re-adds the stripped leading zeroes
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed25519) UnmarshalByteSecret(s []byte) (d []byte) {
- if len(s) > ed25519lib.SeedSize {
- return nil
- }
-
- // Handle stripped leading zeroes
- d = make([]byte, ed25519lib.SeedSize)
- copy(d[ed25519lib.SeedSize-len(s):], s)
- return
-}
-
-// MarshalSignature splits a signature in R and S.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.1
-func (c *ed25519) MarshalSignature(sig []byte) (r, s []byte) {
- return sig[:ed25519Size], sig[ed25519Size:]
-}
-
-// UnmarshalSignature decodes R and S in the native format, re-adding the stripped leading zeroes
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.1
-func (c *ed25519) UnmarshalSignature(r, s []byte) (sig []byte) {
- // Check size
- if len(r) > 32 || len(s) > 32 {
- return nil
- }
-
- sig = make([]byte, ed25519lib.SignatureSize)
-
- // Handle stripped leading zeroes
- copy(sig[ed25519Size-len(r):ed25519Size], r)
- copy(sig[ed25519lib.SignatureSize-len(s):], s)
- return sig
-}
-
-func (c *ed25519) GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error) {
- pk, sk, err := ed25519lib.GenerateKey(rand)
-
- if err != nil {
- return nil, nil, err
- }
-
- return pk, sk[:ed25519lib.SeedSize], nil
-}
-
-func getEd25519Sk(publicKey, privateKey []byte) ed25519lib.PrivateKey {
- privateKeyCap, privateKeyLen, publicKeyLen := cap(privateKey), len(privateKey), len(publicKey)
-
- if privateKeyCap >= privateKeyLen+publicKeyLen &&
- bytes.Equal(privateKey[privateKeyLen:privateKeyLen+publicKeyLen], publicKey) {
- return privateKey[:privateKeyLen+publicKeyLen]
- }
-
- return append(privateKey[:privateKeyLen:privateKeyLen], publicKey...)
-}
-
-func (c *ed25519) Sign(publicKey, privateKey, message []byte) (sig []byte, err error) {
- sig = ed25519lib.Sign(getEd25519Sk(publicKey, privateKey), message)
- return sig, nil
-}
-
-func (c *ed25519) Verify(publicKey, message, sig []byte) bool {
- return ed25519lib.Verify(publicKey, message, sig)
-}
-
-func (c *ed25519) ValidateEdDSA(publicKey, privateKey []byte) (err error) {
- priv := getEd25519Sk(publicKey, privateKey)
- expectedPriv := ed25519lib.NewKeyFromSeed(priv.Seed())
- if subtle.ConstantTimeCompare(priv, expectedPriv) == 0 {
- return errors.KeyInvalidError("ecc: invalid ed25519 secret")
- }
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
deleted file mode 100644
index b6edda7480..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "bytes"
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- ed448lib "github.com/cloudflare/circl/sign/ed448"
-)
-
-type ed448 struct{}
-
-func NewEd448() *ed448 {
- return &ed448{}
-}
-
-func (c *ed448) GetCurveName() string {
- return "ed448"
-}
-
-// MarshalBytePoint encodes the public point from native format, adding the prefix.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed448) MarshalBytePoint(x []byte) []byte {
- // Return prefixed
- return append([]byte{0x40}, x...)
-}
-
-// UnmarshalBytePoint decodes a point from prefixed format to native.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed448) UnmarshalBytePoint(point []byte) (x []byte) {
- if len(point) != ed448lib.PublicKeySize+1 {
- return nil
- }
-
- // Strip prefix
- return point[1:]
-}
-
-// MarshalByteSecret encoded a scalar from native format to prefixed.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed448) MarshalByteSecret(d []byte) []byte {
- // Return prefixed
- return append([]byte{0x40}, d...)
-}
-
-// UnmarshalByteSecret decodes a scalar from prefixed format to native.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
-func (c *ed448) UnmarshalByteSecret(s []byte) (d []byte) {
- // Check prefixed size
- if len(s) != ed448lib.SeedSize+1 {
- return nil
- }
-
- // Strip prefix
- return s[1:]
-}
-
-// MarshalSignature splits a signature in R and S, where R is in prefixed native format and
-// S is an MPI with value zero.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.2
-func (c *ed448) MarshalSignature(sig []byte) (r, s []byte) {
- return append([]byte{0x40}, sig...), []byte{}
-}
-
-// UnmarshalSignature decodes R and S in the native format. Only R is used, in prefixed native format.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.2
-func (c *ed448) UnmarshalSignature(r, s []byte) (sig []byte) {
- if len(r) != ed448lib.SignatureSize+1 {
- return nil
- }
-
- return r[1:]
-}
-
-func (c *ed448) GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error) {
- pk, sk, err := ed448lib.GenerateKey(rand)
-
- if err != nil {
- return nil, nil, err
- }
-
- return pk, sk[:ed448lib.SeedSize], nil
-}
-
-func getEd448Sk(publicKey, privateKey []byte) ed448lib.PrivateKey {
- privateKeyCap, privateKeyLen, publicKeyLen := cap(privateKey), len(privateKey), len(publicKey)
-
- if privateKeyCap >= privateKeyLen+publicKeyLen &&
- bytes.Equal(privateKey[privateKeyLen:privateKeyLen+publicKeyLen], publicKey) {
- return privateKey[:privateKeyLen+publicKeyLen]
- }
-
- return append(privateKey[:privateKeyLen:privateKeyLen], publicKey...)
-}
-
-func (c *ed448) Sign(publicKey, privateKey, message []byte) (sig []byte, err error) {
- // Ed448 is used with the empty string as a context string.
- // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7
- sig = ed448lib.Sign(getEd448Sk(publicKey, privateKey), message, "")
-
- return sig, nil
-}
-
-func (c *ed448) Verify(publicKey, message, sig []byte) bool {
- // Ed448 is used with the empty string as a context string.
- // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7
- return ed448lib.Verify(publicKey, message, sig, "")
-}
-
-func (c *ed448) ValidateEdDSA(publicKey, privateKey []byte) (err error) {
- priv := getEd448Sk(publicKey, privateKey)
- expectedPriv := ed448lib.NewKeyFromSeed(priv.Seed())
- if subtle.ConstantTimeCompare(priv, expectedPriv) == 0 {
- return errors.KeyInvalidError("ecc: invalid ed448 secret")
- }
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/generic.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/generic.go
deleted file mode 100644
index e28d7c7106..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/generic.go
+++ /dev/null
@@ -1,149 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "crypto/ecdsa"
- "crypto/elliptic"
- "fmt"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "io"
- "math/big"
-)
-
-type genericCurve struct {
- Curve elliptic.Curve
-}
-
-func NewGenericCurve(c elliptic.Curve) *genericCurve {
- return &genericCurve{
- Curve: c,
- }
-}
-
-func (c *genericCurve) GetCurveName() string {
- return c.Curve.Params().Name
-}
-
-func (c *genericCurve) MarshalBytePoint(point []byte) []byte {
- return point
-}
-
-func (c *genericCurve) UnmarshalBytePoint(point []byte) []byte {
- return point
-}
-
-func (c *genericCurve) MarshalIntegerPoint(x, y *big.Int) []byte {
- return elliptic.Marshal(c.Curve, x, y)
-}
-
-func (c *genericCurve) UnmarshalIntegerPoint(point []byte) (x, y *big.Int) {
- return elliptic.Unmarshal(c.Curve, point)
-}
-
-func (c *genericCurve) MarshalByteSecret(d []byte) []byte {
- return d
-}
-
-func (c *genericCurve) UnmarshalByteSecret(d []byte) []byte {
- return d
-}
-
-func (c *genericCurve) MarshalIntegerSecret(d *big.Int) []byte {
- return d.Bytes()
-}
-
-func (c *genericCurve) UnmarshalIntegerSecret(d []byte) *big.Int {
- return new(big.Int).SetBytes(d)
-}
-
-func (c *genericCurve) GenerateECDH(rand io.Reader) (point, secret []byte, err error) {
- secret, x, y, err := elliptic.GenerateKey(c.Curve, rand)
- if err != nil {
- return nil, nil, err
- }
-
- point = elliptic.Marshal(c.Curve, x, y)
- return point, secret, nil
-}
-
-func (c *genericCurve) GenerateECDSA(rand io.Reader) (x, y, secret *big.Int, err error) {
- priv, err := ecdsa.GenerateKey(c.Curve, rand)
- if err != nil {
- return
- }
-
- return priv.X, priv.Y, priv.D, nil
-}
-
-func (c *genericCurve) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
- xP, yP := elliptic.Unmarshal(c.Curve, point)
- if xP == nil {
- panic("invalid point")
- }
-
- d, x, y, err := elliptic.GenerateKey(c.Curve, rand)
- if err != nil {
- return nil, nil, err
- }
-
- vsG := elliptic.Marshal(c.Curve, x, y)
- zbBig, _ := c.Curve.ScalarMult(xP, yP, d)
-
- byteLen := (c.Curve.Params().BitSize + 7) >> 3
- zb := make([]byte, byteLen)
- zbBytes := zbBig.Bytes()
- copy(zb[byteLen-len(zbBytes):], zbBytes)
-
- return vsG, zb, nil
-}
-
-func (c *genericCurve) Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error) {
- x, y := elliptic.Unmarshal(c.Curve, ephemeral)
- zbBig, _ := c.Curve.ScalarMult(x, y, secret)
- byteLen := (c.Curve.Params().BitSize + 7) >> 3
- zb := make([]byte, byteLen)
- zbBytes := zbBig.Bytes()
- copy(zb[byteLen-len(zbBytes):], zbBytes)
-
- return zb, nil
-}
-
-func (c *genericCurve) Sign(rand io.Reader, x, y, d *big.Int, hash []byte) (r, s *big.Int, err error) {
- priv := &ecdsa.PrivateKey{D: d, PublicKey: ecdsa.PublicKey{X: x, Y: y, Curve: c.Curve}}
- return ecdsa.Sign(rand, priv, hash)
-}
-
-func (c *genericCurve) Verify(x, y *big.Int, hash []byte, r, s *big.Int) bool {
- pub := &ecdsa.PublicKey{X: x, Y: y, Curve: c.Curve}
- return ecdsa.Verify(pub, hash, r, s)
-}
-
-func (c *genericCurve) validate(xP, yP *big.Int, secret []byte) error {
- // the public point should not be at infinity (0,0)
- zero := new(big.Int)
- if xP.Cmp(zero) == 0 && yP.Cmp(zero) == 0 {
- return errors.KeyInvalidError(fmt.Sprintf("ecc (%s): infinity point", c.Curve.Params().Name))
- }
-
- // re-derive the public point Q' = (X,Y) = dG
- // to compare to declared Q in public key
- expectedX, expectedY := c.Curve.ScalarBaseMult(secret)
- if xP.Cmp(expectedX) != 0 || yP.Cmp(expectedY) != 0 {
- return errors.KeyInvalidError(fmt.Sprintf("ecc (%s): invalid point", c.Curve.Params().Name))
- }
-
- return nil
-}
-
-func (c *genericCurve) ValidateECDSA(xP, yP *big.Int, secret []byte) error {
- return c.validate(xP, yP, secret)
-}
-
-func (c *genericCurve) ValidateECDH(point []byte, secret []byte) error {
- xP, yP := elliptic.Unmarshal(c.Curve, point)
- if xP == nil {
- return errors.KeyInvalidError(fmt.Sprintf("ecc (%s): invalid point", c.Curve.Params().Name))
- }
-
- return c.validate(xP, yP, secret)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/x448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/x448.go
deleted file mode 100644
index df04262e9e..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/x448.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
-package ecc
-
-import (
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- x448lib "github.com/cloudflare/circl/dh/x448"
-)
-
-type x448 struct{}
-
-func NewX448() *x448 {
- return &x448{}
-}
-
-func (c *x448) GetCurveName() string {
- return "x448"
-}
-
-// MarshalBytePoint encodes the public point from native format, adding the prefix.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
-func (c *x448) MarshalBytePoint(point []byte) []byte {
- return append([]byte{0x40}, point...)
-}
-
-// UnmarshalBytePoint decodes a point from prefixed format to native.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
-func (c *x448) UnmarshalBytePoint(point []byte) []byte {
- if len(point) != x448lib.Size+1 {
- return nil
- }
-
- return point[1:]
-}
-
-// MarshalByteSecret encoded a scalar from native format to prefixed.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.2
-func (c *x448) MarshalByteSecret(d []byte) []byte {
- return append([]byte{0x40}, d...)
-}
-
-// UnmarshalByteSecret decodes a scalar from prefixed format to native.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.2
-func (c *x448) UnmarshalByteSecret(d []byte) []byte {
- if len(d) != x448lib.Size+1 {
- return nil
- }
-
- // Store without prefix
- return d[1:]
-}
-
-func (c *x448) generateKeyPairBytes(rand io.Reader) (sk, pk x448lib.Key, err error) {
- if _, err = rand.Read(sk[:]); err != nil {
- return
- }
-
- x448lib.KeyGen(&pk, &sk)
- return
-}
-
-func (c *x448) GenerateECDH(rand io.Reader) (point []byte, secret []byte, err error) {
- priv, pub, err := c.generateKeyPairBytes(rand)
- if err != nil {
- return
- }
-
- return pub[:], priv[:], nil
-}
-
-func (c *x448) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
- var pk, ss x448lib.Key
- seed, e, err := c.generateKeyPairBytes(rand)
- if err != nil {
- return nil, nil, err
- }
- copy(pk[:], point)
- x448lib.Shared(&ss, &seed, &pk)
-
- return e[:], ss[:], nil
-}
-
-func (c *x448) Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error) {
- var ss, sk, e x448lib.Key
-
- copy(sk[:], secret)
- copy(e[:], ephemeral)
- x448lib.Shared(&ss, &sk, &e)
-
- return ss[:], nil
-}
-
-func (c *x448) ValidateECDH(point []byte, secret []byte) error {
- var sk, pk, expectedPk x448lib.Key
-
- copy(pk[:], point)
- copy(sk[:], secret)
- x448lib.KeyGen(&expectedPk, &sk)
-
- if subtle.ConstantTimeCompare(expectedPk[:], pk[:]) == 0 {
- return errors.KeyInvalidError("ecc: invalid curve25519 public point")
- }
-
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.go
deleted file mode 100644
index 6c921481b7..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package encoding implements openpgp packet field encodings as specified in
-// RFC 4880 and 6637.
-package encoding
-
-import "io"
-
-// Field is an encoded field of an openpgp packet.
-type Field interface {
- // Bytes returns the decoded data.
- Bytes() []byte
-
- // BitLength is the size in bits of the decoded data.
- BitLength() uint16
-
- // EncodedBytes returns the encoded data.
- EncodedBytes() []byte
-
- // EncodedLength is the size in bytes of the encoded data.
- EncodedLength() uint16
-
- // ReadFrom reads the next Field from r.
- ReadFrom(r io.Reader) (int64, error)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/mpi.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/mpi.go
deleted file mode 100644
index 02e5e695c3..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/mpi.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package encoding
-
-import (
- "io"
- "math/big"
- "math/bits"
-)
-
-// An MPI is used to store the contents of a big integer, along with the bit
-// length that was specified in the original input. This allows the MPI to be
-// reserialized exactly.
-type MPI struct {
- bytes []byte
- bitLength uint16
-}
-
-// NewMPI returns a MPI initialized with bytes.
-func NewMPI(bytes []byte) *MPI {
- for len(bytes) != 0 && bytes[0] == 0 {
- bytes = bytes[1:]
- }
- if len(bytes) == 0 {
- bitLength := uint16(0)
- return &MPI{bytes, bitLength}
- }
- bitLength := 8*uint16(len(bytes)-1) + uint16(bits.Len8(bytes[0]))
- return &MPI{bytes, bitLength}
-}
-
-// Bytes returns the decoded data.
-func (m *MPI) Bytes() []byte {
- return m.bytes
-}
-
-// BitLength is the size in bits of the decoded data.
-func (m *MPI) BitLength() uint16 {
- return m.bitLength
-}
-
-// EncodedBytes returns the encoded data.
-func (m *MPI) EncodedBytes() []byte {
- return append([]byte{byte(m.bitLength >> 8), byte(m.bitLength)}, m.bytes...)
-}
-
-// EncodedLength is the size in bytes of the encoded data.
-func (m *MPI) EncodedLength() uint16 {
- return uint16(2 + len(m.bytes))
-}
-
-// ReadFrom reads into m the next MPI from r.
-func (m *MPI) ReadFrom(r io.Reader) (int64, error) {
- var buf [2]byte
- n, err := io.ReadFull(r, buf[0:])
- if err != nil {
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return int64(n), err
- }
-
- m.bitLength = uint16(buf[0])<<8 | uint16(buf[1])
- m.bytes = make([]byte, (int(m.bitLength)+7)/8)
-
- nn, err := io.ReadFull(r, m.bytes)
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
-
- // remove leading zero bytes from malformed GnuPG encoded MPIs:
- // https://bugs.gnupg.org/gnupg/issue1853
- // for _, b := range m.bytes {
- // if b != 0 {
- // break
- // }
- // m.bytes = m.bytes[1:]
- // m.bitLength -= 8
- // }
-
- return int64(n) + int64(nn), err
-}
-
-// SetBig initializes m with the bits from n.
-func (m *MPI) SetBig(n *big.Int) *MPI {
- m.bytes = n.Bytes()
- m.bitLength = uint16(n.BitLen())
- return m
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/oid.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/oid.go
deleted file mode 100644
index c9df9fe232..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/oid.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package encoding
-
-import (
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// OID is used to store a variable-length field with a one-octet size
-// prefix. See https://tools.ietf.org/html/rfc6637#section-9.
-type OID struct {
- bytes []byte
-}
-
-const (
- // maxOID is the maximum number of bytes in a OID.
- maxOID = 254
- // reservedOIDLength1 and reservedOIDLength2 are OID lengths that the RFC
- // specifies are reserved.
- reservedOIDLength1 = 0
- reservedOIDLength2 = 0xff
-)
-
-// NewOID returns a OID initialized with bytes.
-func NewOID(bytes []byte) *OID {
- switch len(bytes) {
- case reservedOIDLength1, reservedOIDLength2:
- panic("encoding: NewOID argument length is reserved")
- default:
- if len(bytes) > maxOID {
- panic("encoding: NewOID argument too large")
- }
- }
-
- return &OID{
- bytes: bytes,
- }
-}
-
-// Bytes returns the decoded data.
-func (o *OID) Bytes() []byte {
- return o.bytes
-}
-
-// BitLength is the size in bits of the decoded data.
-func (o *OID) BitLength() uint16 {
- return uint16(len(o.bytes) * 8)
-}
-
-// EncodedBytes returns the encoded data.
-func (o *OID) EncodedBytes() []byte {
- return append([]byte{byte(len(o.bytes))}, o.bytes...)
-}
-
-// EncodedLength is the size in bytes of the encoded data.
-func (o *OID) EncodedLength() uint16 {
- return uint16(1 + len(o.bytes))
-}
-
-// ReadFrom reads into b the next OID from r.
-func (o *OID) ReadFrom(r io.Reader) (int64, error) {
- var buf [1]byte
- n, err := io.ReadFull(r, buf[:])
- if err != nil {
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return int64(n), err
- }
-
- switch buf[0] {
- case reservedOIDLength1, reservedOIDLength2:
- return int64(n), errors.UnsupportedError("reserved for future extensions")
- }
-
- o.bytes = make([]byte, buf[0])
-
- nn, err := io.ReadFull(r, o.bytes)
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
-
- return int64(n) + int64(nn), err
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
deleted file mode 100644
index 77213f66be..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
+++ /dev/null
@@ -1,456 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package openpgp
-
-import (
- "crypto"
- "crypto/rand"
- "crypto/rsa"
- goerrors "errors"
- "io"
- "math/big"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/ecdh"
- "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
- "github.com/ProtonMail/go-crypto/openpgp/ed25519"
- "github.com/ProtonMail/go-crypto/openpgp/ed448"
- "github.com/ProtonMail/go-crypto/openpgp/eddsa"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
- "github.com/ProtonMail/go-crypto/openpgp/packet"
- "github.com/ProtonMail/go-crypto/openpgp/x25519"
- "github.com/ProtonMail/go-crypto/openpgp/x448"
-)
-
-// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a
-// single identity composed of the given full name, comment and email, any of
-// which may be empty but must not contain any of "()<>\x00".
-// If config is nil, sensible defaults will be used.
-func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) {
- creationTime := config.Now()
- keyLifetimeSecs := config.KeyLifetime()
-
- // Generate a primary signing key
- primaryPrivRaw, err := newSigner(config)
- if err != nil {
- return nil, err
- }
- primary := packet.NewSignerPrivateKey(creationTime, primaryPrivRaw)
- if config.V6() {
- if err := primary.UpgradeToV6(); err != nil {
- return nil, err
- }
- }
-
- e := &Entity{
- PrimaryKey: &primary.PublicKey,
- PrivateKey: primary,
- Identities: make(map[string]*Identity),
- Subkeys: []Subkey{},
- Signatures: []*packet.Signature{},
- }
-
- if config.V6() {
- // In v6 keys algorithm preferences should be stored in direct key signatures
- selfSignature := createSignaturePacket(&primary.PublicKey, packet.SigTypeDirectSignature, config)
- err = writeKeyProperties(selfSignature, creationTime, keyLifetimeSecs, config)
- if err != nil {
- return nil, err
- }
- err = selfSignature.SignDirectKeyBinding(&primary.PublicKey, primary, config)
- if err != nil {
- return nil, err
- }
- e.Signatures = append(e.Signatures, selfSignature)
- e.SelfSignature = selfSignature
- }
-
- err = e.addUserId(name, comment, email, config, creationTime, keyLifetimeSecs, !config.V6())
- if err != nil {
- return nil, err
- }
-
- // NOTE: No key expiry here, but we will not return this subkey in EncryptionKey()
- // if the primary/master key has expired.
- err = e.addEncryptionSubkey(config, creationTime, 0)
- if err != nil {
- return nil, err
- }
-
- return e, nil
-}
-
-func (t *Entity) AddUserId(name, comment, email string, config *packet.Config) error {
- creationTime := config.Now()
- keyLifetimeSecs := config.KeyLifetime()
- return t.addUserId(name, comment, email, config, creationTime, keyLifetimeSecs, !config.V6())
-}
-
-func writeKeyProperties(selfSignature *packet.Signature, creationTime time.Time, keyLifetimeSecs uint32, config *packet.Config) error {
- advertiseAead := config.AEAD() != nil
-
- selfSignature.CreationTime = creationTime
- selfSignature.KeyLifetimeSecs = &keyLifetimeSecs
- selfSignature.FlagsValid = true
- selfSignature.FlagSign = true
- selfSignature.FlagCertify = true
- selfSignature.SEIPDv1 = true // true by default, see 5.8 vs. 5.14
- selfSignature.SEIPDv2 = advertiseAead
-
- // Set the PreferredHash for the SelfSignature from the packet.Config.
- // If it is not the must-implement algorithm from rfc4880bis, append that.
- hash, ok := algorithm.HashToHashId(config.Hash())
- if !ok {
- return errors.UnsupportedError("unsupported preferred hash function")
- }
-
- selfSignature.PreferredHash = []uint8{hash}
- if config.Hash() != crypto.SHA256 {
- selfSignature.PreferredHash = append(selfSignature.PreferredHash, hashToHashId(crypto.SHA256))
- }
-
- // Likewise for DefaultCipher.
- selfSignature.PreferredSymmetric = []uint8{uint8(config.Cipher())}
- if config.Cipher() != packet.CipherAES128 {
- selfSignature.PreferredSymmetric = append(selfSignature.PreferredSymmetric, uint8(packet.CipherAES128))
- }
-
- // We set CompressionNone as the preferred compression algorithm because
- // of compression side channel attacks, then append the configured
- // DefaultCompressionAlgo if any is set (to signal support for cases
- // where the application knows that using compression is safe).
- selfSignature.PreferredCompression = []uint8{uint8(packet.CompressionNone)}
- if config.Compression() != packet.CompressionNone {
- selfSignature.PreferredCompression = append(selfSignature.PreferredCompression, uint8(config.Compression()))
- }
-
- if advertiseAead {
- // Get the preferred AEAD mode from the packet.Config.
- // If it is not the must-implement algorithm from rfc9580, append that.
- modes := []uint8{uint8(config.AEAD().Mode())}
- if config.AEAD().Mode() != packet.AEADModeOCB {
- modes = append(modes, uint8(packet.AEADModeOCB))
- }
-
- // For preferred (AES256, GCM), we'll generate (AES256, GCM), (AES256, OCB), (AES128, GCM), (AES128, OCB)
- for _, cipher := range selfSignature.PreferredSymmetric {
- for _, mode := range modes {
- selfSignature.PreferredCipherSuites = append(selfSignature.PreferredCipherSuites, [2]uint8{cipher, mode})
- }
- }
- }
- return nil
-}
-
-func (t *Entity) addUserId(name, comment, email string, config *packet.Config, creationTime time.Time, keyLifetimeSecs uint32, writeProperties bool) error {
- uid := packet.NewUserId(name, comment, email)
- if uid == nil {
- return errors.InvalidArgumentError("user id field contained invalid characters")
- }
-
- if _, ok := t.Identities[uid.Id]; ok {
- return errors.InvalidArgumentError("user id exist")
- }
-
- primary := t.PrivateKey
- isPrimaryId := len(t.Identities) == 0
- selfSignature := createSignaturePacket(&primary.PublicKey, packet.SigTypePositiveCert, config)
- if writeProperties {
- err := writeKeyProperties(selfSignature, creationTime, keyLifetimeSecs, config)
- if err != nil {
- return err
- }
- }
- selfSignature.IsPrimaryId = &isPrimaryId
-
- // User ID binding signature
- err := selfSignature.SignUserId(uid.Id, &primary.PublicKey, primary, config)
- if err != nil {
- return err
- }
- t.Identities[uid.Id] = &Identity{
- Name: uid.Id,
- UserId: uid,
- SelfSignature: selfSignature,
- Signatures: []*packet.Signature{selfSignature},
- }
- return nil
-}
-
-// AddSigningSubkey adds a signing keypair as a subkey to the Entity.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) AddSigningSubkey(config *packet.Config) error {
- creationTime := config.Now()
- keyLifetimeSecs := config.KeyLifetime()
-
- subPrivRaw, err := newSigner(config)
- if err != nil {
- return err
- }
- sub := packet.NewSignerPrivateKey(creationTime, subPrivRaw)
- sub.IsSubkey = true
- if config.V6() {
- if err := sub.UpgradeToV6(); err != nil {
- return err
- }
- }
-
- subkey := Subkey{
- PublicKey: &sub.PublicKey,
- PrivateKey: sub,
- }
- subkey.Sig = createSignaturePacket(e.PrimaryKey, packet.SigTypeSubkeyBinding, config)
- subkey.Sig.CreationTime = creationTime
- subkey.Sig.KeyLifetimeSecs = &keyLifetimeSecs
- subkey.Sig.FlagsValid = true
- subkey.Sig.FlagSign = true
- subkey.Sig.EmbeddedSignature = createSignaturePacket(subkey.PublicKey, packet.SigTypePrimaryKeyBinding, config)
- subkey.Sig.EmbeddedSignature.CreationTime = creationTime
-
- err = subkey.Sig.EmbeddedSignature.CrossSignKey(subkey.PublicKey, e.PrimaryKey, subkey.PrivateKey, config)
- if err != nil {
- return err
- }
-
- err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
- if err != nil {
- return err
- }
-
- e.Subkeys = append(e.Subkeys, subkey)
- return nil
-}
-
-// AddEncryptionSubkey adds an encryption keypair as a subkey to the Entity.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) AddEncryptionSubkey(config *packet.Config) error {
- creationTime := config.Now()
- keyLifetimeSecs := config.KeyLifetime()
- return e.addEncryptionSubkey(config, creationTime, keyLifetimeSecs)
-}
-
-func (e *Entity) addEncryptionSubkey(config *packet.Config, creationTime time.Time, keyLifetimeSecs uint32) error {
- subPrivRaw, err := newDecrypter(config)
- if err != nil {
- return err
- }
- sub := packet.NewDecrypterPrivateKey(creationTime, subPrivRaw)
- sub.IsSubkey = true
- if config.V6() {
- if err := sub.UpgradeToV6(); err != nil {
- return err
- }
- }
-
- subkey := Subkey{
- PublicKey: &sub.PublicKey,
- PrivateKey: sub,
- }
- subkey.Sig = createSignaturePacket(e.PrimaryKey, packet.SigTypeSubkeyBinding, config)
- subkey.Sig.CreationTime = creationTime
- subkey.Sig.KeyLifetimeSecs = &keyLifetimeSecs
- subkey.Sig.FlagsValid = true
- subkey.Sig.FlagEncryptStorage = true
- subkey.Sig.FlagEncryptCommunications = true
-
- err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
- if err != nil {
- return err
- }
-
- e.Subkeys = append(e.Subkeys, subkey)
- return nil
-}
-
-// Generates a signing key
-func newSigner(config *packet.Config) (signer interface{}, err error) {
- switch config.PublicKeyAlgorithm() {
- case packet.PubKeyAlgoRSA:
- bits := config.RSAModulusBits()
- if bits < 1024 {
- return nil, errors.InvalidArgumentError("bits must be >= 1024")
- }
- if config != nil && len(config.RSAPrimes) >= 2 {
- primes := config.RSAPrimes[0:2]
- config.RSAPrimes = config.RSAPrimes[2:]
- return generateRSAKeyWithPrimes(config.Random(), 2, bits, primes)
- }
- return rsa.GenerateKey(config.Random(), bits)
- case packet.PubKeyAlgoEdDSA:
- if config.V6() {
- // Implementations MUST NOT accept or generate v6 key material
- // using the deprecated OIDs.
- return nil, errors.InvalidArgumentError("EdDSALegacy cannot be used for v6 keys")
- }
- curve := ecc.FindEdDSAByGenName(string(config.CurveName()))
- if curve == nil {
- return nil, errors.InvalidArgumentError("unsupported curve")
- }
-
- priv, err := eddsa.GenerateKey(config.Random(), curve)
- if err != nil {
- return nil, err
- }
- return priv, nil
- case packet.PubKeyAlgoECDSA:
- curve := ecc.FindECDSAByGenName(string(config.CurveName()))
- if curve == nil {
- return nil, errors.InvalidArgumentError("unsupported curve")
- }
-
- priv, err := ecdsa.GenerateKey(config.Random(), curve)
- if err != nil {
- return nil, err
- }
- return priv, nil
- case packet.PubKeyAlgoEd25519:
- priv, err := ed25519.GenerateKey(config.Random())
- if err != nil {
- return nil, err
- }
- return priv, nil
- case packet.PubKeyAlgoEd448:
- priv, err := ed448.GenerateKey(config.Random())
- if err != nil {
- return nil, err
- }
- return priv, nil
- default:
- return nil, errors.InvalidArgumentError("unsupported public key algorithm")
- }
-}
-
-// Generates an encryption/decryption key
-func newDecrypter(config *packet.Config) (decrypter interface{}, err error) {
- switch config.PublicKeyAlgorithm() {
- case packet.PubKeyAlgoRSA:
- bits := config.RSAModulusBits()
- if bits < 1024 {
- return nil, errors.InvalidArgumentError("bits must be >= 1024")
- }
- if config != nil && len(config.RSAPrimes) >= 2 {
- primes := config.RSAPrimes[0:2]
- config.RSAPrimes = config.RSAPrimes[2:]
- return generateRSAKeyWithPrimes(config.Random(), 2, bits, primes)
- }
- return rsa.GenerateKey(config.Random(), bits)
- case packet.PubKeyAlgoEdDSA, packet.PubKeyAlgoECDSA:
- fallthrough // When passing EdDSA or ECDSA, we generate an ECDH subkey
- case packet.PubKeyAlgoECDH:
- if config.V6() &&
- (config.CurveName() == packet.Curve25519 ||
- config.CurveName() == packet.Curve448) {
- // Implementations MUST NOT accept or generate v6 key material
- // using the deprecated OIDs.
- return nil, errors.InvalidArgumentError("ECDH with Curve25519/448 legacy cannot be used for v6 keys")
- }
- var kdf = ecdh.KDF{
- Hash: algorithm.SHA512,
- Cipher: algorithm.AES256,
- }
- curve := ecc.FindECDHByGenName(string(config.CurveName()))
- if curve == nil {
- return nil, errors.InvalidArgumentError("unsupported curve")
- }
- return ecdh.GenerateKey(config.Random(), curve, kdf)
- case packet.PubKeyAlgoEd25519, packet.PubKeyAlgoX25519: // When passing Ed25519, we generate an x25519 subkey
- return x25519.GenerateKey(config.Random())
- case packet.PubKeyAlgoEd448, packet.PubKeyAlgoX448: // When passing Ed448, we generate an x448 subkey
- return x448.GenerateKey(config.Random())
- default:
- return nil, errors.InvalidArgumentError("unsupported public key algorithm")
- }
-}
-
-var bigOne = big.NewInt(1)
-
-// generateRSAKeyWithPrimes generates a multi-prime RSA keypair of the
-// given bit size, using the given random source and pre-populated primes.
-func generateRSAKeyWithPrimes(random io.Reader, nprimes int, bits int, prepopulatedPrimes []*big.Int) (*rsa.PrivateKey, error) {
- priv := new(rsa.PrivateKey)
- priv.E = 65537
-
- if nprimes < 2 {
- return nil, goerrors.New("generateRSAKeyWithPrimes: nprimes must be >= 2")
- }
-
- if bits < 1024 {
- return nil, goerrors.New("generateRSAKeyWithPrimes: bits must be >= 1024")
- }
-
- primes := make([]*big.Int, nprimes)
-
-NextSetOfPrimes:
- for {
- todo := bits
- // crypto/rand should set the top two bits in each prime.
- // Thus each prime has the form
- // p_i = 2^bitlen(p_i) × 0.11... (in base 2).
- // And the product is:
- // P = 2^todo × α
- // where α is the product of nprimes numbers of the form 0.11...
- //
- // If α < 1/2 (which can happen for nprimes > 2), we need to
- // shift todo to compensate for lost bits: the mean value of 0.11...
- // is 7/8, so todo + shift - nprimes * log2(7/8) ~= bits - 1/2
- // will give good results.
- if nprimes >= 7 {
- todo += (nprimes - 2) / 5
- }
- for i := 0; i < nprimes; i++ {
- var err error
- if len(prepopulatedPrimes) == 0 {
- primes[i], err = rand.Prime(random, todo/(nprimes-i))
- if err != nil {
- return nil, err
- }
- } else {
- primes[i] = prepopulatedPrimes[0]
- prepopulatedPrimes = prepopulatedPrimes[1:]
- }
-
- todo -= primes[i].BitLen()
- }
-
- // Make sure that primes is pairwise unequal.
- for i, prime := range primes {
- for j := 0; j < i; j++ {
- if prime.Cmp(primes[j]) == 0 {
- continue NextSetOfPrimes
- }
- }
- }
-
- n := new(big.Int).Set(bigOne)
- totient := new(big.Int).Set(bigOne)
- pminus1 := new(big.Int)
- for _, prime := range primes {
- n.Mul(n, prime)
- pminus1.Sub(prime, bigOne)
- totient.Mul(totient, pminus1)
- }
- if n.BitLen() != bits {
- // This should never happen for nprimes == 2 because
- // crypto/rand should set the top two bits in each prime.
- // For nprimes > 2 we hope it does not happen often.
- continue NextSetOfPrimes
- }
-
- priv.D = new(big.Int)
- e := big.NewInt(int64(priv.E))
- ok := priv.D.ModInverse(e, totient)
-
- if ok != nil {
- priv.Primes = primes
- priv.N = n
- break
- }
- }
-
- priv.Precompute()
- return priv, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/keys.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/keys.go
deleted file mode 100644
index a071353e2e..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/keys.go
+++ /dev/null
@@ -1,901 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package openpgp
-
-import (
- goerrors "errors"
- "fmt"
- "io"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/armor"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/packet"
-)
-
-// PublicKeyType is the armor type for a PGP public key.
-var PublicKeyType = "PGP PUBLIC KEY BLOCK"
-
-// PrivateKeyType is the armor type for a PGP private key.
-var PrivateKeyType = "PGP PRIVATE KEY BLOCK"
-
-// An Entity represents the components of an OpenPGP key: a primary public key
-// (which must be a signing key), one or more identities claimed by that key,
-// and zero or more subkeys, which may be encryption keys.
-type Entity struct {
- PrimaryKey *packet.PublicKey
- PrivateKey *packet.PrivateKey
- Identities map[string]*Identity // indexed by Identity.Name
- Revocations []*packet.Signature
- Subkeys []Subkey
- SelfSignature *packet.Signature // Direct-key self signature of the PrimaryKey (contains primary key properties in v6)
- Signatures []*packet.Signature // all (potentially unverified) self-signatures, revocations, and third-party signatures
-}
-
-// An Identity represents an identity claimed by an Entity and zero or more
-// assertions by other entities about that claim.
-type Identity struct {
- Name string // by convention, has the form "Full Name (comment) "
- UserId *packet.UserId
- SelfSignature *packet.Signature
- Revocations []*packet.Signature
- Signatures []*packet.Signature // all (potentially unverified) self-signatures, revocations, and third-party signatures
-}
-
-// A Subkey is an additional public key in an Entity. Subkeys can be used for
-// encryption.
-type Subkey struct {
- PublicKey *packet.PublicKey
- PrivateKey *packet.PrivateKey
- Sig *packet.Signature
- Revocations []*packet.Signature
-}
-
-// A Key identifies a specific public key in an Entity. This is either the
-// Entity's primary key or a subkey.
-type Key struct {
- Entity *Entity
- PublicKey *packet.PublicKey
- PrivateKey *packet.PrivateKey
- SelfSignature *packet.Signature
- Revocations []*packet.Signature
-}
-
-// A KeyRing provides access to public and private keys.
-type KeyRing interface {
- // KeysById returns the set of keys that have the given key id.
- KeysById(id uint64) []Key
- // KeysByIdAndUsage returns the set of keys with the given id
- // that also meet the key usage given by requiredUsage.
- // The requiredUsage is expressed as the bitwise-OR of
- // packet.KeyFlag* values.
- KeysByIdUsage(id uint64, requiredUsage byte) []Key
- // DecryptionKeys returns all private keys that are valid for
- // decryption.
- DecryptionKeys() []Key
-}
-
-// PrimaryIdentity returns an Identity, preferring non-revoked identities,
-// identities marked as primary, or the latest-created identity, in that order.
-func (e *Entity) PrimaryIdentity() *Identity {
- var primaryIdentity *Identity
- for _, ident := range e.Identities {
- if shouldPreferIdentity(primaryIdentity, ident) {
- primaryIdentity = ident
- }
- }
- return primaryIdentity
-}
-
-func shouldPreferIdentity(existingId, potentialNewId *Identity) bool {
- if existingId == nil {
- return true
- }
-
- if len(existingId.Revocations) > len(potentialNewId.Revocations) {
- return true
- }
-
- if len(existingId.Revocations) < len(potentialNewId.Revocations) {
- return false
- }
-
- if existingId.SelfSignature == nil {
- return true
- }
-
- if existingId.SelfSignature.IsPrimaryId != nil && *existingId.SelfSignature.IsPrimaryId &&
- !(potentialNewId.SelfSignature.IsPrimaryId != nil && *potentialNewId.SelfSignature.IsPrimaryId) {
- return false
- }
-
- if !(existingId.SelfSignature.IsPrimaryId != nil && *existingId.SelfSignature.IsPrimaryId) &&
- potentialNewId.SelfSignature.IsPrimaryId != nil && *potentialNewId.SelfSignature.IsPrimaryId {
- return true
- }
-
- return potentialNewId.SelfSignature.CreationTime.After(existingId.SelfSignature.CreationTime)
-}
-
-// EncryptionKey returns the best candidate Key for encrypting a message to the
-// given Entity.
-func (e *Entity) EncryptionKey(now time.Time) (Key, bool) {
- // Fail to find any encryption key if the...
- primarySelfSignature, primaryIdentity := e.PrimarySelfSignature()
- if primarySelfSignature == nil || // no self-signature found
- e.PrimaryKey.KeyExpired(primarySelfSignature, now) || // primary key has expired
- e.Revoked(now) || // primary key has been revoked
- primarySelfSignature.SigExpired(now) || // user ID or or direct self-signature has expired
- (primaryIdentity != nil && primaryIdentity.Revoked(now)) { // user ID has been revoked (for v4 keys)
- return Key{}, false
- }
-
- // Iterate the keys to find the newest, unexpired one
- candidateSubkey := -1
- var maxTime time.Time
- for i, subkey := range e.Subkeys {
- if subkey.Sig.FlagsValid &&
- subkey.Sig.FlagEncryptCommunications &&
- subkey.PublicKey.PubKeyAlgo.CanEncrypt() &&
- !subkey.PublicKey.KeyExpired(subkey.Sig, now) &&
- !subkey.Sig.SigExpired(now) &&
- !subkey.Revoked(now) &&
- (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) {
- candidateSubkey = i
- maxTime = subkey.Sig.CreationTime
- }
- }
-
- if candidateSubkey != -1 {
- subkey := e.Subkeys[candidateSubkey]
- return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig, subkey.Revocations}, true
- }
-
- // If we don't have any subkeys for encryption and the primary key
- // is marked as OK to encrypt with, then we can use it.
- if primarySelfSignature.FlagsValid && primarySelfSignature.FlagEncryptCommunications &&
- e.PrimaryKey.PubKeyAlgo.CanEncrypt() {
- return Key{e, e.PrimaryKey, e.PrivateKey, primarySelfSignature, e.Revocations}, true
- }
-
- return Key{}, false
-}
-
-// CertificationKey return the best candidate Key for certifying a key with this
-// Entity.
-func (e *Entity) CertificationKey(now time.Time) (Key, bool) {
- return e.CertificationKeyById(now, 0)
-}
-
-// CertificationKeyById return the Key for key certification with this
-// Entity and keyID.
-func (e *Entity) CertificationKeyById(now time.Time, id uint64) (Key, bool) {
- return e.signingKeyByIdUsage(now, id, packet.KeyFlagCertify)
-}
-
-// SigningKey return the best candidate Key for signing a message with this
-// Entity.
-func (e *Entity) SigningKey(now time.Time) (Key, bool) {
- return e.SigningKeyById(now, 0)
-}
-
-// SigningKeyById return the Key for signing a message with this
-// Entity and keyID.
-func (e *Entity) SigningKeyById(now time.Time, id uint64) (Key, bool) {
- return e.signingKeyByIdUsage(now, id, packet.KeyFlagSign)
-}
-
-func (e *Entity) signingKeyByIdUsage(now time.Time, id uint64, flags int) (Key, bool) {
- // Fail to find any signing key if the...
- primarySelfSignature, primaryIdentity := e.PrimarySelfSignature()
- if primarySelfSignature == nil || // no self-signature found
- e.PrimaryKey.KeyExpired(primarySelfSignature, now) || // primary key has expired
- e.Revoked(now) || // primary key has been revoked
- primarySelfSignature.SigExpired(now) || // user ID or direct self-signature has expired
- (primaryIdentity != nil && primaryIdentity.Revoked(now)) { // user ID has been revoked (for v4 keys)
- return Key{}, false
- }
-
- // Iterate the keys to find the newest, unexpired one
- candidateSubkey := -1
- var maxTime time.Time
- for idx, subkey := range e.Subkeys {
- if subkey.Sig.FlagsValid &&
- (flags&packet.KeyFlagCertify == 0 || subkey.Sig.FlagCertify) &&
- (flags&packet.KeyFlagSign == 0 || subkey.Sig.FlagSign) &&
- subkey.PublicKey.PubKeyAlgo.CanSign() &&
- !subkey.PublicKey.KeyExpired(subkey.Sig, now) &&
- !subkey.Sig.SigExpired(now) &&
- !subkey.Revoked(now) &&
- (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) &&
- (id == 0 || subkey.PublicKey.KeyId == id) {
- candidateSubkey = idx
- maxTime = subkey.Sig.CreationTime
- }
- }
-
- if candidateSubkey != -1 {
- subkey := e.Subkeys[candidateSubkey]
- return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig, subkey.Revocations}, true
- }
-
- // If we don't have any subkeys for signing and the primary key
- // is marked as OK to sign with, then we can use it.
- if primarySelfSignature.FlagsValid &&
- (flags&packet.KeyFlagCertify == 0 || primarySelfSignature.FlagCertify) &&
- (flags&packet.KeyFlagSign == 0 || primarySelfSignature.FlagSign) &&
- e.PrimaryKey.PubKeyAlgo.CanSign() &&
- (id == 0 || e.PrimaryKey.KeyId == id) {
- return Key{e, e.PrimaryKey, e.PrivateKey, primarySelfSignature, e.Revocations}, true
- }
-
- // No keys with a valid Signing Flag or no keys matched the id passed in
- return Key{}, false
-}
-
-func revoked(revocations []*packet.Signature, now time.Time) bool {
- for _, revocation := range revocations {
- if revocation.RevocationReason != nil && *revocation.RevocationReason == packet.KeyCompromised {
- // If the key is compromised, the key is considered revoked even before the revocation date.
- return true
- }
- if !revocation.SigExpired(now) {
- return true
- }
- }
- return false
-}
-
-// Revoked returns whether the entity has any direct key revocation signatures.
-// Note that third-party revocation signatures are not supported.
-// Note also that Identity and Subkey revocation should be checked separately.
-func (e *Entity) Revoked(now time.Time) bool {
- return revoked(e.Revocations, now)
-}
-
-// EncryptPrivateKeys encrypts all non-encrypted keys in the entity with the same key
-// derived from the provided passphrase. Public keys and dummy keys are ignored,
-// and don't cause an error to be returned.
-func (e *Entity) EncryptPrivateKeys(passphrase []byte, config *packet.Config) error {
- var keysToEncrypt []*packet.PrivateKey
- // Add entity private key to encrypt.
- if e.PrivateKey != nil && !e.PrivateKey.Dummy() && !e.PrivateKey.Encrypted {
- keysToEncrypt = append(keysToEncrypt, e.PrivateKey)
- }
-
- // Add subkeys to encrypt.
- for _, sub := range e.Subkeys {
- if sub.PrivateKey != nil && !sub.PrivateKey.Dummy() && !sub.PrivateKey.Encrypted {
- keysToEncrypt = append(keysToEncrypt, sub.PrivateKey)
- }
- }
- return packet.EncryptPrivateKeys(keysToEncrypt, passphrase, config)
-}
-
-// DecryptPrivateKeys decrypts all encrypted keys in the entity with the given passphrase.
-// Avoids recomputation of similar s2k key derivations. Public keys and dummy keys are ignored,
-// and don't cause an error to be returned.
-func (e *Entity) DecryptPrivateKeys(passphrase []byte) error {
- var keysToDecrypt []*packet.PrivateKey
- // Add entity private key to decrypt.
- if e.PrivateKey != nil && !e.PrivateKey.Dummy() && e.PrivateKey.Encrypted {
- keysToDecrypt = append(keysToDecrypt, e.PrivateKey)
- }
-
- // Add subkeys to decrypt.
- for _, sub := range e.Subkeys {
- if sub.PrivateKey != nil && !sub.PrivateKey.Dummy() && sub.PrivateKey.Encrypted {
- keysToDecrypt = append(keysToDecrypt, sub.PrivateKey)
- }
- }
- return packet.DecryptPrivateKeys(keysToDecrypt, passphrase)
-}
-
-// Revoked returns whether the identity has been revoked by a self-signature.
-// Note that third-party revocation signatures are not supported.
-func (i *Identity) Revoked(now time.Time) bool {
- return revoked(i.Revocations, now)
-}
-
-// Revoked returns whether the subkey has been revoked by a self-signature.
-// Note that third-party revocation signatures are not supported.
-func (s *Subkey) Revoked(now time.Time) bool {
- return revoked(s.Revocations, now)
-}
-
-// Revoked returns whether the key or subkey has been revoked by a self-signature.
-// Note that third-party revocation signatures are not supported.
-// Note also that Identity revocation should be checked separately.
-// Normally, it's not necessary to call this function, except on keys returned by
-// KeysById or KeysByIdUsage.
-func (key *Key) Revoked(now time.Time) bool {
- return revoked(key.Revocations, now)
-}
-
-// An EntityList contains one or more Entities.
-type EntityList []*Entity
-
-// KeysById returns the set of keys that have the given key id.
-func (el EntityList) KeysById(id uint64) (keys []Key) {
- for _, e := range el {
- if e.PrimaryKey.KeyId == id {
- selfSig, _ := e.PrimarySelfSignature()
- keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig, e.Revocations})
- }
-
- for _, subKey := range e.Subkeys {
- if subKey.PublicKey.KeyId == id {
- keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig, subKey.Revocations})
- }
- }
- }
- return
-}
-
-// KeysByIdAndUsage returns the set of keys with the given id that also meet
-// the key usage given by requiredUsage. The requiredUsage is expressed as
-// the bitwise-OR of packet.KeyFlag* values.
-func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) {
- for _, key := range el.KeysById(id) {
- if requiredUsage != 0 {
- if key.SelfSignature == nil || !key.SelfSignature.FlagsValid {
- continue
- }
-
- var usage byte
- if key.SelfSignature.FlagCertify {
- usage |= packet.KeyFlagCertify
- }
- if key.SelfSignature.FlagSign {
- usage |= packet.KeyFlagSign
- }
- if key.SelfSignature.FlagEncryptCommunications {
- usage |= packet.KeyFlagEncryptCommunications
- }
- if key.SelfSignature.FlagEncryptStorage {
- usage |= packet.KeyFlagEncryptStorage
- }
- if usage&requiredUsage != requiredUsage {
- continue
- }
- }
-
- keys = append(keys, key)
- }
- return
-}
-
-// DecryptionKeys returns all private keys that are valid for decryption.
-func (el EntityList) DecryptionKeys() (keys []Key) {
- for _, e := range el {
- for _, subKey := range e.Subkeys {
- if subKey.PrivateKey != nil && subKey.Sig.FlagsValid && (subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) {
- keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig, subKey.Revocations})
- }
- }
- }
- return
-}
-
-// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file.
-func ReadArmoredKeyRing(r io.Reader) (EntityList, error) {
- block, err := armor.Decode(r)
- if err == io.EOF {
- return nil, errors.InvalidArgumentError("no armored data found")
- }
- if err != nil {
- return nil, err
- }
- if block.Type != PublicKeyType && block.Type != PrivateKeyType {
- return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type)
- }
-
- return ReadKeyRing(block.Body)
-}
-
-// ReadKeyRing reads one or more public/private keys. Unsupported keys are
-// ignored as long as at least a single valid key is found.
-func ReadKeyRing(r io.Reader) (el EntityList, err error) {
- packets := packet.NewReader(r)
- var lastUnsupportedError error
-
- for {
- var e *Entity
- e, err = ReadEntity(packets)
- if err != nil {
- // TODO: warn about skipped unsupported/unreadable keys
- if _, ok := err.(errors.UnsupportedError); ok {
- lastUnsupportedError = err
- err = readToNextPublicKey(packets)
- } else if _, ok := err.(errors.StructuralError); ok {
- // Skip unreadable, badly-formatted keys
- lastUnsupportedError = err
- err = readToNextPublicKey(packets)
- }
- if err == io.EOF {
- err = nil
- break
- }
- if err != nil {
- el = nil
- break
- }
- } else {
- el = append(el, e)
- }
- }
-
- if len(el) == 0 && err == nil {
- err = lastUnsupportedError
- }
- return
-}
-
-// readToNextPublicKey reads packets until the start of the entity and leaves
-// the first packet of the new entity in the Reader.
-func readToNextPublicKey(packets *packet.Reader) (err error) {
- var p packet.Packet
- for {
- p, err = packets.Next()
- if err == io.EOF {
- return
- } else if err != nil {
- if _, ok := err.(errors.UnsupportedError); ok {
- continue
- }
- return
- }
-
- if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey {
- packets.Unread(p)
- return
- }
- }
-}
-
-// ReadEntity reads an entity (public key, identities, subkeys etc) from the
-// given Reader.
-func ReadEntity(packets *packet.Reader) (*Entity, error) {
- e := new(Entity)
- e.Identities = make(map[string]*Identity)
-
- p, err := packets.Next()
- if err != nil {
- return nil, err
- }
-
- var ok bool
- if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok {
- if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok {
- packets.Unread(p)
- return nil, errors.StructuralError("first packet was not a public/private key")
- }
- e.PrimaryKey = &e.PrivateKey.PublicKey
- }
-
- if !e.PrimaryKey.PubKeyAlgo.CanSign() {
- return nil, errors.StructuralError("primary key cannot be used for signatures")
- }
-
- var revocations []*packet.Signature
- var directSignatures []*packet.Signature
-EachPacket:
- for {
- p, err := packets.Next()
- if err == io.EOF {
- break
- } else if err != nil {
- return nil, err
- }
-
- switch pkt := p.(type) {
- case *packet.UserId:
- if err := addUserID(e, packets, pkt); err != nil {
- return nil, err
- }
- case *packet.Signature:
- if pkt.SigType == packet.SigTypeKeyRevocation {
- revocations = append(revocations, pkt)
- } else if pkt.SigType == packet.SigTypeDirectSignature {
- directSignatures = append(directSignatures, pkt)
- }
- // Else, ignoring the signature as it does not follow anything
- // we would know to attach it to.
- case *packet.PrivateKey:
- if !pkt.IsSubkey {
- packets.Unread(p)
- break EachPacket
- }
- err = addSubkey(e, packets, &pkt.PublicKey, pkt)
- if err != nil {
- return nil, err
- }
- case *packet.PublicKey:
- if !pkt.IsSubkey {
- packets.Unread(p)
- break EachPacket
- }
- err = addSubkey(e, packets, pkt, nil)
- if err != nil {
- return nil, err
- }
- default:
- // we ignore unknown packets.
- }
- }
-
- if len(e.Identities) == 0 && e.PrimaryKey.Version < 6 {
- return nil, errors.StructuralError(fmt.Sprintf("v%d entity without any identities", e.PrimaryKey.Version))
- }
-
- // An implementation MUST ensure that a valid direct-key signature is present before using a v6 key.
- if e.PrimaryKey.Version == 6 {
- if len(directSignatures) == 0 {
- return nil, errors.StructuralError("v6 entity without a valid direct-key signature")
- }
- // Select main direct key signature.
- var mainDirectKeySelfSignature *packet.Signature
- for _, directSignature := range directSignatures {
- if directSignature.SigType == packet.SigTypeDirectSignature &&
- directSignature.CheckKeyIdOrFingerprint(e.PrimaryKey) &&
- (mainDirectKeySelfSignature == nil ||
- directSignature.CreationTime.After(mainDirectKeySelfSignature.CreationTime)) {
- mainDirectKeySelfSignature = directSignature
- }
- }
- if mainDirectKeySelfSignature == nil {
- return nil, errors.StructuralError("no valid direct-key self-signature for v6 primary key found")
- }
- // Check that the main self-signature is valid.
- err = e.PrimaryKey.VerifyDirectKeySignature(mainDirectKeySelfSignature)
- if err != nil {
- return nil, errors.StructuralError("invalid direct-key self-signature for v6 primary key")
- }
- e.SelfSignature = mainDirectKeySelfSignature
- e.Signatures = directSignatures
- }
-
- for _, revocation := range revocations {
- err = e.PrimaryKey.VerifyRevocationSignature(revocation)
- if err == nil {
- e.Revocations = append(e.Revocations, revocation)
- } else {
- // TODO: RFC 4880 5.2.3.15 defines revocation keys.
- return nil, errors.StructuralError("revocation signature signed by alternate key")
- }
- }
-
- return e, nil
-}
-
-func addUserID(e *Entity, packets *packet.Reader, pkt *packet.UserId) error {
- // Make a new Identity object, that we might wind up throwing away.
- // We'll only add it if we get a valid self-signature over this
- // userID.
- identity := new(Identity)
- identity.Name = pkt.Id
- identity.UserId = pkt
-
- for {
- p, err := packets.Next()
- if err == io.EOF {
- break
- } else if err != nil {
- return err
- }
-
- sig, ok := p.(*packet.Signature)
- if !ok {
- packets.Unread(p)
- break
- }
-
- if sig.SigType != packet.SigTypeGenericCert &&
- sig.SigType != packet.SigTypePersonaCert &&
- sig.SigType != packet.SigTypeCasualCert &&
- sig.SigType != packet.SigTypePositiveCert &&
- sig.SigType != packet.SigTypeCertificationRevocation {
- return errors.StructuralError("user ID signature with wrong type")
- }
-
- if sig.CheckKeyIdOrFingerprint(e.PrimaryKey) {
- if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil {
- return errors.StructuralError("user ID self-signature invalid: " + err.Error())
- }
- if sig.SigType == packet.SigTypeCertificationRevocation {
- identity.Revocations = append(identity.Revocations, sig)
- } else if identity.SelfSignature == nil || sig.CreationTime.After(identity.SelfSignature.CreationTime) {
- identity.SelfSignature = sig
- }
- identity.Signatures = append(identity.Signatures, sig)
- e.Identities[pkt.Id] = identity
- } else {
- identity.Signatures = append(identity.Signatures, sig)
- }
- }
-
- return nil
-}
-
-func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error {
- var subKey Subkey
- subKey.PublicKey = pub
- subKey.PrivateKey = priv
-
- for {
- p, err := packets.Next()
- if err == io.EOF {
- break
- } else if err != nil {
- return errors.StructuralError("subkey signature invalid: " + err.Error())
- }
-
- sig, ok := p.(*packet.Signature)
- if !ok {
- packets.Unread(p)
- break
- }
-
- if sig.SigType != packet.SigTypeSubkeyBinding && sig.SigType != packet.SigTypeSubkeyRevocation {
- return errors.StructuralError("subkey signature with wrong type")
- }
-
- if err := e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, sig); err != nil {
- return errors.StructuralError("subkey signature invalid: " + err.Error())
- }
-
- switch sig.SigType {
- case packet.SigTypeSubkeyRevocation:
- subKey.Revocations = append(subKey.Revocations, sig)
- case packet.SigTypeSubkeyBinding:
- if subKey.Sig == nil || sig.CreationTime.After(subKey.Sig.CreationTime) {
- subKey.Sig = sig
- }
- }
- }
-
- if subKey.Sig == nil {
- return errors.StructuralError("subkey packet not followed by signature")
- }
-
- e.Subkeys = append(e.Subkeys, subKey)
-
- return nil
-}
-
-// SerializePrivate serializes an Entity, including private key material, but
-// excluding signatures from other entities, to the given Writer.
-// Identities and subkeys are re-signed in case they changed since NewEntry.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) {
- if e.PrivateKey.Dummy() {
- return errors.ErrDummyPrivateKey("dummy private key cannot re-sign identities")
- }
- return e.serializePrivate(w, config, true)
-}
-
-// SerializePrivateWithoutSigning serializes an Entity, including private key
-// material, but excluding signatures from other entities, to the given Writer.
-// Self-signatures of identities and subkeys are not re-signed. This is useful
-// when serializing GNU dummy keys, among other things.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) SerializePrivateWithoutSigning(w io.Writer, config *packet.Config) (err error) {
- return e.serializePrivate(w, config, false)
-}
-
-func (e *Entity) serializePrivate(w io.Writer, config *packet.Config, reSign bool) (err error) {
- if e.PrivateKey == nil {
- return goerrors.New("openpgp: private key is missing")
- }
- err = e.PrivateKey.Serialize(w)
- if err != nil {
- return
- }
- for _, revocation := range e.Revocations {
- err := revocation.Serialize(w)
- if err != nil {
- return err
- }
- }
- for _, directSignature := range e.Signatures {
- err := directSignature.Serialize(w)
- if err != nil {
- return err
- }
- }
- for _, ident := range e.Identities {
- err = ident.UserId.Serialize(w)
- if err != nil {
- return
- }
- if reSign {
- if ident.SelfSignature == nil {
- return goerrors.New("openpgp: can't re-sign identity without valid self-signature")
- }
- err = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config)
- if err != nil {
- return
- }
- }
- for _, sig := range ident.Signatures {
- err = sig.Serialize(w)
- if err != nil {
- return err
- }
- }
- }
- for _, subkey := range e.Subkeys {
- err = subkey.PrivateKey.Serialize(w)
- if err != nil {
- return
- }
- if reSign {
- err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
- if err != nil {
- return
- }
- if subkey.Sig.EmbeddedSignature != nil {
- err = subkey.Sig.EmbeddedSignature.CrossSignKey(subkey.PublicKey, e.PrimaryKey,
- subkey.PrivateKey, config)
- if err != nil {
- return
- }
- }
- }
- for _, revocation := range subkey.Revocations {
- err := revocation.Serialize(w)
- if err != nil {
- return err
- }
- }
- err = subkey.Sig.Serialize(w)
- if err != nil {
- return
- }
- }
- return nil
-}
-
-// Serialize writes the public part of the given Entity to w, including
-// signatures from other entities. No private key material will be output.
-func (e *Entity) Serialize(w io.Writer) error {
- err := e.PrimaryKey.Serialize(w)
- if err != nil {
- return err
- }
- for _, revocation := range e.Revocations {
- err := revocation.Serialize(w)
- if err != nil {
- return err
- }
- }
- for _, directSignature := range e.Signatures {
- err := directSignature.Serialize(w)
- if err != nil {
- return err
- }
- }
- for _, ident := range e.Identities {
- err = ident.UserId.Serialize(w)
- if err != nil {
- return err
- }
- for _, sig := range ident.Signatures {
- err = sig.Serialize(w)
- if err != nil {
- return err
- }
- }
- }
- for _, subkey := range e.Subkeys {
- err = subkey.PublicKey.Serialize(w)
- if err != nil {
- return err
- }
- for _, revocation := range subkey.Revocations {
- err := revocation.Serialize(w)
- if err != nil {
- return err
- }
- }
- err = subkey.Sig.Serialize(w)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-// SignIdentity adds a signature to e, from signer, attesting that identity is
-// associated with e. The provided identity must already be an element of
-// e.Identities and the private key of signer must have been decrypted if
-// necessary.
-// If config is nil, sensible defaults will be used.
-func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error {
- certificationKey, ok := signer.CertificationKey(config.Now())
- if !ok {
- return errors.InvalidArgumentError("no valid certification key found")
- }
-
- if certificationKey.PrivateKey.Encrypted {
- return errors.InvalidArgumentError("signing Entity's private key must be decrypted")
- }
-
- ident, ok := e.Identities[identity]
- if !ok {
- return errors.InvalidArgumentError("given identity string not found in Entity")
- }
-
- sig := createSignaturePacket(certificationKey.PublicKey, packet.SigTypeGenericCert, config)
-
- signingUserID := config.SigningUserId()
- if signingUserID != "" {
- if _, ok := signer.Identities[signingUserID]; !ok {
- return errors.InvalidArgumentError("signer identity string not found in signer Entity")
- }
- sig.SignerUserId = &signingUserID
- }
-
- if err := sig.SignUserId(identity, e.PrimaryKey, certificationKey.PrivateKey, config); err != nil {
- return err
- }
- ident.Signatures = append(ident.Signatures, sig)
- return nil
-}
-
-// RevokeKey generates a key revocation signature (packet.SigTypeKeyRevocation) with the
-// specified reason code and text (RFC4880 section-5.2.3.23).
-// If config is nil, sensible defaults will be used.
-func (e *Entity) RevokeKey(reason packet.ReasonForRevocation, reasonText string, config *packet.Config) error {
- revSig := createSignaturePacket(e.PrimaryKey, packet.SigTypeKeyRevocation, config)
- revSig.RevocationReason = &reason
- revSig.RevocationReasonText = reasonText
-
- if err := revSig.RevokeKey(e.PrimaryKey, e.PrivateKey, config); err != nil {
- return err
- }
- e.Revocations = append(e.Revocations, revSig)
- return nil
-}
-
-// RevokeSubkey generates a subkey revocation signature (packet.SigTypeSubkeyRevocation) for
-// a subkey with the specified reason code and text (RFC4880 section-5.2.3.23).
-// If config is nil, sensible defaults will be used.
-func (e *Entity) RevokeSubkey(sk *Subkey, reason packet.ReasonForRevocation, reasonText string, config *packet.Config) error {
- if err := e.PrimaryKey.VerifyKeySignature(sk.PublicKey, sk.Sig); err != nil {
- return errors.InvalidArgumentError("given subkey is not associated with this key")
- }
-
- revSig := createSignaturePacket(e.PrimaryKey, packet.SigTypeSubkeyRevocation, config)
- revSig.RevocationReason = &reason
- revSig.RevocationReasonText = reasonText
-
- if err := revSig.RevokeSubkey(sk.PublicKey, e.PrivateKey, config); err != nil {
- return err
- }
-
- sk.Revocations = append(sk.Revocations, revSig)
- return nil
-}
-
-func (e *Entity) primaryDirectSignature() *packet.Signature {
- return e.SelfSignature
-}
-
-// PrimarySelfSignature searches the entity for the self-signature that stores key preferences.
-// For V4 keys, returns the self-signature of the primary identity, and the identity.
-// For V6 keys, returns the latest valid direct-key self-signature, and no identity (nil).
-// This self-signature is to be used to check the key expiration,
-// algorithm preferences, and so on.
-func (e *Entity) PrimarySelfSignature() (*packet.Signature, *Identity) {
- if e.PrimaryKey.Version == 6 {
- return e.primaryDirectSignature(), nil
- }
- primaryIdentity := e.PrimaryIdentity()
- if primaryIdentity == nil {
- return nil, nil
- }
- return primaryIdentity.SelfSignature, primaryIdentity
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/keys_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/keys_test_data.go
deleted file mode 100644
index 108fd096f3..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/keys_test_data.go
+++ /dev/null
@@ -1,538 +0,0 @@
-package openpgp
-
-const expiringKeyHex = "c6c04d0451d0c680010800abbb021fd03ffc4e96618901180c3fdcb060ee69eeead97b91256d11420d80b5f1b51930248044130bd300605cf8a05b7a40d3d8cfb0a910be2e3db50dcd50a9c54064c2a5550801daa834ff4480b33d3d3ca495ff8a4e84a886977d17d998f881241a874083d8b995beab555b6d22b8a4817ab17ac3e7304f7d4d2c05c495fb2218348d3bc13651db1d92732e368a9dd7dcefa6eddff30b94706a9aaee47e9d39321460b740c59c6fc3c2fd8ab6c0fb868cb87c0051f0321301fe0f0e1820b15e7fb7063395769b525005c7e30a7ce85984f5cac00504e7b4fdc45d74958de8388436fd5c7ba9ea121f1c851b5911dd1b47a14d81a09e92ef37721e2325b6790011010001cd00c2c07b041001080025050251d0c680050900278d00060b09070803020415080a0203160201021901021b03021e01000a0910e7b484133a890a35ae4b0800a1beb82e7f28eaf5273d6af9d3391314f6280b2b624eaca2851f89a9ebcaf80ac589ebd509f168bc4322106ca2e2ce77a76e071a3c7444787d65216b5f05e82c77928860b92aace3b7d0327db59492f422eb9dfab7249266d37429870b091a98aba8724c2259ebf8f85093f21255eafa75aa841e31d94f2ac891b9755fed455e539044ee69fc47950b80e003fc9f298d695660f28329eaa38037c367efde1727458e514faf990d439a21461b719edaddf9296d3d0647b43ca56cb8dbf63b4fcf8b9968e7928c463470fab3b98e44d0d95645062f94b2d04fe56bd52822b71934db8ce845622c40b92fcbe765a142e7f38b61a6aa9606c8e8858dcd3b6eb1894acec04d0451d1f06b01080088bea67444e1789390e7c0335c86775502d58ec783d99c8ef4e06de235ed3dd4b0467f6f358d818c7d8989d43ec6d69fcbc8c32632d5a1b605e3fa8e41d695fcdcaa535936cd0157f9040dce362519803b908eafe838bb13216c885c6f93e9e8d5745607f0d062322085d6bdc760969149a8ff8dd9f5c18d9bfe2e6f63a06e17694cf1f67587c6fb70e9aebf90ffc528ca3b615ac7c9d4a21ea4f7c06f2e98fbbd90a859b8608bf9ea638e3a54289ce44c283110d0c45fa458de6251cd6e7baf71f80f12c8978340490fd90c92b81736ae902ed958e478dceae2835953d189c45d182aff02ea2be61b81d8e94430f041d638647b43e2fcb45fd512fbf5068b810011010001c2c06504180108000f050251d1f06b050900081095021b0c000a0910e7b484133a890a35e63407fe2ec88d6d1e6c9ce7553ece0cb2524747217bad29f251d33df84599ffcc900141a355abd62126800744068a5e05dc167056aa9205273dc7765a2ed49db15c2a83b8d6e6429c902136f1e12229086c1c10c0053242c2a4ae1930db58163387a48cad64607ff2153c320e42843dec28e3fce90e7399d63ac0affa2fee1f0adc0953c89eb3f46ef1d6c04328ed13b491669d5120a3782e3ffb7c69575fb77eebd108794f4dda9d34be2bae57e8e59ec8ebfda2f6f06104b2321be408ea146e2db482b00c5055c8618de36ac9716f80da2617e225556d0fce61b01c8cea2d1e0ea982c31711060ca370f2739366e1e708f38405d784b49d16a26cf62d152eae734327cec04d0451d1f07b010800d5af91c5e7c2fd8951c8d254eab0c97cdcb66822f868b79b78c366255059a68fd74ebca9adb9b970cd9e586690e6e0756705432306878c897b10a4b4ca0005966f99ac8fa4e6f9caf54bf8e53844544beee9872a7ac64c119cf1393d96e674254b661f61ee975633d0e8a8672531edb6bb8e211204e7754a9efa802342118eee850beea742bac95a3f706cc2024cf6037a308bb68162b2f53b9a6346a96e6d31871a2456186e24a1c7a82b82ac04afdfd57cd7fb9ba77a9c760d40b76a170f7be525e5fb6a9848cc726e806187710d9b190387df28700f321f988a392899f93815cc937f309129eb94d5299c5547cb2c085898e6639496e70d746c9d3fb9881d0011010001c2c06504180108000f050251d1f07b050900266305021b0c000a0910e7b484133a890a35bff207fd10dfe8c4a6ea1dd30568012b6fd6891a763c87ad0f7a1d112aad9e8e3239378a3b85588c235865bac2e614348cb4f216d7217f53b3ef48c192e0a4d31d64d7bfa5faccf21155965fa156e887056db644a05ad08a85cc6152d1377d9e37b46f4ff462bbe68ace2dc586ef90070314576c985d8037c2ba63f0a7dc17a62e15bd77e88bc61d9d00858979709f12304264a4cf4225c5cf86f12c8e19486cb9cdcc69f18f027e5f16f4ca8b50e28b3115eaff3a345acd21f624aef81f6ede515c1b55b26b84c1e32264754eab672d5489b287e7277ea855e0a5ff2aa9e8b8c76d579a964ec225255f4d57bf66639ccb34b64798846943e162a41096a7002ca21c7f56"
-const subkeyUsageHex = "988d04533a52bc010400d26af43085558f65b9e7dbc90cb9238015259aed5e954637adcfa2181548b2d0b60c65f1f42ec5081cbf1bc0a8aa4900acfb77070837c58f26012fbce297d70afe96e759ad63531f0037538e70dbf8e384569b9720d99d8eb39d8d0a2947233ed242436cb6ac7dfe74123354b3d0119b5c235d3dd9c9d6c004f8ffaf67ad8583001101000188b7041f010200210502533b8552170c8001ce094aa433f7040bb2ddf0be3893cb843d0fe70c020700000a0910a42704b92866382aa98404009d63d916a27543da4221c60087c33f1c44bec9998c5438018ed370cca4962876c748e94b73eb39c58eb698063f3fd6346d58dd2a11c0247934c4a9d71f24754f7468f96fb24c3e791dd2392b62f626148ad724189498cbf993db2df7c0cdc2d677c35da0f16cb16c9ce7c33b4de65a4a91b1d21a130ae9cc26067718910ef8e2b417556d627261203c756d627261407379642e65642e61753e88b80413010200220502533a52bc021b03060b090807030206150802090a0b0416020301021e01021780000a0910a42704b92866382a47840400c0c2bd04f5fca586de408b395b3c280a278259c93eaaa8b79a53b97003f8ed502a8a00446dd9947fb462677e4fcac0dac2f0701847d15130aadb6cd9e0705ea0cf5f92f129136c7be21a718d46c8e641eb7f044f2adae573e11ae423a0a9ca51324f03a8a2f34b91fa40c3cc764bee4dccadedb54c768ba0469b683ea53f1c29b88d04533a52bc01040099c92a5d6f8b744224da27bc2369127c35269b58bec179de6bbc038f749344222f85a31933224f26b70243c4e4b2d242f0c4777eaef7b5502f9dad6d8bf3aaeb471210674b74de2d7078af497d55f5cdad97c7bedfbc1b41e8065a97c9c3d344b21fc81d27723af8e374bc595da26ea242dccb6ae497be26eea57e563ed517e90011010001889f0418010200090502533a52bc021b0c000a0910a42704b92866382afa1403ff70284c2de8a043ff51d8d29772602fa98009b7861c540535f874f2c230af8caf5638151a636b21f8255003997ccd29747fdd06777bb24f9593bd7d98a3e887689bf902f999915fcc94625ae487e5d13e6616f89090ebc4fdc7eb5cad8943e4056995bb61c6af37f8043016876a958ec7ebf39c43d20d53b7f546cfa83e8d2604b88d04533b8283010400c0b529316dbdf58b4c54461e7e669dc11c09eb7f73819f178ccd4177b9182b91d138605fcf1e463262fabefa73f94a52b5e15d1904635541c7ea540f07050ce0fb51b73e6f88644cec86e91107c957a114f69554548a85295d2b70bd0b203992f76eb5d493d86d9eabcaa7ef3fc7db7e458438db3fcdb0ca1cc97c638439a9170011010001889f0418010200090502533b8283021b0c000a0910a42704b92866382adc6d0400cfff6258485a21675adb7a811c3e19ebca18851533f75a7ba317950b9997fda8d1a4c8c76505c08c04b6c2cc31dc704d33da36a21273f2b388a1a706f7c3378b66d887197a525936ed9a69acb57fe7f718133da85ec742001c5d1864e9c6c8ea1b94f1c3759cebfd93b18606066c063a63be86085b7e37bdbc65f9a915bf084bb901a204533b85cd110400aed3d2c52af2b38b5b67904b0ef73d6dd7aef86adb770e2b153cd22489654dcc91730892087bb9856ae2d9f7ed1eb48f214243fe86bfe87b349ebd7c30e630e49c07b21fdabf78b7a95c8b7f969e97e3d33f2e074c63552ba64a2ded7badc05ce0ea2be6d53485f6900c7860c7aa76560376ce963d7271b9b54638a4028b573f00a0d8854bfcdb04986141568046202192263b9b67350400aaa1049dbc7943141ef590a70dcb028d730371d92ea4863de715f7f0f16d168bd3dc266c2450457d46dcbbf0b071547e5fbee7700a820c3750b236335d8d5848adb3c0da010e998908dfd93d961480084f3aea20b247034f8988eccb5546efaa35a92d0451df3aaf1aee5aa36a4c4d462c760ecd9cebcabfbe1412b1f21450f203fd126687cd486496e971a87fd9e1a8a765fe654baa219a6871ab97768596ab05c26c1aeea8f1a2c72395a58dbc12ef9640d2b95784e974a4d2d5a9b17c25fedacfe551bda52602de8f6d2e48443f5dd1a2a2a8e6a5e70ecdb88cd6e766ad9745c7ee91d78cc55c3d06536b49c3fee6c3d0b6ff0fb2bf13a314f57c953b8f4d93bf88e70418010200090502533b85cd021b0200520910a42704b92866382a47200419110200060502533b85cd000a091042ce2c64bc0ba99214b2009e26b26852c8b13b10c35768e40e78fbbb48bd084100a0c79d9ea0844fa5853dd3c85ff3ecae6f2c9dd6c557aa04008bbbc964cd65b9b8299d4ebf31f41cc7264b8cf33a00e82c5af022331fac79efc9563a822497ba012953cefe2629f1242fcdcb911dbb2315985bab060bfd58261ace3c654bdbbe2e8ed27a46e836490145c86dc7bae15c011f7e1ffc33730109b9338cd9f483e7cef3d2f396aab5bd80efb6646d7e778270ee99d934d187dd98"
-const revokedKeyHex = "988d045331ce82010400c4fdf7b40a5477f206e6ee278eaef888ca73bf9128a9eef9f2f1ddb8b7b71a4c07cfa241f028a04edb405e4d916c61d6beabc333813dc7b484d2b3c52ee233c6a79b1eea4e9cc51596ba9cd5ac5aeb9df62d86ea051055b79d03f8a4fa9f38386f5bd17529138f3325d46801514ea9047977e0829ed728e68636802796801be10011010001889f04200102000905025331d0e3021d03000a0910a401d9f09a34f7c042aa040086631196405b7e6af71026b88e98012eab44aa9849f6ef3fa930c7c9f23deaedba9db1538830f8652fb7648ec3fcade8dbcbf9eaf428e83c6cbcc272201bfe2fbb90d41963397a7c0637a1a9d9448ce695d9790db2dc95433ad7be19eb3de72dacf1d6db82c3644c13eae2a3d072b99bb341debba012c5ce4006a7d34a1f4b94b444526567205265766f6b657220283c52656727732022424d204261726973746122204b657920262530305c303e5c29203c72656740626d626172697374612e636f2e61753e88b704130102002205025331ce82021b03060b090807030206150802090a0b0416020301021e01021780000a0910a401d9f09a34f7c0019c03f75edfbeb6a73e7225ad3cc52724e2872e04260d7daf0d693c170d8c4b243b8767bc7785763533febc62ec2600c30603c433c095453ede59ff2fcabeb84ce32e0ed9d5cf15ffcbc816202b64370d4d77c1e9077d74e94a16fb4fa2e5bec23a56d7a73cf275f91691ae1801a976fcde09e981a2f6327ac27ea1fecf3185df0d56889c04100102000605025331cfb5000a0910fe9645554e8266b64b4303fc084075396674fb6f778d302ac07cef6bc0b5d07b66b2004c44aef711cbac79617ef06d836b4957522d8772dd94bf41a2f4ac8b1ee6d70c57503f837445a74765a076d07b829b8111fc2a918423ddb817ead7ca2a613ef0bfb9c6b3562aec6c3cf3c75ef3031d81d95f6563e4cdcc9960bcb386c5d757b104fcca5fe11fc709df884604101102000605025331cfe7000a09107b15a67f0b3ddc0317f6009e360beea58f29c1d963a22b962b80788c3fa6c84e009d148cfde6b351469b8eae91187eff07ad9d08fcaab88d045331ce820104009f25e20a42b904f3fa555530fe5c46737cf7bd076c35a2a0d22b11f7e0b61a69320b768f4a80fe13980ce380d1cfc4a0cd8fbe2d2e2ef85416668b77208baa65bf973fe8e500e78cc310d7c8705cdb34328bf80e24f0385fce5845c33bc7943cf6b11b02348a23da0bf6428e57c05135f2dc6bd7c1ce325d666d5a5fd2fd5e410011010001889f04180102000905025331ce82021b0c000a0910a401d9f09a34f7c0418003fe34feafcbeaef348a800a0d908a7a6809cc7304017d820f70f0474d5e23cb17e38b67dc6dca282c6ca00961f4ec9edf2738d0f087b1d81e4871ef08e1798010863afb4eac4c44a376cb343be929c5be66a78cfd4456ae9ec6a99d97f4e1c3ff3583351db2147a65c0acef5c003fb544ab3a2e2dc4d43646f58b811a6c3a369d1f"
-const revokedSubkeyHex = "988d04533121f6010400aefc803a3e4bb1a61c86e8a86d2726c6a43e0079e9f2713f1fa017e9854c83877f4aced8e331d675c67ea83ddab80aacbfa0b9040bb12d96f5a3d6be09455e2a76546cbd21677537db941cab710216b6d24ec277ee0bd65b910f416737ed120f6b93a9d3b306245c8cfd8394606fdb462e5cf43c551438d2864506c63367fc890011010001b41d416c696365203c616c69636540626d626172697374612e636f2e61753e88bb041301020025021b03060b090807030206150802090a0b0416020301021e01021780050253312798021901000a09104ef7e4beccde97f015a803ff5448437780f63263b0df8442a995e7f76c221351a51edd06f2063d8166cf3157aada4923dfc44aa0f2a6a4da5cf83b7fe722ba8ab416c976e77c6b5682e7f1069026673bd0de56ba06fd5d7a9f177607f277d9b55ff940a638c3e68525c67517e2b3d976899b93ca267f705b3e5efad7d61220e96b618a4497eab8d04403d23f8846041011020006050253312910000a09107b15a67f0b3ddc03d96e009f50b6365d86c4be5d5e9d0ea42d5e56f5794c617700a0ab274e19c2827780016d23417ce89e0a2c0d987d889c04100102000605025331cf7a000a0910a401d9f09a34f7c0ee970400aca292f213041c9f3b3fc49148cbda9d84afee6183c8dd6c5ff2600b29482db5fecd4303797be1ee6d544a20a858080fec43412061c9a71fae4039fd58013b4ae341273e6c66ad4c7cdd9e68245bedb260562e7b166f2461a1032f2b38c0e0e5715fb3d1656979e052b55ca827a76f872b78a9fdae64bc298170bfcebedc1271b41a416c696365203c616c696365407379646973702e6f722e61753e88b804130102002205025331278b021b03060b090807030206150802090a0b0416020301021e01021780000a09104ef7e4beccde97f06a7003fa03c3af68d272ebc1fa08aa72a03b02189c26496a2833d90450801c4e42c5b5f51ad96ce2d2c9cef4b7c02a6a2fcf1412d6a2d486098eb762f5010a201819c17fd2888aec8eda20c65a3b75744de7ee5cc8ac7bfc470cbe3cb982720405a27a3c6a8c229cfe36905f881b02ed5680f6a8f05866efb9d6c5844897e631deb949ca8846041011020006050253312910000a09107b15a67f0b3ddc0347bc009f7fa35db59147469eb6f2c5aaf6428accb138b22800a0caa2f5f0874bacc5909c652a57a31beda65eddd5889c04100102000605025331cf7a000a0910a401d9f09a34f7c0316403ff46f2a5c101256627f16384d34a38fb47a6c88ba60506843e532d91614339fccae5f884a5741e7582ffaf292ba38ee10a270a05f139bde3814b6a077e8cd2db0f105ebea2a83af70d385f13b507fac2ad93ff79d84950328bb86f3074745a8b7f9b64990fb142e2a12976e27e8d09a28dc5621f957ac49091116da410ac3cbde1b88d04533121f6010400cbd785b56905e4192e2fb62a720727d43c4fa487821203cf72138b884b78b701093243e1d8c92a0248a6c0203a5a88693da34af357499abacaf4b3309c640797d03093870a323b4b6f37865f6eaa2838148a67df4735d43a90ca87942554cdf1c4a751b1e75f9fd4ce4e97e278d6c1c7ed59d33441df7d084f3f02beb68896c70011010001889f0418010200090502533121f6021b0c000a09104ef7e4beccde97f0b98b03fc0a5ccf6a372995835a2f5da33b282a7d612c0ab2a97f59cf9fff73e9110981aac2858c41399afa29624a7fd8a0add11654e3d882c0fd199e161bdad65e5e2548f7b68a437ea64293db1246e3011cbb94dc1bcdeaf0f2539bd88ff16d95547144d97cead6a8c5927660a91e6db0d16eb36b7b49a3525b54d1644e65599b032b7eb901a204533127a0110400bd3edaa09eff9809c4edc2c2a0ebe52e53c50a19c1e49ab78e6167bf61473bb08f2050d78a5cbbc6ed66aff7b42cd503f16b4a0b99fa1609681fca9b7ce2bbb1a5b3864d6cdda4d7ef7849d156d534dea30fb0efb9e4cf8959a2b2ce623905882d5430b995a15c3b9fe92906086788b891002924f94abe139b42cbbfaaabe42f00a0b65dc1a1ad27d798adbcb5b5ad02d2688c89477b03ff4eebb6f7b15a73b96a96bed201c0e5e4ea27e4c6e2dd1005b94d4b90137a5b1cf5e01c6226c070c4cc999938101578877ee76d296b9aab8246d57049caacf489e80a3f40589cade790a020b1ac146d6f7a6241184b8c7fcde680eae3188f5dcbe846d7f7bdad34f6fcfca08413e19c1d5df83fc7c7c627d493492e009c2f52a80400a2fe82de87136fd2e8845888c4431b032ba29d9a29a804277e31002a8201fb8591a3e55c7a0d0881496caf8b9fb07544a5a4879291d0dc026a0ea9e5bd88eb4aa4947bbd694b25012e208a250d65ddc6f1eea59d3aed3b4ec15fcab85e2afaa23a40ab1ef9ce3e11e1bc1c34a0e758e7aa64deb8739276df0af7d4121f834a9b88e70418010200090502533127a0021b02005209104ef7e4beccde97f047200419110200060502533127a0000a0910dbce4ee19529437fe045009c0b32f5ead48ee8a7e98fac0dea3d3e6c0e2c552500a0ad71fadc5007cfaf842d9b7db3335a8cdad15d3d1a6404009b08e2c68fe8f3b45c1bb72a4b3278cdf3012aa0f229883ad74aa1f6000bb90b18301b2f85372ca5d6b9bf478d235b733b1b197d19ccca48e9daf8e890cb64546b4ce1b178faccfff07003c172a2d4f5ebaba9f57153955f3f61a9b80a4f5cb959908f8b211b03b7026a8a82fc612bfedd3794969bcf458c4ce92be215a1176ab88d045331d144010400a5063000c5aaf34953c1aa3bfc95045b3aab9882b9a8027fecfe2142dc6b47ba8aca667399990244d513dd0504716908c17d92c65e74219e004f7b83fc125e575dd58efec3ab6dd22e3580106998523dea42ec75bf9aa111734c82df54630bebdff20fe981cfc36c76f865eb1c2fb62c9e85bc3a6e5015a361a2eb1c8431578d0011010001889f04280102000905025331d433021d03000a09104ef7e4beccde97f02e5503ff5e0630d1b65291f4882b6d40a29da4616bb5088717d469fbcc3648b8276de04a04988b1f1b9f3e18f52265c1f8b6c85861691c1a6b8a3a25a1809a0b32ad330aec5667cb4262f4450649184e8113849b05e5ad06a316ea80c001e8e71838190339a6e48bbde30647bcf245134b9a97fa875c1d83a9862cae87ffd7e2c4ce3a1b89013d04180102000905025331d144021b0200a809104ef7e4beccde97f09d2004190102000605025331d144000a0910677815e371c2fd23522203fe22ab62b8e7a151383cea3edd3a12995693911426f8ccf125e1f6426388c0010f88d9ca7da2224aee8d1c12135998640c5e1813d55a93df472faae75bef858457248db41b4505827590aeccf6f9eb646da7f980655dd3050c6897feddddaca90676dee856d66db8923477d251712bb9b3186b4d0114daf7d6b59272b53218dd1da94a03ff64006fcbe71211e5daecd9961fba66cdb6de3f914882c58ba5beddeba7dcb950c1156d7fba18c19ea880dccc800eae335deec34e3b84ac75ffa24864f782f87815cda1c0f634b3dd2fa67cea30811d21723d21d9551fa12ccbcfa62b6d3a15d01307b99925707992556d50065505b090aadb8579083a20fe65bd2a270da9b011"
-
-const missingCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Charset: UTF-8
-
-mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MI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fWrmfSPq2rDegYcAybxRQz0lF8PAAoJEO3UDQUIHpI/exkH/0vQfdHA8g/N4T6E
-i6b1CUVBAkvtdJpCATZjWPhXmShOw62gkDw306vHPilL4SCvEEi4KzG72zkp6VsB
-DSRcpxCwT4mHue+duiy53/aRMtSJ+vDfiV1Vhq+3sWAck/yUtfDU9/u4eFaiNok1
-8/Gd7reyuZt5CiJnpdPpjCwelK21l2w7sHAnJF55ITXdOxI8oG3BRKufz0z5lyDY
-s2tXYmhhQIggdgelN8LbcMhWs/PBbtUr6uZlNJG2lW1yscD4aI529VjwJlCeo745
-U7pO4eF05VViUJ2mmfoivL3tkhoTUWhx8xs8xCUcCg8DoEoSIhxtOmoTPR22Z9BL
-6LCg2mg=
-=Dhm4
------END PGP PUBLIC KEY BLOCK-----`
-
-const goodCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1
-
-mI0EVUqeVwEEAMufHRrMPWK3gyvi0O0tABCs/oON9zV9KDZlr1a1M91ShCSFwCPo
-7r80PxdWVWcj0V5h50/CJYtpN3eE/mUIgW2z1uDYQF1OzrQ8ubrksfsJvpAhENom
-lTQEppv9mV8qhcM278teb7TX0pgrUHLYF5CfPdp1L957JLLXoQR/lwLVABEBAAG0
-E2dvb2Qtc2lnbmluZy1zdWJrZXmIuAQTAQIAIgUCVUqeVwIbAwYLCQgHAwIGFQgC
-CQoLBBYCAwECHgECF4AACgkQNRjL95IRWP69XQQAlH6+eyXJN4DZTLX78KGjHrsw
-6FCvxxClEPtPUjcJy/1KCRQmtLAt9PbbA78dvgzjDeZMZqRAwdjyJhjyg/fkU2OH
-7wq4ktjUu+dLcOBb+BFMEY+YjKZhf6EJuVfxoTVr5f82XNPbYHfTho9/OABKH6kv
-X70PaKZhbwnwij8Nts65AaIEVUqftREEAJ3WxZfqAX0bTDbQPf2CMT2IVMGDfhK7
-GyubOZgDFFjwUJQvHNvsrbeGLZ0xOBumLINyPO1amIfTgJNm1iiWFWfmnHReGc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jmTxJ8jSwEr2O2sUR0yjbgUAXbTxDVE
-/jg5fQZ1ACvBRQnB7LvMHcInbzjyeTM3FazkkSYQD6b97+dkWwb1iWG5AQ0EWyA7
-kQEIALkg04REDZo1JgdYV4x8HJKFS4xAYWbIva1ZPqvDNmZRUbQZR2+gpJGEwn7z
-VofGvnOYiGW56AS5j31SFf5kro1+1bZQ5iOONBng08OOo58/l1hRseIIVGB5TGSa
-PCdChKKHreJI6hS3mShxH6hdfFtiZuB45rwoaArMMsYcjaezLwKeLc396cpUwwcZ
-snLUNd1Xu5EWEF2OdFkZ2a1qYdxBvAYdQf4+1Nr+NRIx1u1NS9c8jp3PuMOkrQEi
-bNtc1v6v0Jy52mKLG4y7mC/erIkvkQBYJdxPaP7LZVaPYc3/xskcyijrJ/5ufoD8
-K71/ShtsZUXSQn9jlRaYR0EbojMAEQEAAYkBPAQYAQoAJhYhBOSJOSS3Dcepeq2X
-8NaBcvSOnFKDBQJbIDuRAhsMBQkDwmcAAAoJENaBcvSOnFKDkFMIAIt64bVZ8x7+
-TitH1bR4pgcNkaKmgKoZz6FXu80+SnbuEt2NnDyf1cLOSimSTILpwLIuv9Uft5Pb
-OraQbYt3xi9yrqdKqGLv80bxqK0NuryNkvh9yyx5WoG1iKqMj9/FjGghuPrRaT4l
-QinNAghGVkEy1+aXGFrG2DsOC1FFI51CC2WVTzZ5RwR2GpiNRfESsU1rZAUqf/2V
-yJl9bD5R4SUNy8oQmhOxi+gbhD4Ao34e4W0ilibslI/uawvCiOwlu5NGd8zv5n+U
-heiQvzkApQup5c+BhH5zFDFdKJ2CBByxw9+7QjMFI/wgLixKuE0Ob2kAokXf7RlB
-7qTZOahrETw=
-=IKnw
------END PGP PUBLIC KEY BLOCK-----`
-
-const keyWithFirstUserIDRevoked = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: OpenPGP.js v4.10.10
-Comment: https://openpgpjs.org
-
-xsBNBFsgO5EBCADhREPmcjsPkXe1z7ctvyWL0S7oa9JaoG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
-hD4Ao34e4W0ilibslI/uawvCiOwlu5NGd8zv5n+UheiQvzkApQup5c+BhH5z
-FDFdKJ2CBByxw9+7QjMFI/wgLixKuE0Ob2kAokXf7RlB7qTZOahrETw=
-=+2T8
------END PGP PUBLIC KEY BLOCK-----
-`
-
-const keyWithOnlyUserIDRevoked = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-
-mDMEYYwB7RYJKwYBBAHaRw8BAQdARimqhPPzyGAXmfQJjcqM1QVPzLtURJSzNVll
-JV4tEaW0KVJldm9rZWQgUHJpbWFyeSBVc2VyIElEIDxyZXZva2VkQGtleS5jb20+
-iHgEMBYIACAWIQSpyJZAXYqVEFkjyKutFcS0yeB0LQUCYYwCtgIdAAAKCRCtFcS0
-yeB0LbSsAQD8OYMaaBjrdzzpwIkP1stgmPd4/kzN/ZG28Ywl6a5F5QEA5Xg7aq4e
-/t6Fsb4F5iqB956kSPe6YJrikobD/tBbMwSIkAQTFggAOBYhBKnIlkBdipUQWSPI
-q60VxLTJ4HQtBQJhjAHtAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEK0V
-xLTJ4HQtBaoBAPZL7luTCji+Tqhn7XNfFE/0QIahCt8k9wfO1cGlB3inAQDf8Tzw
-ZGR5fNluUcNoVxQT7bUSFStbaGo3k0BaOYPbCLg4BGGMAe0SCisGAQQBl1UBBQEB
-B0DLwSpveSrbIO/IVZD13yrs1XuB3FURZUnafGrRq7+jUAMBCAeIeAQYFggAIBYh
-BKnIlkBdipUQWSPIq60VxLTJ4HQtBQJhjAHtAhsMAAoJEK0VxLTJ4HQtZ1oA/j9u
-8+p3xTNzsmabTL6BkNbMeB/RUKCrlm6woM6AV+vxAQCcXTn3JC2sNoNrLoXuVzaA
-mcG3/TwG5GSQUUPkrDsGDA==
-=mFWy
------END PGP PUBLIC KEY BLOCK-----
-`
-
-const keyWithSubKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-
-mI0EWyKwKQEEALwXhKBnyaaNFeK3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/x3Ut5ycC3CsW41Fnt
-Gm3706Wu9VFbFZVn55F9lPiplUo61n5pqMvOr1gmuQsdXiTa0t5FRa4TZ2VSiHFw
-vdAVSPTUsT4ZxJ1rPyFYRtq1n3pQcvdZowd07r0JnzTMjLLMFYCKhwIowoOC4zqJ
-iB8enjwOlpaqBATRm9xpVF7SJkroPF6/B1vdhj7E3c1aJyHlo0PYBAg756sSHWHg
-UuLyUQ4TA0hcCVenn/L/aSY2LnbdZB1EBhlYjA7dTCgwIqsQhfQmPkjz6g64A7+Y
-HbbrLwADBQgAk14QIEQ+J/VHetpQV/jt2pNsFK1kVK7mXK0spTExaC2yj2sXlHjL
-Ie3bO5T/KqmIaBEB5db5fA5xK9cZt79qrQHDKsEqUetUeMUWLBx77zBsus3grIgy
-bwDZKseRzQ715pwxquxQlScGoDIBKEh08HpwHkq140eIj3w+MAIfndaZaSCNaxaP
-Snky7BQmJ7Wc7qrIwoQP6yrnUqyW2yNi81nJYUhxjChqaFSlwzLs/iNGryBKo0ic
-BqVIRjikKHBlwBng6WyrltQo/Vt9GG8w+lqaAVXbJRlaBZJUR+2NKi/YhP3qQse3
-v8fi4kns0gh5LK+2C01RvdX4T49QSExuIf4HAwLJqYIGwadA2uem5v7/765ZtFWV
-oL0iZ0ueTJDby4wTFDpLVzzDi/uVcB0ZRFrGOp7w6OYcNYTtV8n3xmli2Q5Trw0c
-wZVzvg+ABKWiv7faBjMczIFF8y6WZKOIeAQYEQgAIBYhBI+gnfiHQxB35/Dp0XAQ
-aE/rsWC5BQJffzC7AhsMAAoJEHAQaE/rsWC5ZmIA/jhS4r4lClbvjuPWt0Yqdn7R
-fss2SPMYvMrrDh42aE0OAQD8xn4G6CN8UtW9xihXOY6FpxiJ/sMc2VaneeUd34oa
-4g==
-=XZm8
------END PGP PRIVATE KEY BLOCK-----`
-
-// https://tests.sequoia-pgp.org/#Certificate_expiration
-// P _ U p
-const expiringPrimaryUIDKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-
-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f3u0k14itcv6alKY8+rLZvO1wIIeRZLm
-U0tZDD5HtWDvUV7rIFI1WuoLb+KZgbYn3OWjCPHVdTrdZ2CqnZbG3SXw6awH9bzR
-LV9EXkbhIMez0deCVdeo+wFFklh8/5VK2b0vk/+wqMJxfpa1lHvJLobzOP9fvrsw
-sr92MA2+k901WeISR7qEzcI0Fdg8AyFAExaEK6VyjP7SXGLwvfisw34OxuZr3qmx
-1Sufu4toH3XrB7QJN8XyqqbsGxUCBqWif9RSK4xjzRTe56iPeiSJJOIciMP9i2ld
-I+KgLycyeDvGoBj0HCLO3gVaBe4ubVrj5KjhX2PVNEJd3XZRzaXZE2aAMQ==
-=AmgT
------END PGP PUBLIC KEY BLOCK-----`
-
-const rsa2048PrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-Comment: gpg (GnuPG) 2.2.27 with libgcrypt 1.9.4
-
-lQPGBGL07P0BCADL0etN8efyAXA6sL2WfQvHe5wEKYXPWeN2+jiqSppfeRZAOlzP
-kZ3U+cloeJriplYvVJwI3ID2aw52Z/TRn8iKRP5eOUFrEgcgl06lazLtOndK7o7p
-oBV5mLtHEirFHm6W61fNt10jzM0jx0PV6nseLhFB2J42F1cmU/aBgFo41wjLSZYr
-owR+v+O9S5sUXblQF6sEDcY01sBEu09zrIgT49VFwQ1Cvdh9XZEOTQBfdiugoj5a
-DS3fAqAka3r1VoQK4eR7/upnYSgSACGeaQ4pUelKku5rpm50gdWTY8ppq0k9e1eT
-y2x0OQcW3hWE+j4os1ca0ZEADMdqr/99MOxrABEBAAH+BwMCJWxU4VOZOJ7/I6vX
-FxdfBhIBEXlJ52FM3S/oYtXqLhkGyrtmZOeEazVvUtuCe3M3ScHI8xCthcmE8E0j
-bi+ZEHPS2NiBZtgHFF27BLn7zZuTc+oD5WKduZdK3463egnyThTqIIMl25WZBuab
-k5ycwYrWwBH0jfA4gwJ13ai4pufKC2RM8qIu6YAVPglYBKFLKGvvJHa5vI+LuA0E
-K+k35hIic7yVUcQne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I/Sa0zBMstCJHb2xh
-bmcgR29waGVyIDxnb2xhbmdAZXhhbXBsZS5vcmc+iJAEExYIADgWIQSFQHEOazmo
-h1ldII4MvfnLQ4JBNwUCYvTtQAIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAK
-CRAMvfnLQ4JBN5yeAQCKdry8B5ScCPrev2+UByMCss7Sdu5RhomCFsHdNPLcKAEA
-8ugei+1owHsV+3cGwWWzKk6sLa8ZN87i3SKuOGp9DQycXQRi9O1AEgorBgEEAZdV
-AQUBAQdA5CubPp8l7lrVQ25h7Hx5XN2C8xanRnnpcjzEooCaEA0DAQgHAAD/Rpc+
-sOZUXrFk9HOWB1XU41LoWbDBoG8sP8RWAVYwD5AQRYh4BBgWCAAgFiEEhUBxDms5
-qIdZXSCODL35y0OCQTcFAmL07UACGwwACgkQDL35y0OCQTcvdwEA7lb5g/YisrEf
-iq660uwMGoepLUfvtqKzuQ6heYe83y0BAN65Ffg5HYOJzUEi0kZQRf7OhdtuL2kJ
-SRXn8DmCTfEB
-=cELM
------END PGP PRIVATE KEY BLOCK-----`
-
-const curve448PrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-Comment: C1DB 65D5 80D7 B922 7254 4B1E A699 9895 FABA CE52
-
-xYUEYV2UmRYDK2VxAc9AFyxgh5xnSbyt50TWl558mw9xdMN+/UBLr5+UMP8IsrvV
-MdXuTIE8CyaUQKSotHtH2RkYEXj5nsMAAAHPQIbTMSzjIWug8UFECzAex5FHgAgH
-gYF3RK+TS8D24wX8kOu2C/NoVxwGY+p+i0JHaB+7yljriSKAGxs6wsBEBB8WCgCD
-BYJhXZSZBYkFpI+9AwsJBwkQppmYlfq6zlJHFAAAAAAAHgAgc2FsdEBub3RhdGlv
-bnMuc2VxdW9pYS1wZ3Aub3Jn5wSpIutJ5HncJWk4ruUV8GzQF390rR5+qWEAnAoY
-akcDFQoIApsBAh4BFiEEwdtl1YDXuSJyVEseppmYlfq6zlIAALzdA5dA/fsgYg/J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Aik+lVVQ6u
-zRdUZXN0IDx0ZXN0QGV4YW1wbGUuY29tPsLACgQQFgoAfAUCY9gIsgQLCQcI
-CRD/utJOCym8pR0UgAAAAAAQAAR0ZXh0QGV4YW1wbGUuY29tdGVzdB8UAAAA
-AAASAARiaW5hcnlAZXhhbXBsZS5jb20AAQIDAxUICgQWAAIBAhkBAhsDAh4B
-FiEEEMCQTUVGKgCX5rDQ/7rSTgspvKUAAPl5AP9Npz90LxzrB97Qr2DrGwfG
-wuYn4FSYwtuPfZHHeoIabwD/QEbvpQJ/NBb9EAZuow4Rirlt1yv19mmnF+j5
-8yUzhQjHXQRj2AiyEgorBgEEAZdVAQUBAQdARXAo30DmKcyUg6co7OUm0RNT
-z9iqFbDBzA8A47JEt1MDAQgHAAD/XKK3lBm0SqMR558HLWdBrNG6NqKuqb5X
-joCML987ZNgRD8J4BBgWCAAqBQJj2AiyCRD/utJOCym8pQIbDBYhBBDAkE1F
-RioAl+aw0P+60k4LKbylAADRxgEAg7UfBDiDPp5LHcW9D+SgFHk6+GyEU4ev
-VppQxdtxPvAA/34snHBX7Twnip1nMt7P4e2hDiw/hwQ7oqioOvc6jMkP
-=Z8YJ
------END PGP PRIVATE KEY BLOCK-----
-`
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_config.go
deleted file mode 100644
index fec41a0e73..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_config.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-
-package packet
-
-import "math/bits"
-
-// CipherSuite contains a combination of Cipher and Mode
-type CipherSuite struct {
- // The cipher function
- Cipher CipherFunction
- // The AEAD mode of operation.
- Mode AEADMode
-}
-
-// AEADConfig collects a number of AEAD parameters along with sensible defaults.
-// A nil AEADConfig is valid and results in all default values.
-type AEADConfig struct {
- // The AEAD mode of operation.
- DefaultMode AEADMode
- // Amount of octets in each chunk of data
- ChunkSize uint64
-}
-
-// Mode returns the AEAD mode of operation.
-func (conf *AEADConfig) Mode() AEADMode {
- // If no preference is specified, OCB is used (which is mandatory to implement).
- if conf == nil || conf.DefaultMode == 0 {
- return AEADModeOCB
- }
-
- mode := conf.DefaultMode
- if mode != AEADModeEAX && mode != AEADModeOCB && mode != AEADModeGCM {
- panic("AEAD mode unsupported")
- }
- return mode
-}
-
-// ChunkSizeByte returns the byte indicating the chunk size. The effective
-// chunk size is computed with the formula uint64(1) << (chunkSizeByte + 6)
-// limit to 16 = 4 MiB
-// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
-func (conf *AEADConfig) ChunkSizeByte() byte {
- if conf == nil || conf.ChunkSize == 0 {
- return 12 // 1 << (12 + 6) == 262144 bytes
- }
-
- chunkSize := conf.ChunkSize
- exponent := bits.Len64(chunkSize) - 1
- switch {
- case exponent < 6:
- exponent = 6
- case exponent > 16:
- exponent = 16
- }
-
- return byte(exponent - 6)
-}
-
-// decodeAEADChunkSize returns the effective chunk size. In 32-bit systems, the
-// maximum returned value is 1 << 30.
-func decodeAEADChunkSize(c byte) int {
- size := uint64(1 << (c + 6))
- if size != uint64(int(size)) {
- return 1 << 30
- }
- return int(size)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
deleted file mode 100644
index 5e46046563..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-
-package packet
-
-import (
- "crypto/cipher"
- "encoding/binary"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// aeadCrypter is an AEAD opener/sealer, its configuration, and data for en/decryption.
-type aeadCrypter struct {
- aead cipher.AEAD
- chunkSize int
- nonce []byte
- associatedData []byte // Chunk-independent associated data
- chunkIndex []byte // Chunk counter
- packetTag packetType // SEIP packet (v2) or AEAD Encrypted Data packet
- bytesProcessed int // Amount of plaintext bytes encrypted/decrypted
-}
-
-// computeNonce takes the incremental index and computes an eXclusive OR with
-// the least significant 8 bytes of the receivers' initial nonce (see sec.
-// 5.16.1 and 5.16.2). It returns the resulting nonce.
-func (wo *aeadCrypter) computeNextNonce() (nonce []byte) {
- if wo.packetTag == packetTypeSymmetricallyEncryptedIntegrityProtected {
- return wo.nonce
- }
-
- nonce = make([]byte, len(wo.nonce))
- copy(nonce, wo.nonce)
- offset := len(wo.nonce) - 8
- for i := 0; i < 8; i++ {
- nonce[i+offset] ^= wo.chunkIndex[i]
- }
- return
-}
-
-// incrementIndex performs an integer increment by 1 of the integer represented by the
-// slice, modifying it accordingly.
-func (wo *aeadCrypter) incrementIndex() error {
- index := wo.chunkIndex
- if len(index) == 0 {
- return errors.AEADError("Index has length 0")
- }
- for i := len(index) - 1; i >= 0; i-- {
- if index[i] < 255 {
- index[i]++
- return nil
- }
- index[i] = 0
- }
- return errors.AEADError("cannot further increment index")
-}
-
-// aeadDecrypter reads and decrypts bytes. It buffers extra decrypted bytes when
-// necessary, similar to aeadEncrypter.
-type aeadDecrypter struct {
- aeadCrypter // Embedded ciphertext opener
- reader io.Reader // 'reader' is a partialLengthReader
- chunkBytes []byte
- peekedBytes []byte // Used to detect last chunk
- buffer []byte // Buffered decrypted bytes
-}
-
-// Read decrypts bytes and reads them into dst. It decrypts when necessary and
-// buffers extra decrypted bytes. It returns the number of bytes copied into dst
-// and an error.
-func (ar *aeadDecrypter) Read(dst []byte) (n int, err error) {
- // Return buffered plaintext bytes from previous calls
- if len(ar.buffer) > 0 {
- n = copy(dst, ar.buffer)
- ar.buffer = ar.buffer[n:]
- return
- }
-
- // Read a chunk
- tagLen := ar.aead.Overhead()
- copy(ar.chunkBytes, ar.peekedBytes) // Copy bytes peeked in previous chunk or in initialization
- bytesRead, errRead := io.ReadFull(ar.reader, ar.chunkBytes[tagLen:])
- if errRead != nil && errRead != io.EOF && errRead != io.ErrUnexpectedEOF {
- return 0, errRead
- }
-
- if bytesRead > 0 {
- ar.peekedBytes = ar.chunkBytes[bytesRead:bytesRead+tagLen]
-
- decrypted, errChunk := ar.openChunk(ar.chunkBytes[:bytesRead])
- if errChunk != nil {
- return 0, errChunk
- }
-
- // Return decrypted bytes, buffering if necessary
- n = copy(dst, decrypted)
- ar.buffer = decrypted[n:]
- return
- }
-
- return 0, io.EOF
-}
-
-// Close checks the final authentication tag of the stream.
-// In the future, this function could also be used to wipe the reader
-// and peeked & decrypted bytes, if necessary.
-func (ar *aeadDecrypter) Close() (err error) {
- errChunk := ar.validateFinalTag(ar.peekedBytes)
- if errChunk != nil {
- return errChunk
- }
- return nil
-}
-
-// openChunk decrypts and checks integrity of an encrypted chunk, returning
-// the underlying plaintext and an error. It accesses peeked bytes from next
-// chunk, to identify the last chunk and decrypt/validate accordingly.
-func (ar *aeadDecrypter) openChunk(data []byte) ([]byte, error) {
- adata := ar.associatedData
- if ar.aeadCrypter.packetTag == packetTypeAEADEncrypted {
- adata = append(ar.associatedData, ar.chunkIndex...)
- }
-
- nonce := ar.computeNextNonce()
- plainChunk, err := ar.aead.Open(data[:0:len(data)], nonce, data, adata)
- if err != nil {
- return nil, errors.ErrAEADTagVerification
- }
- ar.bytesProcessed += len(plainChunk)
- if err = ar.aeadCrypter.incrementIndex(); err != nil {
- return nil, err
- }
- return plainChunk, nil
-}
-
-// Checks the summary tag. It takes into account the total decrypted bytes into
-// the associated data. It returns an error, or nil if the tag is valid.
-func (ar *aeadDecrypter) validateFinalTag(tag []byte) error {
- // Associated: tag, version, cipher, aead, chunk size, ...
- amountBytes := make([]byte, 8)
- binary.BigEndian.PutUint64(amountBytes, uint64(ar.bytesProcessed))
-
- adata := ar.associatedData
- if ar.aeadCrypter.packetTag == packetTypeAEADEncrypted {
- // ... index ...
- adata = append(ar.associatedData, ar.chunkIndex...)
- }
-
- // ... and total number of encrypted octets
- adata = append(adata, amountBytes...)
- nonce := ar.computeNextNonce()
- if _, err := ar.aead.Open(nil, nonce, tag, adata); err != nil {
- return errors.ErrAEADTagVerification
- }
- return nil
-}
-
-// aeadEncrypter encrypts and writes bytes. It encrypts when necessary according
-// to the AEAD block size, and buffers the extra encrypted bytes for next write.
-type aeadEncrypter struct {
- aeadCrypter // Embedded plaintext sealer
- writer io.WriteCloser // 'writer' is a partialLengthWriter
- chunkBytes []byte
- offset int
-}
-
-// Write encrypts and writes bytes. It encrypts when necessary and buffers extra
-// plaintext bytes for next call. When the stream is finished, Close() MUST be
-// called to append the final tag.
-func (aw *aeadEncrypter) Write(plaintextBytes []byte) (n int, err error) {
- for n != len(plaintextBytes) {
- copied := copy(aw.chunkBytes[aw.offset:aw.chunkSize], plaintextBytes[n:])
- n += copied
- aw.offset += copied
-
- if aw.offset == aw.chunkSize {
- encryptedChunk, err := aw.sealChunk(aw.chunkBytes[:aw.offset])
- if err != nil {
- return n, err
- }
- _, err = aw.writer.Write(encryptedChunk)
- if err != nil {
- return n, err
- }
- aw.offset = 0
- }
- }
- return
-}
-
-// Close encrypts and writes the remaining buffered plaintext if any, appends
-// the final authentication tag, and closes the embedded writer. This function
-// MUST be called at the end of a stream.
-func (aw *aeadEncrypter) Close() (err error) {
- // Encrypt and write a chunk if there's buffered data left, or if we haven't
- // written any chunks yet.
- if aw.offset > 0 || aw.bytesProcessed == 0 {
- lastEncryptedChunk, err := aw.sealChunk(aw.chunkBytes[:aw.offset])
- if err != nil {
- return err
- }
- _, err = aw.writer.Write(lastEncryptedChunk)
- if err != nil {
- return err
- }
- }
- // Compute final tag (associated data: packet tag, version, cipher, aead,
- // chunk size...
- adata := aw.associatedData
-
- if aw.aeadCrypter.packetTag == packetTypeAEADEncrypted {
- // ... index ...
- adata = append(aw.associatedData, aw.chunkIndex...)
- }
-
- // ... and total number of encrypted octets
- amountBytes := make([]byte, 8)
- binary.BigEndian.PutUint64(amountBytes, uint64(aw.bytesProcessed))
- adata = append(adata, amountBytes...)
-
- nonce := aw.computeNextNonce()
- finalTag := aw.aead.Seal(nil, nonce, nil, adata)
- _, err = aw.writer.Write(finalTag)
- if err != nil {
- return err
- }
- return aw.writer.Close()
-}
-
-// sealChunk Encrypts and authenticates the given chunk.
-func (aw *aeadEncrypter) sealChunk(data []byte) ([]byte, error) {
- if len(data) > aw.chunkSize {
- return nil, errors.AEADError("chunk exceeds maximum length")
- }
- if aw.associatedData == nil {
- return nil, errors.AEADError("can't seal without headers")
- }
- adata := aw.associatedData
- if aw.aeadCrypter.packetTag == packetTypeAEADEncrypted {
- adata = append(aw.associatedData, aw.chunkIndex...)
- }
-
- nonce := aw.computeNextNonce()
- encrypted := aw.aead.Seal(data[:0], nonce, data, adata)
- aw.bytesProcessed += len(data)
- if err := aw.aeadCrypter.incrementIndex(); err != nil {
- return nil, err
- }
- return encrypted, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
deleted file mode 100644
index 583765d87c..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (C) 2019 ProtonTech AG
-
-package packet
-
-import (
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
-)
-
-// AEADEncrypted represents an AEAD Encrypted Packet.
-// See https://www.ietf.org/archive/id/draft-koch-openpgp-2015-rfc4880bis-00.html#name-aead-encrypted-data-packet-t
-type AEADEncrypted struct {
- cipher CipherFunction
- mode AEADMode
- chunkSizeByte byte
- Contents io.Reader // Encrypted chunks and tags
- initialNonce []byte // Referred to as IV in RFC4880-bis
-}
-
-// Only currently defined version
-const aeadEncryptedVersion = 1
-
-func (ae *AEADEncrypted) parse(buf io.Reader) error {
- headerData := make([]byte, 4)
- if n, err := io.ReadFull(buf, headerData); n < 4 {
- return errors.AEADError("could not read aead header:" + err.Error())
- }
- // Read initial nonce
- mode := AEADMode(headerData[2])
- nonceLen := mode.IvLength()
-
- // This packet supports only EAX and OCB
- // https://www.ietf.org/archive/id/draft-koch-openpgp-2015-rfc4880bis-00.html#name-aead-encrypted-data-packet-t
- if nonceLen == 0 || mode > AEADModeOCB {
- return errors.AEADError("unknown mode")
- }
-
- initialNonce := make([]byte, nonceLen)
- if n, err := io.ReadFull(buf, initialNonce); n < nonceLen {
- return errors.AEADError("could not read aead nonce:" + err.Error())
- }
- ae.Contents = buf
- ae.initialNonce = initialNonce
- c := headerData[1]
- if _, ok := algorithm.CipherById[c]; !ok {
- return errors.UnsupportedError("unknown cipher: " + string(c))
- }
- ae.cipher = CipherFunction(c)
- ae.mode = mode
- ae.chunkSizeByte = headerData[3]
- return nil
-}
-
-// Decrypt returns a io.ReadCloser from which decrypted bytes can be read, or
-// an error.
-func (ae *AEADEncrypted) Decrypt(ciph CipherFunction, key []byte) (io.ReadCloser, error) {
- return ae.decrypt(key)
-}
-
-// decrypt prepares an aeadCrypter and returns a ReadCloser from which
-// decrypted bytes can be read (see aeadDecrypter.Read()).
-func (ae *AEADEncrypted) decrypt(key []byte) (io.ReadCloser, error) {
- blockCipher := ae.cipher.new(key)
- aead := ae.mode.new(blockCipher)
- // Carry the first tagLen bytes
- chunkSize := decodeAEADChunkSize(ae.chunkSizeByte)
- tagLen := ae.mode.TagLength()
- chunkBytes := make([]byte, chunkSize+tagLen*2)
- peekedBytes := chunkBytes[chunkSize+tagLen:]
- n, err := io.ReadFull(ae.Contents, peekedBytes)
- if n < tagLen || (err != nil && err != io.EOF) {
- return nil, errors.AEADError("Not enough data to decrypt:" + err.Error())
- }
-
- return &aeadDecrypter{
- aeadCrypter: aeadCrypter{
- aead: aead,
- chunkSize: chunkSize,
- nonce: ae.initialNonce,
- associatedData: ae.associatedData(),
- chunkIndex: make([]byte, 8),
- packetTag: packetTypeAEADEncrypted,
- },
- reader: ae.Contents,
- chunkBytes: chunkBytes,
- peekedBytes: peekedBytes,
- }, nil
-}
-
-// associatedData for chunks: tag, version, cipher, mode, chunk size byte
-func (ae *AEADEncrypted) associatedData() []byte {
- return []byte{
- 0xD4,
- aeadEncryptedVersion,
- byte(ae.cipher),
- byte(ae.mode),
- ae.chunkSizeByte}
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
deleted file mode 100644
index 0bcb38caca..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "compress/bzip2"
- "compress/flate"
- "compress/zlib"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// Compressed represents a compressed OpenPGP packet. The decompressed contents
-// will contain more OpenPGP packets. See RFC 4880, section 5.6.
-type Compressed struct {
- Body io.Reader
-}
-
-const (
- NoCompression = flate.NoCompression
- BestSpeed = flate.BestSpeed
- BestCompression = flate.BestCompression
- DefaultCompression = flate.DefaultCompression
-)
-
-// CompressionConfig contains compressor configuration settings.
-type CompressionConfig struct {
- // Level is the compression level to use. It must be set to
- // between -1 and 9, with -1 causing the compressor to use the
- // default compression level, 0 causing the compressor to use
- // no compression and 1 to 9 representing increasing (better,
- // slower) compression levels. If Level is less than -1 or
- // more then 9, a non-nil error will be returned during
- // encryption. See the constants above for convenient common
- // settings for Level.
- Level int
-}
-
-// decompressionReader ensures that the whole compression packet is read.
-type decompressionReader struct {
- compressed io.Reader
- decompressed io.ReadCloser
- readAll bool
-}
-
-func newDecompressionReader(r io.Reader, decompressor io.ReadCloser) *decompressionReader {
- return &decompressionReader{
- compressed: r,
- decompressed: decompressor,
- }
-}
-
-func (dr *decompressionReader) Read(data []byte) (n int, err error) {
- if dr.readAll {
- return 0, io.EOF
- }
- n, err = dr.decompressed.Read(data)
- if err == io.EOF {
- dr.readAll = true
- // Close the decompressor.
- if errDec := dr.decompressed.Close(); errDec != nil {
- return n, errDec
- }
- // Consume all remaining data from the compressed packet.
- consumeAll(dr.compressed)
- }
- return n, err
-}
-
-func (c *Compressed) parse(r io.Reader) error {
- var buf [1]byte
- _, err := readFull(r, buf[:])
- if err != nil {
- return err
- }
-
- switch buf[0] {
- case 0:
- c.Body = r
- case 1:
- c.Body = newDecompressionReader(r, flate.NewReader(r))
- case 2:
- decompressor, err := zlib.NewReader(r)
- if err != nil {
- return err
- }
- c.Body = newDecompressionReader(r, decompressor)
- case 3:
- c.Body = newDecompressionReader(r, io.NopCloser(bzip2.NewReader(r)))
- default:
- err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0])))
- }
-
- return err
-}
-
-// compressedWriterCloser represents the serialized compression stream
-// header and the compressor. Its Close() method ensures that both the
-// compressor and serialized stream header are closed. Its Write()
-// method writes to the compressor.
-type compressedWriteCloser struct {
- sh io.Closer // Stream Header
- c io.WriteCloser // Compressor
-}
-
-func (cwc compressedWriteCloser) Write(p []byte) (int, error) {
- return cwc.c.Write(p)
-}
-
-func (cwc compressedWriteCloser) Close() (err error) {
- err = cwc.c.Close()
- if err != nil {
- return err
- }
-
- return cwc.sh.Close()
-}
-
-// SerializeCompressed serializes a compressed data packet to w and
-// returns a WriteCloser to which the literal data packets themselves
-// can be written and which MUST be closed on completion. If cc is
-// nil, sensible defaults will be used to configure the compression
-// algorithm.
-func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) {
- compressed, err := serializeStreamHeader(w, packetTypeCompressed)
- if err != nil {
- return
- }
-
- _, err = compressed.Write([]byte{uint8(algo)})
- if err != nil {
- return
- }
-
- level := DefaultCompression
- if cc != nil {
- level = cc.Level
- }
-
- var compressor io.WriteCloser
- switch algo {
- case CompressionZIP:
- compressor, err = flate.NewWriter(compressed, level)
- case CompressionZLIB:
- compressor, err = zlib.NewWriterLevel(compressed, level)
- default:
- s := strconv.Itoa(int(algo))
- err = errors.UnsupportedError("Unsupported compression algorithm: " + s)
- }
- if err != nil {
- return
- }
-
- literaldata = compressedWriteCloser{compressed, compressor}
-
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
deleted file mode 100644
index 8bf8e6e51f..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
+++ /dev/null
@@ -1,410 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "crypto"
- "crypto/rand"
- "io"
- "math/big"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/s2k"
-)
-
-var (
- defaultRejectPublicKeyAlgorithms = map[PublicKeyAlgorithm]bool{
- PubKeyAlgoElGamal: true,
- PubKeyAlgoDSA: true,
- }
- defaultRejectHashAlgorithms = map[crypto.Hash]bool{
- crypto.MD5: true,
- crypto.RIPEMD160: true,
- }
- defaultRejectMessageHashAlgorithms = map[crypto.Hash]bool{
- crypto.SHA1: true,
- crypto.MD5: true,
- crypto.RIPEMD160: true,
- }
- defaultRejectCurves = map[Curve]bool{
- CurveSecP256k1: true,
- }
-)
-
-// A global feature flag to indicate v5 support.
-// Can be set via a build tag, e.g.: `go build -tags v5 ./...`
-// If the build tag is missing config_v5.go will set it to true.
-//
-// Disables parsing of v5 keys and v5 signatures.
-// These are non-standard entities, which in the crypto-refresh have been superseded
-// by v6 keys, v6 signatures and SEIPDv2 encrypted data, respectively.
-var V5Disabled = false
-
-// Config collects a number of parameters along with sensible defaults.
-// A nil *Config is valid and results in all default values.
-type Config struct {
- // Rand provides the source of entropy.
- // If nil, the crypto/rand Reader is used.
- Rand io.Reader
- // DefaultHash is the default hash function to be used.
- // If zero, SHA-256 is used.
- DefaultHash crypto.Hash
- // DefaultCipher is the cipher to be used.
- // If zero, AES-128 is used.
- DefaultCipher CipherFunction
- // Time returns the current time as the number of seconds since the
- // epoch. If Time is nil, time.Now is used.
- Time func() time.Time
- // DefaultCompressionAlgo is the compression algorithm to be
- // applied to the plaintext before encryption. If zero, no
- // compression is done.
- DefaultCompressionAlgo CompressionAlgo
- // CompressionConfig configures the compression settings.
- CompressionConfig *CompressionConfig
- // S2K (String to Key) config, used for key derivation in the context of secret key encryption
- // and password-encrypted data.
- // If nil, the default configuration is used
- S2KConfig *s2k.Config
- // Iteration count for Iterated S2K (String to Key).
- // Only used if sk2.Mode is nil.
- // This value is duplicated here from s2k.Config for backwards compatibility.
- // It determines the strength of the passphrase stretching when
- // the said passphrase is hashed to produce a key. S2KCount
- // should be between 65536 and 65011712, inclusive. If Config
- // is nil or S2KCount is 0, the value 16777216 used. Not all
- // values in the above range can be represented. S2KCount will
- // be rounded up to the next representable value if it cannot
- // be encoded exactly. When set, it is strongly encrouraged to
- // use a value that is at least 65536. See RFC 4880 Section
- // 3.7.1.3.
- //
- // Deprecated: SK2Count should be configured in S2KConfig instead.
- S2KCount int
- // RSABits is the number of bits in new RSA keys made with NewEntity.
- // If zero, then 2048 bit keys are created.
- RSABits int
- // The public key algorithm to use - will always create a signing primary
- // key and encryption subkey.
- Algorithm PublicKeyAlgorithm
- // Some known primes that are optionally prepopulated by the caller
- RSAPrimes []*big.Int
- // Curve configures the desired packet.Curve if the Algorithm is PubKeyAlgoECDSA,
- // PubKeyAlgoEdDSA, or PubKeyAlgoECDH. If empty Curve25519 is used.
- Curve Curve
- // AEADConfig configures the use of the new AEAD Encrypted Data Packet,
- // defined in the draft of the next version of the OpenPGP specification.
- // If a non-nil AEADConfig is passed, usage of this packet is enabled. By
- // default, it is disabled. See the documentation of AEADConfig for more
- // configuration options related to AEAD.
- // **Note: using this option may break compatibility with other OpenPGP
- // implementations, as well as future versions of this library.**
- AEADConfig *AEADConfig
- // V6Keys configures version 6 key generation. If false, this package still
- // supports version 6 keys, but produces version 4 keys.
- V6Keys bool
- // Minimum RSA key size allowed for key generation and message signing, verification and encryption.
- MinRSABits uint16
- // Reject insecure algorithms, only works with v2 api
- RejectPublicKeyAlgorithms map[PublicKeyAlgorithm]bool
- RejectHashAlgorithms map[crypto.Hash]bool
- RejectMessageHashAlgorithms map[crypto.Hash]bool
- RejectCurves map[Curve]bool
- // "The validity period of the key. This is the number of seconds after
- // the key creation time that the key expires. If this is not present
- // or has a value of zero, the key never expires. This is found only on
- // a self-signature.""
- // https://tools.ietf.org/html/rfc4880#section-5.2.3.6
- KeyLifetimeSecs uint32
- // "The validity period of the signature. This is the number of seconds
- // after the signature creation time that the signature expires. If
- // this is not present or has a value of zero, it never expires."
- // https://tools.ietf.org/html/rfc4880#section-5.2.3.10
- SigLifetimeSecs uint32
- // SigningKeyId is used to specify the signing key to use (by Key ID).
- // By default, the signing key is selected automatically, preferring
- // signing subkeys if available.
- SigningKeyId uint64
- // SigningIdentity is used to specify a user ID (packet Signer's User ID, type 28)
- // when producing a generic certification signature onto an existing user ID.
- // The identity must be present in the signer Entity.
- SigningIdentity string
- // InsecureAllowUnauthenticatedMessages controls, whether it is tolerated to read
- // encrypted messages without Modification Detection Code (MDC).
- // MDC is mandated by the IETF OpenPGP Crypto Refresh draft and has long been implemented
- // in most OpenPGP implementations. Messages without MDC are considered unnecessarily
- // insecure and should be prevented whenever possible.
- // In case one needs to deal with messages from very old OpenPGP implementations, there
- // might be no other way than to tolerate the missing MDC. Setting this flag, allows this
- // mode of operation. It should be considered a measure of last resort.
- InsecureAllowUnauthenticatedMessages bool
- // InsecureAllowDecryptionWithSigningKeys allows decryption with keys marked as signing keys in the v2 API.
- // This setting is potentially insecure, but it is needed as some libraries
- // ignored key flags when selecting a key for encryption.
- // Not relevant for the v1 API, as all keys were allowed in decryption.
- InsecureAllowDecryptionWithSigningKeys bool
- // KnownNotations is a map of Notation Data names to bools, which controls
- // the notation names that are allowed to be present in critical Notation Data
- // signature subpackets.
- KnownNotations map[string]bool
- // SignatureNotations is a list of Notations to be added to any signatures.
- SignatureNotations []*Notation
- // CheckIntendedRecipients controls, whether the OpenPGP Intended Recipient Fingerprint feature
- // should be enabled for encryption and decryption.
- // (See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-intended-recipient-fingerpr).
- // When the flag is set, encryption produces Intended Recipient Fingerprint signature sub-packets and decryption
- // checks whether the key it was encrypted to is one of the included fingerprints in the signature.
- // If the flag is disabled, no Intended Recipient Fingerprint sub-packets are created or checked.
- // The default behavior, when the config or flag is nil, is to enable the feature.
- CheckIntendedRecipients *bool
- // CacheSessionKey controls if decryption should return the session key used for decryption.
- // If the flag is set, the session key is cached in the message details struct.
- CacheSessionKey bool
- // CheckPacketSequence is a flag that controls if the pgp message reader should strictly check
- // that the packet sequence conforms with the grammar mandated by rfc4880.
- // The default behavior, when the config or flag is nil, is to check the packet sequence.
- CheckPacketSequence *bool
- // NonDeterministicSignaturesViaNotation is a flag to enable randomization of signatures.
- // If true, a salt notation is used to randomize signatures generated by v4 and v5 keys
- // (v6 signatures are always non-deterministic, by design).
- // This protects EdDSA signatures from potentially leaking the secret key in case of faults (i.e. bitflips) which, in principle, could occur
- // during the signing computation. It is added to signatures of any algo for simplicity, and as it may also serve as protection in case of
- // weaknesses in the hash algo, potentially hindering e.g. some chosen-prefix attacks.
- // The default behavior, when the config or flag is nil, is to enable the feature.
- NonDeterministicSignaturesViaNotation *bool
-}
-
-func (c *Config) Random() io.Reader {
- if c == nil || c.Rand == nil {
- return rand.Reader
- }
- return c.Rand
-}
-
-func (c *Config) Hash() crypto.Hash {
- if c == nil || uint(c.DefaultHash) == 0 {
- return crypto.SHA256
- }
- return c.DefaultHash
-}
-
-func (c *Config) Cipher() CipherFunction {
- if c == nil || uint8(c.DefaultCipher) == 0 {
- return CipherAES128
- }
- return c.DefaultCipher
-}
-
-func (c *Config) Now() time.Time {
- if c == nil || c.Time == nil {
- return time.Now().Truncate(time.Second)
- }
- return c.Time().Truncate(time.Second)
-}
-
-// KeyLifetime returns the validity period of the key.
-func (c *Config) KeyLifetime() uint32 {
- if c == nil {
- return 0
- }
- return c.KeyLifetimeSecs
-}
-
-// SigLifetime returns the validity period of the signature.
-func (c *Config) SigLifetime() uint32 {
- if c == nil {
- return 0
- }
- return c.SigLifetimeSecs
-}
-
-func (c *Config) Compression() CompressionAlgo {
- if c == nil {
- return CompressionNone
- }
- return c.DefaultCompressionAlgo
-}
-
-func (c *Config) RSAModulusBits() int {
- if c == nil || c.RSABits == 0 {
- return 2048
- }
- return c.RSABits
-}
-
-func (c *Config) PublicKeyAlgorithm() PublicKeyAlgorithm {
- if c == nil || c.Algorithm == 0 {
- return PubKeyAlgoRSA
- }
- return c.Algorithm
-}
-
-func (c *Config) CurveName() Curve {
- if c == nil || c.Curve == "" {
- return Curve25519
- }
- return c.Curve
-}
-
-// Deprecated: The hash iterations should now be queried via the S2K() method.
-func (c *Config) PasswordHashIterations() int {
- if c == nil || c.S2KCount == 0 {
- return 0
- }
- return c.S2KCount
-}
-
-func (c *Config) S2K() *s2k.Config {
- if c == nil {
- return nil
- }
- // for backwards compatibility
- if c.S2KCount > 0 && c.S2KConfig == nil {
- return &s2k.Config{
- S2KCount: c.S2KCount,
- }
- }
- return c.S2KConfig
-}
-
-func (c *Config) AEAD() *AEADConfig {
- if c == nil {
- return nil
- }
- return c.AEADConfig
-}
-
-func (c *Config) SigningKey() uint64 {
- if c == nil {
- return 0
- }
- return c.SigningKeyId
-}
-
-func (c *Config) SigningUserId() string {
- if c == nil {
- return ""
- }
- return c.SigningIdentity
-}
-
-func (c *Config) AllowUnauthenticatedMessages() bool {
- if c == nil {
- return false
- }
- return c.InsecureAllowUnauthenticatedMessages
-}
-
-func (c *Config) AllowDecryptionWithSigningKeys() bool {
- if c == nil {
- return false
- }
- return c.InsecureAllowDecryptionWithSigningKeys
-}
-
-func (c *Config) KnownNotation(notationName string) bool {
- if c == nil {
- return false
- }
- return c.KnownNotations[notationName]
-}
-
-func (c *Config) Notations() []*Notation {
- if c == nil {
- return nil
- }
- return c.SignatureNotations
-}
-
-func (c *Config) V6() bool {
- if c == nil {
- return false
- }
- return c.V6Keys
-}
-
-func (c *Config) IntendedRecipients() bool {
- if c == nil || c.CheckIntendedRecipients == nil {
- return true
- }
- return *c.CheckIntendedRecipients
-}
-
-func (c *Config) RetrieveSessionKey() bool {
- if c == nil {
- return false
- }
- return c.CacheSessionKey
-}
-
-func (c *Config) MinimumRSABits() uint16 {
- if c == nil || c.MinRSABits == 0 {
- return 2047
- }
- return c.MinRSABits
-}
-
-func (c *Config) RejectPublicKeyAlgorithm(alg PublicKeyAlgorithm) bool {
- var rejectedAlgorithms map[PublicKeyAlgorithm]bool
- if c == nil || c.RejectPublicKeyAlgorithms == nil {
- // Default
- rejectedAlgorithms = defaultRejectPublicKeyAlgorithms
- } else {
- rejectedAlgorithms = c.RejectPublicKeyAlgorithms
- }
- return rejectedAlgorithms[alg]
-}
-
-func (c *Config) RejectHashAlgorithm(hash crypto.Hash) bool {
- var rejectedAlgorithms map[crypto.Hash]bool
- if c == nil || c.RejectHashAlgorithms == nil {
- // Default
- rejectedAlgorithms = defaultRejectHashAlgorithms
- } else {
- rejectedAlgorithms = c.RejectHashAlgorithms
- }
- return rejectedAlgorithms[hash]
-}
-
-func (c *Config) RejectMessageHashAlgorithm(hash crypto.Hash) bool {
- var rejectedAlgorithms map[crypto.Hash]bool
- if c == nil || c.RejectMessageHashAlgorithms == nil {
- // Default
- rejectedAlgorithms = defaultRejectMessageHashAlgorithms
- } else {
- rejectedAlgorithms = c.RejectMessageHashAlgorithms
- }
- return rejectedAlgorithms[hash]
-}
-
-func (c *Config) RejectCurve(curve Curve) bool {
- var rejectedCurve map[Curve]bool
- if c == nil || c.RejectCurves == nil {
- // Default
- rejectedCurve = defaultRejectCurves
- } else {
- rejectedCurve = c.RejectCurves
- }
- return rejectedCurve[curve]
-}
-
-func (c *Config) StrictPacketSequence() bool {
- if c == nil || c.CheckPacketSequence == nil {
- return true
- }
- return *c.CheckPacketSequence
-}
-
-func (c *Config) RandomizeSignaturesViaNotation() bool {
- if c == nil || c.NonDeterministicSignaturesViaNotation == nil {
- return true
- }
- return *c.NonDeterministicSignaturesViaNotation
-}
-
-// BoolPointer is a helper function to set a boolean pointer in the Config.
-// e.g., config.CheckPacketSequence = BoolPointer(true)
-func BoolPointer(value bool) *bool {
- return &value
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go
deleted file mode 100644
index f2415906b9..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go
+++ /dev/null
@@ -1,7 +0,0 @@
-//go:build !v5
-
-package packet
-
-func init() {
- V5Disabled = true
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
deleted file mode 100644
index b90bb28911..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
+++ /dev/null
@@ -1,584 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/rsa"
- "encoding/binary"
- "encoding/hex"
- "io"
- "math/big"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/ecdh"
- "github.com/ProtonMail/go-crypto/openpgp/elgamal"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
- "github.com/ProtonMail/go-crypto/openpgp/x25519"
- "github.com/ProtonMail/go-crypto/openpgp/x448"
-)
-
-// EncryptedKey represents a public-key encrypted session key. See RFC 4880,
-// section 5.1.
-type EncryptedKey struct {
- Version int
- KeyId uint64
- KeyVersion int // v6
- KeyFingerprint []byte // v6
- Algo PublicKeyAlgorithm
- CipherFunc CipherFunction // only valid after a successful Decrypt for a v3 packet
- Key []byte // only valid after a successful Decrypt
-
- encryptedMPI1, encryptedMPI2 encoding.Field
- ephemeralPublicX25519 *x25519.PublicKey // used for x25519
- ephemeralPublicX448 *x448.PublicKey // used for x448
- encryptedSession []byte // used for x25519 and x448
-}
-
-func (e *EncryptedKey) parse(r io.Reader) (err error) {
- var buf [8]byte
- _, err = readFull(r, buf[:versionSize])
- if err != nil {
- return
- }
- e.Version = int(buf[0])
- if e.Version != 3 && e.Version != 6 {
- return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0])))
- }
- if e.Version == 6 {
- //Read a one-octet size of the following two fields.
- if _, err = readFull(r, buf[:1]); err != nil {
- return
- }
- // The size may also be zero, and the key version and
- // fingerprint omitted for an "anonymous recipient"
- if buf[0] != 0 {
- // non-anonymous case
- _, err = readFull(r, buf[:versionSize])
- if err != nil {
- return
- }
- e.KeyVersion = int(buf[0])
- if e.KeyVersion != 4 && e.KeyVersion != 6 {
- return errors.UnsupportedError("unknown public key version " + strconv.Itoa(e.KeyVersion))
- }
- var fingerprint []byte
- if e.KeyVersion == 6 {
- fingerprint = make([]byte, fingerprintSizeV6)
- } else if e.KeyVersion == 4 {
- fingerprint = make([]byte, fingerprintSize)
- }
- _, err = readFull(r, fingerprint)
- if err != nil {
- return
- }
- e.KeyFingerprint = fingerprint
- if e.KeyVersion == 6 {
- e.KeyId = binary.BigEndian.Uint64(e.KeyFingerprint[:keyIdSize])
- } else if e.KeyVersion == 4 {
- e.KeyId = binary.BigEndian.Uint64(e.KeyFingerprint[fingerprintSize-keyIdSize : fingerprintSize])
- }
- }
- } else {
- _, err = readFull(r, buf[:8])
- if err != nil {
- return
- }
- e.KeyId = binary.BigEndian.Uint64(buf[:keyIdSize])
- }
-
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- e.Algo = PublicKeyAlgorithm(buf[0])
- var cipherFunction byte
- switch e.Algo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- e.encryptedMPI1 = new(encoding.MPI)
- if _, err = e.encryptedMPI1.ReadFrom(r); err != nil {
- return
- }
- case PubKeyAlgoElGamal:
- e.encryptedMPI1 = new(encoding.MPI)
- if _, err = e.encryptedMPI1.ReadFrom(r); err != nil {
- return
- }
-
- e.encryptedMPI2 = new(encoding.MPI)
- if _, err = e.encryptedMPI2.ReadFrom(r); err != nil {
- return
- }
- case PubKeyAlgoECDH:
- e.encryptedMPI1 = new(encoding.MPI)
- if _, err = e.encryptedMPI1.ReadFrom(r); err != nil {
- return
- }
-
- e.encryptedMPI2 = new(encoding.OID)
- if _, err = e.encryptedMPI2.ReadFrom(r); err != nil {
- return
- }
- case PubKeyAlgoX25519:
- e.ephemeralPublicX25519, e.encryptedSession, cipherFunction, err = x25519.DecodeFields(r, e.Version == 6)
- if err != nil {
- return
- }
- case PubKeyAlgoX448:
- e.ephemeralPublicX448, e.encryptedSession, cipherFunction, err = x448.DecodeFields(r, e.Version == 6)
- if err != nil {
- return
- }
- }
- if e.Version < 6 {
- switch e.Algo {
- case PubKeyAlgoX25519, PubKeyAlgoX448:
- e.CipherFunc = CipherFunction(cipherFunction)
- // Check for validiy is in the Decrypt method
- }
- }
-
- _, err = consumeAll(r)
- return
-}
-
-// Decrypt decrypts an encrypted session key with the given private key. The
-// private key must have been decrypted first.
-// If config is nil, sensible defaults will be used.
-func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error {
- if e.Version < 6 && e.KeyId != 0 && e.KeyId != priv.KeyId {
- return errors.InvalidArgumentError("cannot decrypt encrypted session key for key id " + strconv.FormatUint(e.KeyId, 16) + " with private key id " + strconv.FormatUint(priv.KeyId, 16))
- }
- if e.Version == 6 && e.KeyVersion != 0 && !bytes.Equal(e.KeyFingerprint, priv.Fingerprint) {
- return errors.InvalidArgumentError("cannot decrypt encrypted session key for key fingerprint " + hex.EncodeToString(e.KeyFingerprint) + " with private key fingerprint " + hex.EncodeToString(priv.Fingerprint))
- }
- if e.Algo != priv.PubKeyAlgo {
- return errors.InvalidArgumentError("cannot decrypt encrypted session key of type " + strconv.Itoa(int(e.Algo)) + " with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo)))
- }
- if priv.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
-
- var err error
- var b []byte
-
- // TODO(agl): use session key decryption routines here to avoid
- // padding oracle attacks.
- switch priv.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- // Supports both *rsa.PrivateKey and crypto.Decrypter
- k := priv.PrivateKey.(crypto.Decrypter)
- b, err = k.Decrypt(config.Random(), padToKeySize(k.Public().(*rsa.PublicKey), e.encryptedMPI1.Bytes()), nil)
- case PubKeyAlgoElGamal:
- c1 := new(big.Int).SetBytes(e.encryptedMPI1.Bytes())
- c2 := new(big.Int).SetBytes(e.encryptedMPI2.Bytes())
- b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2)
- case PubKeyAlgoECDH:
- vsG := e.encryptedMPI1.Bytes()
- m := e.encryptedMPI2.Bytes()
- oid := priv.PublicKey.oid.EncodedBytes()
- fp := priv.PublicKey.Fingerprint[:]
- if priv.PublicKey.Version == 5 {
- // For v5 the, the fingerprint must be restricted to 20 bytes
- fp = fp[:20]
- }
- b, err = ecdh.Decrypt(priv.PrivateKey.(*ecdh.PrivateKey), vsG, m, oid, fp)
- case PubKeyAlgoX25519:
- b, err = x25519.Decrypt(priv.PrivateKey.(*x25519.PrivateKey), e.ephemeralPublicX25519, e.encryptedSession)
- case PubKeyAlgoX448:
- b, err = x448.Decrypt(priv.PrivateKey.(*x448.PrivateKey), e.ephemeralPublicX448, e.encryptedSession)
- default:
- err = errors.InvalidArgumentError("cannot decrypt encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo)))
- }
- if err != nil {
- return err
- }
-
- var key []byte
- switch priv.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal, PubKeyAlgoECDH:
- keyOffset := 0
- if e.Version < 6 {
- e.CipherFunc = CipherFunction(b[0])
- keyOffset = 1
- if !e.CipherFunc.IsSupported() {
- return errors.UnsupportedError("unsupported encryption function")
- }
- }
- key, err = decodeChecksumKey(b[keyOffset:])
- if err != nil {
- return err
- }
- case PubKeyAlgoX25519, PubKeyAlgoX448:
- if e.Version < 6 {
- switch e.CipherFunc {
- case CipherAES128, CipherAES192, CipherAES256:
- break
- default:
- return errors.StructuralError("v3 PKESK mandates AES as cipher function for x25519 and x448")
- }
- }
- key = b[:]
- default:
- return errors.UnsupportedError("unsupported algorithm for decryption")
- }
- e.Key = key
- return nil
-}
-
-// Serialize writes the encrypted key packet, e, to w.
-func (e *EncryptedKey) Serialize(w io.Writer) error {
- var encodedLength int
- switch e.Algo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- encodedLength = int(e.encryptedMPI1.EncodedLength())
- case PubKeyAlgoElGamal:
- encodedLength = int(e.encryptedMPI1.EncodedLength()) + int(e.encryptedMPI2.EncodedLength())
- case PubKeyAlgoECDH:
- encodedLength = int(e.encryptedMPI1.EncodedLength()) + int(e.encryptedMPI2.EncodedLength())
- case PubKeyAlgoX25519:
- encodedLength = x25519.EncodedFieldsLength(e.encryptedSession, e.Version == 6)
- case PubKeyAlgoX448:
- encodedLength = x448.EncodedFieldsLength(e.encryptedSession, e.Version == 6)
- default:
- return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo)))
- }
-
- packetLen := versionSize /* version */ + keyIdSize /* key id */ + algorithmSize /* algo */ + encodedLength
- if e.Version == 6 {
- packetLen = versionSize /* version */ + algorithmSize /* algo */ + encodedLength + keyVersionSize /* key version */
- if e.KeyVersion == 6 {
- packetLen += fingerprintSizeV6
- } else if e.KeyVersion == 4 {
- packetLen += fingerprintSize
- }
- }
-
- err := serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
-
- _, err = w.Write([]byte{byte(e.Version)})
- if err != nil {
- return err
- }
- if e.Version == 6 {
- _, err = w.Write([]byte{byte(e.KeyVersion)})
- if err != nil {
- return err
- }
- // The key version number may also be zero,
- // and the fingerprint omitted
- if e.KeyVersion != 0 {
- _, err = w.Write(e.KeyFingerprint)
- if err != nil {
- return err
- }
- }
- } else {
- // Write KeyID
- err = binary.Write(w, binary.BigEndian, e.KeyId)
- if err != nil {
- return err
- }
- }
- _, err = w.Write([]byte{byte(e.Algo)})
- if err != nil {
- return err
- }
-
- switch e.Algo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- _, err := w.Write(e.encryptedMPI1.EncodedBytes())
- return err
- case PubKeyAlgoElGamal:
- if _, err := w.Write(e.encryptedMPI1.EncodedBytes()); err != nil {
- return err
- }
- _, err := w.Write(e.encryptedMPI2.EncodedBytes())
- return err
- case PubKeyAlgoECDH:
- if _, err := w.Write(e.encryptedMPI1.EncodedBytes()); err != nil {
- return err
- }
- _, err := w.Write(e.encryptedMPI2.EncodedBytes())
- return err
- case PubKeyAlgoX25519:
- err := x25519.EncodeFields(w, e.ephemeralPublicX25519, e.encryptedSession, byte(e.CipherFunc), e.Version == 6)
- return err
- case PubKeyAlgoX448:
- err := x448.EncodeFields(w, e.ephemeralPublicX448, e.encryptedSession, byte(e.CipherFunc), e.Version == 6)
- return err
- default:
- panic("internal error")
- }
-}
-
-// SerializeEncryptedKeyAEAD serializes an encrypted key packet to w that contains
-// key, encrypted to pub.
-// If aeadSupported is set, PKESK v6 is used, otherwise v3.
-// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
-// If config is nil, sensible defaults will be used.
-func SerializeEncryptedKeyAEAD(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, aeadSupported bool, key []byte, config *Config) error {
- return SerializeEncryptedKeyAEADwithHiddenOption(w, pub, cipherFunc, aeadSupported, key, false, config)
-}
-
-// SerializeEncryptedKeyAEADwithHiddenOption serializes an encrypted key packet to w that contains
-// key, encrypted to pub.
-// Offers the hidden flag option to indicated if the PKESK packet should include a wildcard KeyID.
-// If aeadSupported is set, PKESK v6 is used, otherwise v3.
-// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
-// If config is nil, sensible defaults will be used.
-func SerializeEncryptedKeyAEADwithHiddenOption(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, aeadSupported bool, key []byte, hidden bool, config *Config) error {
- var buf [36]byte // max possible header size is v6
- lenHeaderWritten := versionSize
- version := 3
-
- if aeadSupported {
- version = 6
- }
- // An implementation MUST NOT generate ElGamal v6 PKESKs.
- if version == 6 && pub.PubKeyAlgo == PubKeyAlgoElGamal {
- return errors.InvalidArgumentError("ElGamal v6 PKESK are not allowed")
- }
- // In v3 PKESKs, for x25519 and x448, mandate using AES
- if version == 3 && (pub.PubKeyAlgo == PubKeyAlgoX25519 || pub.PubKeyAlgo == PubKeyAlgoX448) {
- switch cipherFunc {
- case CipherAES128, CipherAES192, CipherAES256:
- break
- default:
- return errors.InvalidArgumentError("v3 PKESK mandates AES for x25519 and x448")
- }
- }
-
- buf[0] = byte(version)
-
- // If hidden is set, the key should be hidden
- // An implementation MAY accept or use a Key ID of all zeros,
- // or a key version of zero and no key fingerprint, to hide the intended decryption key.
- // See Section 5.1.8. in the open pgp crypto refresh
- if version == 6 {
- if !hidden {
- // A one-octet size of the following two fields.
- buf[1] = byte(keyVersionSize + len(pub.Fingerprint))
- // A one octet key version number.
- buf[2] = byte(pub.Version)
- lenHeaderWritten += keyVersionSize + 1
- // The fingerprint of the public key
- copy(buf[lenHeaderWritten:lenHeaderWritten+len(pub.Fingerprint)], pub.Fingerprint)
- lenHeaderWritten += len(pub.Fingerprint)
- } else {
- // The size may also be zero, and the key version
- // and fingerprint omitted for an "anonymous recipient"
- buf[1] = 0
- lenHeaderWritten += 1
- }
- } else {
- if !hidden {
- binary.BigEndian.PutUint64(buf[versionSize:(versionSize+keyIdSize)], pub.KeyId)
- }
- lenHeaderWritten += keyIdSize
- }
- buf[lenHeaderWritten] = byte(pub.PubKeyAlgo)
- lenHeaderWritten += algorithmSize
-
- var keyBlock []byte
- switch pub.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal, PubKeyAlgoECDH:
- lenKeyBlock := len(key) + 2
- if version < 6 {
- lenKeyBlock += 1 // cipher type included
- }
- keyBlock = make([]byte, lenKeyBlock)
- keyOffset := 0
- if version < 6 {
- keyBlock[0] = byte(cipherFunc)
- keyOffset = 1
- }
- encodeChecksumKey(keyBlock[keyOffset:], key)
- case PubKeyAlgoX25519, PubKeyAlgoX448:
- // algorithm is added in plaintext below
- keyBlock = key
- }
-
- switch pub.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
- return serializeEncryptedKeyRSA(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*rsa.PublicKey), keyBlock)
- case PubKeyAlgoElGamal:
- return serializeEncryptedKeyElGamal(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*elgamal.PublicKey), keyBlock)
- case PubKeyAlgoECDH:
- return serializeEncryptedKeyECDH(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*ecdh.PublicKey), keyBlock, pub.oid, pub.Fingerprint)
- case PubKeyAlgoX25519:
- return serializeEncryptedKeyX25519(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*x25519.PublicKey), keyBlock, byte(cipherFunc), version)
- case PubKeyAlgoX448:
- return serializeEncryptedKeyX448(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*x448.PublicKey), keyBlock, byte(cipherFunc), version)
- case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly:
- return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo)))
- }
-
- return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo)))
-}
-
-// SerializeEncryptedKey serializes an encrypted key packet to w that contains
-// key, encrypted to pub.
-// PKESKv6 is used if config.AEAD() is not nil.
-// If config is nil, sensible defaults will be used.
-// Deprecated: Use SerializeEncryptedKeyAEAD instead.
-func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error {
- return SerializeEncryptedKeyAEAD(w, pub, cipherFunc, config.AEAD() != nil, key, config)
-}
-
-// SerializeEncryptedKeyWithHiddenOption serializes an encrypted key packet to w that contains
-// key, encrypted to pub. PKESKv6 is used if config.AEAD() is not nil.
-// The hidden option controls if the packet should be anonymous, i.e., omit key metadata.
-// If config is nil, sensible defaults will be used.
-// Deprecated: Use SerializeEncryptedKeyAEADwithHiddenOption instead.
-func SerializeEncryptedKeyWithHiddenOption(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, hidden bool, config *Config) error {
- return SerializeEncryptedKeyAEADwithHiddenOption(w, pub, cipherFunc, config.AEAD() != nil, key, hidden, config)
-}
-
-func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header []byte, pub *rsa.PublicKey, keyBlock []byte) error {
- cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock)
- if err != nil {
- return errors.InvalidArgumentError("RSA encryption failed: " + err.Error())
- }
-
- cipherMPI := encoding.NewMPI(cipherText)
- packetLen := len(header) /* header length */ + int(cipherMPI.EncodedLength())
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- _, err = w.Write(cipherMPI.EncodedBytes())
- return err
-}
-
-func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header []byte, pub *elgamal.PublicKey, keyBlock []byte) error {
- c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock)
- if err != nil {
- return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error())
- }
-
- packetLen := len(header) /* header length */
- packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8
- packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- if _, err = w.Write(new(encoding.MPI).SetBig(c1).EncodedBytes()); err != nil {
- return err
- }
- _, err = w.Write(new(encoding.MPI).SetBig(c2).EncodedBytes())
- return err
-}
-
-func serializeEncryptedKeyECDH(w io.Writer, rand io.Reader, header []byte, pub *ecdh.PublicKey, keyBlock []byte, oid encoding.Field, fingerprint []byte) error {
- vsG, c, err := ecdh.Encrypt(rand, pub, keyBlock, oid.EncodedBytes(), fingerprint)
- if err != nil {
- return errors.InvalidArgumentError("ECDH encryption failed: " + err.Error())
- }
-
- g := encoding.NewMPI(vsG)
- m := encoding.NewOID(c)
-
- packetLen := len(header) /* header length */
- packetLen += int(g.EncodedLength()) + int(m.EncodedLength())
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
-
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- if _, err = w.Write(g.EncodedBytes()); err != nil {
- return err
- }
- _, err = w.Write(m.EncodedBytes())
- return err
-}
-
-func serializeEncryptedKeyX25519(w io.Writer, rand io.Reader, header []byte, pub *x25519.PublicKey, keyBlock []byte, cipherFunc byte, version int) error {
- ephemeralPublicX25519, ciphertext, err := x25519.Encrypt(rand, pub, keyBlock)
- if err != nil {
- return errors.InvalidArgumentError("x25519 encryption failed: " + err.Error())
- }
-
- packetLen := len(header) /* header length */
- packetLen += x25519.EncodedFieldsLength(ciphertext, version == 6)
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
-
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- return x25519.EncodeFields(w, ephemeralPublicX25519, ciphertext, cipherFunc, version == 6)
-}
-
-func serializeEncryptedKeyX448(w io.Writer, rand io.Reader, header []byte, pub *x448.PublicKey, keyBlock []byte, cipherFunc byte, version int) error {
- ephemeralPublicX448, ciphertext, err := x448.Encrypt(rand, pub, keyBlock)
- if err != nil {
- return errors.InvalidArgumentError("x448 encryption failed: " + err.Error())
- }
-
- packetLen := len(header) /* header length */
- packetLen += x448.EncodedFieldsLength(ciphertext, version == 6)
-
- err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
- if err != nil {
- return err
- }
-
- _, err = w.Write(header[:])
- if err != nil {
- return err
- }
- return x448.EncodeFields(w, ephemeralPublicX448, ciphertext, cipherFunc, version == 6)
-}
-
-func checksumKeyMaterial(key []byte) uint16 {
- var checksum uint16
- for _, v := range key {
- checksum += uint16(v)
- }
- return checksum
-}
-
-func decodeChecksumKey(msg []byte) (key []byte, err error) {
- key = msg[:len(msg)-2]
- expectedChecksum := uint16(msg[len(msg)-2])<<8 | uint16(msg[len(msg)-1])
- checksum := checksumKeyMaterial(key)
- if checksum != expectedChecksum {
- err = errors.StructuralError("session key checksum is incorrect")
- }
- return
-}
-
-func encodeChecksumKey(buffer []byte, key []byte) {
- copy(buffer, key)
- checksum := checksumKeyMaterial(key)
- buffer[len(key)] = byte(checksum >> 8)
- buffer[len(key)+1] = byte(checksum)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/literal.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/literal.go
deleted file mode 100644
index 8a028c8a17..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/literal.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "encoding/binary"
- "io"
-)
-
-// LiteralData represents an encrypted file. See RFC 4880, section 5.9.
-type LiteralData struct {
- Format uint8
- IsBinary bool
- FileName string
- Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined.
- Body io.Reader
-}
-
-// ForEyesOnly returns whether the contents of the LiteralData have been marked
-// as especially sensitive.
-func (l *LiteralData) ForEyesOnly() bool {
- return l.FileName == "_CONSOLE"
-}
-
-func (l *LiteralData) parse(r io.Reader) (err error) {
- var buf [256]byte
-
- _, err = readFull(r, buf[:2])
- if err != nil {
- return
- }
-
- l.Format = buf[0]
- l.IsBinary = l.Format == 'b'
- fileNameLen := int(buf[1])
-
- _, err = readFull(r, buf[:fileNameLen])
- if err != nil {
- return
- }
-
- l.FileName = string(buf[:fileNameLen])
-
- _, err = readFull(r, buf[:4])
- if err != nil {
- return
- }
-
- l.Time = binary.BigEndian.Uint32(buf[:4])
- l.Body = r
- return
-}
-
-// SerializeLiteral serializes a literal data packet to w and returns a
-// WriteCloser to which the data itself can be written and which MUST be closed
-// on completion. The fileName is truncated to 255 bytes.
-func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) {
- var buf [4]byte
- buf[0] = 'b'
- if !isBinary {
- buf[0] = 'u'
- }
- if len(fileName) > 255 {
- fileName = fileName[:255]
- }
- buf[1] = byte(len(fileName))
-
- inner, err := serializeStreamHeader(w, packetTypeLiteralData)
- if err != nil {
- return
- }
-
- _, err = inner.Write(buf[:2])
- if err != nil {
- return
- }
- _, err = inner.Write([]byte(fileName))
- if err != nil {
- return
- }
- binary.BigEndian.PutUint32(buf[:], time)
- _, err = inner.Write(buf[:])
- if err != nil {
- return
- }
-
- plaintext = inner
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/marker.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/marker.go
deleted file mode 100644
index 1ee378ba3c..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/marker.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package packet
-
-import (
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-type Marker struct{}
-
-const markerString = "PGP"
-
-// parse just checks if the packet contains "PGP".
-func (m *Marker) parse(reader io.Reader) error {
- var buffer [3]byte
- if _, err := io.ReadFull(reader, buffer[:]); err != nil {
- return err
- }
- if string(buffer[:]) != markerString {
- return errors.StructuralError("invalid marker packet")
- }
- return nil
-}
-
-// SerializeMarker writes a marker packet to writer.
-func SerializeMarker(writer io.Writer) error {
- err := serializeHeader(writer, packetTypeMarker, len(markerString))
- if err != nil {
- return err
- }
- _, err = writer.Write([]byte(markerString))
- return err
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go
deleted file mode 100644
index 2c3e3f50b2..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package packet
-
-// Notation type represents a Notation Data subpacket
-// see https://tools.ietf.org/html/rfc4880#section-5.2.3.16
-type Notation struct {
- Name string
- Value []byte
- IsCritical bool
- IsHumanReadable bool
-}
-
-func (notation *Notation) getData() []byte {
- nameData := []byte(notation.Name)
- nameLen := len(nameData)
- valueLen := len(notation.Value)
-
- data := make([]byte, 8+nameLen+valueLen)
- if notation.IsHumanReadable {
- data[0] = 0x80
- }
-
- data[4] = byte(nameLen >> 8)
- data[5] = byte(nameLen)
- data[6] = byte(valueLen >> 8)
- data[7] = byte(valueLen)
- copy(data[8:8+nameLen], nameData)
- copy(data[8+nameLen:], notation.Value)
- return data
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/ocfb.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/ocfb.go
deleted file mode 100644
index 4f26d0a00b..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/ocfb.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9
-
-package packet
-
-import (
- "crypto/cipher"
-)
-
-type ocfbEncrypter struct {
- b cipher.Block
- fre []byte
- outUsed int
-}
-
-// An OCFBResyncOption determines if the "resynchronization step" of OCFB is
-// performed.
-type OCFBResyncOption bool
-
-const (
- OCFBResync OCFBResyncOption = true
- OCFBNoResync OCFBResyncOption = false
-)
-
-// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's
-// cipher feedback mode using the given cipher.Block, and an initial amount of
-// ciphertext. randData must be random bytes and be the same length as the
-// cipher.Block's block size. Resync determines if the "resynchronization step"
-// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on
-// this point.
-func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) {
- blockSize := block.BlockSize()
- if len(randData) != blockSize {
- return nil, nil
- }
-
- x := &ocfbEncrypter{
- b: block,
- fre: make([]byte, blockSize),
- outUsed: 0,
- }
- prefix := make([]byte, blockSize+2)
-
- block.Encrypt(x.fre, x.fre)
- for i := 0; i < blockSize; i++ {
- prefix[i] = randData[i] ^ x.fre[i]
- }
-
- block.Encrypt(x.fre, prefix[:blockSize])
- prefix[blockSize] = x.fre[0] ^ randData[blockSize-2]
- prefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1]
-
- if resync {
- block.Encrypt(x.fre, prefix[2:])
- } else {
- x.fre[0] = prefix[blockSize]
- x.fre[1] = prefix[blockSize+1]
- x.outUsed = 2
- }
- return x, prefix
-}
-
-func (x *ocfbEncrypter) XORKeyStream(dst, src []byte) {
- for i := 0; i < len(src); i++ {
- if x.outUsed == len(x.fre) {
- x.b.Encrypt(x.fre, x.fre)
- x.outUsed = 0
- }
-
- x.fre[x.outUsed] ^= src[i]
- dst[i] = x.fre[x.outUsed]
- x.outUsed++
- }
-}
-
-type ocfbDecrypter struct {
- b cipher.Block
- fre []byte
- outUsed int
-}
-
-// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's
-// cipher feedback mode using the given cipher.Block. Prefix must be the first
-// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's
-// block size. On successful exit, blockSize+2 bytes of decrypted data are written into
-// prefix. Resync determines if the "resynchronization step" from RFC 4880,
-// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point.
-func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream {
- blockSize := block.BlockSize()
- if len(prefix) != blockSize+2 {
- return nil
- }
-
- x := &ocfbDecrypter{
- b: block,
- fre: make([]byte, blockSize),
- outUsed: 0,
- }
- prefixCopy := make([]byte, len(prefix))
- copy(prefixCopy, prefix)
-
- block.Encrypt(x.fre, x.fre)
- for i := 0; i < blockSize; i++ {
- prefixCopy[i] ^= x.fre[i]
- }
-
- block.Encrypt(x.fre, prefix[:blockSize])
- prefixCopy[blockSize] ^= x.fre[0]
- prefixCopy[blockSize+1] ^= x.fre[1]
-
- if resync {
- block.Encrypt(x.fre, prefix[2:])
- } else {
- x.fre[0] = prefix[blockSize]
- x.fre[1] = prefix[blockSize+1]
- x.outUsed = 2
- }
- copy(prefix, prefixCopy)
- return x
-}
-
-func (x *ocfbDecrypter) XORKeyStream(dst, src []byte) {
- for i := 0; i < len(src); i++ {
- if x.outUsed == len(x.fre) {
- x.b.Encrypt(x.fre, x.fre)
- x.outUsed = 0
- }
-
- c := src[i]
- dst[i] = x.fre[x.outUsed] ^ src[i]
- x.fre[x.outUsed] = c
- x.outUsed++
- }
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/one_pass_signature.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/one_pass_signature.go
deleted file mode 100644
index f393c4063b..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/one_pass_signature.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "crypto"
- "encoding/binary"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
-)
-
-// OnePassSignature represents a one-pass signature packet. See RFC 4880,
-// section 5.4.
-type OnePassSignature struct {
- Version int
- SigType SignatureType
- Hash crypto.Hash
- PubKeyAlgo PublicKeyAlgorithm
- KeyId uint64
- IsLast bool
- Salt []byte // v6 only
- KeyFingerprint []byte // v6 only
-}
-
-func (ops *OnePassSignature) parse(r io.Reader) (err error) {
- var buf [8]byte
- // Read: version | signature type | hash algorithm | public-key algorithm
- _, err = readFull(r, buf[:4])
- if err != nil {
- return
- }
- if buf[0] != 3 && buf[0] != 6 {
- return errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0])))
- }
- ops.Version = int(buf[0])
-
- var ok bool
- ops.Hash, ok = algorithm.HashIdToHashWithSha1(buf[2])
- if !ok {
- return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2])))
- }
-
- ops.SigType = SignatureType(buf[1])
- ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3])
-
- if ops.Version == 6 {
- // Only for v6, a variable-length field containing the salt
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- saltLength := int(buf[0])
- var expectedSaltLength int
- expectedSaltLength, err = SaltLengthForHash(ops.Hash)
- if err != nil {
- return
- }
- if saltLength != expectedSaltLength {
- err = errors.StructuralError("unexpected salt size for the given hash algorithm")
- return
- }
- salt := make([]byte, expectedSaltLength)
- _, err = readFull(r, salt)
- if err != nil {
- return
- }
- ops.Salt = salt
-
- // Only for v6 packets, 32 octets of the fingerprint of the signing key.
- fingerprint := make([]byte, 32)
- _, err = readFull(r, fingerprint)
- if err != nil {
- return
- }
- ops.KeyFingerprint = fingerprint
- ops.KeyId = binary.BigEndian.Uint64(ops.KeyFingerprint[:8])
- } else {
- _, err = readFull(r, buf[:8])
- if err != nil {
- return
- }
- ops.KeyId = binary.BigEndian.Uint64(buf[:8])
- }
-
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- ops.IsLast = buf[0] != 0
- return
-}
-
-// Serialize marshals the given OnePassSignature to w.
-func (ops *OnePassSignature) Serialize(w io.Writer) error {
- //v3 length 1+1+1+1+8+1 =
- packetLength := 13
- if ops.Version == 6 {
- // v6 length 1+1+1+1+1+len(salt)+32+1 =
- packetLength = 38 + len(ops.Salt)
- }
-
- if err := serializeHeader(w, packetTypeOnePassSignature, packetLength); err != nil {
- return err
- }
-
- var buf [8]byte
- buf[0] = byte(ops.Version)
- buf[1] = uint8(ops.SigType)
- var ok bool
- buf[2], ok = algorithm.HashToHashIdWithSha1(ops.Hash)
- if !ok {
- return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash)))
- }
- buf[3] = uint8(ops.PubKeyAlgo)
-
- _, err := w.Write(buf[:4])
- if err != nil {
- return err
- }
-
- if ops.Version == 6 {
- // write salt for v6 signatures
- _, err := w.Write([]byte{uint8(len(ops.Salt))})
- if err != nil {
- return err
- }
- _, err = w.Write(ops.Salt)
- if err != nil {
- return err
- }
-
- // write fingerprint v6 signatures
- _, err = w.Write(ops.KeyFingerprint)
- if err != nil {
- return err
- }
- } else {
- binary.BigEndian.PutUint64(buf[:8], ops.KeyId)
- _, err := w.Write(buf[:8])
- if err != nil {
- return err
- }
- }
-
- isLast := []byte{byte(0)}
- if ops.IsLast {
- isLast[0] = 1
- }
-
- _, err = w.Write(isLast)
- return err
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/opaque.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/opaque.go
deleted file mode 100644
index cef7c661d3..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/opaque.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "bytes"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is
-// useful for splitting and storing the original packet contents separately,
-// handling unsupported packet types or accessing parts of the packet not yet
-// implemented by this package.
-type OpaquePacket struct {
- // Packet type
- Tag uint8
- // Reason why the packet was parsed opaquely
- Reason error
- // Binary contents of the packet data
- Contents []byte
-}
-
-func (op *OpaquePacket) parse(r io.Reader) (err error) {
- op.Contents, err = io.ReadAll(r)
- return
-}
-
-// Serialize marshals the packet to a writer in its original form, including
-// the packet header.
-func (op *OpaquePacket) Serialize(w io.Writer) (err error) {
- err = serializeHeader(w, packetType(op.Tag), len(op.Contents))
- if err == nil {
- _, err = w.Write(op.Contents)
- }
- return
-}
-
-// Parse attempts to parse the opaque contents into a structure supported by
-// this package. If the packet is not known then the result will be another
-// OpaquePacket.
-func (op *OpaquePacket) Parse() (p Packet, err error) {
- hdr := bytes.NewBuffer(nil)
- err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents))
- if err != nil {
- op.Reason = err
- return op, err
- }
- p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents)))
- if err != nil {
- op.Reason = err
- p = op
- }
- return
-}
-
-// OpaqueReader reads OpaquePackets from an io.Reader.
-type OpaqueReader struct {
- r io.Reader
-}
-
-func NewOpaqueReader(r io.Reader) *OpaqueReader {
- return &OpaqueReader{r: r}
-}
-
-// Read the next OpaquePacket.
-func (or *OpaqueReader) Next() (op *OpaquePacket, err error) {
- tag, _, contents, err := readHeader(or.r)
- if err != nil {
- return
- }
- op = &OpaquePacket{Tag: uint8(tag), Reason: err}
- err = op.parse(contents)
- if err != nil {
- consumeAll(contents)
- }
- return
-}
-
-// OpaqueSubpacket represents an unparsed OpenPGP subpacket,
-// as found in signature and user attribute packets.
-type OpaqueSubpacket struct {
- SubType uint8
- EncodedLength []byte // Store the original encoded length for signature verifications.
- Contents []byte
-}
-
-// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from
-// their byte representation.
-func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) {
- var (
- subHeaderLen int
- subPacket *OpaqueSubpacket
- )
- for len(contents) > 0 {
- subHeaderLen, subPacket, err = nextSubpacket(contents)
- if err != nil {
- break
- }
- result = append(result, subPacket)
- contents = contents[subHeaderLen+len(subPacket.Contents):]
- }
- return
-}
-
-func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) {
- // RFC 4880, section 5.2.3.1
- var subLen uint32
- var encodedLength []byte
- if len(contents) < 1 {
- goto Truncated
- }
- subPacket = &OpaqueSubpacket{}
- switch {
- case contents[0] < 192:
- subHeaderLen = 2 // 1 length byte, 1 subtype byte
- if len(contents) < subHeaderLen {
- goto Truncated
- }
- encodedLength = contents[0:1]
- subLen = uint32(contents[0])
- contents = contents[1:]
- case contents[0] < 255:
- subHeaderLen = 3 // 2 length bytes, 1 subtype
- if len(contents) < subHeaderLen {
- goto Truncated
- }
- encodedLength = contents[0:2]
- subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192
- contents = contents[2:]
- default:
- subHeaderLen = 6 // 5 length bytes, 1 subtype
- if len(contents) < subHeaderLen {
- goto Truncated
- }
- encodedLength = contents[0:5]
- subLen = uint32(contents[1])<<24 |
- uint32(contents[2])<<16 |
- uint32(contents[3])<<8 |
- uint32(contents[4])
- contents = contents[5:]
-
- }
- if subLen > uint32(len(contents)) || subLen == 0 {
- goto Truncated
- }
- subPacket.SubType = contents[0]
- subPacket.EncodedLength = encodedLength
- subPacket.Contents = contents[1:subLen]
- return
-Truncated:
- err = errors.StructuralError("subpacket truncated")
- return
-}
-
-func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) {
- buf := make([]byte, 6)
- copy(buf, osp.EncodedLength)
- n := len(osp.EncodedLength)
-
- buf[n] = osp.SubType
- if _, err = w.Write(buf[:n+1]); err != nil {
- return
- }
- _, err = w.Write(osp.Contents)
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
deleted file mode 100644
index 1e92e22c97..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
+++ /dev/null
@@ -1,675 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package packet implements parsing and serialization of OpenPGP packets, as
-// specified in RFC 4880.
-package packet // import "github.com/ProtonMail/go-crypto/openpgp/packet"
-
-import (
- "bytes"
- "crypto/cipher"
- "crypto/rsa"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
-)
-
-// readFull is the same as io.ReadFull except that reading zero bytes returns
-// ErrUnexpectedEOF rather than EOF.
-func readFull(r io.Reader, buf []byte) (n int, err error) {
- n, err = io.ReadFull(r, buf)
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return
-}
-
-// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2.
-func readLength(r io.Reader) (length int64, isPartial bool, err error) {
- var buf [4]byte
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- switch {
- case buf[0] < 192:
- length = int64(buf[0])
- case buf[0] < 224:
- length = int64(buf[0]-192) << 8
- _, err = readFull(r, buf[0:1])
- if err != nil {
- return
- }
- length += int64(buf[0]) + 192
- case buf[0] < 255:
- length = int64(1) << (buf[0] & 0x1f)
- isPartial = true
- default:
- _, err = readFull(r, buf[0:4])
- if err != nil {
- return
- }
- length = int64(buf[0])<<24 |
- int64(buf[1])<<16 |
- int64(buf[2])<<8 |
- int64(buf[3])
- }
- return
-}
-
-// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths.
-// The continuation lengths are parsed and removed from the stream and EOF is
-// returned at the end of the packet. See RFC 4880, section 4.2.2.4.
-type partialLengthReader struct {
- r io.Reader
- remaining int64
- isPartial bool
-}
-
-func (r *partialLengthReader) Read(p []byte) (n int, err error) {
- for r.remaining == 0 {
- if !r.isPartial {
- return 0, io.EOF
- }
- r.remaining, r.isPartial, err = readLength(r.r)
- if err != nil {
- return 0, err
- }
- }
-
- toRead := int64(len(p))
- if toRead > r.remaining {
- toRead = r.remaining
- }
-
- n, err = r.r.Read(p[:int(toRead)])
- r.remaining -= int64(n)
- if n < int(toRead) && err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return
-}
-
-// partialLengthWriter writes a stream of data using OpenPGP partial lengths.
-// See RFC 4880, section 4.2.2.4.
-type partialLengthWriter struct {
- w io.WriteCloser
- buf bytes.Buffer
- lengthByte [1]byte
-}
-
-func (w *partialLengthWriter) Write(p []byte) (n int, err error) {
- bufLen := w.buf.Len()
- if bufLen > 512 {
- for power := uint(30); ; power-- {
- l := 1 << power
- if bufLen >= l {
- w.lengthByte[0] = 224 + uint8(power)
- _, err = w.w.Write(w.lengthByte[:])
- if err != nil {
- return
- }
- var m int
- m, err = w.w.Write(w.buf.Next(l))
- if err != nil {
- return
- }
- if m != l {
- return 0, io.ErrShortWrite
- }
- break
- }
- }
- }
- return w.buf.Write(p)
-}
-
-func (w *partialLengthWriter) Close() (err error) {
- len := w.buf.Len()
- err = serializeLength(w.w, len)
- if err != nil {
- return err
- }
- _, err = w.buf.WriteTo(w.w)
- if err != nil {
- return err
- }
- return w.w.Close()
-}
-
-// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the
-// underlying Reader returns EOF before the limit has been reached.
-type spanReader struct {
- r io.Reader
- n int64
-}
-
-func (l *spanReader) Read(p []byte) (n int, err error) {
- if l.n <= 0 {
- return 0, io.EOF
- }
- if int64(len(p)) > l.n {
- p = p[0:l.n]
- }
- n, err = l.r.Read(p)
- l.n -= int64(n)
- if l.n > 0 && err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- return
-}
-
-// readHeader parses a packet header and returns an io.Reader which will return
-// the contents of the packet. See RFC 4880, section 4.2.
-func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) {
- var buf [4]byte
- _, err = io.ReadFull(r, buf[:1])
- if err != nil {
- return
- }
- if buf[0]&0x80 == 0 {
- err = errors.StructuralError("tag byte does not have MSB set")
- return
- }
- if buf[0]&0x40 == 0 {
- // Old format packet
- tag = packetType((buf[0] & 0x3f) >> 2)
- lengthType := buf[0] & 3
- if lengthType == 3 {
- length = -1
- contents = r
- return
- }
- lengthBytes := 1 << lengthType
- _, err = readFull(r, buf[0:lengthBytes])
- if err != nil {
- return
- }
- for i := 0; i < lengthBytes; i++ {
- length <<= 8
- length |= int64(buf[i])
- }
- contents = &spanReader{r, length}
- return
- }
-
- // New format packet
- tag = packetType(buf[0] & 0x3f)
- length, isPartial, err := readLength(r)
- if err != nil {
- return
- }
- if isPartial {
- contents = &partialLengthReader{
- remaining: length,
- isPartial: true,
- r: r,
- }
- length = -1
- } else {
- contents = &spanReader{r, length}
- }
- return
-}
-
-// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section
-// 4.2.
-func serializeHeader(w io.Writer, ptype packetType, length int) (err error) {
- err = serializeType(w, ptype)
- if err != nil {
- return
- }
- return serializeLength(w, length)
-}
-
-// serializeType writes an OpenPGP packet type to w. See RFC 4880, section
-// 4.2.
-func serializeType(w io.Writer, ptype packetType) (err error) {
- var buf [1]byte
- buf[0] = 0x80 | 0x40 | byte(ptype)
- _, err = w.Write(buf[:])
- return
-}
-
-// serializeLength writes an OpenPGP packet length to w. See RFC 4880, section
-// 4.2.2.
-func serializeLength(w io.Writer, length int) (err error) {
- var buf [5]byte
- var n int
-
- if length < 192 {
- buf[0] = byte(length)
- n = 1
- } else if length < 8384 {
- length -= 192
- buf[0] = 192 + byte(length>>8)
- buf[1] = byte(length)
- n = 2
- } else {
- buf[0] = 255
- buf[1] = byte(length >> 24)
- buf[2] = byte(length >> 16)
- buf[3] = byte(length >> 8)
- buf[4] = byte(length)
- n = 5
- }
-
- _, err = w.Write(buf[:n])
- return
-}
-
-// serializeStreamHeader writes an OpenPGP packet header to w where the
-// length of the packet is unknown. It returns a io.WriteCloser which can be
-// used to write the contents of the packet. See RFC 4880, section 4.2.
-func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) {
- err = serializeType(w, ptype)
- if err != nil {
- return
- }
- out = &partialLengthWriter{w: w}
- return
-}
-
-// Packet represents an OpenPGP packet. Users are expected to try casting
-// instances of this interface to specific packet types.
-type Packet interface {
- parse(io.Reader) error
-}
-
-// consumeAll reads from the given Reader until error, returning the number of
-// bytes read.
-func consumeAll(r io.Reader) (n int64, err error) {
- var m int
- var buf [1024]byte
-
- for {
- m, err = r.Read(buf[:])
- n += int64(m)
- if err == io.EOF {
- err = nil
- return
- }
- if err != nil {
- return
- }
- }
-}
-
-// packetType represents the numeric ids of the different OpenPGP packet types. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2
-type packetType uint8
-
-const (
- packetTypeEncryptedKey packetType = 1
- packetTypeSignature packetType = 2
- packetTypeSymmetricKeyEncrypted packetType = 3
- packetTypeOnePassSignature packetType = 4
- packetTypePrivateKey packetType = 5
- packetTypePublicKey packetType = 6
- packetTypePrivateSubkey packetType = 7
- packetTypeCompressed packetType = 8
- packetTypeSymmetricallyEncrypted packetType = 9
- packetTypeMarker packetType = 10
- packetTypeLiteralData packetType = 11
- packetTypeTrust packetType = 12
- packetTypeUserId packetType = 13
- packetTypePublicSubkey packetType = 14
- packetTypeUserAttribute packetType = 17
- packetTypeSymmetricallyEncryptedIntegrityProtected packetType = 18
- packetTypeAEADEncrypted packetType = 20
- packetPadding packetType = 21
-)
-
-// EncryptedDataPacket holds encrypted data. It is currently implemented by
-// SymmetricallyEncrypted and AEADEncrypted.
-type EncryptedDataPacket interface {
- Decrypt(CipherFunction, []byte) (io.ReadCloser, error)
-}
-
-// Read reads a single OpenPGP packet from the given io.Reader. If there is an
-// error parsing a packet, the whole packet is consumed from the input.
-func Read(r io.Reader) (p Packet, err error) {
- tag, len, contents, err := readHeader(r)
- if err != nil {
- return
- }
-
- switch tag {
- case packetTypeEncryptedKey:
- p = new(EncryptedKey)
- case packetTypeSignature:
- p = new(Signature)
- case packetTypeSymmetricKeyEncrypted:
- p = new(SymmetricKeyEncrypted)
- case packetTypeOnePassSignature:
- p = new(OnePassSignature)
- case packetTypePrivateKey, packetTypePrivateSubkey:
- pk := new(PrivateKey)
- if tag == packetTypePrivateSubkey {
- pk.IsSubkey = true
- }
- p = pk
- case packetTypePublicKey, packetTypePublicSubkey:
- isSubkey := tag == packetTypePublicSubkey
- p = &PublicKey{IsSubkey: isSubkey}
- case packetTypeCompressed:
- p = new(Compressed)
- case packetTypeSymmetricallyEncrypted:
- p = new(SymmetricallyEncrypted)
- case packetTypeLiteralData:
- p = new(LiteralData)
- case packetTypeUserId:
- p = new(UserId)
- case packetTypeUserAttribute:
- p = new(UserAttribute)
- case packetTypeSymmetricallyEncryptedIntegrityProtected:
- se := new(SymmetricallyEncrypted)
- se.IntegrityProtected = true
- p = se
- case packetTypeAEADEncrypted:
- p = new(AEADEncrypted)
- case packetPadding:
- p = Padding(len)
- case packetTypeMarker:
- p = new(Marker)
- case packetTypeTrust:
- // Not implemented, just consume
- err = errors.UnknownPacketTypeError(tag)
- default:
- // Packet Tags from 0 to 39 are critical.
- // Packet Tags from 40 to 63 are non-critical.
- if tag < 40 {
- err = errors.CriticalUnknownPacketTypeError(tag)
- } else {
- err = errors.UnknownPacketTypeError(tag)
- }
- }
- if p != nil {
- err = p.parse(contents)
- }
- if err != nil {
- consumeAll(contents)
- }
- return
-}
-
-// ReadWithCheck reads a single OpenPGP message packet from the given io.Reader. If there is an
-// error parsing a packet, the whole packet is consumed from the input.
-// ReadWithCheck additionally checks if the OpenPGP message packet sequence adheres
-// to the packet composition rules in rfc4880, if not throws an error.
-func ReadWithCheck(r io.Reader, sequence *SequenceVerifier) (p Packet, msgErr error, err error) {
- tag, len, contents, err := readHeader(r)
- if err != nil {
- return
- }
- switch tag {
- case packetTypeEncryptedKey:
- msgErr = sequence.Next(ESKSymbol)
- p = new(EncryptedKey)
- case packetTypeSignature:
- msgErr = sequence.Next(SigSymbol)
- p = new(Signature)
- case packetTypeSymmetricKeyEncrypted:
- msgErr = sequence.Next(ESKSymbol)
- p = new(SymmetricKeyEncrypted)
- case packetTypeOnePassSignature:
- msgErr = sequence.Next(OPSSymbol)
- p = new(OnePassSignature)
- case packetTypeCompressed:
- msgErr = sequence.Next(CompSymbol)
- p = new(Compressed)
- case packetTypeSymmetricallyEncrypted:
- msgErr = sequence.Next(EncSymbol)
- p = new(SymmetricallyEncrypted)
- case packetTypeLiteralData:
- msgErr = sequence.Next(LDSymbol)
- p = new(LiteralData)
- case packetTypeSymmetricallyEncryptedIntegrityProtected:
- msgErr = sequence.Next(EncSymbol)
- se := new(SymmetricallyEncrypted)
- se.IntegrityProtected = true
- p = se
- case packetTypeAEADEncrypted:
- msgErr = sequence.Next(EncSymbol)
- p = new(AEADEncrypted)
- case packetPadding:
- p = Padding(len)
- case packetTypeMarker:
- p = new(Marker)
- case packetTypeTrust:
- // Not implemented, just consume
- err = errors.UnknownPacketTypeError(tag)
- case packetTypePrivateKey,
- packetTypePrivateSubkey,
- packetTypePublicKey,
- packetTypePublicSubkey,
- packetTypeUserId,
- packetTypeUserAttribute:
- msgErr = sequence.Next(UnknownSymbol)
- consumeAll(contents)
- default:
- // Packet Tags from 0 to 39 are critical.
- // Packet Tags from 40 to 63 are non-critical.
- if tag < 40 {
- err = errors.CriticalUnknownPacketTypeError(tag)
- } else {
- err = errors.UnknownPacketTypeError(tag)
- }
- }
- if p != nil {
- err = p.parse(contents)
- }
- if err != nil {
- consumeAll(contents)
- }
- return
-}
-
-// SignatureType represents the different semantic meanings of an OpenPGP
-// signature. See RFC 4880, section 5.2.1.
-type SignatureType uint8
-
-const (
- SigTypeBinary SignatureType = 0x00
- SigTypeText SignatureType = 0x01
- SigTypeGenericCert SignatureType = 0x10
- SigTypePersonaCert SignatureType = 0x11
- SigTypeCasualCert SignatureType = 0x12
- SigTypePositiveCert SignatureType = 0x13
- SigTypeSubkeyBinding SignatureType = 0x18
- SigTypePrimaryKeyBinding SignatureType = 0x19
- SigTypeDirectSignature SignatureType = 0x1F
- SigTypeKeyRevocation SignatureType = 0x20
- SigTypeSubkeyRevocation SignatureType = 0x28
- SigTypeCertificationRevocation SignatureType = 0x30
-)
-
-// PublicKeyAlgorithm represents the different public key system specified for
-// OpenPGP. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12
-type PublicKeyAlgorithm uint8
-
-const (
- PubKeyAlgoRSA PublicKeyAlgorithm = 1
- PubKeyAlgoElGamal PublicKeyAlgorithm = 16
- PubKeyAlgoDSA PublicKeyAlgorithm = 17
- // RFC 6637, Section 5.
- PubKeyAlgoECDH PublicKeyAlgorithm = 18
- PubKeyAlgoECDSA PublicKeyAlgorithm = 19
- // https://www.ietf.org/archive/id/draft-koch-eddsa-for-openpgp-04.txt
- PubKeyAlgoEdDSA PublicKeyAlgorithm = 22
- // https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh
- PubKeyAlgoX25519 PublicKeyAlgorithm = 25
- PubKeyAlgoX448 PublicKeyAlgorithm = 26
- PubKeyAlgoEd25519 PublicKeyAlgorithm = 27
- PubKeyAlgoEd448 PublicKeyAlgorithm = 28
-
- // Deprecated in RFC 4880, Section 13.5. Use key flags instead.
- PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2
- PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3
-)
-
-// CanEncrypt returns true if it's possible to encrypt a message to a public
-// key of the given type.
-func (pka PublicKeyAlgorithm) CanEncrypt() bool {
- switch pka {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal, PubKeyAlgoECDH, PubKeyAlgoX25519, PubKeyAlgoX448:
- return true
- }
- return false
-}
-
-// CanSign returns true if it's possible for a public key of the given type to
-// sign a message.
-func (pka PublicKeyAlgorithm) CanSign() bool {
- switch pka {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA, PubKeyAlgoEdDSA, PubKeyAlgoEd25519, PubKeyAlgoEd448:
- return true
- }
- return false
-}
-
-// CipherFunction represents the different block ciphers specified for OpenPGP. See
-// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13
-type CipherFunction algorithm.CipherFunction
-
-const (
- Cipher3DES CipherFunction = 2
- CipherCAST5 CipherFunction = 3
- CipherAES128 CipherFunction = 7
- CipherAES192 CipherFunction = 8
- CipherAES256 CipherFunction = 9
-)
-
-// KeySize returns the key size, in bytes, of cipher.
-func (cipher CipherFunction) KeySize() int {
- return algorithm.CipherFunction(cipher).KeySize()
-}
-
-// IsSupported returns true if the cipher is supported from the library
-func (cipher CipherFunction) IsSupported() bool {
- return algorithm.CipherFunction(cipher).KeySize() > 0
-}
-
-// blockSize returns the block size, in bytes, of cipher.
-func (cipher CipherFunction) blockSize() int {
- return algorithm.CipherFunction(cipher).BlockSize()
-}
-
-// new returns a fresh instance of the given cipher.
-func (cipher CipherFunction) new(key []byte) (block cipher.Block) {
- return algorithm.CipherFunction(cipher).New(key)
-}
-
-// padToKeySize left-pads a MPI with zeroes to match the length of the
-// specified RSA public.
-func padToKeySize(pub *rsa.PublicKey, b []byte) []byte {
- k := (pub.N.BitLen() + 7) / 8
- if len(b) >= k {
- return b
- }
- bb := make([]byte, k)
- copy(bb[len(bb)-len(b):], b)
- return bb
-}
-
-// CompressionAlgo Represents the different compression algorithms
-// supported by OpenPGP (except for BZIP2, which is not currently
-// supported). See Section 9.3 of RFC 4880.
-type CompressionAlgo uint8
-
-const (
- CompressionNone CompressionAlgo = 0
- CompressionZIP CompressionAlgo = 1
- CompressionZLIB CompressionAlgo = 2
-)
-
-// AEADMode represents the different Authenticated Encryption with Associated
-// Data specified for OpenPGP.
-// See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.6
-type AEADMode algorithm.AEADMode
-
-const (
- AEADModeEAX AEADMode = 1
- AEADModeOCB AEADMode = 2
- AEADModeGCM AEADMode = 3
-)
-
-func (mode AEADMode) IvLength() int {
- return algorithm.AEADMode(mode).NonceLength()
-}
-
-func (mode AEADMode) TagLength() int {
- return algorithm.AEADMode(mode).TagLength()
-}
-
-// IsSupported returns true if the aead mode is supported from the library
-func (mode AEADMode) IsSupported() bool {
- return algorithm.AEADMode(mode).TagLength() > 0
-}
-
-// new returns a fresh instance of the given mode.
-func (mode AEADMode) new(block cipher.Block) cipher.AEAD {
- return algorithm.AEADMode(mode).New(block)
-}
-
-// ReasonForRevocation represents a revocation reason code as per RFC4880
-// section 5.2.3.23.
-type ReasonForRevocation uint8
-
-const (
- NoReason ReasonForRevocation = 0
- KeySuperseded ReasonForRevocation = 1
- KeyCompromised ReasonForRevocation = 2
- KeyRetired ReasonForRevocation = 3
- UserIDNotValid ReasonForRevocation = 32
- Unknown ReasonForRevocation = 200
-)
-
-func NewReasonForRevocation(value byte) ReasonForRevocation {
- if value < 4 || value == 32 {
- return ReasonForRevocation(value)
- }
- return Unknown
-}
-
-// Curve is a mapping to supported ECC curves for key generation.
-// See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-06.html#name-curve-specific-wire-formats
-type Curve string
-
-const (
- Curve25519 Curve = "Curve25519"
- Curve448 Curve = "Curve448"
- CurveNistP256 Curve = "P256"
- CurveNistP384 Curve = "P384"
- CurveNistP521 Curve = "P521"
- CurveSecP256k1 Curve = "SecP256k1"
- CurveBrainpoolP256 Curve = "BrainpoolP256"
- CurveBrainpoolP384 Curve = "BrainpoolP384"
- CurveBrainpoolP512 Curve = "BrainpoolP512"
-)
-
-// TrustLevel represents a trust level per RFC4880 5.2.3.13
-type TrustLevel uint8
-
-// TrustAmount represents a trust amount per RFC4880 5.2.3.13
-type TrustAmount uint8
-
-const (
- // versionSize is the length in bytes of the version value.
- versionSize = 1
- // algorithmSize is the length in bytes of the key algorithm value.
- algorithmSize = 1
- // keyVersionSize is the length in bytes of the key version value
- keyVersionSize = 1
- // keyIdSize is the length in bytes of the key identifier value.
- keyIdSize = 8
- // timestampSize is the length in bytes of encoded timestamps.
- timestampSize = 4
- // fingerprintSizeV6 is the length in bytes of the key fingerprint in v6.
- fingerprintSizeV6 = 32
- // fingerprintSize is the length in bytes of the key fingerprint.
- fingerprintSize = 20
-)
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_sequence.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_sequence.go
deleted file mode 100644
index 55a8a56c2d..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_sequence.go
+++ /dev/null
@@ -1,222 +0,0 @@
-package packet
-
-// This file implements the pushdown automata (PDA) from PGPainless (Paul Schaub)
-// to verify pgp packet sequences. See Paul's blogpost for more details:
-// https://blog.jabberhead.tk/2022/10/26/implementing-packet-sequence-validation-using-pushdown-automata/
-import (
- "fmt"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-func NewErrMalformedMessage(from State, input InputSymbol, stackSymbol StackSymbol) errors.ErrMalformedMessage {
- return errors.ErrMalformedMessage(fmt.Sprintf("state %d, input symbol %d, stack symbol %d ", from, input, stackSymbol))
-}
-
-// InputSymbol defines the input alphabet of the PDA
-type InputSymbol uint8
-
-const (
- LDSymbol InputSymbol = iota
- SigSymbol
- OPSSymbol
- CompSymbol
- ESKSymbol
- EncSymbol
- EOSSymbol
- UnknownSymbol
-)
-
-// StackSymbol defines the stack alphabet of the PDA
-type StackSymbol int8
-
-const (
- MsgStackSymbol StackSymbol = iota
- OpsStackSymbol
- KeyStackSymbol
- EndStackSymbol
- EmptyStackSymbol
-)
-
-// State defines the states of the PDA
-type State int8
-
-const (
- OpenPGPMessage State = iota
- ESKMessage
- LiteralMessage
- CompressedMessage
- EncryptedMessage
- ValidMessage
-)
-
-// transition represents a state transition in the PDA
-type transition func(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error)
-
-// SequenceVerifier is a pushdown automata to verify
-// PGP messages packet sequences according to rfc4880.
-type SequenceVerifier struct {
- stack []StackSymbol
- state State
-}
-
-// Next performs a state transition with the given input symbol.
-// If the transition fails a ErrMalformedMessage is returned.
-func (sv *SequenceVerifier) Next(input InputSymbol) error {
- for {
- stackSymbol := sv.popStack()
- transitionFunc := getTransition(sv.state)
- nextState, newStackSymbols, redo, err := transitionFunc(input, stackSymbol)
- if err != nil {
- return err
- }
- if redo {
- sv.pushStack(stackSymbol)
- }
- for _, newStackSymbol := range newStackSymbols {
- sv.pushStack(newStackSymbol)
- }
- sv.state = nextState
- if !redo {
- break
- }
- }
- return nil
-}
-
-// Valid returns true if RDA is in a valid state.
-func (sv *SequenceVerifier) Valid() bool {
- return sv.state == ValidMessage && len(sv.stack) == 0
-}
-
-func (sv *SequenceVerifier) AssertValid() error {
- if !sv.Valid() {
- return errors.ErrMalformedMessage("invalid message")
- }
- return nil
-}
-
-func NewSequenceVerifier() *SequenceVerifier {
- return &SequenceVerifier{
- stack: []StackSymbol{EndStackSymbol, MsgStackSymbol},
- state: OpenPGPMessage,
- }
-}
-
-func (sv *SequenceVerifier) popStack() StackSymbol {
- if len(sv.stack) == 0 {
- return EmptyStackSymbol
- }
- elemIndex := len(sv.stack) - 1
- stackSymbol := sv.stack[elemIndex]
- sv.stack = sv.stack[:elemIndex]
- return stackSymbol
-}
-
-func (sv *SequenceVerifier) pushStack(stackSymbol StackSymbol) {
- sv.stack = append(sv.stack, stackSymbol)
-}
-
-func getTransition(from State) transition {
- switch from {
- case OpenPGPMessage:
- return fromOpenPGPMessage
- case LiteralMessage:
- return fromLiteralMessage
- case CompressedMessage:
- return fromCompressedMessage
- case EncryptedMessage:
- return fromEncryptedMessage
- case ESKMessage:
- return fromESKMessage
- case ValidMessage:
- return fromValidMessage
- }
- return nil
-}
-
-// fromOpenPGPMessage is the transition for the state OpenPGPMessage.
-func fromOpenPGPMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
- if stackSymbol != MsgStackSymbol {
- return 0, nil, false, NewErrMalformedMessage(OpenPGPMessage, input, stackSymbol)
- }
- switch input {
- case LDSymbol:
- return LiteralMessage, nil, false, nil
- case SigSymbol:
- return OpenPGPMessage, []StackSymbol{MsgStackSymbol}, false, nil
- case OPSSymbol:
- return OpenPGPMessage, []StackSymbol{OpsStackSymbol, MsgStackSymbol}, false, nil
- case CompSymbol:
- return CompressedMessage, nil, false, nil
- case ESKSymbol:
- return ESKMessage, []StackSymbol{KeyStackSymbol}, false, nil
- case EncSymbol:
- return EncryptedMessage, nil, false, nil
- }
- return 0, nil, false, NewErrMalformedMessage(OpenPGPMessage, input, stackSymbol)
-}
-
-// fromESKMessage is the transition for the state ESKMessage.
-func fromESKMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
- if stackSymbol != KeyStackSymbol {
- return 0, nil, false, NewErrMalformedMessage(ESKMessage, input, stackSymbol)
- }
- switch input {
- case ESKSymbol:
- return ESKMessage, []StackSymbol{KeyStackSymbol}, false, nil
- case EncSymbol:
- return EncryptedMessage, nil, false, nil
- }
- return 0, nil, false, NewErrMalformedMessage(ESKMessage, input, stackSymbol)
-}
-
-// fromLiteralMessage is the transition for the state LiteralMessage.
-func fromLiteralMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
- switch input {
- case SigSymbol:
- if stackSymbol == OpsStackSymbol {
- return LiteralMessage, nil, false, nil
- }
- case EOSSymbol:
- if stackSymbol == EndStackSymbol {
- return ValidMessage, nil, false, nil
- }
- }
- return 0, nil, false, NewErrMalformedMessage(LiteralMessage, input, stackSymbol)
-}
-
-// fromLiteralMessage is the transition for the state CompressedMessage.
-func fromCompressedMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
- switch input {
- case SigSymbol:
- if stackSymbol == OpsStackSymbol {
- return CompressedMessage, nil, false, nil
- }
- case EOSSymbol:
- if stackSymbol == EndStackSymbol {
- return ValidMessage, nil, false, nil
- }
- }
- return OpenPGPMessage, []StackSymbol{MsgStackSymbol}, true, nil
-}
-
-// fromEncryptedMessage is the transition for the state EncryptedMessage.
-func fromEncryptedMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
- switch input {
- case SigSymbol:
- if stackSymbol == OpsStackSymbol {
- return EncryptedMessage, nil, false, nil
- }
- case EOSSymbol:
- if stackSymbol == EndStackSymbol {
- return ValidMessage, nil, false, nil
- }
- }
- return OpenPGPMessage, []StackSymbol{MsgStackSymbol}, true, nil
-}
-
-// fromValidMessage is the transition for the state ValidMessage.
-func fromValidMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
- return 0, nil, false, NewErrMalformedMessage(ValidMessage, input, stackSymbol)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_unsupported.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_unsupported.go
deleted file mode 100644
index 2d714723cf..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_unsupported.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package packet
-
-import (
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// UnsupportedPackage represents a OpenPGP packet with a known packet type
-// but with unsupported content.
-type UnsupportedPacket struct {
- IncompletePacket Packet
- Error errors.UnsupportedError
-}
-
-// Implements the Packet interface
-func (up *UnsupportedPacket) parse(read io.Reader) error {
- err := up.IncompletePacket.parse(read)
- if castedErr, ok := err.(errors.UnsupportedError); ok {
- up.Error = castedErr
- return nil
- }
- return err
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
deleted file mode 100644
index 3b6a7045d1..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package packet
-
-import (
- "io"
-)
-
-// Padding type represents a Padding Packet (Tag 21).
-// The padding type is represented by the length of its padding.
-// see https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#name-padding-packet-tag-21
-type Padding int
-
-// parse just ignores the padding content.
-func (pad Padding) parse(reader io.Reader) error {
- _, err := io.CopyN(io.Discard, reader, int64(pad))
- return err
-}
-
-// SerializePadding writes the padding to writer.
-func (pad Padding) SerializePadding(writer io.Writer, rand io.Reader) error {
- err := serializeHeader(writer, packetPadding, int(pad))
- if err != nil {
- return err
- }
- _, err = io.CopyN(writer, rand, int64(pad))
- return err
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
deleted file mode 100644
index f04e6c6b87..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
+++ /dev/null
@@ -1,1191 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/cipher"
- "crypto/dsa"
- "crypto/rsa"
- "crypto/sha1"
- "crypto/sha256"
- "crypto/subtle"
- "fmt"
- "io"
- "math/big"
- "strconv"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/ecdh"
- "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
- "github.com/ProtonMail/go-crypto/openpgp/ed25519"
- "github.com/ProtonMail/go-crypto/openpgp/ed448"
- "github.com/ProtonMail/go-crypto/openpgp/eddsa"
- "github.com/ProtonMail/go-crypto/openpgp/elgamal"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
- "github.com/ProtonMail/go-crypto/openpgp/s2k"
- "github.com/ProtonMail/go-crypto/openpgp/x25519"
- "github.com/ProtonMail/go-crypto/openpgp/x448"
- "golang.org/x/crypto/hkdf"
-)
-
-// PrivateKey represents a possibly encrypted private key. See RFC 4880,
-// section 5.5.3.
-type PrivateKey struct {
- PublicKey
- Encrypted bool // if true then the private key is unavailable until Decrypt has been called.
- encryptedData []byte
- cipher CipherFunction
- s2k func(out, in []byte)
- aead AEADMode // only relevant if S2KAEAD is enabled
- // An *{rsa|dsa|elgamal|ecdh|ecdsa|ed25519|ed448}.PrivateKey or
- // crypto.Signer/crypto.Decrypter (Decryptor RSA only).
- PrivateKey interface{}
- iv []byte
-
- // Type of encryption of the S2K packet
- // Allowed values are 0 (Not encrypted), 253 (AEAD), 254 (SHA1), or
- // 255 (2-byte checksum)
- s2kType S2KType
- // Full parameters of the S2K packet
- s2kParams *s2k.Params
-}
-
-// S2KType s2k packet type
-type S2KType uint8
-
-const (
- // S2KNON unencrypt
- S2KNON S2KType = 0
- // S2KAEAD use authenticated encryption
- S2KAEAD S2KType = 253
- // S2KSHA1 sha1 sum check
- S2KSHA1 S2KType = 254
- // S2KCHECKSUM sum check
- S2KCHECKSUM S2KType = 255
-)
-
-func NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewEdDSAPrivateKey(creationTime time.Time, priv *eddsa.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewEdDSAPublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewECDHPrivateKey(creationTime time.Time, priv *ecdh.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewECDHPublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewX25519PrivateKey(creationTime time.Time, priv *x25519.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewX25519PublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewX448PrivateKey(creationTime time.Time, priv *x448.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewX448PublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewEd25519PrivateKey(creationTime time.Time, priv *ed25519.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewEd25519PublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-func NewEd448PrivateKey(creationTime time.Time, priv *ed448.PrivateKey) *PrivateKey {
- pk := new(PrivateKey)
- pk.PublicKey = *NewEd448PublicKey(creationTime, &priv.PublicKey)
- pk.PrivateKey = priv
- return pk
-}
-
-// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that
-// implements RSA, ECDSA or EdDSA.
-func NewSignerPrivateKey(creationTime time.Time, signer interface{}) *PrivateKey {
- pk := new(PrivateKey)
- // In general, the public Keys should be used as pointers. We still
- // type-switch on the values, for backwards-compatibility.
- switch pubkey := signer.(type) {
- case *rsa.PrivateKey:
- pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey.PublicKey)
- case rsa.PrivateKey:
- pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey.PublicKey)
- case *ecdsa.PrivateKey:
- pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey.PublicKey)
- case ecdsa.PrivateKey:
- pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey.PublicKey)
- case *eddsa.PrivateKey:
- pk.PublicKey = *NewEdDSAPublicKey(creationTime, &pubkey.PublicKey)
- case eddsa.PrivateKey:
- pk.PublicKey = *NewEdDSAPublicKey(creationTime, &pubkey.PublicKey)
- case *ed25519.PrivateKey:
- pk.PublicKey = *NewEd25519PublicKey(creationTime, &pubkey.PublicKey)
- case ed25519.PrivateKey:
- pk.PublicKey = *NewEd25519PublicKey(creationTime, &pubkey.PublicKey)
- case *ed448.PrivateKey:
- pk.PublicKey = *NewEd448PublicKey(creationTime, &pubkey.PublicKey)
- case ed448.PrivateKey:
- pk.PublicKey = *NewEd448PublicKey(creationTime, &pubkey.PublicKey)
- default:
- panic("openpgp: unknown signer type in NewSignerPrivateKey")
- }
- pk.PrivateKey = signer
- return pk
-}
-
-// NewDecrypterPrivateKey creates a PrivateKey from a *{rsa|elgamal|ecdh|x25519|x448}.PrivateKey.
-func NewDecrypterPrivateKey(creationTime time.Time, decrypter interface{}) *PrivateKey {
- pk := new(PrivateKey)
- switch priv := decrypter.(type) {
- case *rsa.PrivateKey:
- pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey)
- case *elgamal.PrivateKey:
- pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey)
- case *ecdh.PrivateKey:
- pk.PublicKey = *NewECDHPublicKey(creationTime, &priv.PublicKey)
- case *x25519.PrivateKey:
- pk.PublicKey = *NewX25519PublicKey(creationTime, &priv.PublicKey)
- case *x448.PrivateKey:
- pk.PublicKey = *NewX448PublicKey(creationTime, &priv.PublicKey)
- default:
- panic("openpgp: unknown decrypter type in NewDecrypterPrivateKey")
- }
- pk.PrivateKey = decrypter
- return pk
-}
-
-func (pk *PrivateKey) parse(r io.Reader) (err error) {
- err = (&pk.PublicKey).parse(r)
- if err != nil {
- return
- }
- v5 := pk.PublicKey.Version == 5
- v6 := pk.PublicKey.Version == 6
-
- if V5Disabled && v5 {
- return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
- }
-
- var buf [1]byte
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- pk.s2kType = S2KType(buf[0])
- var optCount [1]byte
- if v5 || (v6 && pk.s2kType != S2KNON) {
- if _, err = readFull(r, optCount[:]); err != nil {
- return
- }
- }
-
- switch pk.s2kType {
- case S2KNON:
- pk.s2k = nil
- pk.Encrypted = false
- case S2KSHA1, S2KCHECKSUM, S2KAEAD:
- if (v5 || v6) && pk.s2kType == S2KCHECKSUM {
- return errors.StructuralError(fmt.Sprintf("wrong s2k identifier for version %d", pk.Version))
- }
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- pk.cipher = CipherFunction(buf[0])
- if pk.cipher != 0 && !pk.cipher.IsSupported() {
- return errors.UnsupportedError("unsupported cipher function in private key")
- }
- // [Optional] If string-to-key usage octet was 253,
- // a one-octet AEAD algorithm.
- if pk.s2kType == S2KAEAD {
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- pk.aead = AEADMode(buf[0])
- if !pk.aead.IsSupported() {
- return errors.UnsupportedError("unsupported aead mode in private key")
- }
- }
-
- // [Optional] Only for a version 6 packet,
- // and if string-to-key usage octet was 255, 254, or 253,
- // an one-octet count of the following field.
- if v6 {
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
- }
-
- pk.s2kParams, err = s2k.ParseIntoParams(r)
- if err != nil {
- return
- }
- if pk.s2kParams.Dummy() {
- return
- }
- if pk.s2kParams.Mode() == s2k.Argon2S2K && pk.s2kType != S2KAEAD {
- return errors.StructuralError("using Argon2 S2K without AEAD is not allowed")
- }
- if pk.s2kParams.Mode() == s2k.SimpleS2K && pk.Version == 6 {
- return errors.StructuralError("using Simple S2K with version 6 keys is not allowed")
- }
- pk.s2k, err = pk.s2kParams.Function()
- if err != nil {
- return
- }
- pk.Encrypted = true
- default:
- return errors.UnsupportedError("deprecated s2k function in private key")
- }
-
- if pk.Encrypted {
- var ivSize int
- // If the S2K usage octet was 253, the IV is of the size expected by the AEAD mode,
- // unless it's a version 5 key, in which case it's the size of the symmetric cipher's block size.
- // For all other S2K modes, it's always the block size.
- if !v5 && pk.s2kType == S2KAEAD {
- ivSize = pk.aead.IvLength()
- } else {
- ivSize = pk.cipher.blockSize()
- }
-
- if ivSize == 0 {
- return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher)))
- }
- pk.iv = make([]byte, ivSize)
- _, err = readFull(r, pk.iv)
- if err != nil {
- return
- }
- if v5 && pk.s2kType == S2KAEAD {
- pk.iv = pk.iv[:pk.aead.IvLength()]
- }
- }
-
- var privateKeyData []byte
- if v5 {
- var n [4]byte /* secret material four octet count */
- _, err = readFull(r, n[:])
- if err != nil {
- return
- }
- count := uint32(uint32(n[0])<<24 | uint32(n[1])<<16 | uint32(n[2])<<8 | uint32(n[3]))
- if !pk.Encrypted {
- count = count + 2 /* two octet checksum */
- }
- privateKeyData = make([]byte, count)
- _, err = readFull(r, privateKeyData)
- if err != nil {
- return
- }
- } else {
- privateKeyData, err = io.ReadAll(r)
- if err != nil {
- return
- }
- }
- if !pk.Encrypted {
- if len(privateKeyData) < 2 {
- return errors.StructuralError("truncated private key data")
- }
- if pk.Version != 6 {
- // checksum
- var sum uint16
- for i := 0; i < len(privateKeyData)-2; i++ {
- sum += uint16(privateKeyData[i])
- }
- if privateKeyData[len(privateKeyData)-2] != uint8(sum>>8) ||
- privateKeyData[len(privateKeyData)-1] != uint8(sum) {
- return errors.StructuralError("private key checksum failure")
- }
- privateKeyData = privateKeyData[:len(privateKeyData)-2]
- return pk.parsePrivateKey(privateKeyData)
- } else {
- // No checksum
- return pk.parsePrivateKey(privateKeyData)
- }
- }
-
- pk.encryptedData = privateKeyData
- return
-}
-
-// Dummy returns true if the private key is a dummy key. This is a GNU extension.
-func (pk *PrivateKey) Dummy() bool {
- return pk.s2kParams.Dummy()
-}
-
-func mod64kHash(d []byte) uint16 {
- var h uint16
- for _, b := range d {
- h += uint16(b)
- }
- return h
-}
-
-func (pk *PrivateKey) Serialize(w io.Writer) (err error) {
- contents := bytes.NewBuffer(nil)
- err = pk.PublicKey.serializeWithoutHeaders(contents)
- if err != nil {
- return
- }
- if _, err = contents.Write([]byte{uint8(pk.s2kType)}); err != nil {
- return
- }
-
- optional := bytes.NewBuffer(nil)
- if pk.Encrypted || pk.Dummy() {
- // [Optional] If string-to-key usage octet was 255, 254, or 253,
- // a one-octet symmetric encryption algorithm.
- if _, err = optional.Write([]byte{uint8(pk.cipher)}); err != nil {
- return
- }
- // [Optional] If string-to-key usage octet was 253,
- // a one-octet AEAD algorithm.
- if pk.s2kType == S2KAEAD {
- if _, err = optional.Write([]byte{uint8(pk.aead)}); err != nil {
- return
- }
- }
-
- s2kBuffer := bytes.NewBuffer(nil)
- if err := pk.s2kParams.Serialize(s2kBuffer); err != nil {
- return err
- }
- // [Optional] Only for a version 6 packet, and if string-to-key
- // usage octet was 255, 254, or 253, an one-octet
- // count of the following field.
- if pk.Version == 6 {
- if _, err = optional.Write([]byte{uint8(s2kBuffer.Len())}); err != nil {
- return
- }
- }
- // [Optional] If string-to-key usage octet was 255, 254, or 253,
- // a string-to-key (S2K) specifier. The length of the string-to-key specifier
- // depends on its type
- if _, err = io.Copy(optional, s2kBuffer); err != nil {
- return
- }
-
- // IV
- if pk.Encrypted {
- if _, err = optional.Write(pk.iv); err != nil {
- return
- }
- if pk.Version == 5 && pk.s2kType == S2KAEAD {
- // Add padding for version 5
- padding := make([]byte, pk.cipher.blockSize()-len(pk.iv))
- if _, err = optional.Write(padding); err != nil {
- return
- }
- }
- }
- }
- if pk.Version == 5 || (pk.Version == 6 && pk.s2kType != S2KNON) {
- contents.Write([]byte{uint8(optional.Len())})
- }
-
- if _, err := io.Copy(contents, optional); err != nil {
- return err
- }
-
- if !pk.Dummy() {
- l := 0
- var priv []byte
- if !pk.Encrypted {
- buf := bytes.NewBuffer(nil)
- err = pk.serializePrivateKey(buf)
- if err != nil {
- return err
- }
- l = buf.Len()
- if pk.Version != 6 {
- checksum := mod64kHash(buf.Bytes())
- buf.Write([]byte{byte(checksum >> 8), byte(checksum)})
- }
- priv = buf.Bytes()
- } else {
- priv, l = pk.encryptedData, len(pk.encryptedData)
- }
-
- if pk.Version == 5 {
- contents.Write([]byte{byte(l >> 24), byte(l >> 16), byte(l >> 8), byte(l)})
- }
- contents.Write(priv)
- }
-
- ptype := packetTypePrivateKey
- if pk.IsSubkey {
- ptype = packetTypePrivateSubkey
- }
- err = serializeHeader(w, ptype, contents.Len())
- if err != nil {
- return
- }
- _, err = io.Copy(w, contents)
- if err != nil {
- return
- }
- return
-}
-
-func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error {
- if _, err := w.Write(new(encoding.MPI).SetBig(priv.D).EncodedBytes()); err != nil {
- return err
- }
- if _, err := w.Write(new(encoding.MPI).SetBig(priv.Primes[1]).EncodedBytes()); err != nil {
- return err
- }
- if _, err := w.Write(new(encoding.MPI).SetBig(priv.Primes[0]).EncodedBytes()); err != nil {
- return err
- }
- _, err := w.Write(new(encoding.MPI).SetBig(priv.Precomputed.Qinv).EncodedBytes())
- return err
-}
-
-func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error {
- _, err := w.Write(new(encoding.MPI).SetBig(priv.X).EncodedBytes())
- return err
-}
-
-func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error {
- _, err := w.Write(new(encoding.MPI).SetBig(priv.X).EncodedBytes())
- return err
-}
-
-func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error {
- _, err := w.Write(encoding.NewMPI(priv.MarshalIntegerSecret()).EncodedBytes())
- return err
-}
-
-func serializeEdDSAPrivateKey(w io.Writer, priv *eddsa.PrivateKey) error {
- _, err := w.Write(encoding.NewMPI(priv.MarshalByteSecret()).EncodedBytes())
- return err
-}
-
-func serializeECDHPrivateKey(w io.Writer, priv *ecdh.PrivateKey) error {
- _, err := w.Write(encoding.NewMPI(priv.MarshalByteSecret()).EncodedBytes())
- return err
-}
-
-func serializeX25519PrivateKey(w io.Writer, priv *x25519.PrivateKey) error {
- _, err := w.Write(priv.Secret)
- return err
-}
-
-func serializeX448PrivateKey(w io.Writer, priv *x448.PrivateKey) error {
- _, err := w.Write(priv.Secret)
- return err
-}
-
-func serializeEd25519PrivateKey(w io.Writer, priv *ed25519.PrivateKey) error {
- _, err := w.Write(priv.MarshalByteSecret())
- return err
-}
-
-func serializeEd448PrivateKey(w io.Writer, priv *ed448.PrivateKey) error {
- _, err := w.Write(priv.MarshalByteSecret())
- return err
-}
-
-// decrypt decrypts an encrypted private key using a decryption key.
-func (pk *PrivateKey) decrypt(decryptionKey []byte) error {
- if pk.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- if !pk.Encrypted {
- return nil
- }
- block := pk.cipher.new(decryptionKey)
- var data []byte
- switch pk.s2kType {
- case S2KAEAD:
- aead := pk.aead.new(block)
- additionalData, err := pk.additionalData()
- if err != nil {
- return err
- }
- // Decrypt the encrypted key material with aead
- data, err = aead.Open(nil, pk.iv, pk.encryptedData, additionalData)
- if err != nil {
- return err
- }
- case S2KSHA1, S2KCHECKSUM:
- cfb := cipher.NewCFBDecrypter(block, pk.iv)
- data = make([]byte, len(pk.encryptedData))
- cfb.XORKeyStream(data, pk.encryptedData)
- if pk.s2kType == S2KSHA1 {
- if len(data) < sha1.Size {
- return errors.StructuralError("truncated private key data")
- }
- h := sha1.New()
- h.Write(data[:len(data)-sha1.Size])
- sum := h.Sum(nil)
- if !bytes.Equal(sum, data[len(data)-sha1.Size:]) {
- return errors.StructuralError("private key checksum failure")
- }
- data = data[:len(data)-sha1.Size]
- } else {
- if len(data) < 2 {
- return errors.StructuralError("truncated private key data")
- }
- var sum uint16
- for i := 0; i < len(data)-2; i++ {
- sum += uint16(data[i])
- }
- if data[len(data)-2] != uint8(sum>>8) ||
- data[len(data)-1] != uint8(sum) {
- return errors.StructuralError("private key checksum failure")
- }
- data = data[:len(data)-2]
- }
- default:
- return errors.InvalidArgumentError("invalid s2k type")
- }
-
- err := pk.parsePrivateKey(data)
- if _, ok := err.(errors.KeyInvalidError); ok {
- return errors.KeyInvalidError("invalid key parameters")
- }
- if err != nil {
- return err
- }
-
- // Mark key as unencrypted
- pk.s2kType = S2KNON
- pk.s2k = nil
- pk.Encrypted = false
- pk.encryptedData = nil
- return nil
-}
-
-func (pk *PrivateKey) decryptWithCache(passphrase []byte, keyCache *s2k.Cache) error {
- if pk.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- if !pk.Encrypted {
- return nil
- }
-
- key, err := keyCache.GetOrComputeDerivedKey(passphrase, pk.s2kParams, pk.cipher.KeySize())
- if err != nil {
- return err
- }
- if pk.s2kType == S2KAEAD {
- key = pk.applyHKDF(key)
- }
- return pk.decrypt(key)
-}
-
-// Decrypt decrypts an encrypted private key using a passphrase.
-func (pk *PrivateKey) Decrypt(passphrase []byte) error {
- if pk.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- if !pk.Encrypted {
- return nil
- }
-
- key := make([]byte, pk.cipher.KeySize())
- pk.s2k(key, passphrase)
- if pk.s2kType == S2KAEAD {
- key = pk.applyHKDF(key)
- }
- return pk.decrypt(key)
-}
-
-// DecryptPrivateKeys decrypts all encrypted keys with the given config and passphrase.
-// Avoids recomputation of similar s2k key derivations.
-func DecryptPrivateKeys(keys []*PrivateKey, passphrase []byte) error {
- // Create a cache to avoid recomputation of key derviations for the same passphrase.
- s2kCache := &s2k.Cache{}
- for _, key := range keys {
- if key != nil && !key.Dummy() && key.Encrypted {
- err := key.decryptWithCache(passphrase, s2kCache)
- if err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// encrypt encrypts an unencrypted private key.
-func (pk *PrivateKey) encrypt(key []byte, params *s2k.Params, s2kType S2KType, cipherFunction CipherFunction, rand io.Reader) error {
- if pk.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- if pk.Encrypted {
- return nil
- }
- // check if encryptionKey has the correct size
- if len(key) != cipherFunction.KeySize() {
- return errors.InvalidArgumentError("supplied encryption key has the wrong size")
- }
-
- if params.Mode() == s2k.Argon2S2K && s2kType != S2KAEAD {
- return errors.InvalidArgumentError("using Argon2 S2K without AEAD is not allowed")
- }
- if params.Mode() != s2k.Argon2S2K && params.Mode() != s2k.IteratedSaltedS2K &&
- params.Mode() != s2k.SaltedS2K { // only allowed for high-entropy passphrases
- return errors.InvalidArgumentError("insecure S2K mode")
- }
-
- priv := bytes.NewBuffer(nil)
- err := pk.serializePrivateKey(priv)
- if err != nil {
- return err
- }
-
- pk.cipher = cipherFunction
- pk.s2kParams = params
- pk.s2k, err = pk.s2kParams.Function()
- if err != nil {
- return err
- }
-
- privateKeyBytes := priv.Bytes()
- pk.s2kType = s2kType
- block := pk.cipher.new(key)
- switch s2kType {
- case S2KAEAD:
- if pk.aead == 0 {
- return errors.StructuralError("aead mode is not set on key")
- }
- aead := pk.aead.new(block)
- additionalData, err := pk.additionalData()
- if err != nil {
- return err
- }
- pk.iv = make([]byte, aead.NonceSize())
- _, err = io.ReadFull(rand, pk.iv)
- if err != nil {
- return err
- }
- // Decrypt the encrypted key material with aead
- pk.encryptedData = aead.Seal(nil, pk.iv, privateKeyBytes, additionalData)
- case S2KSHA1, S2KCHECKSUM:
- pk.iv = make([]byte, pk.cipher.blockSize())
- _, err = io.ReadFull(rand, pk.iv)
- if err != nil {
- return err
- }
- cfb := cipher.NewCFBEncrypter(block, pk.iv)
- if s2kType == S2KSHA1 {
- h := sha1.New()
- h.Write(privateKeyBytes)
- sum := h.Sum(nil)
- privateKeyBytes = append(privateKeyBytes, sum...)
- } else {
- var sum uint16
- for _, b := range privateKeyBytes {
- sum += uint16(b)
- }
- privateKeyBytes = append(privateKeyBytes, []byte{uint8(sum >> 8), uint8(sum)}...)
- }
- pk.encryptedData = make([]byte, len(privateKeyBytes))
- cfb.XORKeyStream(pk.encryptedData, privateKeyBytes)
- default:
- return errors.InvalidArgumentError("invalid s2k type for encryption")
- }
-
- pk.Encrypted = true
- pk.PrivateKey = nil
- return err
-}
-
-// EncryptWithConfig encrypts an unencrypted private key using the passphrase and the config.
-func (pk *PrivateKey) EncryptWithConfig(passphrase []byte, config *Config) error {
- params, err := s2k.Generate(config.Random(), config.S2K())
- if err != nil {
- return err
- }
- // Derive an encryption key with the configured s2k function.
- key := make([]byte, config.Cipher().KeySize())
- s2k, err := params.Function()
- if err != nil {
- return err
- }
- s2k(key, passphrase)
- s2kType := S2KSHA1
- if config.AEAD() != nil {
- s2kType = S2KAEAD
- pk.aead = config.AEAD().Mode()
- pk.cipher = config.Cipher()
- key = pk.applyHKDF(key)
- }
- // Encrypt the private key with the derived encryption key.
- return pk.encrypt(key, params, s2kType, config.Cipher(), config.Random())
-}
-
-// EncryptPrivateKeys encrypts all unencrypted keys with the given config and passphrase.
-// Only derives one key from the passphrase, which is then used to encrypt each key.
-func EncryptPrivateKeys(keys []*PrivateKey, passphrase []byte, config *Config) error {
- params, err := s2k.Generate(config.Random(), config.S2K())
- if err != nil {
- return err
- }
- // Derive an encryption key with the configured s2k function.
- encryptionKey := make([]byte, config.Cipher().KeySize())
- s2k, err := params.Function()
- if err != nil {
- return err
- }
- s2k(encryptionKey, passphrase)
- for _, key := range keys {
- if key != nil && !key.Dummy() && !key.Encrypted {
- s2kType := S2KSHA1
- if config.AEAD() != nil {
- s2kType = S2KAEAD
- key.aead = config.AEAD().Mode()
- key.cipher = config.Cipher()
- derivedKey := key.applyHKDF(encryptionKey)
- err = key.encrypt(derivedKey, params, s2kType, config.Cipher(), config.Random())
- } else {
- err = key.encrypt(encryptionKey, params, s2kType, config.Cipher(), config.Random())
- }
- if err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// Encrypt encrypts an unencrypted private key using a passphrase.
-func (pk *PrivateKey) Encrypt(passphrase []byte) error {
- // Default config of private key encryption
- config := &Config{
- S2KConfig: &s2k.Config{
- S2KMode: s2k.IteratedSaltedS2K,
- S2KCount: 65536,
- Hash: crypto.SHA256,
- },
- DefaultCipher: CipherAES256,
- }
- return pk.EncryptWithConfig(passphrase, config)
-}
-
-func (pk *PrivateKey) serializePrivateKey(w io.Writer) (err error) {
- switch priv := pk.PrivateKey.(type) {
- case *rsa.PrivateKey:
- err = serializeRSAPrivateKey(w, priv)
- case *dsa.PrivateKey:
- err = serializeDSAPrivateKey(w, priv)
- case *elgamal.PrivateKey:
- err = serializeElGamalPrivateKey(w, priv)
- case *ecdsa.PrivateKey:
- err = serializeECDSAPrivateKey(w, priv)
- case *eddsa.PrivateKey:
- err = serializeEdDSAPrivateKey(w, priv)
- case *ecdh.PrivateKey:
- err = serializeECDHPrivateKey(w, priv)
- case *x25519.PrivateKey:
- err = serializeX25519PrivateKey(w, priv)
- case *x448.PrivateKey:
- err = serializeX448PrivateKey(w, priv)
- case *ed25519.PrivateKey:
- err = serializeEd25519PrivateKey(w, priv)
- case *ed448.PrivateKey:
- err = serializeEd448PrivateKey(w, priv)
- default:
- err = errors.InvalidArgumentError("unknown private key type")
- }
- return
-}
-
-func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) {
- switch pk.PublicKey.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly:
- return pk.parseRSAPrivateKey(data)
- case PubKeyAlgoDSA:
- return pk.parseDSAPrivateKey(data)
- case PubKeyAlgoElGamal:
- return pk.parseElGamalPrivateKey(data)
- case PubKeyAlgoECDSA:
- return pk.parseECDSAPrivateKey(data)
- case PubKeyAlgoECDH:
- return pk.parseECDHPrivateKey(data)
- case PubKeyAlgoEdDSA:
- return pk.parseEdDSAPrivateKey(data)
- case PubKeyAlgoX25519:
- return pk.parseX25519PrivateKey(data)
- case PubKeyAlgoX448:
- return pk.parseX448PrivateKey(data)
- case PubKeyAlgoEd25519:
- return pk.parseEd25519PrivateKey(data)
- case PubKeyAlgoEd448:
- return pk.parseEd448PrivateKey(data)
- default:
- err = errors.StructuralError("unknown private key type")
- return
- }
-}
-
-func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) {
- rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey)
- rsaPriv := new(rsa.PrivateKey)
- rsaPriv.PublicKey = *rsaPub
-
- buf := bytes.NewBuffer(data)
- d := new(encoding.MPI)
- if _, err := d.ReadFrom(buf); err != nil {
- return err
- }
-
- p := new(encoding.MPI)
- if _, err := p.ReadFrom(buf); err != nil {
- return err
- }
-
- q := new(encoding.MPI)
- if _, err := q.ReadFrom(buf); err != nil {
- return err
- }
-
- rsaPriv.D = new(big.Int).SetBytes(d.Bytes())
- rsaPriv.Primes = make([]*big.Int, 2)
- rsaPriv.Primes[0] = new(big.Int).SetBytes(p.Bytes())
- rsaPriv.Primes[1] = new(big.Int).SetBytes(q.Bytes())
- if err := rsaPriv.Validate(); err != nil {
- return errors.KeyInvalidError(err.Error())
- }
- rsaPriv.Precompute()
- pk.PrivateKey = rsaPriv
-
- return nil
-}
-
-func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) {
- dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey)
- dsaPriv := new(dsa.PrivateKey)
- dsaPriv.PublicKey = *dsaPub
-
- buf := bytes.NewBuffer(data)
- x := new(encoding.MPI)
- if _, err := x.ReadFrom(buf); err != nil {
- return err
- }
-
- dsaPriv.X = new(big.Int).SetBytes(x.Bytes())
- if err := validateDSAParameters(dsaPriv); err != nil {
- return err
- }
- pk.PrivateKey = dsaPriv
-
- return nil
-}
-
-func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) {
- pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey)
- priv := new(elgamal.PrivateKey)
- priv.PublicKey = *pub
-
- buf := bytes.NewBuffer(data)
- x := new(encoding.MPI)
- if _, err := x.ReadFrom(buf); err != nil {
- return err
- }
-
- priv.X = new(big.Int).SetBytes(x.Bytes())
- if err := validateElGamalParameters(priv); err != nil {
- return err
- }
- pk.PrivateKey = priv
-
- return nil
-}
-
-func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) {
- ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey)
- ecdsaPriv := ecdsa.NewPrivateKey(*ecdsaPub)
-
- buf := bytes.NewBuffer(data)
- d := new(encoding.MPI)
- if _, err := d.ReadFrom(buf); err != nil {
- return err
- }
-
- if err := ecdsaPriv.UnmarshalIntegerSecret(d.Bytes()); err != nil {
- return err
- }
- if err := ecdsa.Validate(ecdsaPriv); err != nil {
- return err
- }
- pk.PrivateKey = ecdsaPriv
-
- return nil
-}
-
-func (pk *PrivateKey) parseECDHPrivateKey(data []byte) (err error) {
- ecdhPub := pk.PublicKey.PublicKey.(*ecdh.PublicKey)
- ecdhPriv := ecdh.NewPrivateKey(*ecdhPub)
-
- buf := bytes.NewBuffer(data)
- d := new(encoding.MPI)
- if _, err := d.ReadFrom(buf); err != nil {
- return err
- }
-
- if err := ecdhPriv.UnmarshalByteSecret(d.Bytes()); err != nil {
- return err
- }
-
- if err := ecdh.Validate(ecdhPriv); err != nil {
- return err
- }
-
- pk.PrivateKey = ecdhPriv
-
- return nil
-}
-
-func (pk *PrivateKey) parseX25519PrivateKey(data []byte) (err error) {
- publicKey := pk.PublicKey.PublicKey.(*x25519.PublicKey)
- privateKey := x25519.NewPrivateKey(*publicKey)
- privateKey.PublicKey = *publicKey
-
- privateKey.Secret = make([]byte, x25519.KeySize)
-
- if len(data) != x25519.KeySize {
- err = errors.StructuralError("wrong x25519 key size")
- return err
- }
- subtle.ConstantTimeCopy(1, privateKey.Secret, data)
- if err = x25519.Validate(privateKey); err != nil {
- return err
- }
- pk.PrivateKey = privateKey
- return nil
-}
-
-func (pk *PrivateKey) parseX448PrivateKey(data []byte) (err error) {
- publicKey := pk.PublicKey.PublicKey.(*x448.PublicKey)
- privateKey := x448.NewPrivateKey(*publicKey)
- privateKey.PublicKey = *publicKey
-
- privateKey.Secret = make([]byte, x448.KeySize)
-
- if len(data) != x448.KeySize {
- err = errors.StructuralError("wrong x448 key size")
- return err
- }
- subtle.ConstantTimeCopy(1, privateKey.Secret, data)
- if err = x448.Validate(privateKey); err != nil {
- return err
- }
- pk.PrivateKey = privateKey
- return nil
-}
-
-func (pk *PrivateKey) parseEd25519PrivateKey(data []byte) (err error) {
- publicKey := pk.PublicKey.PublicKey.(*ed25519.PublicKey)
- privateKey := ed25519.NewPrivateKey(*publicKey)
- privateKey.PublicKey = *publicKey
-
- if len(data) != ed25519.SeedSize {
- err = errors.StructuralError("wrong ed25519 key size")
- return err
- }
- err = privateKey.UnmarshalByteSecret(data)
- if err != nil {
- return err
- }
- err = ed25519.Validate(privateKey)
- if err != nil {
- return err
- }
- pk.PrivateKey = privateKey
- return nil
-}
-
-func (pk *PrivateKey) parseEd448PrivateKey(data []byte) (err error) {
- publicKey := pk.PublicKey.PublicKey.(*ed448.PublicKey)
- privateKey := ed448.NewPrivateKey(*publicKey)
- privateKey.PublicKey = *publicKey
-
- if len(data) != ed448.SeedSize {
- err = errors.StructuralError("wrong ed448 key size")
- return err
- }
- err = privateKey.UnmarshalByteSecret(data)
- if err != nil {
- return err
- }
- err = ed448.Validate(privateKey)
- if err != nil {
- return err
- }
- pk.PrivateKey = privateKey
- return nil
-}
-
-func (pk *PrivateKey) parseEdDSAPrivateKey(data []byte) (err error) {
- eddsaPub := pk.PublicKey.PublicKey.(*eddsa.PublicKey)
- eddsaPriv := eddsa.NewPrivateKey(*eddsaPub)
- eddsaPriv.PublicKey = *eddsaPub
-
- buf := bytes.NewBuffer(data)
- d := new(encoding.MPI)
- if _, err := d.ReadFrom(buf); err != nil {
- return err
- }
-
- if err = eddsaPriv.UnmarshalByteSecret(d.Bytes()); err != nil {
- return err
- }
-
- if err := eddsa.Validate(eddsaPriv); err != nil {
- return err
- }
-
- pk.PrivateKey = eddsaPriv
-
- return nil
-}
-
-func (pk *PrivateKey) additionalData() ([]byte, error) {
- additionalData := bytes.NewBuffer(nil)
- // Write additional data prefix based on packet type
- var packetByte byte
- if pk.PublicKey.IsSubkey {
- packetByte = 0xc7
- } else {
- packetByte = 0xc5
- }
- // Write public key to additional data
- _, err := additionalData.Write([]byte{packetByte})
- if err != nil {
- return nil, err
- }
- err = pk.PublicKey.serializeWithoutHeaders(additionalData)
- if err != nil {
- return nil, err
- }
- return additionalData.Bytes(), nil
-}
-
-func (pk *PrivateKey) applyHKDF(inputKey []byte) []byte {
- var packetByte byte
- if pk.PublicKey.IsSubkey {
- packetByte = 0xc7
- } else {
- packetByte = 0xc5
- }
- associatedData := []byte{packetByte, byte(pk.Version), byte(pk.cipher), byte(pk.aead)}
- hkdfReader := hkdf.New(sha256.New, inputKey, []byte{}, associatedData)
- encryptionKey := make([]byte, pk.cipher.KeySize())
- _, _ = readFull(hkdfReader, encryptionKey)
- return encryptionKey
-}
-
-func validateDSAParameters(priv *dsa.PrivateKey) error {
- p := priv.P // group prime
- q := priv.Q // subgroup order
- g := priv.G // g has order q mod p
- x := priv.X // secret
- y := priv.Y // y == g**x mod p
- one := big.NewInt(1)
- // expect g, y >= 2 and g < p
- if g.Cmp(one) <= 0 || y.Cmp(one) <= 0 || g.Cmp(p) > 0 {
- return errors.KeyInvalidError("dsa: invalid group")
- }
- // expect p > q
- if p.Cmp(q) <= 0 {
- return errors.KeyInvalidError("dsa: invalid group prime")
- }
- // q should be large enough and divide p-1
- pSub1 := new(big.Int).Sub(p, one)
- if q.BitLen() < 150 || new(big.Int).Mod(pSub1, q).Cmp(big.NewInt(0)) != 0 {
- return errors.KeyInvalidError("dsa: invalid order")
- }
- // confirm that g has order q mod p
- if !q.ProbablyPrime(32) || new(big.Int).Exp(g, q, p).Cmp(one) != 0 {
- return errors.KeyInvalidError("dsa: invalid order")
- }
- // check y
- if new(big.Int).Exp(g, x, p).Cmp(y) != 0 {
- return errors.KeyInvalidError("dsa: mismatching values")
- }
-
- return nil
-}
-
-func validateElGamalParameters(priv *elgamal.PrivateKey) error {
- p := priv.P // group prime
- g := priv.G // g has order p-1 mod p
- x := priv.X // secret
- y := priv.Y // y == g**x mod p
- one := big.NewInt(1)
- // Expect g, y >= 2 and g < p
- if g.Cmp(one) <= 0 || y.Cmp(one) <= 0 || g.Cmp(p) > 0 {
- return errors.KeyInvalidError("elgamal: invalid group")
- }
- if p.BitLen() < 1024 {
- return errors.KeyInvalidError("elgamal: group order too small")
- }
- pSub1 := new(big.Int).Sub(p, one)
- if new(big.Int).Exp(g, pSub1, p).Cmp(one) != 0 {
- return errors.KeyInvalidError("elgamal: invalid group")
- }
- // Since p-1 is not prime, g might have a smaller order that divides p-1.
- // We cannot confirm the exact order of g, but we make sure it is not too small.
- gExpI := new(big.Int).Set(g)
- i := 1
- threshold := 2 << 17 // we want order > threshold
- for i < threshold {
- i++ // we check every order to make sure key validation is not easily bypassed by guessing y'
- gExpI.Mod(new(big.Int).Mul(gExpI, g), p)
- if gExpI.Cmp(one) == 0 {
- return errors.KeyInvalidError("elgamal: order too small")
- }
- }
- // Check y
- if new(big.Int).Exp(g, x, p).Cmp(y) != 0 {
- return errors.KeyInvalidError("elgamal: mismatching values")
- }
-
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key_test_data.go
deleted file mode 100644
index 029b8f1aab..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key_test_data.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package packet
-
-// Generated with `gpg --export-secret-keys "Test Key 2"`
-const privKeyRSAHex = "9501fe044cc349a8010400b70ca0010e98c090008d45d1ee8f9113bd5861fd57b88bacb7c68658747663f1e1a3b5a98f32fda6472373c024b97359cd2efc88ff60f77751adfbf6af5e615e6a1408cfad8bf0cea30b0d5f53aa27ad59089ba9b15b7ebc2777a25d7b436144027e3bcd203909f147d0e332b240cf63d3395f5dfe0df0a6c04e8655af7eacdf0011010001fe0303024a252e7d475fd445607de39a265472aa74a9320ba2dac395faa687e9e0336aeb7e9a7397e511b5afd9dc84557c80ac0f3d4d7bfec5ae16f20d41c8c84a04552a33870b930420e230e179564f6d19bb153145e76c33ae993886c388832b0fa042ddda7f133924f3854481533e0ede31d51278c0519b29abc3bf53da673e13e3e1214b52413d179d7f66deee35cac8eacb060f78379d70ef4af8607e68131ff529439668fc39c9ce6dfef8a5ac234d234802cbfb749a26107db26406213ae5c06d4673253a3cbee1fcbae58d6ab77e38d6e2c0e7c6317c48e054edadb5a40d0d48acb44643d998139a8a66bb820be1f3f80185bc777d14b5954b60effe2448a036d565c6bc0b915fcea518acdd20ab07bc1529f561c58cd044f723109b93f6fd99f876ff891d64306b5d08f48bab59f38695e9109c4dec34013ba3153488ce070268381ba923ee1eb77125b36afcb4347ec3478c8f2735b06ef17351d872e577fa95d0c397c88c71b59629a36aec"
-
-// Generated by `gpg --export-secret-keys` followed by a manual extraction of
-// the ElGamal subkey from the packets.
-const privKeyElGamalHex = "9d0157044df9ee1a100400eb8e136a58ec39b582629cdadf830bc64e0a94ed8103ca8bb247b27b11b46d1d25297ef4bcc3071785ba0c0bedfe89eabc5287fcc0edf81ab5896c1c8e4b20d27d79813c7aede75320b33eaeeaa586edc00fd1036c10133e6ba0ff277245d0d59d04b2b3421b7244aca5f4a8d870c6f1c1fbff9e1c26699a860b9504f35ca1d700030503fd1ededd3b840795be6d9ccbe3c51ee42e2f39233c432b831ddd9c4e72b7025a819317e47bf94f9ee316d7273b05d5fcf2999c3a681f519b1234bbfa6d359b4752bd9c3f77d6b6456cde152464763414ca130f4e91d91041432f90620fec0e6d6b5116076c2985d5aeaae13be492b9b329efcaf7ee25120159a0a30cd976b42d7afe030302dae7eb80db744d4960c4df930d57e87fe81412eaace9f900e6c839817a614ddb75ba6603b9417c33ea7b6c93967dfa2bcff3fa3c74a5ce2c962db65b03aece14c96cbd0038fc"
-
-// pkcs1PrivKeyHex is a PKCS#1, RSA private key.
-// Generated by `openssl genrsa 1024 | openssl rsa -outform DER | xxd -p`
-const pkcs1PrivKeyHex = "3082025d02010002818100e98edfa1c3b35884a54d0b36a6a603b0290fa85e49e30fa23fc94fef9c6790bc4849928607aa48d809da326fb42a969d06ad756b98b9c1a90f5d4a2b6d0ac05953c97f4da3120164a21a679793ce181c906dc01d235cc085ddcdf6ea06c389b6ab8885dfd685959e693138856a68a7e5db263337ff82a088d583a897cf2d59e9020301000102818100b6d5c9eb70b02d5369b3ee5b520a14490b5bde8a317d36f7e4c74b7460141311d1e5067735f8f01d6f5908b2b96fbd881f7a1ab9a84d82753e39e19e2d36856be960d05ac9ef8e8782ea1b6d65aee28fdfe1d61451e8cff0adfe84322f12cf455028b581cf60eb9e0e140ba5d21aeba6c2634d7c65318b9a665fc01c3191ca21024100fa5e818da3705b0fa33278bb28d4b6f6050388af2d4b75ec9375dd91ccf2e7d7068086a8b82a8f6282e4fbbdb8a7f2622eb97295249d87acea7f5f816f54d347024100eecf9406d7dc49cdfb95ab1eff4064de84c7a30f64b2798936a0d2018ba9eb52e4b636f82e96c49cc63b80b675e91e40d1b2e4017d4b9adaf33ab3d9cf1c214f024100c173704ace742c082323066226a4655226819a85304c542b9dacbeacbf5d1881ee863485fcf6f59f3a604f9b42289282067447f2b13dfeed3eab7851fc81e0550240741fc41f3fc002b382eed8730e33c5d8de40256e4accee846667f536832f711ab1d4590e7db91a8a116ac5bff3be13d3f9243ff2e976662aa9b395d907f8e9c9024046a5696c9ef882363e06c9fa4e2f5b580906452befba03f4a99d0f873697ef1f851d2226ca7934b30b7c3e80cb634a67172bbbf4781735fe3e09263e2dd723e7"
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
deleted file mode 100644
index f8da781bbe..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
+++ /dev/null
@@ -1,1120 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "crypto/dsa"
- "crypto/rsa"
- "crypto/sha1"
- "crypto/sha256"
- _ "crypto/sha512"
- "encoding/binary"
- "fmt"
- "hash"
- "io"
- "math/big"
- "strconv"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/ecdh"
- "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
- "github.com/ProtonMail/go-crypto/openpgp/ed25519"
- "github.com/ProtonMail/go-crypto/openpgp/ed448"
- "github.com/ProtonMail/go-crypto/openpgp/eddsa"
- "github.com/ProtonMail/go-crypto/openpgp/elgamal"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
- "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
- "github.com/ProtonMail/go-crypto/openpgp/x25519"
- "github.com/ProtonMail/go-crypto/openpgp/x448"
-)
-
-// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2.
-type PublicKey struct {
- Version int
- CreationTime time.Time
- PubKeyAlgo PublicKeyAlgorithm
- PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey or *eddsa.PublicKey, *x25519.PublicKey, *x448.PublicKey, *ed25519.PublicKey, *ed448.PublicKey
- Fingerprint []byte
- KeyId uint64
- IsSubkey bool
-
- // RFC 4880 fields
- n, e, p, q, g, y encoding.Field
-
- // RFC 6637 fields
- // oid contains the OID byte sequence identifying the elliptic curve used
- oid encoding.Field
-
- // kdf stores key derivation function parameters
- // used for ECDH encryption. See RFC 6637, Section 9.
- kdf encoding.Field
-}
-
-// UpgradeToV5 updates the version of the key to v5, and updates all necessary
-// fields.
-func (pk *PublicKey) UpgradeToV5() {
- pk.Version = 5
- pk.setFingerprintAndKeyId()
-}
-
-// UpgradeToV6 updates the version of the key to v6, and updates all necessary
-// fields.
-func (pk *PublicKey) UpgradeToV6() error {
- pk.Version = 6
- pk.setFingerprintAndKeyId()
- return pk.checkV6Compatibility()
-}
-
-// signingKey provides a convenient abstraction over signature verification
-// for v3 and v4 public keys.
-type signingKey interface {
- SerializeForHash(io.Writer) error
- SerializeSignaturePrefix(io.Writer) error
- serializeWithoutHeaders(io.Writer) error
-}
-
-// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey.
-func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoRSA,
- PublicKey: pub,
- n: new(encoding.MPI).SetBig(pub.N),
- e: new(encoding.MPI).SetBig(big.NewInt(int64(pub.E))),
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey.
-func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoDSA,
- PublicKey: pub,
- p: new(encoding.MPI).SetBig(pub.P),
- q: new(encoding.MPI).SetBig(pub.Q),
- g: new(encoding.MPI).SetBig(pub.G),
- y: new(encoding.MPI).SetBig(pub.Y),
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey.
-func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoElGamal,
- PublicKey: pub,
- p: new(encoding.MPI).SetBig(pub.P),
- g: new(encoding.MPI).SetBig(pub.G),
- y: new(encoding.MPI).SetBig(pub.Y),
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoECDSA,
- PublicKey: pub,
- p: encoding.NewMPI(pub.MarshalPoint()),
- }
-
- curveInfo := ecc.FindByCurve(pub.GetCurve())
- if curveInfo == nil {
- panic("unknown elliptic curve")
- }
- pk.oid = curveInfo.Oid
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewECDHPublicKey(creationTime time.Time, pub *ecdh.PublicKey) *PublicKey {
- var pk *PublicKey
- var kdf = encoding.NewOID([]byte{0x1, pub.Hash.Id(), pub.Cipher.Id()})
- pk = &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoECDH,
- PublicKey: pub,
- p: encoding.NewMPI(pub.MarshalPoint()),
- kdf: kdf,
- }
-
- curveInfo := ecc.FindByCurve(pub.GetCurve())
-
- if curveInfo == nil {
- panic("unknown elliptic curve")
- }
-
- pk.oid = curveInfo.Oid
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewEdDSAPublicKey(creationTime time.Time, pub *eddsa.PublicKey) *PublicKey {
- curveInfo := ecc.FindByCurve(pub.GetCurve())
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoEdDSA,
- PublicKey: pub,
- oid: curveInfo.Oid,
- // Native point format, see draft-koch-eddsa-for-openpgp-04, Appendix B
- p: encoding.NewMPI(pub.MarshalPoint()),
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewX25519PublicKey(creationTime time.Time, pub *x25519.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoX25519,
- PublicKey: pub,
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewX448PublicKey(creationTime time.Time, pub *x448.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoX448,
- PublicKey: pub,
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewEd25519PublicKey(creationTime time.Time, pub *ed25519.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoEd25519,
- PublicKey: pub,
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func NewEd448PublicKey(creationTime time.Time, pub *ed448.PublicKey) *PublicKey {
- pk := &PublicKey{
- Version: 4,
- CreationTime: creationTime,
- PubKeyAlgo: PubKeyAlgoEd448,
- PublicKey: pub,
- }
-
- pk.setFingerprintAndKeyId()
- return pk
-}
-
-func (pk *PublicKey) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.5.2
- var buf [6]byte
- _, err = readFull(r, buf[:])
- if err != nil {
- return
- }
-
- pk.Version = int(buf[0])
- if pk.Version != 4 && pk.Version != 5 && pk.Version != 6 {
- return errors.UnsupportedError("public key version " + strconv.Itoa(int(buf[0])))
- }
-
- if V5Disabled && pk.Version == 5 {
- return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
- }
-
- if pk.Version >= 5 {
- // Read the four-octet scalar octet count
- // The count is not used in this implementation
- var n [4]byte
- _, err = readFull(r, n[:])
- if err != nil {
- return
- }
- }
- pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0)
- pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5])
- // Ignore four-ocet length
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- err = pk.parseRSA(r)
- case PubKeyAlgoDSA:
- err = pk.parseDSA(r)
- case PubKeyAlgoElGamal:
- err = pk.parseElGamal(r)
- case PubKeyAlgoECDSA:
- err = pk.parseECDSA(r)
- case PubKeyAlgoECDH:
- err = pk.parseECDH(r)
- case PubKeyAlgoEdDSA:
- err = pk.parseEdDSA(r)
- case PubKeyAlgoX25519:
- err = pk.parseX25519(r)
- case PubKeyAlgoX448:
- err = pk.parseX448(r)
- case PubKeyAlgoEd25519:
- err = pk.parseEd25519(r)
- case PubKeyAlgoEd448:
- err = pk.parseEd448(r)
- default:
- err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo)))
- }
- if err != nil {
- return
- }
-
- pk.setFingerprintAndKeyId()
- return
-}
-
-func (pk *PublicKey) setFingerprintAndKeyId() {
- // RFC 4880, section 12.2
- if pk.Version >= 5 {
- fingerprint := sha256.New()
- if err := pk.SerializeForHash(fingerprint); err != nil {
- // Should not happen for a hash.
- panic(err)
- }
- pk.Fingerprint = make([]byte, 32)
- copy(pk.Fingerprint, fingerprint.Sum(nil))
- pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[:8])
- } else {
- fingerprint := sha1.New()
- if err := pk.SerializeForHash(fingerprint); err != nil {
- // Should not happen for a hash.
- panic(err)
- }
- pk.Fingerprint = make([]byte, 20)
- copy(pk.Fingerprint, fingerprint.Sum(nil))
- pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20])
- }
-}
-
-func (pk *PublicKey) checkV6Compatibility() error {
- // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
- switch pk.PubKeyAlgo {
- case PubKeyAlgoECDH:
- curveInfo := ecc.FindByOid(pk.oid)
- if curveInfo == nil {
- return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
- }
- if curveInfo.GenName == ecc.Curve25519GenName {
- return errors.StructuralError("cannot generate v6 key with deprecated OID: Curve25519Legacy")
- }
- case PubKeyAlgoEdDSA:
- return errors.StructuralError("cannot generate v6 key with deprecated algorithm: EdDSALegacy")
- }
- return nil
-}
-
-// parseRSA parses RSA public key material from the given Reader. See RFC 4880,
-// section 5.5.2.
-func (pk *PublicKey) parseRSA(r io.Reader) (err error) {
- pk.n = new(encoding.MPI)
- if _, err = pk.n.ReadFrom(r); err != nil {
- return
- }
- pk.e = new(encoding.MPI)
- if _, err = pk.e.ReadFrom(r); err != nil {
- return
- }
-
- if len(pk.e.Bytes()) > 3 {
- err = errors.UnsupportedError("large public exponent")
- return
- }
- rsa := &rsa.PublicKey{
- N: new(big.Int).SetBytes(pk.n.Bytes()),
- E: 0,
- }
- for i := 0; i < len(pk.e.Bytes()); i++ {
- rsa.E <<= 8
- rsa.E |= int(pk.e.Bytes()[i])
- }
- pk.PublicKey = rsa
- return
-}
-
-// parseDSA parses DSA public key material from the given Reader. See RFC 4880,
-// section 5.5.2.
-func (pk *PublicKey) parseDSA(r io.Reader) (err error) {
- pk.p = new(encoding.MPI)
- if _, err = pk.p.ReadFrom(r); err != nil {
- return
- }
- pk.q = new(encoding.MPI)
- if _, err = pk.q.ReadFrom(r); err != nil {
- return
- }
- pk.g = new(encoding.MPI)
- if _, err = pk.g.ReadFrom(r); err != nil {
- return
- }
- pk.y = new(encoding.MPI)
- if _, err = pk.y.ReadFrom(r); err != nil {
- return
- }
-
- dsa := new(dsa.PublicKey)
- dsa.P = new(big.Int).SetBytes(pk.p.Bytes())
- dsa.Q = new(big.Int).SetBytes(pk.q.Bytes())
- dsa.G = new(big.Int).SetBytes(pk.g.Bytes())
- dsa.Y = new(big.Int).SetBytes(pk.y.Bytes())
- pk.PublicKey = dsa
- return
-}
-
-// parseElGamal parses ElGamal public key material from the given Reader. See
-// RFC 4880, section 5.5.2.
-func (pk *PublicKey) parseElGamal(r io.Reader) (err error) {
- pk.p = new(encoding.MPI)
- if _, err = pk.p.ReadFrom(r); err != nil {
- return
- }
- pk.g = new(encoding.MPI)
- if _, err = pk.g.ReadFrom(r); err != nil {
- return
- }
- pk.y = new(encoding.MPI)
- if _, err = pk.y.ReadFrom(r); err != nil {
- return
- }
-
- elgamal := new(elgamal.PublicKey)
- elgamal.P = new(big.Int).SetBytes(pk.p.Bytes())
- elgamal.G = new(big.Int).SetBytes(pk.g.Bytes())
- elgamal.Y = new(big.Int).SetBytes(pk.y.Bytes())
- pk.PublicKey = elgamal
- return
-}
-
-// parseECDSA parses ECDSA public key material from the given Reader. See
-// RFC 6637, Section 9.
-func (pk *PublicKey) parseECDSA(r io.Reader) (err error) {
- pk.oid = new(encoding.OID)
- if _, err = pk.oid.ReadFrom(r); err != nil {
- return
- }
-
- curveInfo := ecc.FindByOid(pk.oid)
- if curveInfo == nil {
- return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
- }
-
- pk.p = new(encoding.MPI)
- if _, err = pk.p.ReadFrom(r); err != nil {
- return
- }
-
- c, ok := curveInfo.Curve.(ecc.ECDSACurve)
- if !ok {
- return errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", pk.oid))
- }
-
- ecdsaKey := ecdsa.NewPublicKey(c)
- err = ecdsaKey.UnmarshalPoint(pk.p.Bytes())
- pk.PublicKey = ecdsaKey
-
- return
-}
-
-// parseECDH parses ECDH public key material from the given Reader. See
-// RFC 6637, Section 9.
-func (pk *PublicKey) parseECDH(r io.Reader) (err error) {
- pk.oid = new(encoding.OID)
- if _, err = pk.oid.ReadFrom(r); err != nil {
- return
- }
-
- curveInfo := ecc.FindByOid(pk.oid)
- if curveInfo == nil {
- return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
- }
-
- if pk.Version == 6 && curveInfo.GenName == ecc.Curve25519GenName {
- // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
- return errors.StructuralError("cannot read v6 key with deprecated OID: Curve25519Legacy")
- }
-
- pk.p = new(encoding.MPI)
- if _, err = pk.p.ReadFrom(r); err != nil {
- return
- }
- pk.kdf = new(encoding.OID)
- if _, err = pk.kdf.ReadFrom(r); err != nil {
- return
- }
-
- c, ok := curveInfo.Curve.(ecc.ECDHCurve)
- if !ok {
- return errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", pk.oid))
- }
-
- if kdfLen := len(pk.kdf.Bytes()); kdfLen < 3 {
- return errors.UnsupportedError("unsupported ECDH KDF length: " + strconv.Itoa(kdfLen))
- }
- if reserved := pk.kdf.Bytes()[0]; reserved != 0x01 {
- return errors.UnsupportedError("unsupported KDF reserved field: " + strconv.Itoa(int(reserved)))
- }
- kdfHash, ok := algorithm.HashById[pk.kdf.Bytes()[1]]
- if !ok {
- return errors.UnsupportedError("unsupported ECDH KDF hash: " + strconv.Itoa(int(pk.kdf.Bytes()[1])))
- }
- kdfCipher, ok := algorithm.CipherById[pk.kdf.Bytes()[2]]
- if !ok {
- return errors.UnsupportedError("unsupported ECDH KDF cipher: " + strconv.Itoa(int(pk.kdf.Bytes()[2])))
- }
-
- ecdhKey := ecdh.NewPublicKey(c, kdfHash, kdfCipher)
- err = ecdhKey.UnmarshalPoint(pk.p.Bytes())
- pk.PublicKey = ecdhKey
-
- return
-}
-
-func (pk *PublicKey) parseEdDSA(r io.Reader) (err error) {
- if pk.Version == 6 {
- // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
- return errors.StructuralError("cannot generate v6 key with deprecated algorithm: EdDSALegacy")
- }
-
- pk.oid = new(encoding.OID)
- if _, err = pk.oid.ReadFrom(r); err != nil {
- return
- }
-
- curveInfo := ecc.FindByOid(pk.oid)
- if curveInfo == nil {
- return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
- }
-
- c, ok := curveInfo.Curve.(ecc.EdDSACurve)
- if !ok {
- return errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", pk.oid))
- }
-
- pk.p = new(encoding.MPI)
- if _, err = pk.p.ReadFrom(r); err != nil {
- return
- }
-
- if len(pk.p.Bytes()) == 0 {
- return errors.StructuralError("empty EdDSA public key")
- }
-
- pub := eddsa.NewPublicKey(c)
-
- switch flag := pk.p.Bytes()[0]; flag {
- case 0x04:
- // TODO: see _grcy_ecc_eddsa_ensure_compact in grcypt
- return errors.UnsupportedError("unsupported EdDSA compression: " + strconv.Itoa(int(flag)))
- case 0x40:
- err = pub.UnmarshalPoint(pk.p.Bytes())
- default:
- return errors.UnsupportedError("unsupported EdDSA compression: " + strconv.Itoa(int(flag)))
- }
-
- pk.PublicKey = pub
- return
-}
-
-func (pk *PublicKey) parseX25519(r io.Reader) (err error) {
- point := make([]byte, x25519.KeySize)
- _, err = io.ReadFull(r, point)
- if err != nil {
- return
- }
- pub := &x25519.PublicKey{
- Point: point,
- }
- pk.PublicKey = pub
- return
-}
-
-func (pk *PublicKey) parseX448(r io.Reader) (err error) {
- point := make([]byte, x448.KeySize)
- _, err = io.ReadFull(r, point)
- if err != nil {
- return
- }
- pub := &x448.PublicKey{
- Point: point,
- }
- pk.PublicKey = pub
- return
-}
-
-func (pk *PublicKey) parseEd25519(r io.Reader) (err error) {
- point := make([]byte, ed25519.PublicKeySize)
- _, err = io.ReadFull(r, point)
- if err != nil {
- return
- }
- pub := &ed25519.PublicKey{
- Point: point,
- }
- pk.PublicKey = pub
- return
-}
-
-func (pk *PublicKey) parseEd448(r io.Reader) (err error) {
- point := make([]byte, ed448.PublicKeySize)
- _, err = io.ReadFull(r, point)
- if err != nil {
- return
- }
- pub := &ed448.PublicKey{
- Point: point,
- }
- pk.PublicKey = pub
- return
-}
-
-// SerializeForHash serializes the PublicKey to w with the special packet
-// header format needed for hashing.
-func (pk *PublicKey) SerializeForHash(w io.Writer) error {
- if err := pk.SerializeSignaturePrefix(w); err != nil {
- return err
- }
- return pk.serializeWithoutHeaders(w)
-}
-
-// SerializeSignaturePrefix writes the prefix for this public key to the given Writer.
-// The prefix is used when calculating a signature over this public key. See
-// RFC 4880, section 5.2.4.
-func (pk *PublicKey) SerializeSignaturePrefix(w io.Writer) error {
- var pLength = pk.algorithmSpecificByteCount()
- // version, timestamp, algorithm
- pLength += versionSize + timestampSize + algorithmSize
- if pk.Version >= 5 {
- // key octet count (4).
- pLength += 4
- _, err := w.Write([]byte{
- // When a v4 signature is made over a key, the hash data starts with the octet 0x99, followed by a two-octet length
- // of the key, and then the body of the key packet. When a v6 signature is made over a key, the hash data starts
- // with the salt, then octet 0x9B, followed by a four-octet length of the key, and then the body of the key packet.
- 0x95 + byte(pk.Version),
- byte(pLength >> 24),
- byte(pLength >> 16),
- byte(pLength >> 8),
- byte(pLength),
- })
- return err
- }
- if _, err := w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}); err != nil {
- return err
- }
- return nil
-}
-
-func (pk *PublicKey) Serialize(w io.Writer) (err error) {
- length := uint32(versionSize + timestampSize + algorithmSize) // 6 byte header
- length += pk.algorithmSpecificByteCount()
- if pk.Version >= 5 {
- length += 4 // octet key count
- }
- packetType := packetTypePublicKey
- if pk.IsSubkey {
- packetType = packetTypePublicSubkey
- }
- err = serializeHeader(w, packetType, int(length))
- if err != nil {
- return
- }
- return pk.serializeWithoutHeaders(w)
-}
-
-func (pk *PublicKey) algorithmSpecificByteCount() uint32 {
- length := uint32(0)
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- length += uint32(pk.n.EncodedLength())
- length += uint32(pk.e.EncodedLength())
- case PubKeyAlgoDSA:
- length += uint32(pk.p.EncodedLength())
- length += uint32(pk.q.EncodedLength())
- length += uint32(pk.g.EncodedLength())
- length += uint32(pk.y.EncodedLength())
- case PubKeyAlgoElGamal:
- length += uint32(pk.p.EncodedLength())
- length += uint32(pk.g.EncodedLength())
- length += uint32(pk.y.EncodedLength())
- case PubKeyAlgoECDSA:
- length += uint32(pk.oid.EncodedLength())
- length += uint32(pk.p.EncodedLength())
- case PubKeyAlgoECDH:
- length += uint32(pk.oid.EncodedLength())
- length += uint32(pk.p.EncodedLength())
- length += uint32(pk.kdf.EncodedLength())
- case PubKeyAlgoEdDSA:
- length += uint32(pk.oid.EncodedLength())
- length += uint32(pk.p.EncodedLength())
- case PubKeyAlgoX25519:
- length += x25519.KeySize
- case PubKeyAlgoX448:
- length += x448.KeySize
- case PubKeyAlgoEd25519:
- length += ed25519.PublicKeySize
- case PubKeyAlgoEd448:
- length += ed448.PublicKeySize
- default:
- panic("unknown public key algorithm")
- }
- return length
-}
-
-// serializeWithoutHeaders marshals the PublicKey to w in the form of an
-// OpenPGP public key packet, not including the packet header.
-func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) {
- t := uint32(pk.CreationTime.Unix())
- if _, err = w.Write([]byte{
- byte(pk.Version),
- byte(t >> 24), byte(t >> 16), byte(t >> 8), byte(t),
- byte(pk.PubKeyAlgo),
- }); err != nil {
- return
- }
-
- if pk.Version >= 5 {
- n := pk.algorithmSpecificByteCount()
- if _, err = w.Write([]byte{
- byte(n >> 24), byte(n >> 16), byte(n >> 8), byte(n),
- }); err != nil {
- return
- }
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- if _, err = w.Write(pk.n.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(pk.e.EncodedBytes())
- return
- case PubKeyAlgoDSA:
- if _, err = w.Write(pk.p.EncodedBytes()); err != nil {
- return
- }
- if _, err = w.Write(pk.q.EncodedBytes()); err != nil {
- return
- }
- if _, err = w.Write(pk.g.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(pk.y.EncodedBytes())
- return
- case PubKeyAlgoElGamal:
- if _, err = w.Write(pk.p.EncodedBytes()); err != nil {
- return
- }
- if _, err = w.Write(pk.g.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(pk.y.EncodedBytes())
- return
- case PubKeyAlgoECDSA:
- if _, err = w.Write(pk.oid.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(pk.p.EncodedBytes())
- return
- case PubKeyAlgoECDH:
- if _, err = w.Write(pk.oid.EncodedBytes()); err != nil {
- return
- }
- if _, err = w.Write(pk.p.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(pk.kdf.EncodedBytes())
- return
- case PubKeyAlgoEdDSA:
- if _, err = w.Write(pk.oid.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(pk.p.EncodedBytes())
- return
- case PubKeyAlgoX25519:
- publicKey := pk.PublicKey.(*x25519.PublicKey)
- _, err = w.Write(publicKey.Point)
- return
- case PubKeyAlgoX448:
- publicKey := pk.PublicKey.(*x448.PublicKey)
- _, err = w.Write(publicKey.Point)
- return
- case PubKeyAlgoEd25519:
- publicKey := pk.PublicKey.(*ed25519.PublicKey)
- _, err = w.Write(publicKey.Point)
- return
- case PubKeyAlgoEd448:
- publicKey := pk.PublicKey.(*ed448.PublicKey)
- _, err = w.Write(publicKey.Point)
- return
- }
- return errors.InvalidArgumentError("bad public-key algorithm")
-}
-
-// CanSign returns true iff this public key can generate signatures
-func (pk *PublicKey) CanSign() bool {
- return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal && pk.PubKeyAlgo != PubKeyAlgoECDH
-}
-
-// VerifyHashTag returns nil iff sig appears to be a plausible signature of the data
-// hashed into signed, based solely on its HashTag. signed is mutated by this call.
-func VerifyHashTag(signed hash.Hash, sig *Signature) (err error) {
- if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
- sig.AddMetadataToHashSuffix()
- }
- signed.Write(sig.HashSuffix)
- hashBytes := signed.Sum(nil)
- if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {
- return errors.SignatureError("hash tag doesn't match")
- }
- return nil
-}
-
-// VerifySignature returns nil iff sig is a valid signature, made by this
-// public key, of the data hashed into signed. signed is mutated by this call.
-func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) {
- if !pk.CanSign() {
- return errors.InvalidArgumentError("public key cannot generate signatures")
- }
- if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
- sig.AddMetadataToHashSuffix()
- }
- signed.Write(sig.HashSuffix)
- hashBytes := signed.Sum(nil)
- // see discussion https://github.com/ProtonMail/go-crypto/issues/107
- if sig.Version >= 5 && (hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1]) {
- return errors.SignatureError("hash tag doesn't match")
- }
-
- if pk.PubKeyAlgo != sig.PubKeyAlgo {
- return errors.InvalidArgumentError("public key and signature use different algorithms")
- }
-
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey)
- err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.Bytes()))
- if err != nil {
- return errors.SignatureError("RSA verification failure")
- }
- return nil
- case PubKeyAlgoDSA:
- dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey)
- // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
- subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8
- if len(hashBytes) > subgroupSize {
- hashBytes = hashBytes[:subgroupSize]
- }
- if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.Bytes()), new(big.Int).SetBytes(sig.DSASigS.Bytes())) {
- return errors.SignatureError("DSA verification failure")
- }
- return nil
- case PubKeyAlgoECDSA:
- ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey)
- if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.Bytes()), new(big.Int).SetBytes(sig.ECDSASigS.Bytes())) {
- return errors.SignatureError("ECDSA verification failure")
- }
- return nil
- case PubKeyAlgoEdDSA:
- eddsaPublicKey := pk.PublicKey.(*eddsa.PublicKey)
- if !eddsa.Verify(eddsaPublicKey, hashBytes, sig.EdDSASigR.Bytes(), sig.EdDSASigS.Bytes()) {
- return errors.SignatureError("EdDSA verification failure")
- }
- return nil
- case PubKeyAlgoEd25519:
- ed25519PublicKey := pk.PublicKey.(*ed25519.PublicKey)
- if !ed25519.Verify(ed25519PublicKey, hashBytes, sig.EdSig) {
- return errors.SignatureError("Ed25519 verification failure")
- }
- return nil
- case PubKeyAlgoEd448:
- ed448PublicKey := pk.PublicKey.(*ed448.PublicKey)
- if !ed448.Verify(ed448PublicKey, hashBytes, sig.EdSig) {
- return errors.SignatureError("ed448 verification failure")
- }
- return nil
- default:
- return errors.SignatureError("Unsupported public key algorithm used in signature")
- }
-}
-
-// keySignatureHash returns a Hash of the message that needs to be signed for
-// pk to assert a subkey relationship to signed.
-func keySignatureHash(pk, signed signingKey, hashFunc hash.Hash) (h hash.Hash, err error) {
- h = hashFunc
-
- // RFC 4880, section 5.2.4
- err = pk.SerializeForHash(h)
- if err != nil {
- return nil, err
- }
-
- err = signed.SerializeForHash(h)
- return
-}
-
-// VerifyKeyHashTag returns nil iff sig appears to be a plausible signature over this
-// primary key and subkey, based solely on its HashTag.
-func (pk *PublicKey) VerifyKeyHashTag(signed *PublicKey, sig *Signature) error {
- preparedHash, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- h, err := keySignatureHash(pk, signed, preparedHash)
- if err != nil {
- return err
- }
- return VerifyHashTag(h, sig)
-}
-
-// VerifyKeySignature returns nil iff sig is a valid signature, made by this
-// public key, of signed.
-func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error {
- preparedHash, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- h, err := keySignatureHash(pk, signed, preparedHash)
- if err != nil {
- return err
- }
- if err = pk.VerifySignature(h, sig); err != nil {
- return err
- }
-
- if sig.FlagSign {
- // Signing subkeys must be cross-signed. See
- // https://www.gnupg.org/faq/subkey-cross-certify.html.
- if sig.EmbeddedSignature == nil {
- return errors.StructuralError("signing subkey is missing cross-signature")
- }
- preparedHashEmbedded, err := sig.EmbeddedSignature.PrepareVerify()
- if err != nil {
- return err
- }
- // Verify the cross-signature. This is calculated over the same
- // data as the main signature, so we cannot just recursively
- // call signed.VerifyKeySignature(...)
- if h, err = keySignatureHash(pk, signed, preparedHashEmbedded); err != nil {
- return errors.StructuralError("error while hashing for cross-signature: " + err.Error())
- }
- if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil {
- return errors.StructuralError("error while verifying cross-signature: " + err.Error())
- }
- }
-
- return nil
-}
-
-func keyRevocationHash(pk signingKey, hashFunc hash.Hash) (err error) {
- return pk.SerializeForHash(hashFunc)
-}
-
-// VerifyRevocationHashTag returns nil iff sig appears to be a plausible signature
-// over this public key, based solely on its HashTag.
-func (pk *PublicKey) VerifyRevocationHashTag(sig *Signature) (err error) {
- preparedHash, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- if err = keyRevocationHash(pk, preparedHash); err != nil {
- return err
- }
- return VerifyHashTag(preparedHash, sig)
-}
-
-// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this
-// public key.
-func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) {
- preparedHash, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- if err = keyRevocationHash(pk, preparedHash); err != nil {
- return err
- }
- return pk.VerifySignature(preparedHash, sig)
-}
-
-// VerifySubkeyRevocationSignature returns nil iff sig is a valid subkey revocation signature,
-// made by this public key, of signed.
-func (pk *PublicKey) VerifySubkeyRevocationSignature(sig *Signature, signed *PublicKey) (err error) {
- preparedHash, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- h, err := keySignatureHash(pk, signed, preparedHash)
- if err != nil {
- return err
- }
- return pk.VerifySignature(h, sig)
-}
-
-// userIdSignatureHash returns a Hash of the message that needs to be signed
-// to assert that pk is a valid key for id.
-func userIdSignatureHash(id string, pk *PublicKey, h hash.Hash) (err error) {
-
- // RFC 4880, section 5.2.4
- if err := pk.SerializeSignaturePrefix(h); err != nil {
- return err
- }
- if err := pk.serializeWithoutHeaders(h); err != nil {
- return err
- }
-
- var buf [5]byte
- buf[0] = 0xb4
- buf[1] = byte(len(id) >> 24)
- buf[2] = byte(len(id) >> 16)
- buf[3] = byte(len(id) >> 8)
- buf[4] = byte(len(id))
- h.Write(buf[:])
- h.Write([]byte(id))
-
- return nil
-}
-
-// directKeySignatureHash returns a Hash of the message that needs to be signed.
-func directKeySignatureHash(pk *PublicKey, h hash.Hash) (err error) {
- return pk.SerializeForHash(h)
-}
-
-// VerifyUserIdHashTag returns nil iff sig appears to be a plausible signature over this
-// public key and UserId, based solely on its HashTag
-func (pk *PublicKey) VerifyUserIdHashTag(id string, sig *Signature) (err error) {
- preparedHash, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- err = userIdSignatureHash(id, pk, preparedHash)
- if err != nil {
- return err
- }
- return VerifyHashTag(preparedHash, sig)
-}
-
-// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this
-// public key, that id is the identity of pub.
-func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) {
- h, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- if err := userIdSignatureHash(id, pub, h); err != nil {
- return err
- }
- return pk.VerifySignature(h, sig)
-}
-
-// VerifyDirectKeySignature returns nil iff sig is a valid signature, made by this
-// public key.
-func (pk *PublicKey) VerifyDirectKeySignature(sig *Signature) (err error) {
- h, err := sig.PrepareVerify()
- if err != nil {
- return err
- }
- if err := directKeySignatureHash(pk, h); err != nil {
- return err
- }
- return pk.VerifySignature(h, sig)
-}
-
-// KeyIdString returns the public key's fingerprint in capital hex
-// (e.g. "6C7EE1B8621CC013").
-func (pk *PublicKey) KeyIdString() string {
- return fmt.Sprintf("%X", pk.Fingerprint[12:20])
-}
-
-// KeyIdShortString returns the short form of public key's fingerprint
-// in capital hex, as shown by gpg --list-keys (e.g. "621CC013").
-func (pk *PublicKey) KeyIdShortString() string {
- return fmt.Sprintf("%X", pk.Fingerprint[16:20])
-}
-
-// BitLength returns the bit length for the given public key.
-func (pk *PublicKey) BitLength() (bitLength uint16, err error) {
- switch pk.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
- bitLength = pk.n.BitLength()
- case PubKeyAlgoDSA:
- bitLength = pk.p.BitLength()
- case PubKeyAlgoElGamal:
- bitLength = pk.p.BitLength()
- case PubKeyAlgoECDSA:
- bitLength = pk.p.BitLength()
- case PubKeyAlgoECDH:
- bitLength = pk.p.BitLength()
- case PubKeyAlgoEdDSA:
- bitLength = pk.p.BitLength()
- case PubKeyAlgoX25519:
- bitLength = x25519.KeySize * 8
- case PubKeyAlgoX448:
- bitLength = x448.KeySize * 8
- case PubKeyAlgoEd25519:
- bitLength = ed25519.PublicKeySize * 8
- case PubKeyAlgoEd448:
- bitLength = ed448.PublicKeySize * 8
- default:
- err = errors.InvalidArgumentError("bad public-key algorithm")
- }
- return
-}
-
-// Curve returns the used elliptic curve of this public key.
-// Returns an error if no elliptic curve is used.
-func (pk *PublicKey) Curve() (curve Curve, err error) {
- switch pk.PubKeyAlgo {
- case PubKeyAlgoECDSA, PubKeyAlgoECDH, PubKeyAlgoEdDSA:
- curveInfo := ecc.FindByOid(pk.oid)
- if curveInfo == nil {
- return "", errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
- }
- curve = Curve(curveInfo.GenName)
- case PubKeyAlgoEd25519, PubKeyAlgoX25519:
- curve = Curve25519
- case PubKeyAlgoEd448, PubKeyAlgoX448:
- curve = Curve448
- default:
- err = errors.InvalidArgumentError("public key does not operate with an elliptic curve")
- }
- return
-}
-
-// KeyExpired returns whether sig is a self-signature of a key that has
-// expired or is created in the future.
-func (pk *PublicKey) KeyExpired(sig *Signature, currentTime time.Time) bool {
- if pk.CreationTime.Unix() > currentTime.Unix() {
- return true
- }
- if sig.KeyLifetimeSecs == nil || *sig.KeyLifetimeSecs == 0 {
- return false
- }
- expiry := pk.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second)
- return currentTime.Unix() > expiry.Unix()
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key_test_data.go
deleted file mode 100644
index b255f1f6f8..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key_test_data.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package packet
-
-const rsaFingerprintHex = "5fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb"
-
-const rsaPkDataHex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001"
-
-const dsaFingerprintHex = "eece4c094db002103714c63c8e8fbe54062f19ed"
-
-const dsaPkDataHex = "9901a2044d432f89110400cd581334f0d7a1e1bdc8b9d6d8c0baf68793632735d2bb0903224cbaa1dfbf35a60ee7a13b92643421e1eb41aa8d79bea19a115a677f6b8ba3c7818ce53a6c2a24a1608bd8b8d6e55c5090cbde09dd26e356267465ae25e69ec8bdd57c7bbb2623e4d73336f73a0a9098f7f16da2e25252130fd694c0e8070c55a812a423ae7f00a0ebf50e70c2f19c3520a551bd4b08d30f23530d3d03ff7d0bf4a53a64a09dc5e6e6e35854b7d70c882b0c60293401958b1bd9e40abec3ea05ba87cf64899299d4bd6aa7f459c201d3fbbd6c82004bdc5e8a9eb8082d12054cc90fa9d4ec251a843236a588bf49552441817436c4f43326966fe85447d4e6d0acf8fa1ef0f014730770603ad7634c3088dc52501c237328417c31c89ed70400b2f1a98b0bf42f11fefc430704bebbaa41d9f355600c3facee1e490f64208e0e094ea55e3a598a219a58500bf78ac677b670a14f4e47e9cf8eab4f368cc1ddcaa18cc59309d4cc62dd4f680e73e6cc3e1ce87a84d0925efbcb26c575c093fc42eecf45135fabf6403a25c2016e1774c0484e440a18319072c617cc97ac0a3bb0"
-
-const ecdsaFingerprintHex = "9892270b38b8980b05c8d56d43fe956c542ca00b"
-
-const ecdsaPkDataHex = "9893045071c29413052b8104002304230401f4867769cedfa52c325018896245443968e52e51d0c2df8d939949cb5b330f2921711fbee1c9b9dddb95d15cb0255e99badeddda7cc23d9ddcaacbc290969b9f24019375d61c2e4e3b36953a28d8b2bc95f78c3f1d592fb24499be348656a7b17e3963187b4361afe497bc5f9f81213f04069f8e1fb9e6a6290ae295ca1a92b894396cb4"
-
-const ecdhFingerprintHex = "722354df2475a42164d1d49faa8b938f9a201946"
-
-const ecdhPkDataHex = "b90073044d53059212052b810400220303042faa84024a20b6735c4897efa5bfb41bf85b7eefeab5ca0cb9ffc8ea04a46acb25534a577694f9e25340a4ab5223a9dd1eda530c8aa2e6718db10d7e672558c7736fe09369ea5739a2a3554bf16d41faa50562f11c6d39bbd5dffb6b9a9ec91803010909"
-
-const eddsaFingerprintHex = "b2d5e5ec0e6deca6bc8eeeb00907e75e1dd99ad8"
-
-const eddsaPkDataHex = "98330456e2132b16092b06010401da470f01010740bbda39266affa511a8c2d02edf690fb784b0499c4406185811a163539ef11dc1b41d74657374696e67203c74657374696e674074657374696e672e636f6d3e8879041316080021050256e2132b021b03050b09080702061508090a0b020416020301021e01021780000a09100907e75e1dd99ad86d0c00fe39d2008359352782bc9b61ac382584cd8eff3f57a18c2287e3afeeb05d1f04ba00fe2d0bc1ddf3ff8adb9afa3e7d9287244b4ec567f3db4d60b74a9b5465ed528203"
-
-// Source: https://sites.google.com/site/brainhub/pgpecckeys#TOC-ECC-NIST-P-384-key
-const ecc384PubHex = `99006f044d53059213052b81040022030304f6b8c5aced5b84ef9f4a209db2e4a9dfb70d28cb8c10ecd57674a9fa5a67389942b62d5e51367df4c7bfd3f8e500feecf07ed265a621a8ebbbe53e947ec78c677eba143bd1533c2b350e1c29f82313e1e1108eba063be1e64b10e6950e799c2db42465635f6473615f64685f333834203c6f70656e70677040627261696e6875622e6f72673e8900cb04101309005305024d530592301480000000002000077072656665727265642d656d61696c2d656e636f64696e67407067702e636f6d7067706d696d65040b090807021901051b03000000021602051e010000000415090a08000a0910098033880f54719fca2b0180aa37350968bd5f115afd8ce7bc7b103822152dbff06d0afcda835329510905b98cb469ba208faab87c7412b799e7b633017f58364ea480e8a1a3f253a0c5f22c446e8be9a9fce6210136ee30811abbd49139de28b5bdf8dc36d06ae748579e9ff503b90073044d53059212052b810400220303042faa84024a20b6735c4897efa5bfb41bf85b7eefeab5ca0cb9ffc8ea04a46acb25534a577694f9e25340a4ab5223a9dd1eda530c8aa2e6718db10d7e672558c7736fe09369ea5739a2a3554bf16d41faa50562f11c6d39bbd5dffb6b9a9ec9180301090989008404181309000c05024d530592051b0c000000000a0910098033880f54719f80970180eee7a6d8fcee41ee4f9289df17f9bcf9d955dca25c583b94336f3a2b2d4986dc5cf417b8d2dc86f741a9e1a6d236c0e3017d1c76575458a0cfb93ae8a2b274fcc65ceecd7a91eec83656ba13219969f06945b48c56bd04152c3a0553c5f2f4bd1267`
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/reader.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/reader.go
deleted file mode 100644
index dd84092392..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/reader.go
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-type PacketReader interface {
- Next() (p Packet, err error)
- Push(reader io.Reader) (err error)
- Unread(p Packet)
-}
-
-// Reader reads packets from an io.Reader and allows packets to be 'unread' so
-// that they result from the next call to Next.
-type Reader struct {
- q []Packet
- readers []io.Reader
-}
-
-// New io.Readers are pushed when a compressed or encrypted packet is processed
-// and recursively treated as a new source of packets. However, a carefully
-// crafted packet can trigger an infinite recursive sequence of packets. See
-// http://mumble.net/~campbell/misc/pgp-quine
-// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402
-// This constant limits the number of recursive packets that may be pushed.
-const maxReaders = 32
-
-// Next returns the most recently unread Packet, or reads another packet from
-// the top-most io.Reader. Unknown/unsupported/Marker packet types are skipped.
-func (r *Reader) Next() (p Packet, err error) {
- for {
- p, err := r.read()
- if err == io.EOF {
- break
- } else if err != nil {
- if _, ok := err.(errors.UnknownPacketTypeError); ok {
- continue
- }
- if _, ok := err.(errors.UnsupportedError); ok {
- switch p.(type) {
- case *SymmetricallyEncrypted, *AEADEncrypted, *Compressed, *LiteralData:
- return nil, err
- }
- continue
- }
- return nil, err
- } else {
- //A marker packet MUST be ignored when received
- switch p.(type) {
- case *Marker:
- continue
- }
- return p, nil
- }
- }
- return nil, io.EOF
-}
-
-// Next returns the most recently unread Packet, or reads another packet from
-// the top-most io.Reader. Unknown/Marker packet types are skipped while unsupported
-// packets are returned as UnsupportedPacket type.
-func (r *Reader) NextWithUnsupported() (p Packet, err error) {
- for {
- p, err = r.read()
- if err == io.EOF {
- break
- } else if err != nil {
- if _, ok := err.(errors.UnknownPacketTypeError); ok {
- continue
- }
- if casteErr, ok := err.(errors.UnsupportedError); ok {
- return &UnsupportedPacket{
- IncompletePacket: p,
- Error: casteErr,
- }, nil
- }
- return
- } else {
- //A marker packet MUST be ignored when received
- switch p.(type) {
- case *Marker:
- continue
- }
- return
- }
- }
- return nil, io.EOF
-}
-
-func (r *Reader) read() (p Packet, err error) {
- if len(r.q) > 0 {
- p = r.q[len(r.q)-1]
- r.q = r.q[:len(r.q)-1]
- return
- }
- for len(r.readers) > 0 {
- p, err = Read(r.readers[len(r.readers)-1])
- if err == io.EOF {
- r.readers = r.readers[:len(r.readers)-1]
- continue
- }
- return p, err
- }
- return nil, io.EOF
-}
-
-// Push causes the Reader to start reading from a new io.Reader. When an EOF
-// error is seen from the new io.Reader, it is popped and the Reader continues
-// to read from the next most recent io.Reader. Push returns a StructuralError
-// if pushing the reader would exceed the maximum recursion level, otherwise it
-// returns nil.
-func (r *Reader) Push(reader io.Reader) (err error) {
- if len(r.readers) >= maxReaders {
- return errors.StructuralError("too many layers of packets")
- }
- r.readers = append(r.readers, reader)
- return nil
-}
-
-// Unread causes the given Packet to be returned from the next call to Next.
-func (r *Reader) Unread(p Packet) {
- r.q = append(r.q, p)
-}
-
-func NewReader(r io.Reader) *Reader {
- return &Reader{
- q: nil,
- readers: []io.Reader{r},
- }
-}
-
-// CheckReader is similar to Reader but additionally
-// uses the pushdown automata to verify the read packet sequence.
-type CheckReader struct {
- Reader
- verifier *SequenceVerifier
- fullyRead bool
-}
-
-// Next returns the most recently unread Packet, or reads another packet from
-// the top-most io.Reader. Unknown packet types are skipped.
-// If the read packet sequence does not conform to the packet composition
-// rules in rfc4880, it returns an error.
-func (r *CheckReader) Next() (p Packet, err error) {
- if r.fullyRead {
- return nil, io.EOF
- }
- if len(r.q) > 0 {
- p = r.q[len(r.q)-1]
- r.q = r.q[:len(r.q)-1]
- return
- }
- var errMsg error
- for len(r.readers) > 0 {
- p, errMsg, err = ReadWithCheck(r.readers[len(r.readers)-1], r.verifier)
- if errMsg != nil {
- err = errMsg
- return
- }
- if err == nil {
- return
- }
- if err == io.EOF {
- r.readers = r.readers[:len(r.readers)-1]
- continue
- }
- //A marker packet MUST be ignored when received
- switch p.(type) {
- case *Marker:
- continue
- }
- if _, ok := err.(errors.UnknownPacketTypeError); ok {
- continue
- }
- if _, ok := err.(errors.UnsupportedError); ok {
- switch p.(type) {
- case *SymmetricallyEncrypted, *AEADEncrypted, *Compressed, *LiteralData:
- return nil, err
- }
- continue
- }
- return nil, err
- }
- if errMsg = r.verifier.Next(EOSSymbol); errMsg != nil {
- return nil, errMsg
- }
- if errMsg = r.verifier.AssertValid(); errMsg != nil {
- return nil, errMsg
- }
- r.fullyRead = true
- return nil, io.EOF
-}
-
-func NewCheckReader(r io.Reader) *CheckReader {
- return &CheckReader{
- Reader: Reader{
- q: nil,
- readers: []io.Reader{r},
- },
- verifier: NewSequenceVerifier(),
- fullyRead: false,
- }
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/recipient.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/recipient.go
deleted file mode 100644
index fb2e362e4a..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/recipient.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package packet
-
-// Recipient type represents a Intended Recipient Fingerprint subpacket
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#name-intended-recipient-fingerpr
-type Recipient struct {
- KeyVersion int
- Fingerprint []byte
-}
-
-func (r *Recipient) Serialize() []byte {
- packet := make([]byte, len(r.Fingerprint)+1)
- packet[0] = byte(r.KeyVersion)
- copy(packet[1:], r.Fingerprint)
- return packet
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
deleted file mode 100644
index 3a4b366d87..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
+++ /dev/null
@@ -1,1509 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "bytes"
- "crypto"
- "crypto/dsa"
- "encoding/asn1"
- "encoding/binary"
- "hash"
- "io"
- "math/big"
- "strconv"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
- "github.com/ProtonMail/go-crypto/openpgp/ed25519"
- "github.com/ProtonMail/go-crypto/openpgp/ed448"
- "github.com/ProtonMail/go-crypto/openpgp/eddsa"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
-)
-
-const (
- // First octet of key flags.
- // See RFC 9580, section 5.2.3.29 for details.
- KeyFlagCertify = 1 << iota
- KeyFlagSign
- KeyFlagEncryptCommunications
- KeyFlagEncryptStorage
- KeyFlagSplitKey
- KeyFlagAuthenticate
- _
- KeyFlagGroupKey
-)
-
-const (
- // First octet of keyserver preference flags.
- // See RFC 9580, section 5.2.3.25 for details.
- _ = 1 << iota
- _
- _
- _
- _
- _
- _
- KeyserverPrefNoModify
-)
-
-const SaltNotationName = "salt@notations.openpgpjs.org"
-
-// Signature represents a signature. See RFC 9580, section 5.2.
-type Signature struct {
- Version int
- SigType SignatureType
- PubKeyAlgo PublicKeyAlgorithm
- Hash crypto.Hash
- // salt contains a random salt value for v6 signatures
- // See RFC 9580 Section 5.2.4.
- salt []byte
-
- // HashSuffix is extra data that is hashed in after the signed data.
- HashSuffix []byte
- // HashTag contains the first two bytes of the hash for fast rejection
- // of bad signed data.
- HashTag [2]byte
-
- // Metadata includes format, filename and time, and is protected by v5
- // signatures of type 0x00 or 0x01. This metadata is included into the hash
- // computation; if nil, six 0x00 bytes are used instead. See section 5.2.4.
- Metadata *LiteralData
-
- CreationTime time.Time
-
- RSASignature encoding.Field
- DSASigR, DSASigS encoding.Field
- ECDSASigR, ECDSASigS encoding.Field
- EdDSASigR, EdDSASigS encoding.Field
- EdSig []byte
-
- // rawSubpackets contains the unparsed subpackets, in order.
- rawSubpackets []outputSubpacket
-
- // The following are optional so are nil when not included in the
- // signature.
-
- SigLifetimeSecs, KeyLifetimeSecs *uint32
- PreferredSymmetric, PreferredHash, PreferredCompression []uint8
- PreferredCipherSuites [][2]uint8
- IssuerKeyId *uint64
- IssuerFingerprint []byte
- SignerUserId *string
- IsPrimaryId *bool
- Notations []*Notation
- IntendedRecipients []*Recipient
-
- // TrustLevel and TrustAmount can be set by the signer to assert that
- // the key is not only valid but also trustworthy at the specified
- // level.
- // See RFC 9580, section 5.2.3.21 for details.
- TrustLevel TrustLevel
- TrustAmount TrustAmount
-
- // TrustRegularExpression can be used in conjunction with trust Signature
- // packets to limit the scope of the trust that is extended.
- // See RFC 9580, section 5.2.3.22 for details.
- TrustRegularExpression *string
-
- // KeyserverPrefsValid is set if any keyserver preferences were given. See RFC 9580, section
- // 5.2.3.25 for details.
- KeyserverPrefsValid bool
- KeyserverPrefNoModify bool
-
- // PreferredKeyserver can be set to a URI where the latest version of the
- // key that this signature is made over can be found. See RFC 9580, section
- // 5.2.3.26 for details.
- PreferredKeyserver string
-
- // PolicyURI can be set to the URI of a document that describes the
- // policy under which the signature was issued. See RFC 9580, section
- // 5.2.3.28 for details.
- PolicyURI string
-
- // FlagsValid is set if any flags were given. See RFC 9580, section
- // 5.2.3.29 for details.
- FlagsValid bool
- FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage, FlagSplitKey, FlagAuthenticate, FlagGroupKey bool
-
- // RevocationReason is set if this signature has been revoked.
- // See RFC 9580, section 5.2.3.31 for details.
- RevocationReason *ReasonForRevocation
- RevocationReasonText string
-
- // In a self-signature, these flags are set there is a features subpacket
- // indicating that the issuer implementation supports these features
- // see https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#features-subpacket
- SEIPDv1, SEIPDv2 bool
-
- // EmbeddedSignature, if non-nil, is a signature of the parent key, by
- // this key. This prevents an attacker from claiming another's signing
- // subkey as their own.
- EmbeddedSignature *Signature
-
- outSubpackets []outputSubpacket
-}
-
-// VerifiableSignature internally keeps state if the
-// the signature has been verified before.
-type VerifiableSignature struct {
- Valid *bool // nil if it has not been verified yet
- Packet *Signature
-}
-
-// NewVerifiableSig returns a struct of type VerifiableSignature referencing the input signature.
-func NewVerifiableSig(signature *Signature) *VerifiableSignature {
- return &VerifiableSignature{
- Packet: signature,
- }
-}
-
-// Salt returns the signature salt for v6 signatures.
-func (sig *Signature) Salt() []byte {
- if sig == nil {
- return nil
- }
- return sig.salt
-}
-
-func (sig *Signature) parse(r io.Reader) (err error) {
- // RFC 9580, section 5.2.3
- var buf [7]byte
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- sig.Version = int(buf[0])
- if sig.Version != 4 && sig.Version != 5 && sig.Version != 6 {
- err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0])))
- return
- }
-
- if V5Disabled && sig.Version == 5 {
- return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
- }
-
- if sig.Version == 6 {
- _, err = readFull(r, buf[:7])
- } else {
- _, err = readFull(r, buf[:5])
- }
- if err != nil {
- return
- }
- sig.SigType = SignatureType(buf[0])
- sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1])
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA, PubKeyAlgoEdDSA, PubKeyAlgoEd25519, PubKeyAlgoEd448:
- default:
- err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo)))
- return
- }
-
- var ok bool
-
- if sig.Version < 5 {
- sig.Hash, ok = algorithm.HashIdToHashWithSha1(buf[2])
- } else {
- sig.Hash, ok = algorithm.HashIdToHash(buf[2])
- }
-
- if !ok {
- return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2])))
- }
-
- var hashedSubpacketsLength int
- if sig.Version == 6 {
- // For a v6 signature, a four-octet length is used.
- hashedSubpacketsLength =
- int(buf[3])<<24 |
- int(buf[4])<<16 |
- int(buf[5])<<8 |
- int(buf[6])
- } else {
- hashedSubpacketsLength = int(buf[3])<<8 | int(buf[4])
- }
- hashedSubpackets := make([]byte, hashedSubpacketsLength)
- _, err = readFull(r, hashedSubpackets)
- if err != nil {
- return
- }
- err = sig.buildHashSuffix(hashedSubpackets)
- if err != nil {
- return
- }
-
- err = parseSignatureSubpackets(sig, hashedSubpackets, true)
- if err != nil {
- return
- }
-
- if sig.Version == 6 {
- _, err = readFull(r, buf[:4])
- } else {
- _, err = readFull(r, buf[:2])
- }
-
- if err != nil {
- return
- }
- var unhashedSubpacketsLength uint32
- if sig.Version == 6 {
- unhashedSubpacketsLength = uint32(buf[0])<<24 | uint32(buf[1])<<16 | uint32(buf[2])<<8 | uint32(buf[3])
- } else {
- unhashedSubpacketsLength = uint32(buf[0])<<8 | uint32(buf[1])
- }
- unhashedSubpackets := make([]byte, unhashedSubpacketsLength)
- _, err = readFull(r, unhashedSubpackets)
- if err != nil {
- return
- }
- err = parseSignatureSubpackets(sig, unhashedSubpackets, false)
- if err != nil {
- return
- }
-
- _, err = readFull(r, sig.HashTag[:2])
- if err != nil {
- return
- }
-
- if sig.Version == 6 {
- // Only for v6 signatures, a variable-length field containing the salt
- _, err = readFull(r, buf[:1])
- if err != nil {
- return
- }
- saltLength := int(buf[0])
- var expectedSaltLength int
- expectedSaltLength, err = SaltLengthForHash(sig.Hash)
- if err != nil {
- return
- }
- if saltLength != expectedSaltLength {
- err = errors.StructuralError("unexpected salt size for the given hash algorithm")
- return
- }
- salt := make([]byte, expectedSaltLength)
- _, err = readFull(r, salt)
- if err != nil {
- return
- }
- sig.salt = salt
- }
-
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- sig.RSASignature = new(encoding.MPI)
- _, err = sig.RSASignature.ReadFrom(r)
- case PubKeyAlgoDSA:
- sig.DSASigR = new(encoding.MPI)
- if _, err = sig.DSASigR.ReadFrom(r); err != nil {
- return
- }
-
- sig.DSASigS = new(encoding.MPI)
- _, err = sig.DSASigS.ReadFrom(r)
- case PubKeyAlgoECDSA:
- sig.ECDSASigR = new(encoding.MPI)
- if _, err = sig.ECDSASigR.ReadFrom(r); err != nil {
- return
- }
-
- sig.ECDSASigS = new(encoding.MPI)
- _, err = sig.ECDSASigS.ReadFrom(r)
- case PubKeyAlgoEdDSA:
- sig.EdDSASigR = new(encoding.MPI)
- if _, err = sig.EdDSASigR.ReadFrom(r); err != nil {
- return
- }
-
- sig.EdDSASigS = new(encoding.MPI)
- if _, err = sig.EdDSASigS.ReadFrom(r); err != nil {
- return
- }
- case PubKeyAlgoEd25519:
- sig.EdSig, err = ed25519.ReadSignature(r)
- if err != nil {
- return
- }
- case PubKeyAlgoEd448:
- sig.EdSig, err = ed448.ReadSignature(r)
- if err != nil {
- return
- }
- default:
- panic("unreachable")
- }
- return
-}
-
-// parseSignatureSubpackets parses subpackets of the main signature packet. See
-// RFC 9580, section 5.2.3.1.
-func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) {
- for len(subpackets) > 0 {
- subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed)
- if err != nil {
- return
- }
- }
-
- if sig.CreationTime.IsZero() {
- err = errors.StructuralError("no creation time in signature")
- }
-
- return
-}
-
-type signatureSubpacketType uint8
-
-const (
- creationTimeSubpacket signatureSubpacketType = 2
- signatureExpirationSubpacket signatureSubpacketType = 3
- exportableCertSubpacket signatureSubpacketType = 4
- trustSubpacket signatureSubpacketType = 5
- regularExpressionSubpacket signatureSubpacketType = 6
- keyExpirationSubpacket signatureSubpacketType = 9
- prefSymmetricAlgosSubpacket signatureSubpacketType = 11
- issuerSubpacket signatureSubpacketType = 16
- notationDataSubpacket signatureSubpacketType = 20
- prefHashAlgosSubpacket signatureSubpacketType = 21
- prefCompressionSubpacket signatureSubpacketType = 22
- keyserverPrefsSubpacket signatureSubpacketType = 23
- prefKeyserverSubpacket signatureSubpacketType = 24
- primaryUserIdSubpacket signatureSubpacketType = 25
- policyUriSubpacket signatureSubpacketType = 26
- keyFlagsSubpacket signatureSubpacketType = 27
- signerUserIdSubpacket signatureSubpacketType = 28
- reasonForRevocationSubpacket signatureSubpacketType = 29
- featuresSubpacket signatureSubpacketType = 30
- embeddedSignatureSubpacket signatureSubpacketType = 32
- issuerFingerprintSubpacket signatureSubpacketType = 33
- intendedRecipientSubpacket signatureSubpacketType = 35
- prefCipherSuitesSubpacket signatureSubpacketType = 39
-)
-
-// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1.
-func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) {
- // RFC 9580, section 5.2.3.7
- var (
- length uint32
- packetType signatureSubpacketType
- isCritical bool
- )
- if len(subpacket) == 0 {
- err = errors.StructuralError("zero length signature subpacket")
- return
- }
- switch {
- case subpacket[0] < 192:
- length = uint32(subpacket[0])
- subpacket = subpacket[1:]
- case subpacket[0] < 255:
- if len(subpacket) < 2 {
- goto Truncated
- }
- length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192
- subpacket = subpacket[2:]
- default:
- if len(subpacket) < 5 {
- goto Truncated
- }
- length = uint32(subpacket[1])<<24 |
- uint32(subpacket[2])<<16 |
- uint32(subpacket[3])<<8 |
- uint32(subpacket[4])
- subpacket = subpacket[5:]
- }
- if length > uint32(len(subpacket)) {
- goto Truncated
- }
- rest = subpacket[length:]
- subpacket = subpacket[:length]
- if len(subpacket) == 0 {
- err = errors.StructuralError("zero length signature subpacket")
- return
- }
- packetType = signatureSubpacketType(subpacket[0] & 0x7f)
- isCritical = subpacket[0]&0x80 == 0x80
- subpacket = subpacket[1:]
- sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket})
- if !isHashed &&
- packetType != issuerSubpacket &&
- packetType != issuerFingerprintSubpacket &&
- packetType != embeddedSignatureSubpacket {
- return
- }
- switch packetType {
- case creationTimeSubpacket:
- if len(subpacket) != 4 {
- err = errors.StructuralError("signature creation time not four bytes")
- return
- }
- t := binary.BigEndian.Uint32(subpacket)
- sig.CreationTime = time.Unix(int64(t), 0)
- case signatureExpirationSubpacket:
- // Signature expiration time, section 5.2.3.18
- if len(subpacket) != 4 {
- err = errors.StructuralError("expiration subpacket with bad length")
- return
- }
- sig.SigLifetimeSecs = new(uint32)
- *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket)
- case exportableCertSubpacket:
- if subpacket[0] == 0 {
- err = errors.UnsupportedError("signature with non-exportable certification")
- return
- }
- case trustSubpacket:
- if len(subpacket) != 2 {
- err = errors.StructuralError("trust subpacket with bad length")
- return
- }
- // Trust level and amount, section 5.2.3.21
- sig.TrustLevel = TrustLevel(subpacket[0])
- sig.TrustAmount = TrustAmount(subpacket[1])
- case regularExpressionSubpacket:
- if len(subpacket) == 0 {
- err = errors.StructuralError("regexp subpacket with bad length")
- return
- }
- // Trust regular expression, section 5.2.3.22
- // RFC specifies the string should be null-terminated; remove a null byte from the end
- if subpacket[len(subpacket)-1] != 0x00 {
- err = errors.StructuralError("expected regular expression to be null-terminated")
- return
- }
- trustRegularExpression := string(subpacket[:len(subpacket)-1])
- sig.TrustRegularExpression = &trustRegularExpression
- case keyExpirationSubpacket:
- // Key expiration time, section 5.2.3.13
- if len(subpacket) != 4 {
- err = errors.StructuralError("key expiration subpacket with bad length")
- return
- }
- sig.KeyLifetimeSecs = new(uint32)
- *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket)
- case prefSymmetricAlgosSubpacket:
- // Preferred symmetric algorithms, section 5.2.3.14
- sig.PreferredSymmetric = make([]byte, len(subpacket))
- copy(sig.PreferredSymmetric, subpacket)
- case issuerSubpacket:
- // Issuer, section 5.2.3.12
- if sig.Version > 4 && isHashed {
- err = errors.StructuralError("issuer subpacket found in v6 key")
- return
- }
- if len(subpacket) != 8 {
- err = errors.StructuralError("issuer subpacket with bad length")
- return
- }
- if sig.Version <= 4 {
- sig.IssuerKeyId = new(uint64)
- *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket)
- }
- case notationDataSubpacket:
- // Notation data, section 5.2.3.24
- if len(subpacket) < 8 {
- err = errors.StructuralError("notation data subpacket with bad length")
- return
- }
-
- nameLength := uint32(subpacket[4])<<8 | uint32(subpacket[5])
- valueLength := uint32(subpacket[6])<<8 | uint32(subpacket[7])
- if len(subpacket) != int(nameLength)+int(valueLength)+8 {
- err = errors.StructuralError("notation data subpacket with bad length")
- return
- }
-
- notation := Notation{
- IsHumanReadable: (subpacket[0] & 0x80) == 0x80,
- Name: string(subpacket[8:(nameLength + 8)]),
- Value: subpacket[(nameLength + 8):(valueLength + nameLength + 8)],
- IsCritical: isCritical,
- }
-
- sig.Notations = append(sig.Notations, ¬ation)
- case prefHashAlgosSubpacket:
- // Preferred hash algorithms, section 5.2.3.16
- sig.PreferredHash = make([]byte, len(subpacket))
- copy(sig.PreferredHash, subpacket)
- case prefCompressionSubpacket:
- // Preferred compression algorithms, section 5.2.3.17
- sig.PreferredCompression = make([]byte, len(subpacket))
- copy(sig.PreferredCompression, subpacket)
- case keyserverPrefsSubpacket:
- // Keyserver preferences, section 5.2.3.25
- sig.KeyserverPrefsValid = true
- if len(subpacket) == 0 {
- return
- }
- if subpacket[0]&KeyserverPrefNoModify != 0 {
- sig.KeyserverPrefNoModify = true
- }
- case prefKeyserverSubpacket:
- // Preferred keyserver, section 5.2.3.26
- sig.PreferredKeyserver = string(subpacket)
- case primaryUserIdSubpacket:
- // Primary User ID, section 5.2.3.27
- if len(subpacket) != 1 {
- err = errors.StructuralError("primary user id subpacket with bad length")
- return
- }
- sig.IsPrimaryId = new(bool)
- if subpacket[0] > 0 {
- *sig.IsPrimaryId = true
- }
- case keyFlagsSubpacket:
- // Key flags, section 5.2.3.29
- sig.FlagsValid = true
- if len(subpacket) == 0 {
- return
- }
- if subpacket[0]&KeyFlagCertify != 0 {
- sig.FlagCertify = true
- }
- if subpacket[0]&KeyFlagSign != 0 {
- sig.FlagSign = true
- }
- if subpacket[0]&KeyFlagEncryptCommunications != 0 {
- sig.FlagEncryptCommunications = true
- }
- if subpacket[0]&KeyFlagEncryptStorage != 0 {
- sig.FlagEncryptStorage = true
- }
- if subpacket[0]&KeyFlagSplitKey != 0 {
- sig.FlagSplitKey = true
- }
- if subpacket[0]&KeyFlagAuthenticate != 0 {
- sig.FlagAuthenticate = true
- }
- if subpacket[0]&KeyFlagGroupKey != 0 {
- sig.FlagGroupKey = true
- }
- case signerUserIdSubpacket:
- userId := string(subpacket)
- sig.SignerUserId = &userId
- case reasonForRevocationSubpacket:
- // Reason For Revocation, section 5.2.3.31
- if len(subpacket) == 0 {
- err = errors.StructuralError("empty revocation reason subpacket")
- return
- }
- sig.RevocationReason = new(ReasonForRevocation)
- *sig.RevocationReason = NewReasonForRevocation(subpacket[0])
- sig.RevocationReasonText = string(subpacket[1:])
- case featuresSubpacket:
- // Features subpacket, section 5.2.3.32 specifies a very general
- // mechanism for OpenPGP implementations to signal support for new
- // features.
- if len(subpacket) > 0 {
- if subpacket[0]&0x01 != 0 {
- sig.SEIPDv1 = true
- }
- // 0x02 and 0x04 are reserved
- if subpacket[0]&0x08 != 0 {
- sig.SEIPDv2 = true
- }
- }
- case embeddedSignatureSubpacket:
- // Only usage is in signatures that cross-certify
- // signing subkeys. section 5.2.3.34 describes the
- // format, with its usage described in section 11.1
- if sig.EmbeddedSignature != nil {
- err = errors.StructuralError("Cannot have multiple embedded signatures")
- return
- }
- sig.EmbeddedSignature = new(Signature)
- if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil {
- return nil, err
- }
- if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding {
- return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType)))
- }
- case policyUriSubpacket:
- // Policy URI, section 5.2.3.28
- sig.PolicyURI = string(subpacket)
- case issuerFingerprintSubpacket:
- if len(subpacket) == 0 {
- err = errors.StructuralError("empty issuer fingerprint subpacket")
- return
- }
- v, l := subpacket[0], len(subpacket[1:])
- if v >= 5 && l != 32 || v < 5 && l != 20 {
- return nil, errors.StructuralError("bad fingerprint length")
- }
- sig.IssuerFingerprint = make([]byte, l)
- copy(sig.IssuerFingerprint, subpacket[1:])
- sig.IssuerKeyId = new(uint64)
- if v >= 5 {
- *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket[1:9])
- } else {
- *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket[13:21])
- }
- case intendedRecipientSubpacket:
- // Intended Recipient Fingerprint, section 5.2.3.36
- if len(subpacket) < 1 {
- return nil, errors.StructuralError("invalid intended recipient fingerpring length")
- }
- version, length := subpacket[0], len(subpacket[1:])
- if version >= 5 && length != 32 || version < 5 && length != 20 {
- return nil, errors.StructuralError("invalid fingerprint length")
- }
- fingerprint := make([]byte, length)
- copy(fingerprint, subpacket[1:])
- sig.IntendedRecipients = append(sig.IntendedRecipients, &Recipient{int(version), fingerprint})
- case prefCipherSuitesSubpacket:
- // Preferred AEAD cipher suites, section 5.2.3.15
- if len(subpacket)%2 != 0 {
- err = errors.StructuralError("invalid aead cipher suite length")
- return
- }
-
- sig.PreferredCipherSuites = make([][2]byte, len(subpacket)/2)
-
- for i := 0; i < len(subpacket)/2; i++ {
- sig.PreferredCipherSuites[i] = [2]uint8{subpacket[2*i], subpacket[2*i+1]}
- }
- default:
- if isCritical {
- err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType)))
- return
- }
- }
- return
-
-Truncated:
- err = errors.StructuralError("signature subpacket truncated")
- return
-}
-
-// subpacketLengthLength returns the length, in bytes, of an encoded length value.
-func subpacketLengthLength(length int) int {
- if length < 192 {
- return 1
- }
- if length < 16320 {
- return 2
- }
- return 5
-}
-
-func (sig *Signature) CheckKeyIdOrFingerprint(pk *PublicKey) bool {
- if sig.IssuerFingerprint != nil && len(sig.IssuerFingerprint) >= 20 {
- return bytes.Equal(sig.IssuerFingerprint, pk.Fingerprint)
- }
- return sig.IssuerKeyId != nil && *sig.IssuerKeyId == pk.KeyId
-}
-
-func (sig *Signature) CheckKeyIdOrFingerprintExplicit(fingerprint []byte, keyId uint64) bool {
- if sig.IssuerFingerprint != nil && len(sig.IssuerFingerprint) >= 20 && fingerprint != nil {
- return bytes.Equal(sig.IssuerFingerprint, fingerprint)
- }
- return sig.IssuerKeyId != nil && *sig.IssuerKeyId == keyId
-}
-
-// serializeSubpacketLength marshals the given length into to.
-func serializeSubpacketLength(to []byte, length int) int {
- // RFC 9580, Section 4.2.1.
- if length < 192 {
- to[0] = byte(length)
- return 1
- }
- if length < 16320 {
- length -= 192
- to[0] = byte((length >> 8) + 192)
- to[1] = byte(length)
- return 2
- }
- to[0] = 255
- to[1] = byte(length >> 24)
- to[2] = byte(length >> 16)
- to[3] = byte(length >> 8)
- to[4] = byte(length)
- return 5
-}
-
-// subpacketsLength returns the serialized length, in bytes, of the given
-// subpackets.
-func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) {
- for _, subpacket := range subpackets {
- if subpacket.hashed == hashed {
- length += subpacketLengthLength(len(subpacket.contents) + 1)
- length += 1 // type byte
- length += len(subpacket.contents)
- }
- }
- return
-}
-
-// serializeSubpackets marshals the given subpackets into to.
-func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) {
- for _, subpacket := range subpackets {
- if subpacket.hashed == hashed {
- n := serializeSubpacketLength(to, len(subpacket.contents)+1)
- to[n] = byte(subpacket.subpacketType)
- if subpacket.isCritical {
- to[n] |= 0x80
- }
- to = to[1+n:]
- n = copy(to, subpacket.contents)
- to = to[n:]
- }
- }
-}
-
-// SigExpired returns whether sig is a signature that has expired or is created
-// in the future.
-func (sig *Signature) SigExpired(currentTime time.Time) bool {
- if sig.CreationTime.Unix() > currentTime.Unix() {
- return true
- }
- if sig.SigLifetimeSecs == nil || *sig.SigLifetimeSecs == 0 {
- return false
- }
- expiry := sig.CreationTime.Add(time.Duration(*sig.SigLifetimeSecs) * time.Second)
- return currentTime.Unix() > expiry.Unix()
-}
-
-// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing.
-func (sig *Signature) buildHashSuffix(hashedSubpackets []byte) (err error) {
- var hashId byte
- var ok bool
-
- if sig.Version < 5 {
- hashId, ok = algorithm.HashToHashIdWithSha1(sig.Hash)
- } else {
- hashId, ok = algorithm.HashToHashId(sig.Hash)
- }
-
- if !ok {
- sig.HashSuffix = nil
- return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash)))
- }
-
- hashedFields := bytes.NewBuffer([]byte{
- uint8(sig.Version),
- uint8(sig.SigType),
- uint8(sig.PubKeyAlgo),
- uint8(hashId),
- })
- hashedSubpacketsLength := len(hashedSubpackets)
- if sig.Version == 6 {
- // v6 signatures store the length in 4 octets
- hashedFields.Write([]byte{
- uint8(hashedSubpacketsLength >> 24),
- uint8(hashedSubpacketsLength >> 16),
- uint8(hashedSubpacketsLength >> 8),
- uint8(hashedSubpacketsLength),
- })
- } else {
- hashedFields.Write([]byte{
- uint8(hashedSubpacketsLength >> 8),
- uint8(hashedSubpacketsLength),
- })
- }
- lenPrefix := hashedFields.Len()
- hashedFields.Write(hashedSubpackets)
-
- var l uint64 = uint64(lenPrefix + len(hashedSubpackets))
- if sig.Version == 5 {
- // v5 case
- hashedFields.Write([]byte{0x05, 0xff})
- hashedFields.Write([]byte{
- uint8(l >> 56), uint8(l >> 48), uint8(l >> 40), uint8(l >> 32),
- uint8(l >> 24), uint8(l >> 16), uint8(l >> 8), uint8(l),
- })
- } else {
- // v4 and v6 case
- hashedFields.Write([]byte{byte(sig.Version), 0xff})
- hashedFields.Write([]byte{
- uint8(l >> 24), uint8(l >> 16), uint8(l >> 8), uint8(l),
- })
- }
- sig.HashSuffix = make([]byte, hashedFields.Len())
- copy(sig.HashSuffix, hashedFields.Bytes())
- return
-}
-
-func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) {
- hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true)
- hashedSubpackets := make([]byte, hashedSubpacketsLen)
- serializeSubpackets(hashedSubpackets, sig.outSubpackets, true)
- err = sig.buildHashSuffix(hashedSubpackets)
- if err != nil {
- return
- }
- if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
- sig.AddMetadataToHashSuffix()
- }
-
- h.Write(sig.HashSuffix)
- digest = h.Sum(nil)
- copy(sig.HashTag[:], digest)
- return
-}
-
-// PrepareSign must be called to create a hash object before Sign for v6 signatures.
-// The created hash object initially hashes a randomly generated salt
-// as required by v6 signatures. The generated salt is stored in sig. If the signature is not v6,
-// the method returns an empty hash object.
-// See RFC 9580 Section 5.2.4.
-func (sig *Signature) PrepareSign(config *Config) (hash.Hash, error) {
- if !sig.Hash.Available() {
- return nil, errors.UnsupportedError("hash function")
- }
- hasher := sig.Hash.New()
- if sig.Version == 6 {
- if sig.salt == nil {
- var err error
- sig.salt, err = SignatureSaltForHash(sig.Hash, config.Random())
- if err != nil {
- return nil, err
- }
- }
- hasher.Write(sig.salt)
- }
- return hasher, nil
-}
-
-// SetSalt sets the signature salt for v6 signatures.
-// Assumes salt is generated correctly and checks if length matches.
-// If the signature is not v6, the method ignores the salt.
-// Use PrepareSign whenever possible instead of generating and
-// hashing the salt externally.
-// See RFC 9580 Section 5.2.4.
-func (sig *Signature) SetSalt(salt []byte) error {
- if sig.Version == 6 {
- expectedSaltLength, err := SaltLengthForHash(sig.Hash)
- if err != nil {
- return err
- }
- if salt == nil || len(salt) != expectedSaltLength {
- return errors.InvalidArgumentError("unexpected salt size for the given hash algorithm")
- }
- sig.salt = salt
- }
- return nil
-}
-
-// PrepareVerify must be called to create a hash object before verifying v6 signatures.
-// The created hash object initially hashes the internally stored salt.
-// If the signature is not v6, the method returns an empty hash object.
-// See RFC 9580 Section 5.2.4.
-func (sig *Signature) PrepareVerify() (hash.Hash, error) {
- if !sig.Hash.Available() {
- return nil, errors.UnsupportedError("hash function")
- }
- hasher := sig.Hash.New()
- if sig.Version == 6 {
- if sig.salt == nil {
- return nil, errors.StructuralError("v6 requires a salt for the hash to be signed")
- }
- hasher.Write(sig.salt)
- }
- return hasher, nil
-}
-
-// Sign signs a message with a private key. The hash, h, must contain
-// the hash of the message to be signed and will be mutated by this function.
-// On success, the signature is stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) {
- if priv.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- sig.Version = priv.PublicKey.Version
- sig.IssuerFingerprint = priv.PublicKey.Fingerprint
- if sig.Version < 6 && config.RandomizeSignaturesViaNotation() {
- sig.removeNotationsWithName(SaltNotationName)
- salt, err := SignatureSaltForHash(sig.Hash, config.Random())
- if err != nil {
- return err
- }
- notation := Notation{
- Name: SaltNotationName,
- Value: salt,
- IsCritical: false,
- IsHumanReadable: false,
- }
- sig.Notations = append(sig.Notations, ¬ation)
- }
- sig.outSubpackets, err = sig.buildSubpackets(priv.PublicKey)
- if err != nil {
- return err
- }
- digest, err := sig.signPrepareHash(h)
- if err != nil {
- return
- }
- switch priv.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- // supports both *rsa.PrivateKey and crypto.Signer
- sigdata, err := priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)
- if err == nil {
- sig.RSASignature = encoding.NewMPI(sigdata)
- }
- case PubKeyAlgoDSA:
- dsaPriv := priv.PrivateKey.(*dsa.PrivateKey)
-
- // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
- subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8
- if len(digest) > subgroupSize {
- digest = digest[:subgroupSize]
- }
- r, s, err := dsa.Sign(config.Random(), dsaPriv, digest)
- if err == nil {
- sig.DSASigR = new(encoding.MPI).SetBig(r)
- sig.DSASigS = new(encoding.MPI).SetBig(s)
- }
- case PubKeyAlgoECDSA:
- var r, s *big.Int
- if sk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok {
- r, s, err = ecdsa.Sign(config.Random(), sk, digest)
- } else {
- var b []byte
- b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)
- if err == nil {
- r, s, err = unwrapECDSASig(b)
- }
- }
-
- if err == nil {
- sig.ECDSASigR = new(encoding.MPI).SetBig(r)
- sig.ECDSASigS = new(encoding.MPI).SetBig(s)
- }
- case PubKeyAlgoEdDSA:
- sk := priv.PrivateKey.(*eddsa.PrivateKey)
- r, s, err := eddsa.Sign(sk, digest)
- if err == nil {
- sig.EdDSASigR = encoding.NewMPI(r)
- sig.EdDSASigS = encoding.NewMPI(s)
- }
- case PubKeyAlgoEd25519:
- sk := priv.PrivateKey.(*ed25519.PrivateKey)
- signature, err := ed25519.Sign(sk, digest)
- if err == nil {
- sig.EdSig = signature
- }
- case PubKeyAlgoEd448:
- sk := priv.PrivateKey.(*ed448.PrivateKey)
- signature, err := ed448.Sign(sk, digest)
- if err == nil {
- sig.EdSig = signature
- }
- default:
- err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo)))
- }
-
- return
-}
-
-// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA signature.
-func unwrapECDSASig(b []byte) (r, s *big.Int, err error) {
- var ecsdaSig struct {
- R, S *big.Int
- }
- _, err = asn1.Unmarshal(b, &ecsdaSig)
- if err != nil {
- return
- }
- return ecsdaSig.R, ecsdaSig.S, nil
-}
-
-// SignUserId computes a signature from priv, asserting that pub is a valid
-// key for the identity id. On success, the signature is stored in sig. Call
-// Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error {
- if priv.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- prepareHash, err := sig.PrepareSign(config)
- if err != nil {
- return err
- }
- if err := userIdSignatureHash(id, pub, prepareHash); err != nil {
- return err
- }
- return sig.Sign(prepareHash, priv, config)
-}
-
-// SignDirectKeyBinding computes a signature from priv
-// On success, the signature is stored in sig.
-// Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) SignDirectKeyBinding(pub *PublicKey, priv *PrivateKey, config *Config) error {
- if priv.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- prepareHash, err := sig.PrepareSign(config)
- if err != nil {
- return err
- }
- if err := directKeySignatureHash(pub, prepareHash); err != nil {
- return err
- }
- return sig.Sign(prepareHash, priv, config)
-}
-
-// CrossSignKey computes a signature from signingKey on pub hashed using hashKey. On success,
-// the signature is stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) CrossSignKey(pub *PublicKey, hashKey *PublicKey, signingKey *PrivateKey,
- config *Config) error {
- prepareHash, err := sig.PrepareSign(config)
- if err != nil {
- return err
- }
- h, err := keySignatureHash(hashKey, pub, prepareHash)
- if err != nil {
- return err
- }
- return sig.Sign(h, signingKey, config)
-}
-
-// SignKey computes a signature from priv, asserting that pub is a subkey. On
-// success, the signature is stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error {
- if priv.Dummy() {
- return errors.ErrDummyPrivateKey("dummy key found")
- }
- prepareHash, err := sig.PrepareSign(config)
- if err != nil {
- return err
- }
- h, err := keySignatureHash(&priv.PublicKey, pub, prepareHash)
- if err != nil {
- return err
- }
- return sig.Sign(h, priv, config)
-}
-
-// RevokeKey computes a revocation signature of pub using priv. On success, the signature is
-// stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) RevokeKey(pub *PublicKey, priv *PrivateKey, config *Config) error {
- prepareHash, err := sig.PrepareSign(config)
- if err != nil {
- return err
- }
- if err := keyRevocationHash(pub, prepareHash); err != nil {
- return err
- }
- return sig.Sign(prepareHash, priv, config)
-}
-
-// RevokeSubkey computes a subkey revocation signature of pub using priv.
-// On success, the signature is stored in sig. Call Serialize to write it out.
-// If config is nil, sensible defaults will be used.
-func (sig *Signature) RevokeSubkey(pub *PublicKey, priv *PrivateKey, config *Config) error {
- // Identical to a subkey binding signature
- return sig.SignKey(pub, priv, config)
-}
-
-// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been
-// called first.
-func (sig *Signature) Serialize(w io.Writer) (err error) {
- if len(sig.outSubpackets) == 0 {
- sig.outSubpackets = sig.rawSubpackets
- }
- if sig.RSASignature == nil && sig.DSASigR == nil && sig.ECDSASigR == nil && sig.EdDSASigR == nil && sig.EdSig == nil {
- return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize")
- }
-
- sigLength := 0
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- sigLength = int(sig.RSASignature.EncodedLength())
- case PubKeyAlgoDSA:
- sigLength = int(sig.DSASigR.EncodedLength())
- sigLength += int(sig.DSASigS.EncodedLength())
- case PubKeyAlgoECDSA:
- sigLength = int(sig.ECDSASigR.EncodedLength())
- sigLength += int(sig.ECDSASigS.EncodedLength())
- case PubKeyAlgoEdDSA:
- sigLength = int(sig.EdDSASigR.EncodedLength())
- sigLength += int(sig.EdDSASigS.EncodedLength())
- case PubKeyAlgoEd25519:
- sigLength = ed25519.SignatureSize
- case PubKeyAlgoEd448:
- sigLength = ed448.SignatureSize
- default:
- panic("impossible")
- }
-
- hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true)
- unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false)
- length := 4 + /* length of version|signature type|public-key algorithm|hash algorithm */
- 2 /* length of hashed subpackets */ + hashedSubpacketsLen +
- 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen +
- 2 /* hash tag */ + sigLength
- if sig.Version == 6 {
- length += 4 + /* the two length fields are four-octet instead of two */
- 1 + /* salt length */
- len(sig.salt) /* length salt */
- }
- err = serializeHeader(w, packetTypeSignature, length)
- if err != nil {
- return
- }
- err = sig.serializeBody(w)
- if err != nil {
- return err
- }
- return
-}
-
-func (sig *Signature) serializeBody(w io.Writer) (err error) {
- var fields []byte
- if sig.Version == 6 {
- // v6 signatures use 4 octets for length
- hashedSubpacketsLen :=
- uint32(uint32(sig.HashSuffix[4])<<24) |
- uint32(uint32(sig.HashSuffix[5])<<16) |
- uint32(uint32(sig.HashSuffix[6])<<8) |
- uint32(sig.HashSuffix[7])
- fields = sig.HashSuffix[:8+hashedSubpacketsLen]
- } else {
- hashedSubpacketsLen := uint16(uint16(sig.HashSuffix[4])<<8) |
- uint16(sig.HashSuffix[5])
- fields = sig.HashSuffix[:6+hashedSubpacketsLen]
-
- }
- _, err = w.Write(fields)
- if err != nil {
- return
- }
-
- unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false)
- var unhashedSubpackets []byte
- if sig.Version == 6 {
- unhashedSubpackets = make([]byte, 4+unhashedSubpacketsLen)
- unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 24)
- unhashedSubpackets[1] = byte(unhashedSubpacketsLen >> 16)
- unhashedSubpackets[2] = byte(unhashedSubpacketsLen >> 8)
- unhashedSubpackets[3] = byte(unhashedSubpacketsLen)
- serializeSubpackets(unhashedSubpackets[4:], sig.outSubpackets, false)
- } else {
- unhashedSubpackets = make([]byte, 2+unhashedSubpacketsLen)
- unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8)
- unhashedSubpackets[1] = byte(unhashedSubpacketsLen)
- serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false)
- }
-
- _, err = w.Write(unhashedSubpackets)
- if err != nil {
- return
- }
- _, err = w.Write(sig.HashTag[:])
- if err != nil {
- return
- }
-
- if sig.Version == 6 {
- // write salt for v6 signatures
- _, err = w.Write([]byte{uint8(len(sig.salt))})
- if err != nil {
- return
- }
- _, err = w.Write(sig.salt)
- if err != nil {
- return
- }
- }
-
- switch sig.PubKeyAlgo {
- case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
- _, err = w.Write(sig.RSASignature.EncodedBytes())
- case PubKeyAlgoDSA:
- if _, err = w.Write(sig.DSASigR.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(sig.DSASigS.EncodedBytes())
- case PubKeyAlgoECDSA:
- if _, err = w.Write(sig.ECDSASigR.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(sig.ECDSASigS.EncodedBytes())
- case PubKeyAlgoEdDSA:
- if _, err = w.Write(sig.EdDSASigR.EncodedBytes()); err != nil {
- return
- }
- _, err = w.Write(sig.EdDSASigS.EncodedBytes())
- case PubKeyAlgoEd25519:
- err = ed25519.WriteSignature(w, sig.EdSig)
- case PubKeyAlgoEd448:
- err = ed448.WriteSignature(w, sig.EdSig)
- default:
- panic("impossible")
- }
- return
-}
-
-// outputSubpacket represents a subpacket to be marshaled.
-type outputSubpacket struct {
- hashed bool // true if this subpacket is in the hashed area.
- subpacketType signatureSubpacketType
- isCritical bool
- contents []byte
-}
-
-func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubpacket, err error) {
- creationTime := make([]byte, 4)
- binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))
- // Signature Creation Time
- subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, true, creationTime})
- // Signature Expiration Time
- if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
- sigLifetime := make([]byte, 4)
- binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)
- subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})
- }
- // Trust Signature
- if sig.TrustLevel != 0 {
- subpackets = append(subpackets, outputSubpacket{true, trustSubpacket, true, []byte{byte(sig.TrustLevel), byte(sig.TrustAmount)}})
- }
- // Regular Expression
- if sig.TrustRegularExpression != nil {
- // RFC specifies the string should be null-terminated; add a null byte to the end
- subpackets = append(subpackets, outputSubpacket{true, regularExpressionSubpacket, true, []byte(*sig.TrustRegularExpression + "\000")})
- }
- // Key Expiration Time
- if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {
- keyLifetime := make([]byte, 4)
- binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)
- subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})
- }
- // Preferred Symmetric Ciphers for v1 SEIPD
- if len(sig.PreferredSymmetric) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric})
- }
- // Issuer Key ID
- if sig.IssuerKeyId != nil && sig.Version == 4 {
- keyId := make([]byte, 8)
- binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId)
- subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, true, keyId})
- }
- // Notation Data
- for _, notation := range sig.Notations {
- subpackets = append(
- subpackets,
- outputSubpacket{
- true,
- notationDataSubpacket,
- notation.IsCritical,
- notation.getData(),
- })
- }
- // Preferred Hash Algorithms
- if len(sig.PreferredHash) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash})
- }
- // Preferred Compression Algorithms
- if len(sig.PreferredCompression) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression})
- }
- // Keyserver Preferences
- // Keyserver preferences may only appear in self-signatures or certification signatures.
- if sig.KeyserverPrefsValid {
- var prefs byte
- if sig.KeyserverPrefNoModify {
- prefs |= KeyserverPrefNoModify
- }
- subpackets = append(subpackets, outputSubpacket{true, keyserverPrefsSubpacket, false, []byte{prefs}})
- }
- // Preferred Keyserver
- if len(sig.PreferredKeyserver) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefKeyserverSubpacket, false, []uint8(sig.PreferredKeyserver)})
- }
- // Primary User ID
- if sig.IsPrimaryId != nil && *sig.IsPrimaryId {
- subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}})
- }
- // Policy URI
- if len(sig.PolicyURI) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, policyUriSubpacket, false, []uint8(sig.PolicyURI)})
- }
- // Key Flags
- // Key flags may only appear in self-signatures or certification signatures.
- if sig.FlagsValid {
- var flags byte
- if sig.FlagCertify {
- flags |= KeyFlagCertify
- }
- if sig.FlagSign {
- flags |= KeyFlagSign
- }
- if sig.FlagEncryptCommunications {
- flags |= KeyFlagEncryptCommunications
- }
- if sig.FlagEncryptStorage {
- flags |= KeyFlagEncryptStorage
- }
- if sig.FlagSplitKey {
- flags |= KeyFlagSplitKey
- }
- if sig.FlagAuthenticate {
- flags |= KeyFlagAuthenticate
- }
- if sig.FlagGroupKey {
- flags |= KeyFlagGroupKey
- }
- subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, true, []byte{flags}})
- }
- // Signer's User ID
- if sig.SignerUserId != nil {
- subpackets = append(subpackets, outputSubpacket{true, signerUserIdSubpacket, false, []byte(*sig.SignerUserId)})
- }
- // Reason for Revocation
- // Revocation reason appears only in revocation signatures and is serialized as per section 5.2.3.31.
- if sig.RevocationReason != nil {
- subpackets = append(subpackets, outputSubpacket{true, reasonForRevocationSubpacket, true,
- append([]uint8{uint8(*sig.RevocationReason)}, []uint8(sig.RevocationReasonText)...)})
- }
- // Features
- var features = byte(0x00)
- if sig.SEIPDv1 {
- features |= 0x01
- }
- if sig.SEIPDv2 {
- features |= 0x08
- }
- if features != 0x00 {
- subpackets = append(subpackets, outputSubpacket{true, featuresSubpacket, false, []byte{features}})
- }
- // Embedded Signature
- // EmbeddedSignature appears only in subkeys capable of signing and is serialized as per section 5.2.3.34.
- if sig.EmbeddedSignature != nil {
- var buf bytes.Buffer
- err = sig.EmbeddedSignature.serializeBody(&buf)
- if err != nil {
- return
- }
- subpackets = append(subpackets, outputSubpacket{true, embeddedSignatureSubpacket, true, buf.Bytes()})
- }
- // Issuer Fingerprint
- if sig.IssuerFingerprint != nil {
- contents := append([]uint8{uint8(issuer.Version)}, sig.IssuerFingerprint...)
- subpackets = append(subpackets, outputSubpacket{true, issuerFingerprintSubpacket, sig.Version >= 5, contents})
- }
- // Intended Recipient Fingerprint
- for _, recipient := range sig.IntendedRecipients {
- subpackets = append(
- subpackets,
- outputSubpacket{
- true,
- intendedRecipientSubpacket,
- false,
- recipient.Serialize(),
- })
- }
- // Preferred AEAD Ciphersuites
- if len(sig.PreferredCipherSuites) > 0 {
- serialized := make([]byte, len(sig.PreferredCipherSuites)*2)
- for i, cipherSuite := range sig.PreferredCipherSuites {
- serialized[2*i] = cipherSuite[0]
- serialized[2*i+1] = cipherSuite[1]
- }
- subpackets = append(subpackets, outputSubpacket{true, prefCipherSuitesSubpacket, false, serialized})
- }
- return
-}
-
-// AddMetadataToHashSuffix modifies the current hash suffix to include metadata
-// (format, filename, and time). Version 5 keys protect this data including it
-// in the hash computation. See section 5.2.4.
-func (sig *Signature) AddMetadataToHashSuffix() {
- if sig == nil || sig.Version != 5 {
- return
- }
- if sig.SigType != 0x00 && sig.SigType != 0x01 {
- return
- }
- lit := sig.Metadata
- if lit == nil {
- // This will translate into six 0x00 bytes.
- lit = &LiteralData{}
- }
-
- // Extract the current byte count
- n := sig.HashSuffix[len(sig.HashSuffix)-8:]
- l := uint64(
- uint64(n[0])<<56 | uint64(n[1])<<48 | uint64(n[2])<<40 | uint64(n[3])<<32 |
- uint64(n[4])<<24 | uint64(n[5])<<16 | uint64(n[6])<<8 | uint64(n[7]))
-
- suffix := bytes.NewBuffer(nil)
- suffix.Write(sig.HashSuffix[:l])
-
- // Add the metadata
- var buf [4]byte
- buf[0] = lit.Format
- fileName := lit.FileName
- if len(lit.FileName) > 255 {
- fileName = fileName[:255]
- }
- buf[1] = byte(len(fileName))
- suffix.Write(buf[:2])
- suffix.Write([]byte(lit.FileName))
- binary.BigEndian.PutUint32(buf[:], lit.Time)
- suffix.Write(buf[:])
-
- suffix.Write([]byte{0x05, 0xff})
- suffix.Write([]byte{
- uint8(l >> 56), uint8(l >> 48), uint8(l >> 40), uint8(l >> 32),
- uint8(l >> 24), uint8(l >> 16), uint8(l >> 8), uint8(l),
- })
- sig.HashSuffix = suffix.Bytes()
-}
-
-// SaltLengthForHash selects the required salt length for the given hash algorithm,
-// as per Table 23 (Hash algorithm registry) of the crypto refresh.
-// See RFC 9580 Section 9.5.
-func SaltLengthForHash(hash crypto.Hash) (int, error) {
- switch hash {
- case crypto.SHA256, crypto.SHA224, crypto.SHA3_256:
- return 16, nil
- case crypto.SHA384:
- return 24, nil
- case crypto.SHA512, crypto.SHA3_512:
- return 32, nil
- default:
- return 0, errors.UnsupportedError("hash function not supported for V6 signatures")
- }
-}
-
-// SignatureSaltForHash generates a random signature salt
-// with the length for the given hash algorithm.
-// See RFC 9580 Section 9.5.
-func SignatureSaltForHash(hash crypto.Hash, randReader io.Reader) ([]byte, error) {
- saltLength, err := SaltLengthForHash(hash)
- if err != nil {
- return nil, err
- }
- salt := make([]byte, saltLength)
- _, err = io.ReadFull(randReader, salt)
- if err != nil {
- return nil, err
- }
- return salt, nil
-}
-
-// removeNotationsWithName removes all notations in this signature with the given name.
-func (sig *Signature) removeNotationsWithName(name string) {
- if sig == nil || sig.Notations == nil {
- return
- }
- updatedNotations := make([]*Notation, 0, len(sig.Notations))
- for _, notation := range sig.Notations {
- if notation.Name != name {
- updatedNotations = append(updatedNotations, notation)
- }
- }
- sig.Notations = updatedNotations
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
deleted file mode 100644
index 2812a1db88..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "bytes"
- "crypto/cipher"
- "crypto/sha256"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/s2k"
- "golang.org/x/crypto/hkdf"
-)
-
-// This is the largest session key that we'll support. Since at most 256-bit cipher
-// is supported in OpenPGP, this is large enough to contain also the auth tag.
-const maxSessionKeySizeInBytes = 64
-
-// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC
-// 4880, section 5.3.
-type SymmetricKeyEncrypted struct {
- Version int
- CipherFunc CipherFunction
- Mode AEADMode
- s2k func(out, in []byte)
- iv []byte
- encryptedKey []byte // Contains also the authentication tag for AEAD
-}
-
-// parse parses an SymmetricKeyEncrypted packet as specified in
-// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#name-symmetric-key-encrypted-ses
-func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error {
- var buf [1]byte
-
- // Version
- if _, err := readFull(r, buf[:]); err != nil {
- return err
- }
- ske.Version = int(buf[0])
- if ske.Version != 4 && ske.Version != 5 && ske.Version != 6 {
- return errors.UnsupportedError("unknown SymmetricKeyEncrypted version")
- }
-
- if V5Disabled && ske.Version == 5 {
- return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
- }
-
- if ske.Version > 5 {
- // Scalar octet count
- if _, err := readFull(r, buf[:]); err != nil {
- return err
- }
- }
-
- // Cipher function
- if _, err := readFull(r, buf[:]); err != nil {
- return err
- }
- ske.CipherFunc = CipherFunction(buf[0])
- if !ske.CipherFunc.IsSupported() {
- return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[0])))
- }
-
- if ske.Version >= 5 {
- // AEAD mode
- if _, err := readFull(r, buf[:]); err != nil {
- return errors.StructuralError("cannot read AEAD octet from packet")
- }
- ske.Mode = AEADMode(buf[0])
- }
-
- if ske.Version > 5 {
- // Scalar octet count
- if _, err := readFull(r, buf[:]); err != nil {
- return err
- }
- }
-
- var err error
- if ske.s2k, err = s2k.Parse(r); err != nil {
- if _, ok := err.(errors.ErrDummyPrivateKey); ok {
- return errors.UnsupportedError("missing key GNU extension in session key")
- }
- return err
- }
-
- if ske.Version >= 5 {
- // AEAD IV
- iv := make([]byte, ske.Mode.IvLength())
- _, err := readFull(r, iv)
- if err != nil {
- return errors.StructuralError("cannot read AEAD IV")
- }
-
- ske.iv = iv
- }
-
- encryptedKey := make([]byte, maxSessionKeySizeInBytes)
- // The session key may follow. We just have to try and read to find
- // out. If it exists then we limit it to maxSessionKeySizeInBytes.
- n, err := readFull(r, encryptedKey)
- if err != nil && err != io.ErrUnexpectedEOF {
- return err
- }
-
- if n != 0 {
- if n == maxSessionKeySizeInBytes {
- return errors.UnsupportedError("oversized encrypted session key")
- }
- ske.encryptedKey = encryptedKey[:n]
- }
- return nil
-}
-
-// Decrypt attempts to decrypt an encrypted session key and returns the key and
-// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data
-// packet.
-func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) {
- key := make([]byte, ske.CipherFunc.KeySize())
- ske.s2k(key, passphrase)
- if len(ske.encryptedKey) == 0 {
- return key, ske.CipherFunc, nil
- }
- switch ske.Version {
- case 4:
- plaintextKey, cipherFunc, err := ske.decryptV4(key)
- return plaintextKey, cipherFunc, err
- case 5, 6:
- plaintextKey, err := ske.aeadDecrypt(ske.Version, key)
- return plaintextKey, CipherFunction(0), err
- }
- err := errors.UnsupportedError("unknown SymmetricKeyEncrypted version")
- return nil, CipherFunction(0), err
-}
-
-func (ske *SymmetricKeyEncrypted) decryptV4(key []byte) ([]byte, CipherFunction, error) {
- // the IV is all zeros
- iv := make([]byte, ske.CipherFunc.blockSize())
- c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv)
- plaintextKey := make([]byte, len(ske.encryptedKey))
- c.XORKeyStream(plaintextKey, ske.encryptedKey)
- cipherFunc := CipherFunction(plaintextKey[0])
- if cipherFunc.blockSize() == 0 {
- return nil, ske.CipherFunc, errors.UnsupportedError(
- "unknown cipher: " + strconv.Itoa(int(cipherFunc)))
- }
- plaintextKey = plaintextKey[1:]
- if len(plaintextKey) != cipherFunc.KeySize() {
- return nil, cipherFunc, errors.StructuralError(
- "length of decrypted key not equal to cipher keysize")
- }
- return plaintextKey, cipherFunc, nil
-}
-
-func (ske *SymmetricKeyEncrypted) aeadDecrypt(version int, key []byte) ([]byte, error) {
- adata := []byte{0xc3, byte(version), byte(ske.CipherFunc), byte(ske.Mode)}
- aead := getEncryptedKeyAeadInstance(ske.CipherFunc, ske.Mode, key, adata, version)
-
- plaintextKey, err := aead.Open(nil, ske.iv, ske.encryptedKey, adata)
- if err != nil {
- return nil, err
- }
- return plaintextKey, nil
-}
-
-// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w.
-// The packet contains a random session key, encrypted by a key derived from
-// the given passphrase. The session key is returned and must be passed to
-// SerializeSymmetricallyEncrypted.
-// If config is nil, sensible defaults will be used.
-func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) {
- cipherFunc := config.Cipher()
-
- sessionKey := make([]byte, cipherFunc.KeySize())
- _, err = io.ReadFull(config.Random(), sessionKey)
- if err != nil {
- return
- }
-
- err = SerializeSymmetricKeyEncryptedReuseKey(w, sessionKey, passphrase, config)
- if err != nil {
- return
- }
-
- key = sessionKey
- return
-}
-
-// SerializeSymmetricKeyEncryptedReuseKey serializes a symmetric key packet to w.
-// The packet contains the given session key, encrypted by a key derived from
-// the given passphrase. The returned session key must be passed to
-// SerializeSymmetricallyEncrypted.
-// If config is nil, sensible defaults will be used.
-// Deprecated: Use SerializeSymmetricKeyEncryptedAEADReuseKey instead.
-func SerializeSymmetricKeyEncryptedReuseKey(w io.Writer, sessionKey []byte, passphrase []byte, config *Config) (err error) {
- return SerializeSymmetricKeyEncryptedAEADReuseKey(w, sessionKey, passphrase, config.AEAD() != nil, config)
-}
-
-// SerializeSymmetricKeyEncryptedAEADReuseKey serializes a symmetric key packet to w.
-// The packet contains the given session key, encrypted by a key derived from
-// the given passphrase. The returned session key must be passed to
-// SerializeSymmetricallyEncrypted.
-// If aeadSupported is set, SKESK v6 is used, otherwise v4.
-// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
-// If config is nil, sensible defaults will be used.
-func SerializeSymmetricKeyEncryptedAEADReuseKey(w io.Writer, sessionKey []byte, passphrase []byte, aeadSupported bool, config *Config) (err error) {
- var version int
- if aeadSupported {
- version = 6
- } else {
- version = 4
- }
- cipherFunc := config.Cipher()
- // cipherFunc must be AES
- if !cipherFunc.IsSupported() || cipherFunc < CipherAES128 || cipherFunc > CipherAES256 {
- return errors.UnsupportedError("unsupported cipher: " + strconv.Itoa(int(cipherFunc)))
- }
-
- keySize := cipherFunc.KeySize()
- s2kBuf := new(bytes.Buffer)
- keyEncryptingKey := make([]byte, keySize)
- // s2k.Serialize salts and stretches the passphrase, and writes the
- // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf.
- err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, config.S2K())
- if err != nil {
- return
- }
- s2kBytes := s2kBuf.Bytes()
-
- var packetLength int
- switch version {
- case 4:
- packetLength = 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize
- case 5, 6:
- ivLen := config.AEAD().Mode().IvLength()
- tagLen := config.AEAD().Mode().TagLength()
- packetLength = 3 + len(s2kBytes) + ivLen + keySize + tagLen
- }
- if version > 5 {
- packetLength += 2 // additional octet count fields
- }
-
- err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength)
- if err != nil {
- return
- }
-
- // Symmetric Key Encrypted Version
- buf := []byte{byte(version)}
-
- if version > 5 {
- // Scalar octet count
- buf = append(buf, byte(3+len(s2kBytes)+config.AEAD().Mode().IvLength()))
- }
-
- // Cipher function
- buf = append(buf, byte(cipherFunc))
-
- if version >= 5 {
- // AEAD mode
- buf = append(buf, byte(config.AEAD().Mode()))
- }
- if version > 5 {
- // Scalar octet count
- buf = append(buf, byte(len(s2kBytes)))
- }
- _, err = w.Write(buf)
- if err != nil {
- return
- }
- _, err = w.Write(s2kBytes)
- if err != nil {
- return
- }
-
- switch version {
- case 4:
- iv := make([]byte, cipherFunc.blockSize())
- c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv)
- encryptedCipherAndKey := make([]byte, keySize+1)
- c.XORKeyStream(encryptedCipherAndKey, buf[1:])
- c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey)
- _, err = w.Write(encryptedCipherAndKey)
- if err != nil {
- return
- }
- case 5, 6:
- mode := config.AEAD().Mode()
- adata := []byte{0xc3, byte(version), byte(cipherFunc), byte(mode)}
- aead := getEncryptedKeyAeadInstance(cipherFunc, mode, keyEncryptingKey, adata, version)
-
- // Sample iv using random reader
- iv := make([]byte, config.AEAD().Mode().IvLength())
- _, err = io.ReadFull(config.Random(), iv)
- if err != nil {
- return
- }
- // Seal and write (encryptedData includes auth. tag)
-
- encryptedData := aead.Seal(nil, iv, sessionKey, adata)
- _, err = w.Write(iv)
- if err != nil {
- return
- }
- _, err = w.Write(encryptedData)
- if err != nil {
- return
- }
- }
-
- return
-}
-
-func getEncryptedKeyAeadInstance(c CipherFunction, mode AEADMode, inputKey, associatedData []byte, version int) (aead cipher.AEAD) {
- var blockCipher cipher.Block
- if version > 5 {
- hkdfReader := hkdf.New(sha256.New, inputKey, []byte{}, associatedData)
-
- encryptionKey := make([]byte, c.KeySize())
- _, _ = readFull(hkdfReader, encryptionKey)
-
- blockCipher = c.new(encryptionKey)
- } else {
- blockCipher = c.new(inputKey)
- }
- return mode.new(blockCipher)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
deleted file mode 100644
index 0e898742cf..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-const aeadSaltSize = 32
-
-// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The
-// encrypted Contents will consist of more OpenPGP packets. See RFC 4880,
-// sections 5.7 and 5.13.
-type SymmetricallyEncrypted struct {
- Version int
- Contents io.Reader // contains tag for version 2
- IntegrityProtected bool // If true it is type 18 (with MDC or AEAD). False is packet type 9
-
- // Specific to version 1
- prefix []byte
-
- // Specific to version 2
- Cipher CipherFunction
- Mode AEADMode
- ChunkSizeByte byte
- Salt [aeadSaltSize]byte
-}
-
-const (
- symmetricallyEncryptedVersionMdc = 1
- symmetricallyEncryptedVersionAead = 2
-)
-
-func (se *SymmetricallyEncrypted) parse(r io.Reader) error {
- if se.IntegrityProtected {
- // See RFC 4880, section 5.13.
- var buf [1]byte
- _, err := readFull(r, buf[:])
- if err != nil {
- return err
- }
-
- switch buf[0] {
- case symmetricallyEncryptedVersionMdc:
- se.Version = symmetricallyEncryptedVersionMdc
- case symmetricallyEncryptedVersionAead:
- se.Version = symmetricallyEncryptedVersionAead
- if err := se.parseAead(r); err != nil {
- return err
- }
- default:
- return errors.UnsupportedError("unknown SymmetricallyEncrypted version")
- }
- }
- se.Contents = r
- return nil
-}
-
-// Decrypt returns a ReadCloser, from which the decrypted Contents of the
-// packet can be read. An incorrect key will only be detected after trying
-// to decrypt the entire data.
-func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) {
- if se.Version == symmetricallyEncryptedVersionAead {
- return se.decryptAead(key)
- }
-
- return se.decryptMdc(c, key)
-}
-
-// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet
-// to w and returns a WriteCloser to which the to-be-encrypted packets can be
-// written.
-// If aeadSupported is set to true, SEIPDv2 is used with the indicated CipherSuite.
-// Otherwise, SEIPDv1 is used with the indicated CipherFunction.
-// Note: aeadSupported MUST match the value passed to SerializeEncryptedKeyAEAD
-// and/or SerializeSymmetricKeyEncryptedAEADReuseKey.
-// If config is nil, sensible defaults will be used.
-func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, aeadSupported bool, cipherSuite CipherSuite, key []byte, config *Config) (Contents io.WriteCloser, err error) {
- writeCloser := noOpCloser{w}
- ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedIntegrityProtected)
- if err != nil {
- return
- }
-
- if aeadSupported {
- return serializeSymmetricallyEncryptedAead(ciphertext, cipherSuite, config.AEADConfig.ChunkSizeByte(), config.Random(), key)
- }
-
- return serializeSymmetricallyEncryptedMdc(ciphertext, c, key, config)
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
deleted file mode 100644
index 3ddc4fe4a9..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright 2023 Proton AG. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "crypto/cipher"
- "crypto/sha256"
- "fmt"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "golang.org/x/crypto/hkdf"
-)
-
-// parseAead parses a V2 SEIPD packet (AEAD) as specified in
-// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
-func (se *SymmetricallyEncrypted) parseAead(r io.Reader) error {
- headerData := make([]byte, 3)
- if n, err := io.ReadFull(r, headerData); n < 3 {
- return errors.StructuralError("could not read aead header: " + err.Error())
- }
-
- // Cipher
- se.Cipher = CipherFunction(headerData[0])
- // cipherFunc must have block size 16 to use AEAD
- if se.Cipher.blockSize() != 16 {
- return errors.UnsupportedError("invalid aead cipher: " + strconv.Itoa(int(se.Cipher)))
- }
-
- // Mode
- se.Mode = AEADMode(headerData[1])
- if se.Mode.TagLength() == 0 {
- return errors.UnsupportedError("unknown aead mode: " + strconv.Itoa(int(se.Mode)))
- }
-
- // Chunk size
- se.ChunkSizeByte = headerData[2]
- if se.ChunkSizeByte > 16 {
- return errors.UnsupportedError("invalid aead chunk size byte: " + strconv.Itoa(int(se.ChunkSizeByte)))
- }
-
- // Salt
- if n, err := io.ReadFull(r, se.Salt[:]); n < aeadSaltSize {
- return errors.StructuralError("could not read aead salt: " + err.Error())
- }
-
- return nil
-}
-
-// associatedData for chunks: tag, version, cipher, mode, chunk size byte
-func (se *SymmetricallyEncrypted) associatedData() []byte {
- return []byte{
- 0xD2,
- symmetricallyEncryptedVersionAead,
- byte(se.Cipher),
- byte(se.Mode),
- se.ChunkSizeByte,
- }
-}
-
-// decryptAead decrypts a V2 SEIPD packet (AEAD) as specified in
-// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
-func (se *SymmetricallyEncrypted) decryptAead(inputKey []byte) (io.ReadCloser, error) {
- if se.Cipher.KeySize() != len(inputKey) {
- return nil, errors.StructuralError(fmt.Sprintf("invalid session key length for cipher: got %d bytes, but expected %d bytes", len(inputKey), se.Cipher.KeySize()))
- }
-
- aead, nonce := getSymmetricallyEncryptedAeadInstance(se.Cipher, se.Mode, inputKey, se.Salt[:], se.associatedData())
- // Carry the first tagLen bytes
- chunkSize := decodeAEADChunkSize(se.ChunkSizeByte)
- tagLen := se.Mode.TagLength()
- chunkBytes := make([]byte, chunkSize+tagLen*2)
- peekedBytes := chunkBytes[chunkSize+tagLen:]
- n, err := io.ReadFull(se.Contents, peekedBytes)
- if n < tagLen || (err != nil && err != io.EOF) {
- return nil, errors.StructuralError("not enough data to decrypt:" + err.Error())
- }
-
- return &aeadDecrypter{
- aeadCrypter: aeadCrypter{
- aead: aead,
- chunkSize: decodeAEADChunkSize(se.ChunkSizeByte),
- nonce: nonce,
- associatedData: se.associatedData(),
- chunkIndex: nonce[len(nonce)-8:],
- packetTag: packetTypeSymmetricallyEncryptedIntegrityProtected,
- },
- reader: se.Contents,
- chunkBytes: chunkBytes,
- peekedBytes: peekedBytes,
- }, nil
-}
-
-// serializeSymmetricallyEncryptedAead encrypts to a writer a V2 SEIPD packet (AEAD) as specified in
-// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
-func serializeSymmetricallyEncryptedAead(ciphertext io.WriteCloser, cipherSuite CipherSuite, chunkSizeByte byte, rand io.Reader, inputKey []byte) (Contents io.WriteCloser, err error) {
- // cipherFunc must have block size 16 to use AEAD
- if cipherSuite.Cipher.blockSize() != 16 {
- return nil, errors.InvalidArgumentError("invalid aead cipher function")
- }
-
- if cipherSuite.Cipher.KeySize() != len(inputKey) {
- return nil, errors.InvalidArgumentError("error in aead serialization: bad key length")
- }
-
- // Data for en/decryption: tag, version, cipher, aead mode, chunk size
- prefix := []byte{
- 0xD2,
- symmetricallyEncryptedVersionAead,
- byte(cipherSuite.Cipher),
- byte(cipherSuite.Mode),
- chunkSizeByte,
- }
-
- // Write header (that correspond to prefix except first byte)
- n, err := ciphertext.Write(prefix[1:])
- if err != nil || n < 4 {
- return nil, err
- }
-
- // Random salt
- salt := make([]byte, aeadSaltSize)
- if _, err := io.ReadFull(rand, salt); err != nil {
- return nil, err
- }
-
- if _, err := ciphertext.Write(salt); err != nil {
- return nil, err
- }
-
- aead, nonce := getSymmetricallyEncryptedAeadInstance(cipherSuite.Cipher, cipherSuite.Mode, inputKey, salt, prefix)
-
- chunkSize := decodeAEADChunkSize(chunkSizeByte)
- tagLen := aead.Overhead()
- chunkBytes := make([]byte, chunkSize+tagLen)
- return &aeadEncrypter{
- aeadCrypter: aeadCrypter{
- aead: aead,
- chunkSize: chunkSize,
- associatedData: prefix,
- nonce: nonce,
- chunkIndex: nonce[len(nonce)-8:],
- packetTag: packetTypeSymmetricallyEncryptedIntegrityProtected,
- },
- writer: ciphertext,
- chunkBytes: chunkBytes,
- }, nil
-}
-
-func getSymmetricallyEncryptedAeadInstance(c CipherFunction, mode AEADMode, inputKey, salt, associatedData []byte) (aead cipher.AEAD, nonce []byte) {
- hkdfReader := hkdf.New(sha256.New, inputKey, salt, associatedData)
-
- encryptionKey := make([]byte, c.KeySize())
- _, _ = readFull(hkdfReader, encryptionKey)
-
- nonce = make([]byte, mode.IvLength())
-
- // Last 64 bits of nonce are the counter
- _, _ = readFull(hkdfReader, nonce[:len(nonce)-8])
-
- blockCipher := c.new(encryptionKey)
- aead = mode.new(blockCipher)
-
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
deleted file mode 100644
index 8b18623684..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "crypto/cipher"
- "crypto/sha1"
- "crypto/subtle"
- "hash"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
-)
-
-// seMdcReader wraps an io.Reader with a no-op Close method.
-type seMdcReader struct {
- in io.Reader
-}
-
-func (ser seMdcReader) Read(buf []byte) (int, error) {
- return ser.in.Read(buf)
-}
-
-func (ser seMdcReader) Close() error {
- return nil
-}
-
-func (se *SymmetricallyEncrypted) decryptMdc(c CipherFunction, key []byte) (io.ReadCloser, error) {
- if !c.IsSupported() {
- return nil, errors.UnsupportedError("unsupported cipher: " + strconv.Itoa(int(c)))
- }
-
- if len(key) != c.KeySize() {
- return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length")
- }
-
- if se.prefix == nil {
- se.prefix = make([]byte, c.blockSize()+2)
- _, err := readFull(se.Contents, se.prefix)
- if err != nil {
- return nil, err
- }
- } else if len(se.prefix) != c.blockSize()+2 {
- return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths")
- }
-
- ocfbResync := OCFBResync
- if se.IntegrityProtected {
- // MDC packets use a different form of OCFB mode.
- ocfbResync = OCFBNoResync
- }
-
- s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync)
-
- plaintext := cipher.StreamReader{S: s, R: se.Contents}
-
- if se.IntegrityProtected {
- // IntegrityProtected packets have an embedded hash that we need to check.
- h := sha1.New()
- h.Write(se.prefix)
- return &seMDCReader{in: plaintext, h: h}, nil
- }
-
- // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser.
- return seMdcReader{plaintext}, nil
-}
-
-const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size
-
-// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold
-// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an
-// MDC packet containing a hash of the previous Contents which is checked
-// against the running hash. See RFC 4880, section 5.13.
-type seMDCReader struct {
- in io.Reader
- h hash.Hash
- trailer [mdcTrailerSize]byte
- scratch [mdcTrailerSize]byte
- trailerUsed int
- error bool
- eof bool
-}
-
-func (ser *seMDCReader) Read(buf []byte) (n int, err error) {
- if ser.error {
- err = io.ErrUnexpectedEOF
- return
- }
- if ser.eof {
- err = io.EOF
- return
- }
-
- // If we haven't yet filled the trailer buffer then we must do that
- // first.
- for ser.trailerUsed < mdcTrailerSize {
- n, err = ser.in.Read(ser.trailer[ser.trailerUsed:])
- ser.trailerUsed += n
- if err == io.EOF {
- if ser.trailerUsed != mdcTrailerSize {
- n = 0
- err = io.ErrUnexpectedEOF
- ser.error = true
- return
- }
- ser.eof = true
- n = 0
- return
- }
-
- if err != nil {
- n = 0
- return
- }
- }
-
- // If it's a short read then we read into a temporary buffer and shift
- // the data into the caller's buffer.
- if len(buf) <= mdcTrailerSize {
- n, err = readFull(ser.in, ser.scratch[:len(buf)])
- copy(buf, ser.trailer[:n])
- ser.h.Write(buf[:n])
- copy(ser.trailer[:], ser.trailer[n:])
- copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:])
- if n < len(buf) {
- ser.eof = true
- err = io.EOF
- }
- return
- }
-
- n, err = ser.in.Read(buf[mdcTrailerSize:])
- copy(buf, ser.trailer[:])
- ser.h.Write(buf[:n])
- copy(ser.trailer[:], buf[n:])
-
- if err == io.EOF {
- ser.eof = true
- }
- return
-}
-
-// This is a new-format packet tag byte for a type 19 (Integrity Protected) packet.
-const mdcPacketTagByte = byte(0x80) | 0x40 | 19
-
-func (ser *seMDCReader) Close() error {
- if ser.error {
- return errors.ErrMDCHashMismatch
- }
-
- for !ser.eof {
- // We haven't seen EOF so we need to read to the end
- var buf [1024]byte
- _, err := ser.Read(buf[:])
- if err == io.EOF {
- break
- }
- if err != nil {
- return errors.ErrMDCHashMismatch
- }
- }
-
- ser.h.Write(ser.trailer[:2])
-
- final := ser.h.Sum(nil)
- if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 {
- return errors.ErrMDCHashMismatch
- }
- // The hash already includes the MDC header, but we still check its value
- // to confirm encryption correctness
- if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size {
- return errors.ErrMDCHashMismatch
- }
- return nil
-}
-
-// An seMDCWriter writes through to an io.WriteCloser while maintains a running
-// hash of the data written. On close, it emits an MDC packet containing the
-// running hash.
-type seMDCWriter struct {
- w io.WriteCloser
- h hash.Hash
-}
-
-func (w *seMDCWriter) Write(buf []byte) (n int, err error) {
- w.h.Write(buf)
- return w.w.Write(buf)
-}
-
-func (w *seMDCWriter) Close() (err error) {
- var buf [mdcTrailerSize]byte
-
- buf[0] = mdcPacketTagByte
- buf[1] = sha1.Size
- w.h.Write(buf[:2])
- digest := w.h.Sum(nil)
- copy(buf[2:], digest)
-
- _, err = w.w.Write(buf[:])
- if err != nil {
- return
- }
- return w.w.Close()
-}
-
-// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
-type noOpCloser struct {
- w io.Writer
-}
-
-func (c noOpCloser) Write(data []byte) (n int, err error) {
- return c.w.Write(data)
-}
-
-func (c noOpCloser) Close() error {
- return nil
-}
-
-func serializeSymmetricallyEncryptedMdc(ciphertext io.WriteCloser, c CipherFunction, key []byte, config *Config) (Contents io.WriteCloser, err error) {
- // Disallow old cipher suites
- if !c.IsSupported() || c < CipherAES128 {
- return nil, errors.InvalidArgumentError("invalid mdc cipher function")
- }
-
- if c.KeySize() != len(key) {
- return nil, errors.InvalidArgumentError("error in mdc serialization: bad key length")
- }
-
- _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersionMdc})
- if err != nil {
- return
- }
-
- block := c.new(key)
- blockSize := block.BlockSize()
- iv := make([]byte, blockSize)
- _, err = io.ReadFull(config.Random(), iv)
- if err != nil {
- return nil, err
- }
- s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync)
- _, err = ciphertext.Write(prefix)
- if err != nil {
- return
- }
- plaintext := cipher.StreamWriter{S: s, W: ciphertext}
-
- h := sha1.New()
- h.Write(iv)
- h.Write(iv[blockSize-2:])
- Contents = &seMDCWriter{w: plaintext, h: h}
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userattribute.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userattribute.go
deleted file mode 100644
index 63814ed132..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userattribute.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "bytes"
- "image"
- "image/jpeg"
- "io"
-)
-
-const UserAttrImageSubpacket = 1
-
-// UserAttribute is capable of storing other types of data about a user
-// beyond name, email and a text comment. In practice, user attributes are typically used
-// to store a signed thumbnail photo JPEG image of the user.
-// See RFC 4880, section 5.12.
-type UserAttribute struct {
- Contents []*OpaqueSubpacket
-}
-
-// NewUserAttributePhoto creates a user attribute packet
-// containing the given images.
-func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) {
- uat = new(UserAttribute)
- for _, photo := range photos {
- var buf bytes.Buffer
- // RFC 4880, Section 5.12.1.
- data := []byte{
- 0x10, 0x00, // Little-endian image header length (16 bytes)
- 0x01, // Image header version 1
- 0x01, // JPEG
- 0, 0, 0, 0, // 12 reserved octets, must be all zero.
- 0, 0, 0, 0,
- 0, 0, 0, 0}
- if _, err = buf.Write(data); err != nil {
- return
- }
- if err = jpeg.Encode(&buf, photo, nil); err != nil {
- return
- }
-
- lengthBuf := make([]byte, 5)
- n := serializeSubpacketLength(lengthBuf, len(buf.Bytes())+1)
- lengthBuf = lengthBuf[:n]
-
- uat.Contents = append(uat.Contents, &OpaqueSubpacket{
- SubType: UserAttrImageSubpacket,
- EncodedLength: lengthBuf,
- Contents: buf.Bytes(),
- })
- }
- return
-}
-
-// NewUserAttribute creates a new user attribute packet containing the given subpackets.
-func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute {
- return &UserAttribute{Contents: contents}
-}
-
-func (uat *UserAttribute) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.13
- b, err := io.ReadAll(r)
- if err != nil {
- return
- }
- uat.Contents, err = OpaqueSubpackets(b)
- return
-}
-
-// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including
-// header.
-func (uat *UserAttribute) Serialize(w io.Writer) (err error) {
- var buf bytes.Buffer
- for _, sp := range uat.Contents {
- err = sp.Serialize(&buf)
- if err != nil {
- return err
- }
- }
- if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil {
- return err
- }
- _, err = w.Write(buf.Bytes())
- return
-}
-
-// ImageData returns zero or more byte slices, each containing
-// JPEG File Interchange Format (JFIF), for each photo in the
-// user attribute packet.
-func (uat *UserAttribute) ImageData() (imageData [][]byte) {
- for _, sp := range uat.Contents {
- if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 {
- imageData = append(imageData, sp.Contents[16:])
- }
- }
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userid.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userid.go
deleted file mode 100644
index 3c7451a3c3..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userid.go
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package packet
-
-import (
- "io"
- "strings"
-)
-
-// UserId contains text that is intended to represent the name and email
-// address of the key holder. See RFC 4880, section 5.11. By convention, this
-// takes the form "Full Name (Comment) "
-type UserId struct {
- Id string // By convention, this takes the form "Full Name (Comment) " which is split out in the fields below.
-
- Name, Comment, Email string
-}
-
-func hasInvalidCharacters(s string) bool {
- for _, c := range s {
- switch c {
- case '(', ')', '<', '>', 0:
- return true
- }
- }
- return false
-}
-
-// NewUserId returns a UserId or nil if any of the arguments contain invalid
-// characters. The invalid characters are '\x00', '(', ')', '<' and '>'
-func NewUserId(name, comment, email string) *UserId {
- // RFC 4880 doesn't deal with the structure of userid strings; the
- // name, comment and email form is just a convention. However, there's
- // no convention about escaping the metacharacters and GPG just refuses
- // to create user ids where, say, the name contains a '('. We mirror
- // this behaviour.
-
- if hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) {
- return nil
- }
-
- uid := new(UserId)
- uid.Name, uid.Comment, uid.Email = name, comment, email
- uid.Id = name
- if len(comment) > 0 {
- if len(uid.Id) > 0 {
- uid.Id += " "
- }
- uid.Id += "("
- uid.Id += comment
- uid.Id += ")"
- }
- if len(email) > 0 {
- if len(uid.Id) > 0 {
- uid.Id += " "
- }
- uid.Id += "<"
- uid.Id += email
- uid.Id += ">"
- }
- return uid
-}
-
-func (uid *UserId) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.11
- b, err := io.ReadAll(r)
- if err != nil {
- return
- }
- uid.Id = string(b)
- uid.Name, uid.Comment, uid.Email = parseUserId(uid.Id)
- return
-}
-
-// Serialize marshals uid to w in the form of an OpenPGP packet, including
-// header.
-func (uid *UserId) Serialize(w io.Writer) error {
- err := serializeHeader(w, packetTypeUserId, len(uid.Id))
- if err != nil {
- return err
- }
- _, err = w.Write([]byte(uid.Id))
- return err
-}
-
-// parseUserId extracts the name, comment and email from a user id string that
-// is formatted as "Full Name (Comment) ".
-func parseUserId(id string) (name, comment, email string) {
- var n, c, e struct {
- start, end int
- }
- var state int
-
- for offset, rune := range id {
- switch state {
- case 0:
- // Entering name
- n.start = offset
- state = 1
- fallthrough
- case 1:
- // In name
- if rune == '(' {
- state = 2
- n.end = offset
- } else if rune == '<' {
- state = 5
- n.end = offset
- }
- case 2:
- // Entering comment
- c.start = offset
- state = 3
- fallthrough
- case 3:
- // In comment
- if rune == ')' {
- state = 4
- c.end = offset
- }
- case 4:
- // Between comment and email
- if rune == '<' {
- state = 5
- }
- case 5:
- // Entering email
- e.start = offset
- state = 6
- fallthrough
- case 6:
- // In email
- if rune == '>' {
- state = 7
- e.end = offset
- }
- default:
- // After email
- }
- }
- switch state {
- case 1:
- // ended in the name
- n.end = len(id)
- case 3:
- // ended in comment
- c.end = len(id)
- case 6:
- // ended in email
- e.end = len(id)
- }
-
- name = strings.TrimSpace(id[n.start:n.end])
- comment = strings.TrimSpace(id[c.start:c.end])
- email = strings.TrimSpace(id[e.start:e.end])
-
- // RFC 2822 3.4: alternate simple form of a mailbox
- if email == "" && strings.ContainsRune(name, '@') {
- email = name
- name = ""
- }
-
- return
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
deleted file mode 100644
index e6dd9b5fd3..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
+++ /dev/null
@@ -1,619 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package openpgp implements high level operations on OpenPGP messages.
-package openpgp // import "github.com/ProtonMail/go-crypto/openpgp"
-
-import (
- "crypto"
- _ "crypto/sha256"
- _ "crypto/sha512"
- "hash"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/armor"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "github.com/ProtonMail/go-crypto/openpgp/packet"
- _ "golang.org/x/crypto/sha3"
-)
-
-// SignatureType is the armor type for a PGP signature.
-var SignatureType = "PGP SIGNATURE"
-
-// readArmored reads an armored block with the given type.
-func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) {
- block, err := armor.Decode(r)
- if err != nil {
- return
- }
-
- if block.Type != expectedType {
- return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type)
- }
-
- return block.Body, nil
-}
-
-// MessageDetails contains the result of parsing an OpenPGP encrypted and/or
-// signed message.
-type MessageDetails struct {
- IsEncrypted bool // true if the message was encrypted.
- EncryptedToKeyIds []uint64 // the list of recipient key ids.
- IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message.
- DecryptedWith Key // the private key used to decrypt the message, if any.
- IsSigned bool // true if the message is signed.
- SignedByKeyId uint64 // the key id of the signer, if any.
- SignedByFingerprint []byte // the key fingerprint of the signer, if any.
- SignedBy *Key // the key of the signer, if available.
- LiteralData *packet.LiteralData // the metadata of the contents
- UnverifiedBody io.Reader // the contents of the message.
-
- // If IsSigned is true and SignedBy is non-zero then the signature will
- // be verified as UnverifiedBody is read. The signature cannot be
- // checked until the whole of UnverifiedBody is read so UnverifiedBody
- // must be consumed until EOF before the data can be trusted. Even if a
- // message isn't signed (or the signer is unknown) the data may contain
- // an authentication code that is only checked once UnverifiedBody has
- // been consumed. Once EOF has been seen, the following fields are
- // valid. (An authentication code failure is reported as a
- // SignatureError error when reading from UnverifiedBody.)
- Signature *packet.Signature // the signature packet itself.
- SignatureError error // nil if the signature is good.
- UnverifiedSignatures []*packet.Signature // all other unverified signature packets.
-
- decrypted io.ReadCloser
-}
-
-// A PromptFunction is used as a callback by functions that may need to decrypt
-// a private key, or prompt for a passphrase. It is called with a list of
-// acceptable, encrypted private keys and a boolean that indicates whether a
-// passphrase is usable. It should either decrypt a private key or return a
-// passphrase to try. If the decrypted private key or given passphrase isn't
-// correct, the function will be called again, forever. Any error returned will
-// be passed up.
-type PromptFunction func(keys []Key, symmetric bool) ([]byte, error)
-
-// A keyEnvelopePair is used to store a private key with the envelope that
-// contains a symmetric key, encrypted with that key.
-type keyEnvelopePair struct {
- key Key
- encryptedKey *packet.EncryptedKey
-}
-
-// ReadMessage parses an OpenPGP message that may be signed and/or encrypted.
-// The given KeyRing should contain both public keys (for signature
-// verification) and, possibly encrypted, private keys for decrypting.
-// If config is nil, sensible defaults will be used.
-func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) {
- var p packet.Packet
-
- var symKeys []*packet.SymmetricKeyEncrypted
- var pubKeys []keyEnvelopePair
- // Integrity protected encrypted packet: SymmetricallyEncrypted or AEADEncrypted
- var edp packet.EncryptedDataPacket
-
- packets := packet.NewReader(r)
- md = new(MessageDetails)
- md.IsEncrypted = true
-
- // The message, if encrypted, starts with a number of packets
- // containing an encrypted decryption key. The decryption key is either
- // encrypted to a public key, or with a passphrase. This loop
- // collects these packets.
-ParsePackets:
- for {
- p, err = packets.Next()
- if err != nil {
- return nil, err
- }
- switch p := p.(type) {
- case *packet.SymmetricKeyEncrypted:
- // This packet contains the decryption key encrypted with a passphrase.
- md.IsSymmetricallyEncrypted = true
- symKeys = append(symKeys, p)
- case *packet.EncryptedKey:
- // This packet contains the decryption key encrypted to a public key.
- md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId)
- switch p.Algo {
- case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal, packet.PubKeyAlgoECDH, packet.PubKeyAlgoX25519, packet.PubKeyAlgoX448:
- break
- default:
- continue
- }
- if keyring != nil {
- var keys []Key
- if p.KeyId == 0 {
- keys = keyring.DecryptionKeys()
- } else {
- keys = keyring.KeysById(p.KeyId)
- }
- for _, k := range keys {
- pubKeys = append(pubKeys, keyEnvelopePair{k, p})
- }
- }
- case *packet.SymmetricallyEncrypted:
- if !p.IntegrityProtected && !config.AllowUnauthenticatedMessages() {
- return nil, errors.UnsupportedError("message is not integrity protected")
- }
- edp = p
- break ParsePackets
- case *packet.AEADEncrypted:
- edp = p
- break ParsePackets
- case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature:
- // This message isn't encrypted.
- if len(symKeys) != 0 || len(pubKeys) != 0 {
- return nil, errors.StructuralError("key material not followed by encrypted message")
- }
- packets.Unread(p)
- return readSignedMessage(packets, nil, keyring, config)
- }
- }
-
- var candidates []Key
- var decrypted io.ReadCloser
-
- // Now that we have the list of encrypted keys we need to decrypt at
- // least one of them or, if we cannot, we need to call the prompt
- // function so that it can decrypt a key or give us a passphrase.
-FindKey:
- for {
- // See if any of the keys already have a private key available
- candidates = candidates[:0]
- candidateFingerprints := make(map[string]bool)
-
- for _, pk := range pubKeys {
- if pk.key.PrivateKey == nil {
- continue
- }
- if !pk.key.PrivateKey.Encrypted {
- if len(pk.encryptedKey.Key) == 0 {
- errDec := pk.encryptedKey.Decrypt(pk.key.PrivateKey, config)
- if errDec != nil {
- continue
- }
- }
- // Try to decrypt symmetrically encrypted
- decrypted, err = edp.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key)
- if err != nil && err != errors.ErrKeyIncorrect {
- return nil, err
- }
- if decrypted != nil {
- md.DecryptedWith = pk.key
- break FindKey
- }
- } else {
- fpr := string(pk.key.PublicKey.Fingerprint[:])
- if v := candidateFingerprints[fpr]; v {
- continue
- }
- candidates = append(candidates, pk.key)
- candidateFingerprints[fpr] = true
- }
- }
-
- if len(candidates) == 0 && len(symKeys) == 0 {
- return nil, errors.ErrKeyIncorrect
- }
-
- if prompt == nil {
- return nil, errors.ErrKeyIncorrect
- }
-
- passphrase, err := prompt(candidates, len(symKeys) != 0)
- if err != nil {
- return nil, err
- }
-
- // Try the symmetric passphrase first
- if len(symKeys) != 0 && passphrase != nil {
- for _, s := range symKeys {
- key, cipherFunc, err := s.Decrypt(passphrase)
- // In v4, on wrong passphrase, session key decryption is very likely to result in an invalid cipherFunc:
- // only for < 5% of cases we will proceed to decrypt the data
- if err == nil {
- decrypted, err = edp.Decrypt(cipherFunc, key)
- if err != nil {
- return nil, err
- }
- if decrypted != nil {
- break FindKey
- }
- }
- }
- }
- }
-
- md.decrypted = decrypted
- if err := packets.Push(decrypted); err != nil {
- return nil, err
- }
- mdFinal, sensitiveParsingErr := readSignedMessage(packets, md, keyring, config)
- if sensitiveParsingErr != nil {
- return nil, errors.HandleSensitiveParsingError(sensitiveParsingErr, md.decrypted != nil)
- }
- return mdFinal, nil
-}
-
-// readSignedMessage reads a possibly signed message if mdin is non-zero then
-// that structure is updated and returned. Otherwise a fresh MessageDetails is
-// used.
-func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing, config *packet.Config) (md *MessageDetails, err error) {
- if mdin == nil {
- mdin = new(MessageDetails)
- }
- md = mdin
-
- var p packet.Packet
- var h hash.Hash
- var wrappedHash hash.Hash
- var prevLast bool
-FindLiteralData:
- for {
- p, err = packets.Next()
- if err != nil {
- return nil, err
- }
- switch p := p.(type) {
- case *packet.Compressed:
- if err := packets.Push(p.Body); err != nil {
- return nil, err
- }
- case *packet.OnePassSignature:
- if prevLast {
- return nil, errors.UnsupportedError("nested signature packets")
- }
-
- if p.IsLast {
- prevLast = true
- }
-
- h, wrappedHash, err = hashForSignature(p.Hash, p.SigType, p.Salt)
- if err != nil {
- md.SignatureError = err
- }
-
- md.IsSigned = true
- if p.Version == 6 {
- md.SignedByFingerprint = p.KeyFingerprint
- }
- md.SignedByKeyId = p.KeyId
-
- if keyring != nil {
- keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign)
- if len(keys) > 0 {
- md.SignedBy = &keys[0]
- }
- }
- case *packet.LiteralData:
- md.LiteralData = p
- break FindLiteralData
- }
- }
-
- if md.IsSigned && md.SignatureError == nil {
- md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md, config}
- } else if md.decrypted != nil {
- md.UnverifiedBody = &checkReader{md, false}
- } else {
- md.UnverifiedBody = md.LiteralData.Body
- }
-
- return md, nil
-}
-
-func wrapHashForSignature(hashFunc hash.Hash, sigType packet.SignatureType) (hash.Hash, error) {
- switch sigType {
- case packet.SigTypeBinary:
- return hashFunc, nil
- case packet.SigTypeText:
- return NewCanonicalTextHash(hashFunc), nil
- }
- return nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType)))
-}
-
-// hashForSignature returns a pair of hashes that can be used to verify a
-// signature. The signature may specify that the contents of the signed message
-// should be preprocessed (i.e. to normalize line endings). Thus this function
-// returns two hashes. The second should be used to hash the message itself and
-// performs any needed preprocessing.
-func hashForSignature(hashFunc crypto.Hash, sigType packet.SignatureType, sigSalt []byte) (hash.Hash, hash.Hash, error) {
- if _, ok := algorithm.HashToHashIdWithSha1(hashFunc); !ok {
- return nil, nil, errors.UnsupportedError("unsupported hash function")
- }
- if !hashFunc.Available() {
- return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashFunc)))
- }
- h := hashFunc.New()
- if sigSalt != nil {
- h.Write(sigSalt)
- }
- wrappedHash, err := wrapHashForSignature(h, sigType)
- if err != nil {
- return nil, nil, err
- }
- switch sigType {
- case packet.SigTypeBinary:
- return h, wrappedHash, nil
- case packet.SigTypeText:
- return h, wrappedHash, nil
- }
- return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType)))
-}
-
-// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF
-// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger
-// MDC checks.
-type checkReader struct {
- md *MessageDetails
- checked bool
-}
-
-func (cr *checkReader) Read(buf []byte) (int, error) {
- n, sensitiveParsingError := cr.md.LiteralData.Body.Read(buf)
- if sensitiveParsingError == io.EOF {
- if cr.checked {
- // Only check once
- return n, io.EOF
- }
- mdcErr := cr.md.decrypted.Close()
- if mdcErr != nil {
- return n, mdcErr
- }
- cr.checked = true
- return n, io.EOF
- }
-
- if sensitiveParsingError != nil {
- return n, errors.HandleSensitiveParsingError(sensitiveParsingError, true)
- }
-
- return n, nil
-}
-
-// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes
-// the data as it is read. When it sees an EOF from the underlying io.Reader
-// it parses and checks a trailing Signature packet and triggers any MDC checks.
-type signatureCheckReader struct {
- packets *packet.Reader
- h, wrappedHash hash.Hash
- md *MessageDetails
- config *packet.Config
-}
-
-func (scr *signatureCheckReader) Read(buf []byte) (int, error) {
- n, sensitiveParsingError := scr.md.LiteralData.Body.Read(buf)
-
- // Hash only if required
- if scr.md.SignedBy != nil {
- scr.wrappedHash.Write(buf[:n])
- }
-
- readsDecryptedData := scr.md.decrypted != nil
- if sensitiveParsingError == io.EOF {
- var p packet.Packet
- var readError error
- var sig *packet.Signature
-
- p, readError = scr.packets.Next()
- for readError == nil {
- var ok bool
- if sig, ok = p.(*packet.Signature); ok {
- if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
- sig.Metadata = scr.md.LiteralData
- }
-
- // If signature KeyID matches
- if scr.md.SignedBy != nil && *sig.IssuerKeyId == scr.md.SignedByKeyId {
- key := scr.md.SignedBy
- signatureError := key.PublicKey.VerifySignature(scr.h, sig)
- if signatureError == nil {
- signatureError = checkMessageSignatureDetails(key, sig, scr.config)
- }
- scr.md.Signature = sig
- scr.md.SignatureError = signatureError
- } else {
- scr.md.UnverifiedSignatures = append(scr.md.UnverifiedSignatures, sig)
- }
- }
-
- p, readError = scr.packets.Next()
- }
-
- if scr.md.SignedBy != nil && scr.md.Signature == nil {
- if scr.md.UnverifiedSignatures == nil {
- scr.md.SignatureError = errors.StructuralError("LiteralData not followed by signature")
- } else {
- scr.md.SignatureError = errors.StructuralError("No matching signature found")
- }
- }
-
- // The SymmetricallyEncrypted packet, if any, might have an
- // unsigned hash of its own. In order to check this we need to
- // close that Reader.
- if scr.md.decrypted != nil {
- if sensitiveParsingError := scr.md.decrypted.Close(); sensitiveParsingError != nil {
- return n, errors.HandleSensitiveParsingError(sensitiveParsingError, true)
- }
- }
- return n, io.EOF
- }
-
- if sensitiveParsingError != nil {
- return n, errors.HandleSensitiveParsingError(sensitiveParsingError, readsDecryptedData)
- }
-
- return n, nil
-}
-
-// VerifyDetachedSignature takes a signed file and a detached signature and
-// returns the signature packet and the entity the signature was signed by,
-// if any, and a possible signature verification error.
-// If the signer isn't known, ErrUnknownIssuer is returned.
-func VerifyDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (sig *packet.Signature, signer *Entity, err error) {
- return verifyDetachedSignature(keyring, signed, signature, nil, false, config)
-}
-
-// VerifyDetachedSignatureAndHash performs the same actions as
-// VerifyDetachedSignature and checks that the expected hash functions were used.
-func VerifyDetachedSignatureAndHash(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, config *packet.Config) (sig *packet.Signature, signer *Entity, err error) {
- return verifyDetachedSignature(keyring, signed, signature, expectedHashes, true, config)
-}
-
-// CheckDetachedSignature takes a signed file and a detached signature and
-// returns the entity the signature was signed by, if any, and a possible
-// signature verification error. If the signer isn't known,
-// ErrUnknownIssuer is returned.
-func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (signer *Entity, err error) {
- _, signer, err = verifyDetachedSignature(keyring, signed, signature, nil, false, config)
- return
-}
-
-// CheckDetachedSignatureAndHash performs the same actions as
-// CheckDetachedSignature and checks that the expected hash functions were used.
-func CheckDetachedSignatureAndHash(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, config *packet.Config) (signer *Entity, err error) {
- _, signer, err = verifyDetachedSignature(keyring, signed, signature, expectedHashes, true, config)
- return
-}
-
-func verifyDetachedSignature(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, checkHashes bool, config *packet.Config) (sig *packet.Signature, signer *Entity, err error) {
- var issuerKeyId uint64
- var hashFunc crypto.Hash
- var sigType packet.SignatureType
- var keys []Key
- var p packet.Packet
-
- packets := packet.NewReader(signature)
- for {
- p, err = packets.Next()
- if err == io.EOF {
- return nil, nil, errors.ErrUnknownIssuer
- }
- if err != nil {
- return nil, nil, err
- }
-
- var ok bool
- sig, ok = p.(*packet.Signature)
- if !ok {
- return nil, nil, errors.StructuralError("non signature packet found")
- }
- if sig.IssuerKeyId == nil {
- return nil, nil, errors.StructuralError("signature doesn't have an issuer")
- }
- issuerKeyId = *sig.IssuerKeyId
- hashFunc = sig.Hash
- sigType = sig.SigType
- if checkHashes {
- matchFound := false
- // check for hashes
- for _, expectedHash := range expectedHashes {
- if hashFunc == expectedHash {
- matchFound = true
- break
- }
- }
- if !matchFound {
- return nil, nil, errors.StructuralError("hash algorithm or salt mismatch with cleartext message headers")
- }
- }
- keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign)
- if len(keys) > 0 {
- break
- }
- }
-
- if len(keys) == 0 {
- panic("unreachable")
- }
-
- h, err := sig.PrepareVerify()
- if err != nil {
- return nil, nil, err
- }
- wrappedHash, err := wrapHashForSignature(h, sigType)
- if err != nil {
- return nil, nil, err
- }
-
- if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF {
- return nil, nil, err
- }
-
- for _, key := range keys {
- err = key.PublicKey.VerifySignature(h, sig)
- if err == nil {
- return sig, key.Entity, checkMessageSignatureDetails(&key, sig, config)
- }
- }
-
- return nil, nil, err
-}
-
-// CheckArmoredDetachedSignature performs the same actions as
-// CheckDetachedSignature but expects the signature to be armored.
-func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (signer *Entity, err error) {
- body, err := readArmored(signature, SignatureType)
- if err != nil {
- return
- }
-
- return CheckDetachedSignature(keyring, signed, body, config)
-}
-
-// checkMessageSignatureDetails returns an error if:
-// - The signature (or one of the binding signatures mentioned below)
-// has a unknown critical notation data subpacket
-// - The primary key of the signing entity is revoked
-// - The primary identity is revoked
-// - The signature is expired
-// - The primary key of the signing entity is expired according to the
-// primary identity binding signature
-//
-// ... or, if the signature was signed by a subkey and:
-// - The signing subkey is revoked
-// - The signing subkey is expired according to the subkey binding signature
-// - The signing subkey binding signature is expired
-// - The signing subkey cross-signature is expired
-//
-// NOTE: The order of these checks is important, as the caller may choose to
-// ignore ErrSignatureExpired or ErrKeyExpired errors, but should never
-// ignore any other errors.
-func checkMessageSignatureDetails(key *Key, signature *packet.Signature, config *packet.Config) error {
- now := config.Now()
- primarySelfSignature, primaryIdentity := key.Entity.PrimarySelfSignature()
- signedBySubKey := key.PublicKey != key.Entity.PrimaryKey
- sigsToCheck := []*packet.Signature{signature, primarySelfSignature}
- if signedBySubKey {
- sigsToCheck = append(sigsToCheck, key.SelfSignature, key.SelfSignature.EmbeddedSignature)
- }
- for _, sig := range sigsToCheck {
- for _, notation := range sig.Notations {
- if notation.IsCritical && !config.KnownNotation(notation.Name) {
- return errors.SignatureError("unknown critical notation: " + notation.Name)
- }
- }
- }
- if key.Entity.Revoked(now) || // primary key is revoked
- (signedBySubKey && key.Revoked(now)) || // subkey is revoked
- (primaryIdentity != nil && primaryIdentity.Revoked(now)) { // primary identity is revoked for v4
- return errors.ErrKeyRevoked
- }
- if key.Entity.PrimaryKey.KeyExpired(primarySelfSignature, now) { // primary key is expired
- return errors.ErrKeyExpired
- }
- if signedBySubKey {
- if key.PublicKey.KeyExpired(key.SelfSignature, now) { // subkey is expired
- return errors.ErrKeyExpired
- }
- }
- for _, sig := range sigsToCheck {
- if sig.SigExpired(now) { // any of the relevant signatures are expired
- return errors.ErrSignatureExpired
- }
- }
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go
deleted file mode 100644
index 670d60226a..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go
+++ /dev/null
@@ -1,457 +0,0 @@
-package openpgp
-
-const testKey1KeyId uint64 = 0xA34D7E18C20C31BB
-const testKey3KeyId uint64 = 0x338934250CCC0360
-const testKeyP256KeyId uint64 = 0xd44a2c495918513e
-
-const signedInput = "Signed message\nline 2\nline 3\n"
-const signedTextInput = "Signed message\r\nline 2\r\nline 3\r\n"
-
-const recipientUnspecifiedHex = "848c0300000000000000000103ff62d4d578d03cf40c3da998dfe216c074fa6ddec5e31c197c9666ba292830d91d18716a80f699f9d897389a90e6d62d0238f5f07a5248073c0f24920e4bc4a30c2d17ee4e0cae7c3d4aaa4e8dced50e3010a80ee692175fa0385f62ecca4b56ee6e9980aa3ec51b61b077096ac9e800edaf161268593eedb6cc7027ff5cb32745d250010d407a6221ae22ef18469b444f2822478c4d190b24d36371a95cb40087cdd42d9399c3d06a53c0673349bfb607927f20d1e122bde1e2bf3aa6cae6edf489629bcaa0689539ae3b718914d88ededc3b"
-
-const detachedSignatureHex = "889c04000102000605024d449cd1000a0910a34d7e18c20c31bb167603ff57718d09f28a519fdc7b5a68b6a3336da04df85e38c5cd5d5bd2092fa4629848a33d85b1729402a2aab39c3ac19f9d573f773cc62c264dc924c067a79dfd8a863ae06c7c8686120760749f5fd9b1e03a64d20a7df3446ddc8f0aeadeaeba7cbaee5c1e366d65b6a0c6cc749bcb912d2f15013f812795c2e29eb7f7b77f39ce77"
-
-const detachedSignatureTextHex = "889c04010102000605024d449d21000a0910a34d7e18c20c31bbc8c60400a24fbef7342603a41cb1165767bd18985d015fb72fe05db42db36cfb2f1d455967f1e491194fbf6cf88146222b23bf6ffbd50d17598d976a0417d3192ff9cc0034fd00f287b02e90418bbefe609484b09231e4e7a5f3562e199bf39909ab5276c4d37382fe088f6b5c3426fc1052865da8b3ab158672d58b6264b10823dc4b39"
-
-const detachedSignatureDSAHex = "884604001102000605024d6c4eac000a0910338934250ccc0360f18d00a087d743d6405ed7b87755476629600b8b694a39e900a0abff8126f46faf1547c1743c37b21b4ea15b8f83"
-
-const detachedSignatureP256Hex = "885e0400130a0006050256e5bb00000a0910d44a2c495918513edef001009841a4f792beb0befccb35c8838a6a87d9b936beaa86db6745ddc7b045eee0cf00fd1ac1f78306b17e965935dd3f8bae4587a76587e4af231efe19cc4011a8434817"
-
-// The plaintext is https://www.gutenberg.org/cache/epub/1080/pg1080.txt
-const modestProposalSha512 = "lbbrB1+WP3T9AaC9OQqBdOcCjgeEQadlulXsNPgVx0tyqPzDHwUugZ2gE7V0ESKAw6kAVfgkcuvfgxAAGaeHtw=="
-
-const testKeys1And2Hex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b0020003b88d044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f0011010001889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab0020003988d044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b0020003b88d044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020003"
-
-const testKeys1And2PrivateHex = "9501d8044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd00110100010003ff4d91393b9a8e3430b14d6209df42f98dc927425b881f1209f319220841273a802a97c7bdb8b3a7740b3ab5866c4d1d308ad0d3a79bd1e883aacf1ac92dfe720285d10d08752a7efe3c609b1d00f17f2805b217be53999a7da7e493bfc3e9618fd17018991b8128aea70a05dbce30e4fbe626aa45775fa255dd9177aabf4df7cf0200c1ded12566e4bc2bb590455e5becfb2e2c9796482270a943343a7835de41080582c2be3caf5981aa838140e97afa40ad652a0b544f83eb1833b0957dce26e47b0200eacd6046741e9ce2ec5beb6fb5e6335457844fb09477f83b050a96be7da043e17f3a9523567ed40e7a521f818813a8b8a72209f1442844843ccc7eb9805442570200bdafe0438d97ac36e773c7162028d65844c4d463e2420aa2228c6e50dc2743c3d6c72d0d782a5173fe7be2169c8a9f4ef8a7cf3e37165e8c61b89c346cdc6c1799d2b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b00200009d01d8044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f00110100010003fd17a7490c22a79c59281fb7b20f5e6553ec0c1637ae382e8adaea295f50241037f8997cf42c1ce26417e015091451b15424b2c59eb8d4161b0975630408e394d3b00f88d4b4e18e2cc85e8251d4753a27c639c83f5ad4a571c4f19d7cd460b9b73c25ade730c99df09637bd173d8e3e981ac64432078263bb6dc30d3e974150dd0200d0ee05be3d4604d2146fb0457f31ba17c057560785aa804e8ca5530a7cd81d3440d0f4ba6851efcfd3954b7e68908fc0ba47f7ac37bf559c6c168b70d3a7c8cd0200da1c677c4bce06a068070f2b3733b0a714e88d62aa3f9a26c6f5216d48d5c2b5624144f3807c0df30be66b3268eeeca4df1fbded58faf49fc95dc3c35f134f8b01fd1396b6c0fc1b6c4f0eb8f5e44b8eace1e6073e20d0b8bc5385f86f1cf3f050f66af789f3ef1fc107b7f4421e19e0349c730c68f0a226981f4e889054fdb4dc149e8e889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab00200009501fe044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001fe030302e9030f3c783e14856063f16938530e148bc57a7aa3f3e4f90df9dceccdc779bc0835e1ad3d006e4a8d7b36d08b8e0de5a0d947254ecfbd22037e6572b426bcfdc517796b224b0036ff90bc574b5509bede85512f2eefb520fb4b02aa523ba739bff424a6fe81c5041f253f8d757e69a503d3563a104d0d49e9e890b9d0c26f96b55b743883b472caa7050c4acfd4a21f875bdf1258d88bd61224d303dc9df77f743137d51e6d5246b88c406780528fd9a3e15bab5452e5b93970d9dcc79f48b38651b9f15bfbcf6da452837e9cc70683d1bdca94507870f743e4ad902005812488dd342f836e72869afd00ce1850eea4cfa53ce10e3608e13d3c149394ee3cbd0e23d018fcbcb6e2ec5a1a22972d1d462ca05355d0d290dd2751e550d5efb38c6c89686344df64852bf4ff86638708f644e8ec6bd4af9b50d8541cb91891a431326ab2e332faa7ae86cfb6e0540aa63160c1e5cdd5a4add518b303fff0a20117c6bc77f7cfbaf36b04c865c6c2b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b00200009d01fe044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001fe030302e9030f3c783e148560f936097339ae381d63116efcf802ff8b1c9360767db5219cc987375702a4123fd8657d3e22700f23f95020d1b261eda5257e9a72f9a918e8ef22dd5b3323ae03bbc1923dd224db988cadc16acc04b120a9f8b7e84da9716c53e0334d7b66586ddb9014df604b41be1e960dcfcbc96f4ed150a1a0dd070b9eb14276b9b6be413a769a75b519a53d3ecc0c220e85cd91ca354d57e7344517e64b43b6e29823cbd87eae26e2b2e78e6dedfbb76e3e9f77bcb844f9a8932eb3db2c3f9e44316e6f5d60e9e2a56e46b72abe6b06dc9a31cc63f10023d1f5e12d2a3ee93b675c96f504af0001220991c88db759e231b3320dcedf814dcf723fd9857e3d72d66a0f2af26950b915abdf56c1596f46a325bf17ad4810d3535fb02a259b247ac3dbd4cc3ecf9c51b6c07cebb009c1506fba0a89321ec8683e3fd009a6e551d50243e2d5092fefb3321083a4bad91320dc624bd6b5dddf93553e3d53924c05bfebec1fb4bd47e89a1a889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020000"
-
-const dsaElGamalTestKeysHex = "9501e1044dfcb16a110400aa3e5c1a1f43dd28c2ffae8abf5cfce555ee874134d8ba0a0f7b868ce2214beddc74e5e1e21ded354a95d18acdaf69e5e342371a71fbb9093162e0c5f3427de413a7f2c157d83f5cd2f9d791256dc4f6f0e13f13c3302af27f2384075ab3021dff7a050e14854bbde0a1094174855fc02f0bae8e00a340d94a1f22b32e48485700a0cec672ac21258fb95f61de2ce1af74b2c4fa3e6703ff698edc9be22c02ae4d916e4fa223f819d46582c0516235848a77b577ea49018dcd5e9e15cff9dbb4663a1ae6dd7580fa40946d40c05f72814b0f88481207e6c0832c3bded4853ebba0a7e3bd8e8c66df33d5a537cd4acf946d1080e7a3dcea679cb2b11a72a33a2b6a9dc85f466ad2ddf4c3db6283fa645343286971e3dd700703fc0c4e290d45767f370831a90187e74e9972aae5bff488eeff7d620af0362bfb95c1a6c3413ab5d15a2e4139e5d07a54d72583914661ed6a87cce810be28a0aa8879a2dd39e52fb6fe800f4f181ac7e328f740cde3d09a05cecf9483e4cca4253e60d4429ffd679d9996a520012aad119878c941e3cf151459873bdfc2a9563472fe0303027a728f9feb3b864260a1babe83925ce794710cfd642ee4ae0e5b9d74cee49e9c67b6cd0ea5dfbb582132195a121356a1513e1bca73e5b80c58c7ccb4164453412f456c47616d616c2054657374204b65792031886204131102002205024dfcb16a021b03060b090807030206150802090a0b0416020301021e01021780000a091033af447ccd759b09fadd00a0b8fd6f5a790bad7e9f2dbb7632046dc4493588db009c087c6a9ba9f7f49fab221587a74788c00db4889ab00200009d0157044dfcb16a1004008dec3f9291205255ccff8c532318133a6840739dd68b03ba942676f9038612071447bf07d00d559c5c0875724ea16a4c774f80d8338b55fca691a0522e530e604215b467bbc9ccfd483a1da99d7bc2648b4318fdbd27766fc8bfad3fddb37c62b8ae7ccfe9577e9b8d1e77c1d417ed2c2ef02d52f4da11600d85d3229607943700030503ff506c94c87c8cab778e963b76cf63770f0a79bf48fb49d3b4e52234620fc9f7657f9f8d56c96a2b7c7826ae6b57ebb2221a3fe154b03b6637cea7e6d98e3e45d87cf8dc432f723d3d71f89c5192ac8d7290684d2c25ce55846a80c9a7823f6acd9bb29fa6cd71f20bc90eccfca20451d0c976e460e672b000df49466408d527affe0303027a728f9feb3b864260abd761730327bca2aaa4ea0525c175e92bf240682a0e83b226f97ecb2e935b62c9a133858ce31b271fa8eb41f6a1b3cd72a63025ce1a75ee4180dcc284884904181102000905024dfcb16a021b0c000a091033af447ccd759b09dd0b009e3c3e7296092c81bee5a19929462caaf2fff3ae26009e218c437a2340e7ea628149af1ec98ec091a43992b00200009501e1044dfcb1be1104009f61faa61aa43df75d128cbe53de528c4aec49ce9360c992e70c77072ad5623de0a3a6212771b66b39a30dad6781799e92608316900518ec01184a85d872365b7d2ba4bacfb5882ea3c2473d3750dc6178cc1cf82147fb58caa28b28e9f12f6d1efcb0534abed644156c91cca4ab78834268495160b2400bc422beb37d237c2300a0cac94911b6d493bda1e1fbc6feeca7cb7421d34b03fe22cec6ccb39675bb7b94a335c2b7be888fd3906a1125f33301d8aa6ec6ee6878f46f73961c8d57a3e9544d8ef2a2cbfd4d52da665b1266928cfe4cb347a58c412815f3b2d2369dec04b41ac9a71cc9547426d5ab941cccf3b18575637ccfb42df1a802df3cfe0a999f9e7109331170e3a221991bf868543960f8c816c28097e503fe319db10fb98049f3a57d7c80c420da66d56f3644371631fad3f0ff4040a19a4fedc2d07727a1b27576f75a4d28c47d8246f27071e12d7a8de62aad216ddbae6aa02efd6b8a3e2818cda48526549791ab277e447b3a36c57cefe9b592f5eab73959743fcc8e83cbefec03a329b55018b53eec196765ae40ef9e20521a603c551efe0303020950d53a146bf9c66034d00c23130cce95576a2ff78016ca471276e8227fb30b1ffbd92e61804fb0c3eff9e30b1a826ee8f3e4730b4d86273ca977b4164453412f456c47616d616c2054657374204b65792032886204131102002205024dfcb1be021b03060b090807030206150802090a0b0416020301021e01021780000a0910a86bf526325b21b22bd9009e34511620415c974750a20df5cb56b182f3b48e6600a0a9466cb1a1305a84953445f77d461593f1d42bc1b00200009d0157044dfcb1be1004009565a951da1ee87119d600c077198f1c1bceb0f7aa54552489298e41ff788fa8f0d43a69871f0f6f77ebdfb14a4260cf9fbeb65d5844b4272a1904dd95136d06c3da745dc46327dd44a0f16f60135914368c8039a34033862261806bb2c5ce1152e2840254697872c85441ccb7321431d75a747a4bfb1d2c66362b51ce76311700030503fc0ea76601c196768070b7365a200e6ddb09307f262d5f39eec467b5f5784e22abdf1aa49226f59ab37cb49969d8f5230ea65caf56015abda62604544ed526c5c522bf92bed178a078789f6c807b6d34885688024a5bed9e9f8c58d11d4b82487b44c5f470c5606806a0443b79cadb45e0f897a561a53f724e5349b9267c75ca17fe0303020950d53a146bf9c660bc5f4ce8f072465e2d2466434320c1e712272fafc20e342fe7608101580fa1a1a367e60486a7cd1246b7ef5586cf5e10b32762b710a30144f12dd17dd4884904181102000905024dfcb1be021b0c000a0910a86bf526325b21b2904c00a0b2b66b4b39ccffda1d10f3ea8d58f827e30a8b8e009f4255b2d8112a184e40cde43a34e8655ca7809370b0020000"
-
-const ed25519wX25519Key = "c54b0663877fe31b00000020f94da7bb48d60a61e567706a6587d0331999bb9d891a08242ead84543df895a3001972817b12be707e8d5f586ce61361201d344eb266a2c82fde6835762b65b0b7c2b1061f1b0a00000042058263877fe3030b090705150a0e080c021600029b03021e09222106cb186c4f0609a697e4d52dfa6c722b0c1f1e27c18a56708f6525ec27bad9acc905270902070200000000ad2820103e2d7d227ec0e6d7ce4471db36bfc97083253690271498a7ef0576c07faae14585b3b903b0127ec4fda2f023045a2ec76bcb4f9571a9651e14aee1137a1d668442c88f951e33c4ffd33fb9a17d511eed758fc6d9cc50cb5fd793b2039d5804c74b0663877fe319000000208693248367f9e5015db922f8f48095dda784987f2d5985b12fbad16caf5e4435004d600a4f794d44775c57a26e0feefed558e9afffd6ad0d582d57fb2ba2dcedb8c29b06181b0a0000002c050263877fe322a106cb186c4f0609a697e4d52dfa6c722b0c1f1e27c18a56708f6525ec27bad9acc9021b0c00000000defa20a6e9186d9d5935fc8fe56314cdb527486a5a5120f9b762a235a729f039010a56b89c658568341fbef3b894e9834ad9bc72afae2f4c9c47a43855e65f1cb0a3f77bbc5f61085c1f8249fe4e7ca59af5f0bcee9398e0fa8d76e522e1d8ab42bb0d"
-
-const signedMessageHex = "a3019bc0cbccc0c4b8d8b74ee2108fe16ec6d3ca490cbe362d3f8333d3f352531472538b8b13d353b97232f352158c20943157c71c16064626063656269052062e4e01987e9b6fccff4b7df3a34c534b23e679cbec3bc0f8f6e64dfb4b55fe3f8efa9ce110ddb5cd79faf1d753c51aecfa669f7e7aa043436596cccc3359cb7dd6bbe9ecaa69e5989d9e57209571edc0b2fa7f57b9b79a64ee6e99ce1371395fee92fec2796f7b15a77c386ff668ee27f6d38f0baa6c438b561657377bf6acff3c5947befd7bf4c196252f1d6e5c524d0300"
-
-const signedTextMessageHex = "a3019bc0cbccc8c4b8d8b74ee2108fe16ec6d36a250cbece0c178233d3f352531472538b8b13d35379b97232f352158ca0b4312f57c71c1646462606365626906a062e4e019811591798ff99bf8afee860b0d8a8c2a85c3387e3bcf0bb3b17987f2bbcfab2aa526d930cbfd3d98757184df3995c9f3e7790e36e3e9779f06089d4c64e9e47dd6202cb6e9bc73c5d11bb59fbaf89d22d8dc7cf199ddf17af96e77c5f65f9bbed56f427bd8db7af37f6c9984bf9385efaf5f184f986fb3e6adb0ecfe35bbf92d16a7aa2a344fb0bc52fb7624f0200"
-
-const signedEncryptedMessageHex = "c18c032a67d68660df41c70103ff5a84c9a72f80e74ef0384c2d6a9ebfe2b09e06a8f298394f6d2abf174e40934ab0ec01fb2d0ddf21211c6fe13eb238563663b017a6b44edca552eb4736c4b7dc6ed907dd9e12a21b51b64b46f902f76fb7aaf805c1db8070574d8d0431a23e324a750f77fb72340a17a42300ee4ca8207301e95a731da229a63ab9c6b44541fbd2c11d016d810b3b3b2b38f15b5b40f0a4910332829c2062f1f7cc61f5b03677d73c54cafa1004ced41f315d46444946faae571d6f426e6dbd45d9780eb466df042005298adabf7ce0ef766dfeb94cd449c7ed0046c880339599c4711af073ce649b1e237c40b50a5536283e03bdbb7afad78bd08707715c67fb43295f905b4c479178809d429a8e167a9a8c6dfd8ab20b4edebdc38d6dec879a3202e1b752690d9bb5b0c07c5a227c79cc200e713a99251a4219d62ad5556900cf69bd384b6c8e726c7be267471d0d23af956da165af4af757246c2ebcc302b39e8ef2fccb4971b234fcda22d759ddb20e27269ee7f7fe67898a9de721bfa02ab0becaa046d00ea16cb1afc4e2eab40d0ac17121c565686e5cbd0cbdfbd9d6db5c70278b9c9db5a83176d04f61fbfbc4471d721340ede2746e5c312ded4f26787985af92b64fae3f253dbdde97f6a5e1996fd4d865599e32ff76325d3e9abe93184c02988ee89a4504356a4ef3b9b7a57cbb9637ca90af34a7676b9ef559325c3cca4e29d69fec1887f5440bb101361d744ad292a8547f22b4f22b419a42aa836169b89190f46d9560824cb2ac6e8771de8223216a5e647e132ab9eebcba89569ab339cb1c3d70fe806b31f4f4c600b4103b8d7583ebff16e43dcda551e6530f975122eb8b29"
-
-const verifiedSignatureEncryptedMessageHex = "c2b304000108000605026048f6d600210910a34d7e18c20c31bb1621045fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb9a3b0400a32ddac1af259c1b0abab0041327ea04970944401978fb647dd1cf9aba4f164e43f0d8a9389501886474bdd4a6e77f6aea945c07dfbf87743835b44cc2c39a1f9aeecfa83135abc92e18e50396f2e6a06c44e0188b0081effbfb4160d28f118d4ff73dd199a102e47cffd8c7ff2bacd83ae72b5820c021a486766dd587b5da61"
-
-const unverifiedSignatureEncryptedMessageHex = "c2b304000108000605026048f6d600210910a34d7e18c20c31bb1621045fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb9a3b0400a32ddac1af259c1b0abab0041327ea04970944401978fb647dd1cf9aba4f164e43f0d8a9389501886474bdd4a6e77f6aea945c07dfbf87743835b44cc2c39a1f9aeecfa83135abc92e18e50396f2e6a06c44e0188b0081effbfb4160d28f118d4ff73dd199a102e47cffd8c7ff2bacd83ae72b5820c021a486766dd587b5da61"
-
-const signedEncryptedMessage2Hex = "85010e03cf6a7abcd43e36731003fb057f5495b79db367e277cdbe4ab90d924ddee0c0381494112ff8c1238fb0184af35d1731573b01bc4c55ecacd2aafbe2003d36310487d1ecc9ac994f3fada7f9f7f5c3a64248ab7782906c82c6ff1303b69a84d9a9529c31ecafbcdb9ba87e05439897d87e8a2a3dec55e14df19bba7f7bd316291c002ae2efd24f83f9e3441203fc081c0c23dc3092a454ca8a082b27f631abf73aca341686982e8fbda7e0e7d863941d68f3de4a755c2964407f4b5e0477b3196b8c93d551dd23c8beef7d0f03fbb1b6066f78907faf4bf1677d8fcec72651124080e0b7feae6b476e72ab207d38d90b958759fdedfc3c6c35717c9dbfc979b3cfbbff0a76d24a5e57056bb88acbd2a901ef64bc6e4db02adc05b6250ff378de81dca18c1910ab257dff1b9771b85bb9bbe0a69f5989e6d1710a35e6dfcceb7d8fb5ccea8db3932b3d9ff3fe0d327597c68b3622aec8e3716c83a6c93f497543b459b58ba504ed6bcaa747d37d2ca746fe49ae0a6ce4a8b694234e941b5159ff8bd34b9023da2814076163b86f40eed7c9472f81b551452d5ab87004a373c0172ec87ea6ce42ccfa7dbdad66b745496c4873d8019e8c28d6b3"
-
-const signatureEncryptedMessage2Hex = "c24604001102000605024dfd0166000a091033af447ccd759b09bae600a096ec5e63ecf0a403085e10f75cc3bab327663282009f51fad9df457ed8d2b70d8a73c76e0443eac0f377"
-
-const symmetricallyEncryptedCompressedHex = "c32e040903085a357c1a7b5614ed00cc0d1d92f428162058b3f558a0fb0980d221ebac6c97d5eda4e0fe32f6e706e94dd263012d6ca1ef8c4bbd324098225e603a10c85ebf09cbf7b5aeeb5ce46381a52edc51038b76a8454483be74e6dcd1e50d5689a8ae7eceaeefed98a0023d49b22eb1f65c2aa1ef1783bb5e1995713b0457102ec3c3075fe871267ffa4b686ad5d52000d857"
-
-const dsaTestKeyHex = "9901a2044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794"
-
-const dsaTestKeyPrivateHex = "9501bb044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4d00009f592e0619d823953577d4503061706843317e4fee083db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794"
-
-const p256TestKeyHex = "98520456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b7754b8560456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b6030108078861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e"
-
-const p256TestKeyPrivateHex = "94a50456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253fe070302f0c2bfb0b6c30f87ee1599472b8636477eab23ced13b271886a4b50ed34c9d8436af5af5b8f88921f0efba6ef8c37c459bbb88bc1c6a13bbd25c4ce9b1e97679569ee77645d469bf4b43de637f5561b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b77549ca90456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b603010807fe0703027510012471a603cfee2968dce19f732721ddf03e966fd133b4e3c7a685b788705cbc46fb026dc94724b830c9edbaecd2fb2c662f23169516cacd1fe423f0475c364ecc10abcabcfd4bbbda1a36a1bd8861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e"
-
-const armoredPrivateKeyBlock = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-lQHYBE2rFNoBBADFwqWQIW/DSqcB4yCQqnAFTJ27qS5AnB46ccAdw3u4Greeu3Bp
-idpoHdjULy7zSKlwR1EA873dO/k/e11Ml3dlAFUinWeejWaK2ugFP6JjiieSsrKn
-vWNicdCS4HTWn0X4sjl0ZiAygw6GNhqEQ3cpLeL0g8E9hnYzJKQ0LWJa0QARAQAB
-AAP/TB81EIo2VYNmTq0pK1ZXwUpxCrvAAIG3hwKjEzHcbQznsjNvPUihZ+NZQ6+X
-0HCfPAdPkGDCLCb6NavcSW+iNnLTrdDnSI6+3BbIONqWWdRDYJhqZCkqmG6zqSfL
-IdkJgCw94taUg5BWP/AAeQrhzjChvpMQTVKQL5mnuZbUCeMCAN5qrYMP2S9iKdnk
-VANIFj7656ARKt/nf4CBzxcpHTyB8+d2CtPDKCmlJP6vL8t58Jmih+kHJMvC0dzn
-gr5f5+sCAOOe5gt9e0am7AvQWhdbHVfJU0TQJx+m2OiCJAqGTB1nvtBLHdJnfdC9
-TnXXQ6ZXibqLyBies/xeY2sCKL5qtTMCAKnX9+9d/5yQxRyrQUHt1NYhaXZnJbHx
-q4ytu0eWz+5i68IYUSK69jJ1NWPM0T6SkqpB3KCAIv68VFm9PxqG1KmhSrQIVGVz
-dCBLZXmIuAQTAQIAIgUCTasU2gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA
-CgkQO9o98PRieSoLhgQAkLEZex02Q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icKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Charset: UTF-8
-
-xv8AAABSBAAAAAATCCqGSM49AwEHAgME1LRoXSpOxtHXDUdmuvzchyg6005qIBJ4
-sfaSxX7QgH9RV2ONUhC+WiayCNADq+UMzuR/vunSr4aQffXvuGnR383/AAAAFDxk
-Z2lsQHlhaG9vLWluYy5jb20+wv8AAACGBBATCAA4/wAAAAWCVGvAG/8AAAACiwn/
-AAAACZC2VkQCOjdvYf8AAAAFlQgJCgv/AAAAA5YBAv8AAAACngEAAE1BAP0X8veD
-24IjmI5/C6ZAfVNXxgZZFhTAACFX75jUA3oD6AEAzoSwKf1aqH6oq62qhCN/pekX
-+WAsVMBhNwzLpqtCRjLO/wAAAFYEAAAAABIIKoZIzj0DAQcCAwT50ain7vXiIRv8
-B1DO3x3cE/aattZ5sHNixJzRCXi2vQIA5QmOxZ6b5jjUekNbdHG3SZi1a2Ak5mfX
-fRxC/5VGAwEIB8L/AAAAZQQYEwgAGP8AAAAFglRrwBz/AAAACZC2VkQCOjdvYQAA
-FJAA9isX3xtGyMLYwp2F3nXm7QEdY5bq5VUcD/RJlj792VwA/1wH0pCzVLl4Q9F9
-ex7En5r7rHR5xwX82Msc+Rq9dSyO
-=7MrZ
------END PGP PUBLIC KEY BLOCK-----`
-
-const dsaKeyWithSHA512 = `9901a2044f04b07f110400db244efecc7316553ee08d179972aab87bb1214de7692593fcf5b6feb1c80fba268722dd464748539b85b81d574cd2d7ad0ca2444de4d849b8756bad7768c486c83a824f9bba4af773d11742bdfb4ac3b89ef8cc9452d4aad31a37e4b630d33927bff68e879284a1672659b8b298222fc68f370f3e24dccacc4a862442b9438b00a0ea444a24088dc23e26df7daf8f43cba3bffc4fe703fe3d6cd7fdca199d54ed8ae501c30e3ec7871ea9cdd4cf63cfe6fc82281d70a5b8bb493f922cd99fba5f088935596af087c8d818d5ec4d0b9afa7f070b3d7c1dd32a84fca08d8280b4890c8da1dde334de8e3cad8450eed2a4a4fcc2db7b8e5528b869a74a7f0189e11ef097ef1253582348de072bb07a9fa8ab838e993cef0ee203ff49298723e2d1f549b00559f886cd417a41692ce58d0ac1307dc71d85a8af21b0cf6eaa14baf2922d3a70389bedf17cc514ba0febbd107675a372fe84b90162a9e88b14d4b1c6be855b96b33fb198c46f058568817780435b6936167ebb3724b680f32bf27382ada2e37a879b3d9de2abe0c3f399350afd1ad438883f4791e2e3b4184453412068617368207472756e636174696f6e207465737488620413110a002205024f04b07f021b03060b090807030206150802090a0b0416020301021e01021780000a0910ef20e0cefca131581318009e2bf3bf047a44d75a9bacd00161ee04d435522397009a03a60d51bd8a568c6c021c8d7cf1be8d990d6417b0020003`
-
-const unknownHashFunctionHex = `8a00000040040001990006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
-
-const rsaSignatureBadMPIlength = `8a00000040040001030006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
-
-const missingHashFunctionHex = `8a00000040040001030006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
-
-const campbellQuine = `a0b001000300fcffa0b001000d00f2ff000300fcffa0b001000d00f2ff8270a01c00000500faff8270a01c00000500faff000500faff001400ebff8270a01c00000500faff000500faff001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400000000ffff000000ffff000b00f4ff428821c400000000ffff000000ffff000b00f4ff0233214c40000100feff000233214c40000100feff0000`
-
-const keyV4forVerifyingSignedMessageV3 = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-Comment: GPGTools - https://gpgtools.org
-
-mI0EVfxoFQEEAMBIqmbDfYygcvP6Phr1wr1XI41IF7Qixqybs/foBF8qqblD9gIY
-BKpXjnBOtbkcVOJ0nljd3/sQIfH4E0vQwK5/4YRQSI59eKOqd6Fx+fWQOLG+uu6z
-tewpeCj9LLHvibx/Sc7VWRnrznia6ftrXxJ/wHMezSab3tnGC0YPVdGNABEBAAG0
-JEdvY3J5cHRvIFRlc3QgS2V5IDx0aGVtYXhAZ21haWwuY29tPoi5BBMBCgAjBQJV
-/GgVAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQeXnQmhdGW9PFVAP+
-K7TU0qX5ArvIONIxh/WAweyOk884c5cE8f+3NOPOOCRGyVy0FId5A7MmD5GOQh4H
-JseOZVEVCqlmngEvtHZb3U1VYtVGE5WZ+6rQhGsMcWP5qaT4soYwMBlSYxgYwQcx
-YhN9qOr292f9j2Y//TTIJmZT4Oa+lMxhWdqTfX+qMgG4jQRV/GgVAQQArhFSiij1
-b+hT3dnapbEU+23Z1yTu1DfF6zsxQ4XQWEV3eR8v+8mEDDNcz8oyyF56k6UQ3rXi
-UMTIwRDg4V6SbZmaFbZYCOwp/EmXJ3rfhm7z7yzXj2OFN22luuqbyVhuL7LRdB0M
-pxgmjXb4tTvfgKd26x34S+QqUJ7W6uprY4sAEQEAAYifBBgBCgAJBQJV/GgVAhsM
-AAoJEHl50JoXRlvT7y8D/02ckx4OMkKBZo7viyrBw0MLG92i+DC2bs35PooHR6zz
-786mitjOp5z2QWNLBvxC70S0qVfCIz8jKupO1J6rq6Z8CcbLF3qjm6h1omUBf8Nd
-EfXKD2/2HV6zMKVknnKzIEzauh+eCKS2CeJUSSSryap/QLVAjRnckaES/OsEWhNB
-=RZia
------END PGP PUBLIC KEY BLOCK-----
-`
-
-const signedMessageV3 = `-----BEGIN PGP MESSAGE-----
-Comment: GPGTools - https://gpgtools.org
-
-owGbwMvMwMVYWXlhlrhb9GXG03JJDKF/MtxDMjKLFYAoUaEktbhEITe1uDgxPVWP
-q5NhKjMrWAVcC9evD8z/bF/uWNjqtk/X3y5/38XGRQHm/57rrDRYuGnTw597Xqka
-uM3137/hH3Os+Jf2dc0fXOITKwJvXJvecPVs0ta+Vg7ZO1MLn8w58Xx+6L58mbka
-DGHyU9yTueZE8D+QF/Tz28Y78dqtF56R1VPn9Xw4uJqrWYdd7b3vIZ1V6R4Nh05d
-iT57d/OhWwA=
-=hG7R
------END PGP MESSAGE-----
-`
-
-// https://mailarchive.ietf.org/arch/msg/openpgp/9SheW_LENE0Kxf7haNllovPyAdY/
-const v5PrivKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-
-lGEFXJH05BYAAAAtCSsGAQQB2kcPAQEHQFhZlVcVVtwf+21xNQPX+ecMJJBL0MPd
-fj75iux+my8QAAAAAAAiAQCHZ1SnSUmWqxEsoI6facIVZQu6mph3cBFzzTvcm5lA
-Ng5ctBhlbW1hLmdvbGRtYW5AZXhhbXBsZS5uZXSIlgUTFggASCIhBRk0e8mHJGQC
-X5nfPsLgAA7ZiEiS4fez6kyUAJFZVptUBQJckfTkAhsDBQsJCAcCAyICAQYVCgkI
-CwIEFgIDAQIeBwIXgAAA9cAA/jiR3yMsZMeEQ40u6uzEoXa6UXeV/S3wwJAXRJy9
-M8s0AP9vuL/7AyTfFXwwzSjDnYmzS0qAhbLDQ643N+MXGBJ2BZxmBVyR9OQSAAAA
-MgorBgEEAZdVAQUBAQdA+nysrzml2UCweAqtpDuncSPlvrcBWKU0yfU0YvYWWAoD
-AQgHAAAAAAAiAP9OdAPppjU1WwpqjIItkxr+VPQRT8Zm/Riw7U3F6v3OiBFHiHoF
-GBYIACwiIQUZNHvJhyRkAl+Z3z7C4AAO2YhIkuH3s+pMlACRWVabVAUCXJH05AIb
-DAAAOSQBAP4BOOIR/sGLNMOfeb5fPs/02QMieoiSjIBnijhob2U5AQC+RtOHCHx7
-TcIYl5/Uyoi+FOvPLcNw4hOv2nwUzSSVAw==
-=IiS2
------END PGP PRIVATE KEY BLOCK-----`
-
-// See OpenPGP crypto refresh Section A.3.
-const v6PrivKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-
-xUsGY4d/4xsAAAAg+U2nu0jWCmHlZ3BqZYfQMxmZu52JGggkLq2EVD34laMAGXKB
-exK+cH6NX1hs5hNhIB00TrJmosgv3mg1ditlsLfCsQYfGwoAAABCBYJjh3/jAwsJ
-BwUVCg4IDAIWAAKbAwIeCSIhBssYbE8GCaaX5NUt+mxyKwwfHifBilZwj2Ul7Ce6
-2azJBScJAgcCAAAAAK0oIBA+LX0ifsDm185Ecds2v8lwgyU2kCcUmKfvBXbAf6rh
-RYWzuQOwEn7E/aLwIwRaLsdry0+VcallHhSu4RN6HWaEQsiPlR4zxP/TP7mhfVEe
-7XWPxtnMUMtf15OyA51YBMdLBmOHf+MZAAAAIIaTJINn+eUBXbki+PSAld2nhJh/
-LVmFsS+60WyvXkQ1AE1gCk95TUR3XFeibg/u/tVY6a//1q0NWC1X+yui3O24wpsG
-GBsKAAAALAWCY4d/4wKbDCIhBssYbE8GCaaX5NUt+mxyKwwfHifBilZwj2Ul7Ce6
-2azJAAAAAAQBIKbpGG2dWTX8j+VjFM21J0hqWlEg+bdiojWnKfA5AQpWUWtnNwDE
-M0g12vYxoWM8Y81W+bHBw805I8kWVkXU6vFOi+HWvv/ira7ofJu16NnoUkhclkUr
-k0mXubZvyl4GBg==
------END PGP PRIVATE KEY BLOCK-----`
-
-// See OpenPGP crypto refresh merge request:
-// https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/304
-const v6PrivKeyMsg = `-----BEGIN PGP MESSAGE-----
-
-wV0GIQYSyD8ecG9jCP4VGkF3Q6HwM3kOk+mXhIjR2zeNqZMIhRmHzxjV8bU/gXzO
-WgBM85PMiVi93AZfJfhK9QmxfdNnZBjeo1VDeVZheQHgaVf7yopqR6W1FT6NOrfS
-aQIHAgZhZBZTW+CwcW1g4FKlbExAf56zaw76/prQoN+bAzxpohup69LA7JW/Vp0l
-yZnuSj3hcFj0DfqLTGgr4/u717J+sPWbtQBfgMfG9AOIwwrUBqsFE9zW+f1zdlYo
-bhF30A+IitsxxA==
------END PGP MESSAGE-----`
-
-// See OpenPGP crypto refresh merge request:
-// https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/305
-const v6PrivKeyInlineSignMsg = `-----BEGIN PGP MESSAGE-----
-
-wV0GIQYSyD8ecG9jCP4VGkF3Q6HwM3kOk+mXhIjR2zeNqZMIhRmHzxjV8bU/gXzO
-WgBM85PMiVi93AZfJfhK9QmxfdNnZBjeo1VDeVZheQHgaVf7yopqR6W1FT6NOrfS
-aQIHAgZhZBZTW+CwcW1g4FKlbExAf56zaw76/prQoN+bAzxpohup69LA7JW/Vp0l
-yZnuSj3hcFj0DfqLTGgr4/u717J+sPWbtQBfgMfG9AOIwwrUBqsFE9zW+f1zdlYo
-bhF30A+IitsxxA==
------END PGP MESSAGE-----`
-
-// See https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/274
-// decryption password: "correct horse battery staple"
-const v6ArgonSealedPrivKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-
-xYIGY4d/4xsAAAAg+U2nu0jWCmHlZ3BqZYfQMxmZu52JGggkLq2EVD34laP9JgkC
-FARdb9ccngltHraRe25uHuyuAQQVtKipJ0+r5jL4dacGWSAheCWPpITYiyfyIOPS
-3gIDyg8f7strd1OB4+LZsUhcIjOMpVHgmiY/IutJkulneoBYwrEGHxsKAAAAQgWC
-Y4d/4wMLCQcFFQoOCAwCFgACmwMCHgkiIQbLGGxPBgmml+TVLfpscisMHx4nwYpW
-cI9lJewnutmsyQUnCQIHAgAAAACtKCAQPi19In7A5tfORHHbNr/JcIMlNpAnFJin
-7wV2wH+q4UWFs7kDsBJ+xP2i8CMEWi7Ha8tPlXGpZR4UruETeh1mhELIj5UeM8T/
-0z+5oX1RHu11j8bZzFDLX9eTsgOdWATHggZjh3/jGQAAACCGkySDZ/nlAV25Ivj0
-gJXdp4SYfy1ZhbEvutFsr15ENf0mCQIUBA5hhGgp2oaavg6mFUXcFMwBBBUuE8qf
-9Ock+xwusd+GAglBr5LVyr/lup3xxQvHXFSjjA2haXfoN6xUGRdDEHI6+uevKjVR
-v5oAxgu7eJpaXNjCmwYYGwoAAAAsBYJjh3/jApsMIiEGyxhsTwYJppfk1S36bHIr
-DB8eJ8GKVnCPZSXsJ7rZrMkAAAAABAEgpukYbZ1ZNfyP5WMUzbUnSGpaUSD5t2Ki
-Nacp8DkBClZRa2c3AMQzSDXa9jGhYzxjzVb5scHDzTkjyRZWRdTq8U6L4da+/+Kt
-ruh8m7Xo2ehSSFyWRSuTSZe5tm/KXgYG
------END PGP PRIVATE KEY BLOCK-----`
-
-const v4Key25519 = `-----BEGIN PGP PRIVATE KEY BLOCK-----
-
-xUkEZB3qzRto01j2k2pwN5ux9w70stPinAdXULLr20CRW7U7h2GSeACch0M+
-qzQg8yjFQ8VBvu3uwgKH9senoHmj72lLSCLTmhFKzQR0ZXN0wogEEBsIAD4F
-gmQd6s0ECwkHCAmQIf45+TuC+xMDFQgKBBYAAgECGQECmwMCHgEWIQSWEzMi
-jJUHvyIbVKIh/jn5O4L7EwAAUhaHNlgudvxARdPPETUzVgjuWi+YIz8w1xIb
-lHQMvIrbe2sGCQIethpWofd0x7DHuv/ciHg+EoxJ/Td6h4pWtIoKx0kEZB3q
-zRm4CyA7quliq7yx08AoOqHTuuCgvpkSdEhpp3pEyejQOgBo0p6ywIiLPllY
-0t+jpNspHpAGfXID6oqjpYuJw3AfVRBlwnQEGBsIACoFgmQd6s0JkCH+Ofk7
-gvsTApsMFiEElhMzIoyVB78iG1SiIf45+TuC+xMAAGgQuN9G73446ykvJ/mL
-sCZ7zGFId2gBd1EnG0FTC4npfOKpck0X8dngByrCxU8LDSfvjsEp/xDAiKsQ
-aU71tdtNBQ==
-=e7jT
------END PGP PRIVATE KEY BLOCK-----`
-
-const keyWithExpiredCrossSig = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-
-xsDNBF2lnPIBDAC5cL9PQoQLTMuhjbYvb4Ncuuo0bfmgPRFywX53jPhoFf4Zg6mv
-/seOXpgecTdOcVttfzC8ycIKrt3aQTiwOG/ctaR4Bk/t6ayNFfdUNxHWk4WCKzdz
-/56fW2O0F23qIRd8UUJp5IIlN4RDdRCtdhVQIAuzvp2oVy/LaS2kxQo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APbqmLhDmWRQwGzkWHKceKS7nZ/ox2WK6OS7Ob8ZGZkM64iPo6/EGj5Yc19vQN
-AGiIaPEGszBBWlOpHTPhNm0LB0nMWqqaT87oNYwP8CQuuxDb6rKJ2lffCmZH27Lb
-UbQZcH8J+0UhpeaiadPZxH5ATJAcenmVtVVMLVOFnm+eIlxzov9ntpgGYt8hLdXB
-ITEG9mMgp3TGS9ZzSifMZ8UGtHdp9QdBg8NEVPFzDOMGxpc/Bftav7RRRuPiAER+
-7A5CBid5
-=aQkm
------END PGP SIGNATURE-----
-`
-
-const signedMessageWithCriticalNotation = `-----BEGIN PGP MESSAGE-----
-
-owGbwMvMwMH4oOW7S46CznTG09xJDDE3Wl1KUotLuDousDAwcjBYiSmyXL+48d6x
-U1PSGUxcj8IUszKBVMpMaWAAAgEGZpAeh9SKxNyCnFS95PzcytRiBi5OAZjyXXzM
-f8WYLqv7TXP61Sa4rqT12CI3xaN73YS2pt089f96odCKaEPnWJ3iSGmzJaW/ug10
-2Zo8Wj2k4s7t8wt4H3HtTu+y5UZfV3VOO+l//sdE/o+Lsub8FZH7/eOq7OnbNp4n
-vwjE8mqJXetNMfj8r2SCyvkEnlVRYR+/mnge+ib56FdJ8uKtqSxyvgA=
-=fRXs
------END PGP MESSAGE-----`
-
-const criticalNotationSigner = `-----BEGIN PGP PUBLIC KEY BLOCK-----
-
-mI0EUmEvTgEEANyWtQQMOybQ9JltDqmaX0WnNPJeLILIM36sw6zL0nfTQ5zXSS3+
-fIF6P29lJFxpblWk02PSID5zX/DYU9/zjM2xPO8Oa4xo0cVTOTLj++Ri5mtr//f5
-GLsIXxFrBJhD/ghFsL3Op0GXOeLJ9A5bsOn8th7x6JucNKuaRB6bQbSPABEBAAG0
-JFRlc3QgTWNUZXN0aW5ndG9uIDx0ZXN0QGV4YW1wbGUuY29tPoi5BBMBAgAjBQJS
-YS9OAhsvBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQSmNhOk1uQJQwDAP6
-Agr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-EVEYf+De4qT/dQTsdww78Chtcv9JY9r2kDm77dk2MUGHL2j7n8jasbLtgA7h
-pn2DMIWLrGamMLWRmlwslolKr1sMV5x8w+5Ias6C33iBMl9phkg42an0gYmc
-byVJHvLO/XErtC+GNIJeMg==
-=liRq
------END PGP MESSAGE-----
-`
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
deleted file mode 100644
index 6871b84fc9..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
+++ /dev/null
@@ -1,436 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package s2k implements the various OpenPGP string-to-key transforms as
-// specified in RFC 4800 section 3.7.1, and Argon2 specified in
-// draft-ietf-openpgp-crypto-refresh-08 section 3.7.1.4.
-package s2k // import "github.com/ProtonMail/go-crypto/openpgp/s2k"
-
-import (
- "crypto"
- "hash"
- "io"
- "strconv"
-
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "golang.org/x/crypto/argon2"
-)
-
-type Mode uint8
-
-// Defines the default S2KMode constants
-//
-// 0 (simple), 1(salted), 3(iterated), 4(argon2)
-const (
- SimpleS2K Mode = 0
- SaltedS2K Mode = 1
- IteratedSaltedS2K Mode = 3
- Argon2S2K Mode = 4
- GnuS2K Mode = 101
-)
-
-const Argon2SaltSize int = 16
-
-// Params contains all the parameters of the s2k packet
-type Params struct {
- // mode is the mode of s2k function.
- // It can be 0 (simple), 1(salted), 3(iterated)
- // 2(reserved) 100-110(private/experimental).
- mode Mode
- // hashId is the ID of the hash function used in any of the modes
- hashId byte
- // salt is a byte array to use as a salt in hashing process or argon2
- saltBytes [Argon2SaltSize]byte
- // countByte is used to determine how many rounds of hashing are to
- // be performed in s2k mode 3. See RFC 4880 Section 3.7.1.3.
- countByte byte
- // passes is a parameter in Argon2 to determine the number of iterations
- // See RFC the crypto refresh Section 3.7.1.4.
- passes byte
- // parallelism is a parameter in Argon2 to determine the degree of paralellism
- // See RFC the crypto refresh Section 3.7.1.4.
- parallelism byte
- // memoryExp is a parameter in Argon2 to determine the memory usage
- // i.e., 2 ** memoryExp kibibytes
- // See RFC the crypto refresh Section 3.7.1.4.
- memoryExp byte
-}
-
-// encodeCount converts an iterative "count" in the range 1024 to
-// 65011712, inclusive, to an encoded count. The return value is the
-// octet that is actually stored in the GPG file. encodeCount panics
-// if i is not in the above range (encodedCount above takes care to
-// pass i in the correct range). See RFC 4880 Section 3.7.7.1.
-func encodeCount(i int) uint8 {
- if i < 65536 || i > 65011712 {
- panic("count arg i outside the required range")
- }
-
- for encoded := 96; encoded < 256; encoded++ {
- count := decodeCount(uint8(encoded))
- if count >= i {
- return uint8(encoded)
- }
- }
-
- return 255
-}
-
-// decodeCount returns the s2k mode 3 iterative "count" corresponding to
-// the encoded octet c.
-func decodeCount(c uint8) int {
- return (16 + int(c&15)) << (uint32(c>>4) + 6)
-}
-
-// encodeMemory converts the Argon2 "memory" in the range parallelism*8 to
-// 2**31, inclusive, to an encoded memory. The return value is the
-// octet that is actually stored in the GPG file. encodeMemory panics
-// if is not in the above range
-// See OpenPGP crypto refresh Section 3.7.1.4.
-func encodeMemory(memory uint32, parallelism uint8) uint8 {
- if memory < (8*uint32(parallelism)) || memory > uint32(2147483648) {
- panic("Memory argument memory is outside the required range")
- }
-
- for exp := 3; exp < 31; exp++ {
- compare := decodeMemory(uint8(exp))
- if compare >= memory {
- return uint8(exp)
- }
- }
-
- return 31
-}
-
-// decodeMemory computes the decoded memory in kibibytes as 2**memoryExponent
-func decodeMemory(memoryExponent uint8) uint32 {
- return uint32(1) << memoryExponent
-}
-
-// Simple writes to out the result of computing the Simple S2K function (RFC
-// 4880, section 3.7.1.1) using the given hash and input passphrase.
-func Simple(out []byte, h hash.Hash, in []byte) {
- Salted(out, h, in, nil)
-}
-
-var zero [1]byte
-
-// Salted writes to out the result of computing the Salted S2K function (RFC
-// 4880, section 3.7.1.2) using the given hash, input passphrase and salt.
-func Salted(out []byte, h hash.Hash, in []byte, salt []byte) {
- done := 0
- var digest []byte
-
- for i := 0; done < len(out); i++ {
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(zero[:])
- }
- h.Write(salt)
- h.Write(in)
- digest = h.Sum(digest[:0])
- n := copy(out[done:], digest)
- done += n
- }
-}
-
-// Iterated writes to out the result of computing the Iterated and Salted S2K
-// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase,
-// salt and iteration count.
-func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) {
- combined := make([]byte, len(in)+len(salt))
- copy(combined, salt)
- copy(combined[len(salt):], in)
-
- if count < len(combined) {
- count = len(combined)
- }
-
- done := 0
- var digest []byte
- for i := 0; done < len(out); i++ {
- h.Reset()
- for j := 0; j < i; j++ {
- h.Write(zero[:])
- }
- written := 0
- for written < count {
- if written+len(combined) > count {
- todo := count - written
- h.Write(combined[:todo])
- written = count
- } else {
- h.Write(combined)
- written += len(combined)
- }
- }
- digest = h.Sum(digest[:0])
- n := copy(out[done:], digest)
- done += n
- }
-}
-
-// Argon2 writes to out the key derived from the password (in) with the Argon2
-// function (the crypto refresh, section 3.7.1.4)
-func Argon2(out []byte, in []byte, salt []byte, passes uint8, paralellism uint8, memoryExp uint8) {
- key := argon2.IDKey(in, salt, uint32(passes), decodeMemory(memoryExp), paralellism, uint32(len(out)))
- copy(out[:], key)
-}
-
-// Generate generates valid parameters from given configuration.
-// It will enforce the Iterated and Salted or Argon2 S2K method.
-func Generate(rand io.Reader, c *Config) (*Params, error) {
- var params *Params
- if c != nil && c.Mode() == Argon2S2K {
- // handle Argon2 case
- argonConfig := c.Argon2()
- params = &Params{
- mode: Argon2S2K,
- passes: argonConfig.Passes(),
- parallelism: argonConfig.Parallelism(),
- memoryExp: argonConfig.EncodedMemory(),
- }
- } else if c != nil && c.PassphraseIsHighEntropy && c.Mode() == SaltedS2K { // Allow SaltedS2K if PassphraseIsHighEntropy
- hashId, ok := algorithm.HashToHashId(c.hash())
- if !ok {
- return nil, errors.UnsupportedError("no such hash")
- }
-
- params = &Params{
- mode: SaltedS2K,
- hashId: hashId,
- }
- } else { // Enforce IteratedSaltedS2K method otherwise
- hashId, ok := algorithm.HashToHashId(c.hash())
- if !ok {
- return nil, errors.UnsupportedError("no such hash")
- }
- if c != nil {
- c.S2KMode = IteratedSaltedS2K
- }
- params = &Params{
- mode: IteratedSaltedS2K,
- hashId: hashId,
- countByte: c.EncodedCount(),
- }
- }
- if _, err := io.ReadFull(rand, params.salt()); err != nil {
- return nil, err
- }
- return params, nil
-}
-
-// Parse reads a binary specification for a string-to-key transformation from r
-// and returns a function which performs that transform. If the S2K is a special
-// GNU extension that indicates that the private key is missing, then the error
-// returned is errors.ErrDummyPrivateKey.
-func Parse(r io.Reader) (f func(out, in []byte), err error) {
- params, err := ParseIntoParams(r)
- if err != nil {
- return nil, err
- }
-
- return params.Function()
-}
-
-// ParseIntoParams reads a binary specification for a string-to-key
-// transformation from r and returns a struct describing the s2k parameters.
-func ParseIntoParams(r io.Reader) (params *Params, err error) {
- var buf [Argon2SaltSize + 3]byte
-
- _, err = io.ReadFull(r, buf[:1])
- if err != nil {
- return
- }
-
- params = &Params{
- mode: Mode(buf[0]),
- }
-
- switch params.mode {
- case SimpleS2K:
- _, err = io.ReadFull(r, buf[:1])
- if err != nil {
- return nil, err
- }
- params.hashId = buf[0]
- return params, nil
- case SaltedS2K:
- _, err = io.ReadFull(r, buf[:9])
- if err != nil {
- return nil, err
- }
- params.hashId = buf[0]
- copy(params.salt(), buf[1:9])
- return params, nil
- case IteratedSaltedS2K:
- _, err = io.ReadFull(r, buf[:10])
- if err != nil {
- return nil, err
- }
- params.hashId = buf[0]
- copy(params.salt(), buf[1:9])
- params.countByte = buf[9]
- return params, nil
- case Argon2S2K:
- _, err = io.ReadFull(r, buf[:Argon2SaltSize+3])
- if err != nil {
- return nil, err
- }
- copy(params.salt(), buf[:Argon2SaltSize])
- params.passes = buf[Argon2SaltSize]
- params.parallelism = buf[Argon2SaltSize+1]
- params.memoryExp = buf[Argon2SaltSize+2]
- if err := validateArgon2Params(params); err != nil {
- return nil, err
- }
- return params, nil
- case GnuS2K:
- // This is a GNU extension. See
- // https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=fe55ae16ab4e26d8356dc574c9e8bc935e71aef1;hb=23191d7851eae2217ecdac6484349849a24fd94a#l1109
- if _, err = io.ReadFull(r, buf[:5]); err != nil {
- return nil, err
- }
- params.hashId = buf[0]
- if buf[1] == 'G' && buf[2] == 'N' && buf[3] == 'U' && buf[4] == 1 {
- return params, nil
- }
- return nil, errors.UnsupportedError("GNU S2K extension")
- }
-
- return nil, errors.UnsupportedError("S2K function")
-}
-
-func (params *Params) Mode() Mode {
- return params.mode
-}
-
-func (params *Params) Dummy() bool {
- return params != nil && params.mode == GnuS2K
-}
-
-func (params *Params) salt() []byte {
- switch params.mode {
- case SaltedS2K, IteratedSaltedS2K:
- return params.saltBytes[:8]
- case Argon2S2K:
- return params.saltBytes[:Argon2SaltSize]
- default:
- return nil
- }
-}
-
-func (params *Params) Function() (f func(out, in []byte), err error) {
- if params.Dummy() {
- return nil, errors.ErrDummyPrivateKey("dummy key found")
- }
- var hashObj crypto.Hash
- if params.mode != Argon2S2K {
- var ok bool
- hashObj, ok = algorithm.HashIdToHashWithSha1(params.hashId)
- if !ok {
- return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(params.hashId)))
- }
- if !hashObj.Available() {
- return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashObj)))
- }
- }
-
- switch params.mode {
- case SimpleS2K:
- f := func(out, in []byte) {
- Simple(out, hashObj.New(), in)
- }
-
- return f, nil
- case SaltedS2K:
- f := func(out, in []byte) {
- Salted(out, hashObj.New(), in, params.salt())
- }
-
- return f, nil
- case IteratedSaltedS2K:
- f := func(out, in []byte) {
- Iterated(out, hashObj.New(), in, params.salt(), decodeCount(params.countByte))
- }
-
- return f, nil
- case Argon2S2K:
- f := func(out, in []byte) {
- Argon2(out, in, params.salt(), params.passes, params.parallelism, params.memoryExp)
- }
- return f, nil
- }
-
- return nil, errors.UnsupportedError("S2K function")
-}
-
-func (params *Params) Serialize(w io.Writer) (err error) {
- if _, err = w.Write([]byte{uint8(params.mode)}); err != nil {
- return
- }
- if params.mode != Argon2S2K {
- if _, err = w.Write([]byte{params.hashId}); err != nil {
- return
- }
- }
- if params.Dummy() {
- _, err = w.Write(append([]byte("GNU"), 1))
- return
- }
- if params.mode > 0 {
- if _, err = w.Write(params.salt()); err != nil {
- return
- }
- if params.mode == IteratedSaltedS2K {
- _, err = w.Write([]byte{params.countByte})
- }
- if params.mode == Argon2S2K {
- _, err = w.Write([]byte{params.passes, params.parallelism, params.memoryExp})
- }
- }
- return
-}
-
-// Serialize salts and stretches the given passphrase and writes the
-// resulting key into key. It also serializes an S2K descriptor to
-// w. The key stretching can be configured with c, which may be
-// nil. In that case, sensible defaults will be used.
-func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error {
- params, err := Generate(rand, c)
- if err != nil {
- return err
- }
- err = params.Serialize(w)
- if err != nil {
- return err
- }
-
- f, err := params.Function()
- if err != nil {
- return err
- }
- f(key, passphrase)
- return nil
-}
-
-// validateArgon2Params checks that the argon2 parameters are valid according to RFC9580.
-func validateArgon2Params(params *Params) error {
- // The number of passes t and the degree of parallelism p MUST be non-zero.
- if params.parallelism == 0 {
- return errors.StructuralError("invalid argon2 params: parallelism is 0")
- }
- if params.passes == 0 {
- return errors.StructuralError("invalid argon2 params: iterations is 0")
- }
-
- // The encoded memory size MUST be a value from 3+ceil(log2(p)) to 31,
- // such that the decoded memory size m is a value from 8*p to 2^31.
- if params.memoryExp > 31 || decodeMemory(params.memoryExp) < 8*uint32(params.parallelism) {
- return errors.StructuralError("invalid argon2 params: memory is out of bounds")
- }
-
- return nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_cache.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_cache.go
deleted file mode 100644
index 616e0d12c6..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_cache.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package s2k
-
-// Cache stores keys derived with s2k functions from one passphrase
-// to avoid recomputation if multiple items are encrypted with
-// the same parameters.
-type Cache map[Params][]byte
-
-// GetOrComputeDerivedKey tries to retrieve the key
-// for the given s2k parameters from the cache.
-// If there is no hit, it derives the key with the s2k function from the passphrase,
-// updates the cache, and returns the key.
-func (c *Cache) GetOrComputeDerivedKey(passphrase []byte, params *Params, expectedKeySize int) ([]byte, error) {
- key, found := (*c)[*params]
- if !found || len(key) != expectedKeySize {
- var err error
- derivedKey := make([]byte, expectedKeySize)
- s2k, err := params.Function()
- if err != nil {
- return nil, err
- }
- s2k(derivedKey, passphrase)
- (*c)[*params] = key
- return derivedKey, nil
- }
- return key, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_config.go
deleted file mode 100644
index b93db1ab85..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_config.go
+++ /dev/null
@@ -1,129 +0,0 @@
-package s2k
-
-import "crypto"
-
-// Config collects configuration parameters for s2k key-stretching
-// transformations. A nil *Config is valid and results in all default
-// values.
-type Config struct {
- // S2K (String to Key) mode, used for key derivation in the context of secret key encryption
- // and passphrase-encrypted data. Either s2k.Argon2S2K or s2k.IteratedSaltedS2K may be used.
- // If the passphrase is a high-entropy key, indicated by setting PassphraseIsHighEntropy to true,
- // s2k.SaltedS2K can also be used.
- // Note: Argon2 is the strongest option but not all OpenPGP implementations are compatible with it
- //(pending standardisation).
- // 0 (simple), 1(salted), 3(iterated), 4(argon2)
- // 2(reserved) 100-110(private/experimental).
- S2KMode Mode
- // Only relevant if S2KMode is not set to s2k.Argon2S2K.
- // Hash is the default hash function to be used. If
- // nil, SHA256 is used.
- Hash crypto.Hash
- // Argon2 parameters for S2K (String to Key).
- // Only relevant if S2KMode is set to s2k.Argon2S2K.
- // If nil, default parameters are used.
- // For more details on the choice of parameters, see https://tools.ietf.org/html/rfc9106#section-4.
- Argon2Config *Argon2Config
- // Only relevant if S2KMode is set to s2k.IteratedSaltedS2K.
- // Iteration count for Iterated S2K (String to Key). It
- // determines the strength of the passphrase stretching when
- // the said passphrase is hashed to produce a key. S2KCount
- // should be between 65536 and 65011712, inclusive. If Config
- // is nil or S2KCount is 0, the value 16777216 used. Not all
- // values in the above range can be represented. S2KCount will
- // be rounded up to the next representable value if it cannot
- // be encoded exactly. When set, it is strongly encrouraged to
- // use a value that is at least 65536. See RFC 4880 Section
- // 3.7.1.3.
- S2KCount int
- // Indicates whether the passphrase passed by the application is a
- // high-entropy key (e.g. it's randomly generated or derived from
- // another passphrase using a strong key derivation function).
- // When true, allows the S2KMode to be s2k.SaltedS2K.
- // When the passphrase is not a high-entropy key, using SaltedS2K is
- // insecure, and not allowed by draft-ietf-openpgp-crypto-refresh-08.
- PassphraseIsHighEntropy bool
-}
-
-// Argon2Config stores the Argon2 parameters
-// A nil *Argon2Config is valid and results in all default
-type Argon2Config struct {
- NumberOfPasses uint8
- DegreeOfParallelism uint8
- // Memory specifies the desired Argon2 memory usage in kibibytes.
- // For example memory=64*1024 sets the memory cost to ~64 MB.
- Memory uint32
-}
-
-func (c *Config) Mode() Mode {
- if c == nil {
- return IteratedSaltedS2K
- }
- return c.S2KMode
-}
-
-func (c *Config) hash() crypto.Hash {
- if c == nil || uint(c.Hash) == 0 {
- return crypto.SHA256
- }
-
- return c.Hash
-}
-
-func (c *Config) Argon2() *Argon2Config {
- if c == nil || c.Argon2Config == nil {
- return nil
- }
- return c.Argon2Config
-}
-
-// EncodedCount get encoded count
-func (c *Config) EncodedCount() uint8 {
- if c == nil || c.S2KCount == 0 {
- return 224 // The common case. Corresponding to 16777216
- }
-
- i := c.S2KCount
-
- switch {
- case i < 65536:
- i = 65536
- case i > 65011712:
- i = 65011712
- }
-
- return encodeCount(i)
-}
-
-func (c *Argon2Config) Passes() uint8 {
- if c == nil || c.NumberOfPasses == 0 {
- return 3
- }
- return c.NumberOfPasses
-}
-
-func (c *Argon2Config) Parallelism() uint8 {
- if c == nil || c.DegreeOfParallelism == 0 {
- return 4
- }
- return c.DegreeOfParallelism
-}
-
-func (c *Argon2Config) EncodedMemory() uint8 {
- if c == nil || c.Memory == 0 {
- return 16 // 64 MiB of RAM
- }
-
- memory := c.Memory
- lowerBound := uint32(c.Parallelism()) * 8
- upperBound := uint32(2147483648)
-
- switch {
- case memory < lowerBound:
- memory = lowerBound
- case memory > upperBound:
- memory = upperBound
- }
-
- return encodeMemory(memory, c.Parallelism())
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
deleted file mode 100644
index b0f6ef7b09..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
+++ /dev/null
@@ -1,620 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package openpgp
-
-import (
- "crypto"
- "hash"
- "io"
- "strconv"
- "time"
-
- "github.com/ProtonMail/go-crypto/openpgp/armor"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
- "github.com/ProtonMail/go-crypto/openpgp/packet"
-)
-
-// DetachSign signs message with the private key from signer (which must
-// already have been decrypted) and writes the signature to w.
-// If config is nil, sensible defaults will be used.
-func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
- return detachSign(w, signer, message, packet.SigTypeBinary, config)
-}
-
-// ArmoredDetachSign signs message with the private key from signer (which
-// must already have been decrypted) and writes an armored signature to w.
-// If config is nil, sensible defaults will be used.
-func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) {
- return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config)
-}
-
-// DetachSignText signs message (after canonicalising the line endings) with
-// the private key from signer (which must already have been decrypted) and
-// writes the signature to w.
-// If config is nil, sensible defaults will be used.
-func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
- return detachSign(w, signer, message, packet.SigTypeText, config)
-}
-
-// ArmoredDetachSignText signs message (after canonicalising the line endings)
-// with the private key from signer (which must already have been decrypted)
-// and writes an armored signature to w.
-// If config is nil, sensible defaults will be used.
-func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
- return armoredDetachSign(w, signer, message, packet.SigTypeText, config)
-}
-
-func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {
- out, err := armor.Encode(w, SignatureType, nil)
- if err != nil {
- return
- }
- err = detachSign(out, signer, message, sigType, config)
- if err != nil {
- return
- }
- return out.Close()
-}
-
-func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {
- signingKey, ok := signer.SigningKeyById(config.Now(), config.SigningKey())
- if !ok {
- return errors.InvalidArgumentError("no valid signing keys")
- }
- if signingKey.PrivateKey == nil {
- return errors.InvalidArgumentError("signing key doesn't have a private key")
- }
- if signingKey.PrivateKey.Encrypted {
- return errors.InvalidArgumentError("signing key is encrypted")
- }
- if _, ok := algorithm.HashToHashId(config.Hash()); !ok {
- return errors.InvalidArgumentError("invalid hash function")
- }
-
- sig := createSignaturePacket(signingKey.PublicKey, sigType, config)
-
- h, err := sig.PrepareSign(config)
- if err != nil {
- return
- }
- wrappedHash, err := wrapHashForSignature(h, sig.SigType)
- if err != nil {
- return
- }
- if _, err = io.Copy(wrappedHash, message); err != nil {
- return err
- }
-
- err = sig.Sign(h, signingKey.PrivateKey, config)
- if err != nil {
- return
- }
-
- return sig.Serialize(w)
-}
-
-// FileHints contains metadata about encrypted files. This metadata is, itself,
-// encrypted.
-type FileHints struct {
- // IsBinary can be set to hint that the contents are binary data.
- IsBinary bool
- // FileName hints at the name of the file that should be written. It's
- // truncated to 255 bytes if longer. It may be empty to suggest that the
- // file should not be written to disk. It may be equal to "_CONSOLE" to
- // suggest the data should not be written to disk.
- FileName string
- // ModTime contains the modification time of the file, or the zero time if not applicable.
- ModTime time.Time
-}
-
-// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase.
-// The resulting WriteCloser must be closed after the contents of the file have
-// been written.
-// If config is nil, sensible defaults will be used.
-func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- if hints == nil {
- hints = &FileHints{}
- }
-
- key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config)
- if err != nil {
- return
- }
-
- var w io.WriteCloser
- cipherSuite := packet.CipherSuite{
- Cipher: config.Cipher(),
- Mode: config.AEAD().Mode(),
- }
- w, err = packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), config.AEAD() != nil, cipherSuite, key, config)
- if err != nil {
- return
- }
-
- literalData := w
- if algo := config.Compression(); algo != packet.CompressionNone {
- var compConfig *packet.CompressionConfig
- if config != nil {
- compConfig = config.CompressionConfig
- }
- literalData, err = packet.SerializeCompressed(w, algo, compConfig)
- if err != nil {
- return
- }
- }
-
- var epochSeconds uint32
- if !hints.ModTime.IsZero() {
- epochSeconds = uint32(hints.ModTime.Unix())
- }
- return packet.SerializeLiteral(literalData, hints.IsBinary, hints.FileName, epochSeconds)
-}
-
-// intersectPreferences mutates and returns a prefix of a that contains only
-// the values in the intersection of a and b. The order of a is preserved.
-func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) {
- var j int
- for _, v := range a {
- for _, v2 := range b {
- if v == v2 {
- a[j] = v
- j++
- break
- }
- }
- }
-
- return a[:j]
-}
-
-// intersectPreferences mutates and returns a prefix of a that contains only
-// the values in the intersection of a and b. The order of a is preserved.
-func intersectCipherSuites(a [][2]uint8, b [][2]uint8) (intersection [][2]uint8) {
- var j int
- for _, v := range a {
- for _, v2 := range b {
- if v[0] == v2[0] && v[1] == v2[1] {
- a[j] = v
- j++
- break
- }
- }
- }
-
- return a[:j]
-}
-
-func hashToHashId(h crypto.Hash) uint8 {
- v, ok := algorithm.HashToHashId(h)
- if !ok {
- panic("tried to convert unknown hash")
- }
- return v
-}
-
-// EncryptText encrypts a message to a number of recipients and, optionally,
-// signs it. Optional information is contained in 'hints', also encrypted, that
-// aids the recipients in processing the message. The resulting WriteCloser
-// must be closed after the contents of the file have been written. If config
-// is nil, sensible defaults will be used. The signing is done in text mode.
-func EncryptText(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- return encrypt(ciphertext, ciphertext, to, signed, hints, packet.SigTypeText, config)
-}
-
-// Encrypt encrypts a message to a number of recipients and, optionally, signs
-// it. hints contains optional information, that is also encrypted, that aids
-// the recipients in processing the message. The resulting WriteCloser must
-// be closed after the contents of the file have been written.
-// If config is nil, sensible defaults will be used.
-func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- return encrypt(ciphertext, ciphertext, to, signed, hints, packet.SigTypeBinary, config)
-}
-
-// EncryptSplit encrypts a message to a number of recipients and, optionally, signs
-// it. hints contains optional information, that is also encrypted, that aids
-// the recipients in processing the message. The resulting WriteCloser must
-// be closed after the contents of the file have been written.
-// If config is nil, sensible defaults will be used.
-func EncryptSplit(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- return encrypt(keyWriter, dataWriter, to, signed, hints, packet.SigTypeBinary, config)
-}
-
-// EncryptTextSplit encrypts a message to a number of recipients and, optionally, signs
-// it. hints contains optional information, that is also encrypted, that aids
-// the recipients in processing the message. The resulting WriteCloser must
-// be closed after the contents of the file have been written.
-// If config is nil, sensible defaults will be used.
-func EncryptTextSplit(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
- return encrypt(keyWriter, dataWriter, to, signed, hints, packet.SigTypeText, config)
-}
-
-// writeAndSign writes the data as a payload package and, optionally, signs
-// it. hints contains optional information, that is also encrypted,
-// that aids the recipients in processing the message. The resulting
-// WriteCloser must be closed after the contents of the file have been
-// written. If config is nil, sensible defaults will be used.
-func writeAndSign(payload io.WriteCloser, candidateHashes []uint8, signed *Entity, hints *FileHints, sigType packet.SignatureType, config *packet.Config) (plaintext io.WriteCloser, err error) {
- var signer *packet.PrivateKey
- if signed != nil {
- signKey, ok := signed.SigningKeyById(config.Now(), config.SigningKey())
- if !ok {
- return nil, errors.InvalidArgumentError("no valid signing keys")
- }
- signer = signKey.PrivateKey
- if signer == nil {
- return nil, errors.InvalidArgumentError("no private key in signing key")
- }
- if signer.Encrypted {
- return nil, errors.InvalidArgumentError("signing key must be decrypted")
- }
- }
-
- var hash crypto.Hash
- for _, hashId := range candidateHashes {
- if h, ok := algorithm.HashIdToHash(hashId); ok && h.Available() {
- hash = h
- break
- }
- }
-
- // If the hash specified by config is a candidate, we'll use that.
- if configuredHash := config.Hash(); configuredHash.Available() {
- for _, hashId := range candidateHashes {
- if h, ok := algorithm.HashIdToHash(hashId); ok && h == configuredHash {
- hash = h
- break
- }
- }
- }
-
- if hash == 0 {
- hashId := candidateHashes[0]
- name, ok := algorithm.HashIdToString(hashId)
- if !ok {
- name = "#" + strconv.Itoa(int(hashId))
- }
- return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)")
- }
-
- var salt []byte
- if signer != nil {
- var opsVersion = 3
- if signer.Version == 6 {
- opsVersion = signer.Version
- }
- ops := &packet.OnePassSignature{
- Version: opsVersion,
- SigType: sigType,
- Hash: hash,
- PubKeyAlgo: signer.PubKeyAlgo,
- KeyId: signer.KeyId,
- IsLast: true,
- }
- if opsVersion == 6 {
- ops.KeyFingerprint = signer.Fingerprint
- salt, err = packet.SignatureSaltForHash(hash, config.Random())
- if err != nil {
- return nil, err
- }
- ops.Salt = salt
- }
- if err := ops.Serialize(payload); err != nil {
- return nil, err
- }
- }
-
- if hints == nil {
- hints = &FileHints{}
- }
-
- w := payload
- if signer != nil {
- // If we need to write a signature packet after the literal
- // data then we need to stop literalData from closing
- // encryptedData.
- w = noOpCloser{w}
-
- }
- var epochSeconds uint32
- if !hints.ModTime.IsZero() {
- epochSeconds = uint32(hints.ModTime.Unix())
- }
- literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds)
- if err != nil {
- return nil, err
- }
-
- if signer != nil {
- h, wrappedHash, err := hashForSignature(hash, sigType, salt)
- if err != nil {
- return nil, err
- }
- metadata := &packet.LiteralData{
- Format: 'u',
- FileName: hints.FileName,
- Time: epochSeconds,
- }
- if hints.IsBinary {
- metadata.Format = 'b'
- }
- return signatureWriter{payload, literalData, hash, wrappedHash, h, salt, signer, sigType, config, metadata}, nil
- }
- return literalData, nil
-}
-
-// encrypt encrypts a message to a number of recipients and, optionally, signs
-// it. hints contains optional information, that is also encrypted, that aids
-// the recipients in processing the message. The resulting WriteCloser must
-// be closed after the contents of the file have been written.
-// If config is nil, sensible defaults will be used.
-func encrypt(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *Entity, hints *FileHints, sigType packet.SignatureType, config *packet.Config) (plaintext io.WriteCloser, err error) {
- if len(to) == 0 {
- return nil, errors.InvalidArgumentError("no encryption recipient provided")
- }
-
- // These are the possible ciphers that we'll use for the message.
- candidateCiphers := []uint8{
- uint8(packet.CipherAES256),
- uint8(packet.CipherAES128),
- }
-
- // These are the possible hash functions that we'll use for the signature.
- candidateHashes := []uint8{
- hashToHashId(crypto.SHA256),
- hashToHashId(crypto.SHA384),
- hashToHashId(crypto.SHA512),
- hashToHashId(crypto.SHA3_256),
- hashToHashId(crypto.SHA3_512),
- }
-
- // Prefer GCM if everyone supports it
- candidateCipherSuites := [][2]uint8{
- {uint8(packet.CipherAES256), uint8(packet.AEADModeGCM)},
- {uint8(packet.CipherAES256), uint8(packet.AEADModeEAX)},
- {uint8(packet.CipherAES256), uint8(packet.AEADModeOCB)},
- {uint8(packet.CipherAES128), uint8(packet.AEADModeGCM)},
- {uint8(packet.CipherAES128), uint8(packet.AEADModeEAX)},
- {uint8(packet.CipherAES128), uint8(packet.AEADModeOCB)},
- }
-
- candidateCompression := []uint8{
- uint8(packet.CompressionNone),
- uint8(packet.CompressionZIP),
- uint8(packet.CompressionZLIB),
- }
-
- encryptKeys := make([]Key, len(to))
-
- // AEAD is used only if config enables it and every key supports it
- aeadSupported := config.AEAD() != nil
-
- for i := range to {
- var ok bool
- encryptKeys[i], ok = to[i].EncryptionKey(config.Now())
- if !ok {
- return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no valid encryption keys")
- }
-
- primarySelfSignature, _ := to[i].PrimarySelfSignature()
- if primarySelfSignature == nil {
- return nil, errors.InvalidArgumentError("entity without a self-signature")
- }
-
- if !primarySelfSignature.SEIPDv2 {
- aeadSupported = false
- }
-
- candidateCiphers = intersectPreferences(candidateCiphers, primarySelfSignature.PreferredSymmetric)
- candidateHashes = intersectPreferences(candidateHashes, primarySelfSignature.PreferredHash)
- candidateCipherSuites = intersectCipherSuites(candidateCipherSuites, primarySelfSignature.PreferredCipherSuites)
- candidateCompression = intersectPreferences(candidateCompression, primarySelfSignature.PreferredCompression)
- }
-
- // In the event that the intersection of supported algorithms is empty we use the ones
- // labelled as MUST that every implementation supports.
- if len(candidateCiphers) == 0 {
- // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.3
- candidateCiphers = []uint8{uint8(packet.CipherAES128)}
- }
- if len(candidateHashes) == 0 {
- // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#hash-algos
- candidateHashes = []uint8{hashToHashId(crypto.SHA256)}
- }
- if len(candidateCipherSuites) == 0 {
- // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.6
- candidateCipherSuites = [][2]uint8{{uint8(packet.CipherAES128), uint8(packet.AEADModeOCB)}}
- }
-
- cipher := packet.CipherFunction(candidateCiphers[0])
- aeadCipherSuite := packet.CipherSuite{
- Cipher: packet.CipherFunction(candidateCipherSuites[0][0]),
- Mode: packet.AEADMode(candidateCipherSuites[0][1]),
- }
-
- // If the cipher specified by config is a candidate, we'll use that.
- configuredCipher := config.Cipher()
- for _, c := range candidateCiphers {
- cipherFunc := packet.CipherFunction(c)
- if cipherFunc == configuredCipher {
- cipher = cipherFunc
- break
- }
- }
-
- var symKey []byte
- if aeadSupported {
- symKey = make([]byte, aeadCipherSuite.Cipher.KeySize())
- } else {
- symKey = make([]byte, cipher.KeySize())
- }
-
- if _, err := io.ReadFull(config.Random(), symKey); err != nil {
- return nil, err
- }
-
- for _, key := range encryptKeys {
- if err := packet.SerializeEncryptedKeyAEAD(keyWriter, key.PublicKey, cipher, aeadSupported, symKey, config); err != nil {
- return nil, err
- }
- }
-
- var payload io.WriteCloser
- payload, err = packet.SerializeSymmetricallyEncrypted(dataWriter, cipher, aeadSupported, aeadCipherSuite, symKey, config)
- if err != nil {
- return
- }
-
- payload, err = handleCompression(payload, candidateCompression, config)
- if err != nil {
- return nil, err
- }
-
- return writeAndSign(payload, candidateHashes, signed, hints, sigType, config)
-}
-
-// Sign signs a message. The resulting WriteCloser must be closed after the
-// contents of the file have been written. hints contains optional information
-// that aids the recipients in processing the message.
-// If config is nil, sensible defaults will be used.
-func Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) {
- if signed == nil {
- return nil, errors.InvalidArgumentError("no signer provided")
- }
-
- // These are the possible hash functions that we'll use for the signature.
- candidateHashes := []uint8{
- hashToHashId(crypto.SHA256),
- hashToHashId(crypto.SHA384),
- hashToHashId(crypto.SHA512),
- hashToHashId(crypto.SHA3_256),
- hashToHashId(crypto.SHA3_512),
- }
- defaultHashes := candidateHashes[0:1]
- primarySelfSignature, _ := signed.PrimarySelfSignature()
- if primarySelfSignature == nil {
- return nil, errors.StructuralError("signed entity has no self-signature")
- }
- preferredHashes := primarySelfSignature.PreferredHash
- if len(preferredHashes) == 0 {
- preferredHashes = defaultHashes
- }
- candidateHashes = intersectPreferences(candidateHashes, preferredHashes)
- if len(candidateHashes) == 0 {
- return nil, errors.StructuralError("cannot sign because signing key shares no common algorithms with candidate hashes")
- }
-
- return writeAndSign(noOpCloser{output}, candidateHashes, signed, hints, packet.SigTypeBinary, config)
-}
-
-// signatureWriter hashes the contents of a message while passing it along to
-// literalData. When closed, it closes literalData, writes a signature packet
-// to encryptedData and then also closes encryptedData.
-type signatureWriter struct {
- encryptedData io.WriteCloser
- literalData io.WriteCloser
- hashType crypto.Hash
- wrappedHash hash.Hash
- h hash.Hash
- salt []byte // v6 only
- signer *packet.PrivateKey
- sigType packet.SignatureType
- config *packet.Config
- metadata *packet.LiteralData // V5 signatures protect document metadata
-}
-
-func (s signatureWriter) Write(data []byte) (int, error) {
- s.wrappedHash.Write(data)
- switch s.sigType {
- case packet.SigTypeBinary:
- return s.literalData.Write(data)
- case packet.SigTypeText:
- flag := 0
- return writeCanonical(s.literalData, data, &flag)
- }
- return 0, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(s.sigType)))
-}
-
-func (s signatureWriter) Close() error {
- sig := createSignaturePacket(&s.signer.PublicKey, s.sigType, s.config)
- sig.Hash = s.hashType
- sig.Metadata = s.metadata
-
- if err := sig.SetSalt(s.salt); err != nil {
- return err
- }
-
- if err := sig.Sign(s.h, s.signer, s.config); err != nil {
- return err
- }
- if err := s.literalData.Close(); err != nil {
- return err
- }
- if err := sig.Serialize(s.encryptedData); err != nil {
- return err
- }
- return s.encryptedData.Close()
-}
-
-func createSignaturePacket(signer *packet.PublicKey, sigType packet.SignatureType, config *packet.Config) *packet.Signature {
- sigLifetimeSecs := config.SigLifetime()
- return &packet.Signature{
- Version: signer.Version,
- SigType: sigType,
- PubKeyAlgo: signer.PubKeyAlgo,
- Hash: config.Hash(),
- CreationTime: config.Now(),
- IssuerKeyId: &signer.KeyId,
- IssuerFingerprint: signer.Fingerprint,
- Notations: config.Notations(),
- SigLifetimeSecs: &sigLifetimeSecs,
- }
-}
-
-// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
-// TODO: we have two of these in OpenPGP packages alone. This probably needs
-// to be promoted somewhere more common.
-type noOpCloser struct {
- w io.Writer
-}
-
-func (c noOpCloser) Write(data []byte) (n int, err error) {
- return c.w.Write(data)
-}
-
-func (c noOpCloser) Close() error {
- return nil
-}
-
-func handleCompression(compressed io.WriteCloser, candidateCompression []uint8, config *packet.Config) (data io.WriteCloser, err error) {
- data = compressed
- confAlgo := config.Compression()
- if confAlgo == packet.CompressionNone {
- return
- }
-
- // Set algorithm labelled as MUST as fallback
- // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.4
- finalAlgo := packet.CompressionNone
- // if compression specified by config available we will use it
- for _, c := range candidateCompression {
- if uint8(confAlgo) == c {
- finalAlgo = confAlgo
- break
- }
- }
-
- if finalAlgo != packet.CompressionNone {
- var compConfig *packet.CompressionConfig
- if config != nil {
- compConfig = config.CompressionConfig
- }
- data, err = packet.SerializeCompressed(compressed, finalAlgo, compConfig)
- if err != nil {
- return
- }
- }
- return data, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/x25519/x25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/x25519/x25519.go
deleted file mode 100644
index 38afcc74fa..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/x25519/x25519.go
+++ /dev/null
@@ -1,221 +0,0 @@
-package x25519
-
-import (
- "crypto/sha256"
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/aes/keywrap"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- x25519lib "github.com/cloudflare/circl/dh/x25519"
- "golang.org/x/crypto/hkdf"
-)
-
-const (
- hkdfInfo = "OpenPGP X25519"
- aes128KeySize = 16
- // The size of a public or private key in bytes.
- KeySize = x25519lib.Size
-)
-
-type PublicKey struct {
- // Point represents the encoded elliptic curve point of the public key.
- Point []byte
-}
-
-type PrivateKey struct {
- PublicKey
- // Secret represents the secret of the private key.
- Secret []byte
-}
-
-// NewPrivateKey creates a new empty private key including the public key.
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-// Validate validates that the provided public key matches the private key.
-func Validate(pk *PrivateKey) (err error) {
- var expectedPublicKey, privateKey x25519lib.Key
- subtle.ConstantTimeCopy(1, privateKey[:], pk.Secret)
- x25519lib.KeyGen(&expectedPublicKey, &privateKey)
- if subtle.ConstantTimeCompare(expectedPublicKey[:], pk.PublicKey.Point) == 0 {
- return errors.KeyInvalidError("x25519: invalid key")
- }
- return nil
-}
-
-// GenerateKey generates a new x25519 key pair.
-func GenerateKey(rand io.Reader) (*PrivateKey, error) {
- var privateKey, publicKey x25519lib.Key
- privateKeyOut := new(PrivateKey)
- err := generateKey(rand, &privateKey, &publicKey)
- if err != nil {
- return nil, err
- }
- privateKeyOut.PublicKey.Point = publicKey[:]
- privateKeyOut.Secret = privateKey[:]
- return privateKeyOut, nil
-}
-
-func generateKey(rand io.Reader, privateKey *x25519lib.Key, publicKey *x25519lib.Key) error {
- maxRounds := 10
- isZero := true
- for round := 0; isZero; round++ {
- if round == maxRounds {
- return errors.InvalidArgumentError("x25519: zero keys only, randomness source might be corrupt")
- }
- _, err := io.ReadFull(rand, privateKey[:])
- if err != nil {
- return err
- }
- isZero = constantTimeIsZero(privateKey[:])
- }
- x25519lib.KeyGen(publicKey, privateKey)
- return nil
-}
-
-// Encrypt encrypts a sessionKey with x25519 according to
-// the OpenPGP crypto refresh specification section 5.1.6. The function assumes that the
-// sessionKey has the correct format and padding according to the specification.
-func Encrypt(rand io.Reader, publicKey *PublicKey, sessionKey []byte) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, err error) {
- var ephemeralPrivate, ephemeralPublic, staticPublic, shared x25519lib.Key
- // Check that the input static public key has 32 bytes
- if len(publicKey.Point) != KeySize {
- err = errors.KeyInvalidError("x25519: the public key has the wrong size")
- return
- }
- copy(staticPublic[:], publicKey.Point)
- // Generate ephemeral keyPair
- err = generateKey(rand, &ephemeralPrivate, &ephemeralPublic)
- if err != nil {
- return
- }
- // Compute shared key
- ok := x25519lib.Shared(&shared, &ephemeralPrivate, &staticPublic)
- if !ok {
- err = errors.KeyInvalidError("x25519: the public key is a low order point")
- return
- }
- // Derive the encryption key from the shared secret
- encryptionKey := applyHKDF(ephemeralPublic[:], publicKey.Point[:], shared[:])
- ephemeralPublicKey = &PublicKey{
- Point: ephemeralPublic[:],
- }
- // Encrypt the sessionKey with aes key wrapping
- encryptedSessionKey, err = keywrap.Wrap(encryptionKey, sessionKey)
- return
-}
-
-// Decrypt decrypts a session key stored in ciphertext with the provided x25519
-// private key and ephemeral public key.
-func Decrypt(privateKey *PrivateKey, ephemeralPublicKey *PublicKey, ciphertext []byte) (encodedSessionKey []byte, err error) {
- var ephemeralPublic, staticPrivate, shared x25519lib.Key
- // Check that the input ephemeral public key has 32 bytes
- if len(ephemeralPublicKey.Point) != KeySize {
- err = errors.KeyInvalidError("x25519: the public key has the wrong size")
- return
- }
- copy(ephemeralPublic[:], ephemeralPublicKey.Point)
- subtle.ConstantTimeCopy(1, staticPrivate[:], privateKey.Secret)
- // Compute shared key
- ok := x25519lib.Shared(&shared, &staticPrivate, &ephemeralPublic)
- if !ok {
- err = errors.KeyInvalidError("x25519: the ephemeral public key is a low order point")
- return
- }
- // Derive the encryption key from the shared secret
- encryptionKey := applyHKDF(ephemeralPublicKey.Point[:], privateKey.PublicKey.Point[:], shared[:])
- // Decrypt the session key with aes key wrapping
- encodedSessionKey, err = keywrap.Unwrap(encryptionKey, ciphertext)
- return
-}
-
-func applyHKDF(ephemeralPublicKey []byte, publicKey []byte, sharedSecret []byte) []byte {
- inputKey := make([]byte, 3*KeySize)
- // ephemeral public key | recipient public key | shared secret
- subtle.ConstantTimeCopy(1, inputKey[:KeySize], ephemeralPublicKey)
- subtle.ConstantTimeCopy(1, inputKey[KeySize:2*KeySize], publicKey)
- subtle.ConstantTimeCopy(1, inputKey[2*KeySize:], sharedSecret)
- hkdfReader := hkdf.New(sha256.New, inputKey, []byte{}, []byte(hkdfInfo))
- encryptionKey := make([]byte, aes128KeySize)
- _, _ = io.ReadFull(hkdfReader, encryptionKey)
- return encryptionKey
-}
-
-func constantTimeIsZero(bytes []byte) bool {
- isZero := byte(0)
- for _, b := range bytes {
- isZero |= b
- }
- return isZero == 0
-}
-
-// ENCODING/DECODING ciphertexts:
-
-// EncodeFieldsLength returns the length of the ciphertext encoding
-// given the encrypted session key.
-func EncodedFieldsLength(encryptedSessionKey []byte, v6 bool) int {
- lenCipherFunction := 0
- if !v6 {
- lenCipherFunction = 1
- }
- return KeySize + 1 + len(encryptedSessionKey) + lenCipherFunction
-}
-
-// EncodeField encodes x25519 session key encryption fields as
-// ephemeral x25519 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey
-// and writes it to writer.
-func EncodeFields(writer io.Writer, ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, v6 bool) (err error) {
- lenAlgorithm := 0
- if !v6 {
- lenAlgorithm = 1
- }
- if _, err = writer.Write(ephemeralPublicKey.Point); err != nil {
- return err
- }
- if _, err = writer.Write([]byte{byte(len(encryptedSessionKey) + lenAlgorithm)}); err != nil {
- return err
- }
- if !v6 {
- if _, err = writer.Write([]byte{cipherFunction}); err != nil {
- return err
- }
- }
- _, err = writer.Write(encryptedSessionKey)
- return err
-}
-
-// DecodeField decodes a x25519 session key encryption as
-// ephemeral x25519 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey.
-func DecodeFields(reader io.Reader, v6 bool) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, err error) {
- var buf [1]byte
- ephemeralPublicKey = &PublicKey{
- Point: make([]byte, KeySize),
- }
- // 32 octets representing an ephemeral x25519 public key.
- if _, err = io.ReadFull(reader, ephemeralPublicKey.Point); err != nil {
- return nil, nil, 0, err
- }
- // A one-octet size of the following fields.
- if _, err = io.ReadFull(reader, buf[:]); err != nil {
- return nil, nil, 0, err
- }
- followingLen := buf[0]
- // The one-octet algorithm identifier, if it was passed (in the case of a v3 PKESK packet).
- if !v6 {
- if _, err = io.ReadFull(reader, buf[:]); err != nil {
- return nil, nil, 0, err
- }
- cipherFunction = buf[0]
- followingLen -= 1
- }
- // The encrypted session key.
- encryptedSessionKey = make([]byte, followingLen)
- if _, err = io.ReadFull(reader, encryptedSessionKey); err != nil {
- return nil, nil, 0, err
- }
- return ephemeralPublicKey, encryptedSessionKey, cipherFunction, nil
-}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/x448/x448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/x448/x448.go
deleted file mode 100644
index 65a082dabd..0000000000
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/x448/x448.go
+++ /dev/null
@@ -1,229 +0,0 @@
-package x448
-
-import (
- "crypto/sha512"
- "crypto/subtle"
- "io"
-
- "github.com/ProtonMail/go-crypto/openpgp/aes/keywrap"
- "github.com/ProtonMail/go-crypto/openpgp/errors"
- x448lib "github.com/cloudflare/circl/dh/x448"
- "golang.org/x/crypto/hkdf"
-)
-
-const (
- hkdfInfo = "OpenPGP X448"
- aes256KeySize = 32
- // The size of a public or private key in bytes.
- KeySize = x448lib.Size
-)
-
-type PublicKey struct {
- // Point represents the encoded elliptic curve point of the public key.
- Point []byte
-}
-
-type PrivateKey struct {
- PublicKey
- // Secret represents the secret of the private key.
- Secret []byte
-}
-
-// NewPrivateKey creates a new empty private key including the public key.
-func NewPrivateKey(key PublicKey) *PrivateKey {
- return &PrivateKey{
- PublicKey: key,
- }
-}
-
-// Validate validates that the provided public key matches
-// the private key.
-func Validate(pk *PrivateKey) (err error) {
- var expectedPublicKey, privateKey x448lib.Key
- subtle.ConstantTimeCopy(1, privateKey[:], pk.Secret)
- x448lib.KeyGen(&expectedPublicKey, &privateKey)
- if subtle.ConstantTimeCompare(expectedPublicKey[:], pk.PublicKey.Point) == 0 {
- return errors.KeyInvalidError("x448: invalid key")
- }
- return nil
-}
-
-// GenerateKey generates a new x448 key pair.
-func GenerateKey(rand io.Reader) (*PrivateKey, error) {
- var privateKey, publicKey x448lib.Key
- privateKeyOut := new(PrivateKey)
- err := generateKey(rand, &privateKey, &publicKey)
- if err != nil {
- return nil, err
- }
- privateKeyOut.PublicKey.Point = publicKey[:]
- privateKeyOut.Secret = privateKey[:]
- return privateKeyOut, nil
-}
-
-func generateKey(rand io.Reader, privateKey *x448lib.Key, publicKey *x448lib.Key) error {
- maxRounds := 10
- isZero := true
- for round := 0; isZero; round++ {
- if round == maxRounds {
- return errors.InvalidArgumentError("x448: zero keys only, randomness source might be corrupt")
- }
- _, err := io.ReadFull(rand, privateKey[:])
- if err != nil {
- return err
- }
- isZero = constantTimeIsZero(privateKey[:])
- }
- x448lib.KeyGen(publicKey, privateKey)
- return nil
-}
-
-// Encrypt encrypts a sessionKey with x448 according to
-// the OpenPGP crypto refresh specification section 5.1.7. The function assumes that the
-// sessionKey has the correct format and padding according to the specification.
-func Encrypt(rand io.Reader, publicKey *PublicKey, sessionKey []byte) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, err error) {
- var ephemeralPrivate, ephemeralPublic, staticPublic, shared x448lib.Key
- // Check that the input static public key has 56 bytes.
- if len(publicKey.Point) != KeySize {
- err = errors.KeyInvalidError("x448: the public key has the wrong size")
- return nil, nil, err
- }
- copy(staticPublic[:], publicKey.Point)
- // Generate ephemeral keyPair.
- if err = generateKey(rand, &ephemeralPrivate, &ephemeralPublic); err != nil {
- return nil, nil, err
- }
- // Compute shared key.
- ok := x448lib.Shared(&shared, &ephemeralPrivate, &staticPublic)
- if !ok {
- err = errors.KeyInvalidError("x448: the public key is a low order point")
- return nil, nil, err
- }
- // Derive the encryption key from the shared secret.
- encryptionKey := applyHKDF(ephemeralPublic[:], publicKey.Point[:], shared[:])
- ephemeralPublicKey = &PublicKey{
- Point: ephemeralPublic[:],
- }
- // Encrypt the sessionKey with aes key wrapping.
- encryptedSessionKey, err = keywrap.Wrap(encryptionKey, sessionKey)
- if err != nil {
- return nil, nil, err
- }
- return ephemeralPublicKey, encryptedSessionKey, nil
-}
-
-// Decrypt decrypts a session key stored in ciphertext with the provided x448
-// private key and ephemeral public key.
-func Decrypt(privateKey *PrivateKey, ephemeralPublicKey *PublicKey, ciphertext []byte) (encodedSessionKey []byte, err error) {
- var ephemeralPublic, staticPrivate, shared x448lib.Key
- // Check that the input ephemeral public key has 56 bytes.
- if len(ephemeralPublicKey.Point) != KeySize {
- err = errors.KeyInvalidError("x448: the public key has the wrong size")
- return nil, err
- }
- copy(ephemeralPublic[:], ephemeralPublicKey.Point)
- subtle.ConstantTimeCopy(1, staticPrivate[:], privateKey.Secret)
- // Compute shared key.
- ok := x448lib.Shared(&shared, &staticPrivate, &ephemeralPublic)
- if !ok {
- err = errors.KeyInvalidError("x448: the ephemeral public key is a low order point")
- return nil, err
- }
- // Derive the encryption key from the shared secret.
- encryptionKey := applyHKDF(ephemeralPublicKey.Point[:], privateKey.PublicKey.Point[:], shared[:])
- // Decrypt the session key with aes key wrapping.
- encodedSessionKey, err = keywrap.Unwrap(encryptionKey, ciphertext)
- if err != nil {
- return nil, err
- }
- return encodedSessionKey, nil
-}
-
-func applyHKDF(ephemeralPublicKey []byte, publicKey []byte, sharedSecret []byte) []byte {
- inputKey := make([]byte, 3*KeySize)
- // ephemeral public key | recipient public key | shared secret.
- subtle.ConstantTimeCopy(1, inputKey[:KeySize], ephemeralPublicKey)
- subtle.ConstantTimeCopy(1, inputKey[KeySize:2*KeySize], publicKey)
- subtle.ConstantTimeCopy(1, inputKey[2*KeySize:], sharedSecret)
- hkdfReader := hkdf.New(sha512.New, inputKey, []byte{}, []byte(hkdfInfo))
- encryptionKey := make([]byte, aes256KeySize)
- _, _ = io.ReadFull(hkdfReader, encryptionKey)
- return encryptionKey
-}
-
-func constantTimeIsZero(bytes []byte) bool {
- isZero := byte(0)
- for _, b := range bytes {
- isZero |= b
- }
- return isZero == 0
-}
-
-// ENCODING/DECODING ciphertexts:
-
-// EncodeFieldsLength returns the length of the ciphertext encoding
-// given the encrypted session key.
-func EncodedFieldsLength(encryptedSessionKey []byte, v6 bool) int {
- lenCipherFunction := 0
- if !v6 {
- lenCipherFunction = 1
- }
- return KeySize + 1 + len(encryptedSessionKey) + lenCipherFunction
-}
-
-// EncodeField encodes x448 session key encryption fields as
-// ephemeral x448 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey
-// and writes it to writer.
-func EncodeFields(writer io.Writer, ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, v6 bool) (err error) {
- lenAlgorithm := 0
- if !v6 {
- lenAlgorithm = 1
- }
- if _, err = writer.Write(ephemeralPublicKey.Point); err != nil {
- return err
- }
- if _, err = writer.Write([]byte{byte(len(encryptedSessionKey) + lenAlgorithm)}); err != nil {
- return err
- }
- if !v6 {
- if _, err = writer.Write([]byte{cipherFunction}); err != nil {
- return err
- }
- }
- if _, err = writer.Write(encryptedSessionKey); err != nil {
- return err
- }
- return nil
-}
-
-// DecodeField decodes a x448 session key encryption as
-// ephemeral x448 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey.
-func DecodeFields(reader io.Reader, v6 bool) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, err error) {
- var buf [1]byte
- ephemeralPublicKey = &PublicKey{
- Point: make([]byte, KeySize),
- }
- // 56 octets representing an ephemeral x448 public key.
- if _, err = io.ReadFull(reader, ephemeralPublicKey.Point); err != nil {
- return nil, nil, 0, err
- }
- // A one-octet size of the following fields.
- if _, err = io.ReadFull(reader, buf[:]); err != nil {
- return nil, nil, 0, err
- }
- followingLen := buf[0]
- // The one-octet algorithm identifier, if it was passed (in the case of a v3 PKESK packet).
- if !v6 {
- if _, err = io.ReadFull(reader, buf[:]); err != nil {
- return nil, nil, 0, err
- }
- cipherFunction = buf[0]
- followingLen -= 1
- }
- // The encrypted session key.
- encryptedSessionKey = make([]byte, followingLen)
- if _, err = io.ReadFull(reader, encryptedSessionKey); err != nil {
- return nil, nil, 0, err
- }
- return ephemeralPublicKey, encryptedSessionKey, cipherFunction, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
index 8e930fc6f8..fc102ab7e1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
@@ -3,4 +3,4 @@
package aws
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.36.3"
+const goModuleVersion = "1.36.4"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go
index 66aa2bd6ab..32875e0779 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go
@@ -59,7 +59,7 @@ func (s *StreamSigner) GetSignature(ctx context.Context, headers, payload []byte
prevSignature := s.prevSignature
- st := v4Internal.NewSigningTime(signingTime)
+ st := v4Internal.NewSigningTime(signingTime.UTC())
sigKey := s.signingKeyDeriver.DeriveKey(s.credentials, s.service, s.region, st)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
index 237292bb89..0416b30a4d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
@@ -1,3 +1,19 @@
+# v1.29.16 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.15 (2025-06-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.14 (2025-04-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.13 (2025-04-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.29.12 (2025-03-27)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
index 88b9c9d52c..8c30900142 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
@@ -3,4 +3,4 @@
package config
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.29.12"
+const goModuleVersion = "1.29.16"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
index f622db4abd..d47d8629e0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
@@ -1,3 +1,19 @@
+# v1.17.69 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.68 (2025-06-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.67 (2025-04-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.66 (2025-04-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.17.65 (2025-03-27)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
index 5cf21cd8ab..3ec6470b41 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
@@ -3,4 +3,4 @@
package credentials
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.17.65"
+const goModuleVersion = "1.17.69"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
index 1f69e820e7..4bd7a942fb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v1.16.31 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.16.30 (2025-02-27)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
index dba9ef600e..accba4083a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
@@ -3,4 +3,4 @@
package imds
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.16.30"
+const goModuleVersion = "1.16.31"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
index eae3e16af7..b4990deff2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v1.3.35 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.3.34 (2025-02-27)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
index eddabe6344..19fd284472 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
@@ -3,4 +3,4 @@
package configsources
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.3.34"
+const goModuleVersion = "1.3.35"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
index e19224f1b8..a2bfa6ead4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
@@ -208,6 +208,9 @@
},
"regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$",
"regions" : {
+ "aws-iso-e-global" : {
+ "description" : "AWS ISOE (Europe) global region"
+ },
"eu-isoe-west-1" : {
"description" : "EU ISOE West"
}
@@ -234,6 +237,22 @@
"description" : "US ISOF SOUTH"
}
}
+ }, {
+ "id" : "aws-eusc",
+ "outputs" : {
+ "dnsSuffix" : "amazonaws.eu",
+ "dualStackDnsSuffix" : "amazonaws.eu",
+ "implicitGlobalRegion" : "eusc-de-east-1",
+ "name" : "aws-eusc",
+ "supportsDualStack" : false,
+ "supportsFIPS" : true
+ },
+ "regionRegex" : "^eusc\\-(de)\\-\\w+\\-\\d+$",
+ "regions" : {
+ "eusc-de-east-1" : {
+ "description" : "EU (Germany)"
+ }
+ }
} ],
"version" : "1.1"
}
\ No newline at end of file
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
index 83e5bd28a7..b56edee377 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v2.6.35 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v2.6.34 (2025-02-27)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
index 735dba7ac7..e7ebb2f5fa 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
@@ -3,4 +3,4 @@
package endpoints
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "2.6.34"
+const goModuleVersion = "2.6.35"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
index 2b5ceb4b51..ec8f6ce5b0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v1.12.16 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.12.15 (2025-02-27)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
index a165a100f8..03377a3d9b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
@@ -3,4 +3,4 @@
package presignedurl
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.12.15"
+const goModuleVersion = "1.12.16"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md
index 50ec310bbd..aeda2b59fe 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md
@@ -1,3 +1,27 @@
+# v1.41.0 (2025-06-12)
+
+* **Feature**: AWS KMS announces the support of ML-DSA key pairs that creates post-quantum safe digital signatures.
+
+# v1.40.1 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.40.0 (2025-06-06)
+
+* **Feature**: Remove unpopulated KeyMaterialId from Encrypt Response
+
+# v1.39.0 (2025-06-05)
+
+* **Feature**: AWS KMS announces the support for on-demand rotation of symmetric-encryption KMS keys with imported key material (EXTERNAL origin).
+
+# v1.38.3 (2025-04-10)
+
+* No change notes available for this release.
+
+# v1.38.2 (2025-04-03)
+
+* No change notes available for this release.
+
# v1.38.1 (2025-03-04.2)
* **Bug Fix**: Add assurance test for operation order.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go
index 8e26732934..7ed501c8be 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go
@@ -32,7 +32,7 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [kms:CancelKeyDeletion]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Deleting KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) CancelKeyDeletion(ctx context.Context, params *CancelKeyDeletionInput, optFns ...func(*Options)) (*CancelKeyDeletionOutput, error) {
if params == nil {
params = &CancelKeyDeletionInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go
index e5abbb8fc7..7a12c3740e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go
@@ -26,9 +26,9 @@ import (
// does not indicate that the custom key store is connected. To get the connection
// state of the custom key store, use the DescribeCustomKeyStoresoperation.
//
-// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
-// and extensive integration of KMS with the isolation and control of a key store
-// that you own and manage.
+// This operation is part of the custom key stores feature in KMS, which combines
+// the convenience and extensive integration of KMS with the isolation and control
+// of a key store that you own and manage.
//
// The ConnectCustomKeyStore operation might fail for various reasons. To find the
// reason, use the DescribeCustomKeyStoresoperation and see the ConnectionErrorCode in the response. For
@@ -95,14 +95,13 @@ import (
// more information, see [KMS eventual consistency].
//
// [DescribeClusters]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
-// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
-// [kmsuser crypto user]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
+// [kmsuser crypto user]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html#concept-kmsuser
// [Troubleshooting an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
// [CreateHsm]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
// [kms:ConnectCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Troubleshooting an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) ConnectCustomKeyStore(ctx context.Context, params *ConnectCustomKeyStoreInput, optFns ...func(*Options)) (*ConnectCustomKeyStoreOutput, error) {
if params == nil {
params = &ConnectCustomKeyStoreInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go
index 2966f7a21b..9ccf678de7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go
@@ -27,7 +27,7 @@ import (
//
// The alias must be unique in the account and Region, but you can have aliases
// with the same name in different Regions. For detailed information about aliases,
-// see [Using aliases]in the Key Management Service Developer Guide.
+// see [Aliases in KMS]in the Key Management Service Developer Guide.
//
// This operation does not return a response. To get the alias that you created,
// use the ListAliasesoperation.
@@ -60,12 +60,12 @@ import (
// more information, see [KMS eventual consistency].
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
-// [Using aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
// [kms:CreateAlias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Aliases in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/alias-access.html
func (c *Client) CreateAlias(ctx context.Context, params *CreateAliasInput, optFns ...func(*Options)) (*CreateAliasOutput, error) {
if params == nil {
params = &CreateAliasInput{}
@@ -105,7 +105,7 @@ type CreateAliasInput struct {
// A valid key ID is required. If you supply a null or empty string value, this
// operation returns an error.
//
- // For help finding the key ID and ARN, see [Finding the Key ID and ARN] in the Key Management Service
+ // For help finding the key ID and ARN, see [Find the key ID and key ARN] in the Key Management Service
// Developer Guide .
//
// Specify the key ID or key ARN of the KMS key.
@@ -120,7 +120,7 @@ type CreateAliasInput struct {
// To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
//
// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
- // [Finding the Key ID and ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn
+ // [Find the key ID and key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/find-cmk-id-arn.html
//
// This member is required.
TargetKeyId *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go
index 9f5146b47a..1f4292ed0f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go
@@ -17,9 +17,9 @@ import (
// backed by an [CloudHSM cluster]and [external key stores] backed by an external key store proxy and external key
// manager outside of Amazon Web Services.
//
-// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
-// and extensive integration of KMS with the isolation and control of a key store
-// that you own and manage.
+// This operation is part of the custom key stores feature in KMS, which combines
+// the convenience and extensive integration of KMS with the isolation and control
+// of a key store that you own and manage.
//
// Before you create the custom key store, the required elements must be in place
// and operational. We recommend that you use the test tools that KMS provides to
@@ -61,8 +61,6 @@ import (
// immediately, you might want to connect it to verify that all settings are
// correct and then disconnect it until you are ready to use it.
//
-// For help with failures, see [Troubleshooting a custom key store] in the Key Management Service Developer Guide.
-//
// Cross-account use: No. You cannot perform this operation on a custom key store
// in a different Amazon Web Services account.
//
@@ -85,16 +83,14 @@ import (
//
// [CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
// [CloudHSM cluster]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
-// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
// [external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
// [Troubleshooting an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
// [Assemble the prerequisites (for CloudHSM key stores)]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
// [Assemble the prerequisites (for external key stores)]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
-// [Troubleshooting a custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
// [Troubleshooting an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
// [kms:CreateCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) CreateCustomKeyStore(ctx context.Context, params *CreateCustomKeyStoreInput, optFns ...func(*Options)) (*CreateCustomKeyStoreOutput, error) {
if params == nil {
params = &CreateCustomKeyStoreInput{}
@@ -151,7 +147,7 @@ type CreateCustomKeyStoreInput struct {
// This parameter tells KMS the kmsuser account password; it does not change the
// password in the CloudHSM cluster.
//
- // [kmsuser crypto user (CU) account]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
+ // [kmsuser crypto user (CU) account]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html#concept-kmsuser
KeyStorePassword *string
// Specifies the certificate for an CloudHSM key store. This parameter is required
@@ -201,7 +197,7 @@ type CreateCustomKeyStoreInput struct {
// proxy. Even if you choose a VPC endpoint service, the proxy can be hosted within
// the VPC or outside of Amazon Web Services such as in your corporate data center.
//
- // [Choosing a connectivity option]: https://docs.aws.amazon.com/kms/latest/developerguide/plan-xks-keystore.html#choose-xks-connectivity
+ // [Choosing a connectivity option]: https://docs.aws.amazon.com/kms/latest/developerguide/choose-xks-connectivity.html
XksProxyConnectivity types.XksProxyConnectivityType
// Specifies the endpoint that KMS uses to send requests to the external key store
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go
index bce9011a43..07fa25e581 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go
@@ -21,8 +21,8 @@ import (
// and delete it without changing your key policies or IAM policies.
//
// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
-// Key Management Service Developer Guide . For examples of working with grants in
-// several programming languages, see [Programming grants].
+// Key Management Service Developer Guide . For examples of creating grants in
+// several programming languages, see [Use CreateGrant with an Amazon Web Services SDK or CLI].
//
// The CreateGrant operation returns a GrantToken and a GrantId .
//
@@ -63,13 +63,13 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
// [kms:CreateGrant]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Use CreateGrant with an Amazon Web Services SDK or CLI]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_CreateGrant_section.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
//
-// [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+// [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
func (c *Client) CreateGrant(ctx context.Context, params *CreateGrantInput, optFns ...func(*Options)) (*CreateGrantOutput, error) {
if params == nil {
params = &CreateGrantInput{}
@@ -167,10 +167,10 @@ type CreateGrantInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -180,7 +180,7 @@ type CreateGrantInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// A friendly name for the grant. Use this value to prevent the unintended
@@ -213,7 +213,7 @@ type CreateGrantInput struct {
//
// [IAM ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
// [Amazon Resource Name (ARN)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
- // [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
+ // [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-delete.html
RetiringPrincipal *string
noSmithyDocumentSerde
@@ -233,7 +233,7 @@ type CreateGrantOutput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantToken *string
// Metadata pertaining to the operation's result.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go
index 6ae27326f7..0972863fb8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go
@@ -18,8 +18,7 @@ import (
//
// A KMS key is a logical representation of a cryptographic key. In addition to
// the key material used in cryptographic operations, a KMS key includes metadata,
-// such as the key ID, key policy, creation date, description, and key state. For
-// details, see [Managing keys]in the Key Management Service Developer Guide
+// such as the key ID, key policy, creation date, description, and key state.
//
// Use the parameters of CreateKey to specify the type of KMS key, the source of
// its key material, its key policy, description, tags, and other properties.
@@ -52,18 +51,19 @@ import (
// or sign and verify. You can't change these properties after the KMS key is
// created.
//
-// Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or
-// an SM2 key pair (China Regions only). The private key in an asymmetric KMS key
-// never leaves KMS unencrypted. However, you can use the GetPublicKeyoperation to download
-// the public key so it can be used outside of KMS. Each KMS key can have only one
-// key usage. KMS keys with RSA key pairs can be used to encrypt and decrypt data
-// or sign and verify messages (but not both). KMS keys with NIST-recommended ECC
-// key pairs can be used to sign and verify messages or derive shared secrets (but
-// not both). KMS keys with ECC_SECG_P256K1 can be used only to sign and verify
-// messages. KMS keys with SM2 key pairs (China Regions only) can be used to either
-// encrypt and decrypt data, sign and verify messages, or derive shared secrets
-// (you must choose one key usage type). For information about asymmetric KMS keys,
-// see [Asymmetric KMS keys]in the Key Management Service Developer Guide.
+// Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair,
+// ML-DSA key pair or an SM2 key pair (China Regions only). The private key in an
+// asymmetric KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey
+// operation to download the public key so it can be used outside of KMS. Each KMS
+// key can have only one key usage. KMS keys with RSA key pairs can be used to
+// encrypt and decrypt data or sign and verify messages (but not both). KMS keys
+// with NIST-recommended ECC key pairs can be used to sign and verify messages or
+// derive shared secrets (but not both). KMS keys with ECC_SECG_P256K1 can be used
+// only to sign and verify messages. KMS keys with ML-DSA key pairs can be used to
+// sign and verify messages. KMS keys with SM2 key pairs (China Regions only) can
+// be used to either encrypt and decrypt data, sign and verify messages, or derive
+// shared secrets (you must choose one key usage type). For information about
+// asymmetric KMS keys, see [Asymmetric KMS keys]in the Key Management Service Developer Guide.
//
// HMAC KMS key To create an HMAC KMS key, set the KeySpec parameter to a key spec
// value for HMAC KMS keys. Then set the KeyUsage parameter to GENERATE_VERIFY_MAC
@@ -111,7 +111,7 @@ import (
// To create a multi-Region primary key with imported key material, use the Origin
// parameter of CreateKey with a value of EXTERNAL and the MultiRegion parameter
// with a value of True . To create replicas of the multi-Region primary key, use
-// the ReplicateKeyoperation. For instructions, see [Importing key material into multi-Region keys]. For more information about multi-Region
+// the ReplicateKeyoperation. For instructions, see [Importing key material step 1]. For more information about multi-Region
// keys, see [Multi-Region keys in KMS]in the Key Management Service Developer Guide.
//
// Custom key store A [custom key store] lets you protect your Amazon Web Services resources using
@@ -168,20 +168,19 @@ import (
// more information, see [KMS eventual consistency].
//
// [CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
-// [external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+// [external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keys.html
// [external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
// [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
-// [Managing keys]: https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html
+// [Importing key material step 1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html
// [KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys
-// [Allow a user to create KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Allow a user to create KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/customer-managed-policies.html#iam-policy-example-create-key
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
+// [CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/create-cmk-keystore.html
// [kms:CreateKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [Importing key material into multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html
// [Importing Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) CreateKey(ctx context.Context, params *CreateKeyInput, optFns ...func(*Options)) (*CreateKeyOutput, error) {
if params == nil {
params = &CreateKeyInput{}
@@ -227,7 +226,7 @@ type CreateKeyInput struct {
// store, you must use the XksKeyId parameter to specify an external key that
// serves as key material for the KMS key.
//
- // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
CustomKeyStoreId *string
// Instead, use the KeySpec parameter.
@@ -253,14 +252,14 @@ type CreateKeyInput struct {
// Specifies the type of KMS key to create. The default value, SYMMETRIC_DEFAULT ,
// creates a KMS key with a 256-bit AES-GCM key that is used for encryption and
// decryption, except in China Regions, where it creates a 128-bit symmetric key
- // that uses SM4 encryption. For help choosing a key spec for your KMS key, see [Choosing a KMS key type]in
- // the Key Management Service Developer Guide .
+ // that uses SM4 encryption. For a detailed description of all supported key specs,
+ // see [Key spec reference]in the Key Management Service Developer Guide .
//
// The KeySpec determines whether the KMS key contains a symmetric key or an
// asymmetric key pair. It also determines the algorithms that the KMS key
// supports. You can't change the KeySpec after the KMS key is created. To further
// restrict the algorithms that can be used with the KMS key, use a condition key
- // in its key policy or IAM policy. For more information, see [kms:EncryptionAlgorithm], [kms:MacAlgorithm] or [kms:Signing Algorithm] in the Key
+ // in its key policy or IAM policy. For more information, see [kms:EncryptionAlgorithm], [kms:MacAlgorithm], [kms:KeyAgreementAlgorithm], or [kms:SigningAlgorithm] in the Key
// Management Service Developer Guide .
//
// [Amazon Web Services services that are integrated with KMS]use symmetric encryption KMS keys to protect your data. These services do not
@@ -304,15 +303,24 @@ type CreateKeyInput struct {
//
// - ECC_SECG_P256K1 (secp256k1), commonly used for cryptocurrencies.
//
+ // - Asymmetric ML-DSA key pairs (signing and verification)
+ //
+ // - ML_DSA_44
+ //
+ // - ML_DSA_65
+ //
+ // - ML_DSA_87
+ //
// - SM2 key pairs (encryption and decryption -or- signing and verification -or-
// deriving shared secrets)
//
// - SM2 (China Regions only)
//
- // [kms:EncryptionAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm
- // [kms:Signing Algorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm
- // [kms:MacAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-mac-algorithm
- // [Choosing a KMS key type]: https://docs.aws.amazon.com/kms/latest/developerguide/key-types.html#symm-asymm-choose
+ // [Key spec reference]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose-key-spec.html
+ // [kms:EncryptionAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-encryption-algorithm
+ // [kms:SigningAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-signing-algorithm
+ // [kms:MacAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-mac-algorithm
+ // [kms:KeyAgreementAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-key-agreement-algorithm
// [Amazon Web Services services that are integrated with KMS]: http://aws.amazon.com/kms/features/#AWS_Service_Integration
KeySpec types.KeySpec
@@ -334,12 +342,14 @@ type CreateKeyInput struct {
// - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs,
// specify SIGN_VERIFY or KEY_AGREEMENT .
//
- // - For asymmetric KMS keys with ECC_SECG_P256K1 key pairs specify SIGN_VERIFY .
+ // - For asymmetric KMS keys with ECC_SECG_P256K1 key pairs, specify SIGN_VERIFY .
+ //
+ // - For asymmetric KMS keys with ML-DSA key pairs, specify SIGN_VERIFY .
//
// - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
// ENCRYPT_DECRYPT , SIGN_VERIFY , or KEY_AGREEMENT .
//
- // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
KeyUsage types.KeyUsageType
// Creates a multi-Region primary key that you can replicate into other Amazon Web
@@ -407,17 +417,28 @@ type CreateKeyInput struct {
// be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible]in the Amazon Web
// Services Identity and Access Management User Guide.
//
+ // If either of the required Resource or Action elements are missing from a key
+ // policy statement, the policy statement has no effect. When a key policy
+ // statement is missing one of these elements, the KMS console correctly reports an
+ // error, but the CreateKey and PutKeyPolicy API requests succeed, even though the
+ // policy statement is ineffective.
+ //
+ // For more information on required key policy elements, see [Elements in a key policy] in the Key
+ // Management Service Developer Guide.
+ //
// If you do not provide a key policy, KMS attaches a default key policy to the
// KMS key. For more information, see [Default key policy]in the Key Management Service Developer
// Guide.
//
- // The key policy size quota is 32 kilobytes (32768 bytes).
+ // If the key policy exceeds the length constraint, KMS returns a
+ // LimitExceededException .
//
// For help writing and formatting a JSON policy document, see the [IAM JSON Policy Reference] in the
// Identity and Access Management User Guide .
//
+ // [Elements in a key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-overview.html#key-policy-elements
// [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
- // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html
// [Changes that I make are not always immediately visible]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
Policy *string
@@ -440,11 +461,11 @@ type CreateKeyInput struct {
//
// When you add tags to an Amazon Web Services resource, Amazon Web Services
// generates a cost allocation report with usage and costs aggregated by tags. Tags
- // can also be used to control access to a KMS key. For details, see [Tagging Keys].
+ // can also be used to control access to a KMS key. For details, see [Tags in KMS].
//
// [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
- // [Tagging Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+ // [Tags in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
Tags []types.Tag
// Identifies the [external key] that serves as key material for the KMS key in an [external key store]. Specify the
@@ -472,7 +493,7 @@ type CreateKeyInput struct {
// [external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
// [Double encryption]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-double-encryption
// [external key]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
- // [Requirements for a KMS key in an external key store]: https://docs.aws.amazon.com/create-xks-keys.html#xks-key-requirements
+ // [Requirements for a KMS key in an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keys.html#xks-key-requirements
// [external key store proxy]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-xks-proxy
XksKeyId *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go
index f0ed6b253d..27e045ae96 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go
@@ -46,13 +46,13 @@ import (
// operation fails. This practice ensures that you use the KMS key that you intend.
//
// Whenever possible, use key policies to give users permission to call the Decrypt
-// operation on a particular KMS key, instead of using &IAM; policies. Otherwise,
-// you might create an &IAM; policy that gives the user Decrypt permission on all
-// KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys in
-// other accounts if the key policy for the cross-account KMS key permits it. If
-// you must use an IAM policy for Decrypt permissions, limit the user to
-// particular KMS keys or particular trusted accounts. For details, see [Best practices for IAM policies]in the Key
-// Management Service Developer Guide.
+// operation on a particular KMS key, instead of using IAM policies. Otherwise, you
+// might create an IAM policy that gives the user Decrypt permission on all KMS
+// keys. This user could decrypt ciphertext that was encrypted by KMS keys in other
+// accounts if the key policy for the cross-account KMS key permits it. If you must
+// use an IAM policy for Decrypt permissions, limit the user to particular KMS
+// keys or particular trusted accounts. For details, see [Best practices for IAM policies]in the Key Management
+// Service Developer Guide.
//
// Decrypt also supports [Amazon Web Services Nitro Enclaves], which provide an isolated compute environment in Amazon
// EC2. To call Decrypt for a Nitro enclave, use the [Amazon Web Services Nitro Enclaves SDK] or any Amazon Web Services
@@ -93,7 +93,7 @@ import (
// [Amazon S3 client-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
// [Best practices for IAM policies]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices
// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
func (c *Client) Decrypt(ctx context.Context, params *DecryptInput, optFns ...func(*Options)) (*DecryptOutput, error) {
if params == nil {
@@ -119,10 +119,10 @@ type DecryptInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Specifies the encryption algorithm that will be used to decrypt the ciphertext.
@@ -149,8 +149,8 @@ type DecryptInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
EncryptionContext map[string]string
// A list of grant tokens.
@@ -160,7 +160,7 @@ type DecryptInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// Specifies the KMS key that KMS uses to decrypt the ciphertext.
@@ -240,6 +240,11 @@ type DecryptOutput struct {
// [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
KeyId *string
+ // The identifier of the key material used to decrypt the ciphertext. This field
+ // is present only when the operation uses a symmetric encryption KMS key. This
+ // field is omitted if the request includes the Recipient parameter.
+ KeyMaterialId *string
+
// Decrypted plaintext data. When you use the HTTP API or the Amazon Web Services
// CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go
index 434fff3d28..e377f5cb2a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go
@@ -50,7 +50,7 @@ import (
//
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
// [kms:DeleteAlias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
func (c *Client) DeleteAlias(ctx context.Context, params *DeleteAliasInput, optFns ...func(*Options)) (*DeleteAliasOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go
index 49cc8a16ab..9a38c3ef47 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go
@@ -16,9 +16,9 @@ import (
// key store, it does not affect the external key store proxy, external key
// manager, or any external keys.
//
-// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
-// and extensive integration of KMS with the isolation and control of a key store
-// that you own and manage.
+// This operation is part of the custom key stores feature in KMS, which combines
+// the convenience and extensive integration of KMS with the isolation and control
+// of a key store that you own and manage.
//
// The custom key store that you delete cannot contain any [KMS keys]. Before deleting the
// key store, verify that you will never need to use any of the KMS keys in the key
@@ -63,12 +63,11 @@ import (
// more information, see [KMS eventual consistency].
//
// [delete the orphaned key material]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
-// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
// [kms:DeleteCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
// [KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) DeleteCustomKeyStore(ctx context.Context, params *DeleteCustomKeyStoreInput, optFns ...func(*Options)) (*DeleteCustomKeyStoreOutput, error) {
if params == nil {
params = &DeleteCustomKeyStoreInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go
index 5b85126521..c87556a9da 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go
@@ -31,6 +31,8 @@ import (
//
// # GetParametersForImport
//
+// # ListKeyRotations
+//
// # ImportKeyMaterial
//
// Eventual consistency: The KMS API follows an eventual consistency model. For
@@ -39,7 +41,7 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [kms:DeleteImportedKeyMaterial]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Importing Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) DeleteImportedKeyMaterial(ctx context.Context, params *DeleteImportedKeyMaterialInput, optFns ...func(*Options)) (*DeleteImportedKeyMaterialOutput, error) {
if params == nil {
params = &DeleteImportedKeyMaterialInput{}
@@ -74,10 +76,27 @@ type DeleteImportedKeyMaterialInput struct {
// This member is required.
KeyId *string
+ // Identifies the imported key material you are deleting.
+ //
+ // If no KeyMaterialId is specified, KMS deletes the current key material.
+ //
+ // To get the list of key material IDs associated with a KMS key, use ListKeyRotations.
+ KeyMaterialId *string
+
noSmithyDocumentSerde
}
type DeleteImportedKeyMaterialOutput struct {
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key from which the key material was
+ // deleted.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // Identifies the deleted key material.
+ KeyMaterialId *string
+
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go
index 578c2c9ceb..952d7ed393 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go
@@ -91,7 +91,7 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [kms:DeriveSharedSecret]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [NIST recommendations for key derivation]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf
func (c *Client) DeriveSharedSecret(ctx context.Context, params *DeriveSharedSecretInput, optFns ...func(*Options)) (*DeriveSharedSecretOutput, error) {
if params == nil {
@@ -166,10 +166,10 @@ type DeriveSharedSecretInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -179,7 +179,7 @@ type DeriveSharedSecretInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go
index 78ec89e964..6e9f9cc1df 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go
@@ -13,9 +13,9 @@ import (
// Gets information about [custom key stores] in the account and Region.
//
-// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
-// and extensive integration of KMS with the isolation and control of a key store
-// that you own and manage.
+// This operation is part of the custom key stores feature in KMS, which combines
+// the convenience and extensive integration of KMS with the isolation and control
+// of a key store that you own and manage.
//
// By default, this operation returns information about all custom key stores in
// the account and Region. To get only information about a particular custom key
@@ -62,10 +62,10 @@ import (
// more information, see [KMS eventual consistency].
//
// [kms:DescribeCustomKeyStores]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
// [Troubleshooting CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
// [Troubleshooting external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) DescribeCustomKeyStores(ctx context.Context, params *DescribeCustomKeyStoresInput, optFns ...func(*Options)) (*DescribeCustomKeyStoresOutput, error) {
if params == nil {
params = &DescribeCustomKeyStoresInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go
index 1695eea257..e86fcc4ed6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go
@@ -32,7 +32,7 @@ import (
//
// - Whether automatic key rotation is enabled on the KMS key. To get this
// information, use GetKeyRotationStatus. Also, some key states prevent a KMS key from being
-// automatically rotated. For details, see [How Automatic Key Rotation Works]in the Key Management Service
+// automatically rotated. For details, see [How key rotation works]in the Key Management Service
// Developer Guide.
//
// - Tags on the KMS key. To get this information, use ListResourceTags.
@@ -71,12 +71,12 @@ import (
//
// [CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
// [external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+// [How key rotation works]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works
// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
// [kms:DescribeKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [How Automatic Key Rotation Works]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works
// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
// [Amazon Web Services managed keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
func (c *Client) DescribeKey(ctx context.Context, params *DescribeKeyInput, optFns ...func(*Options)) (*DescribeKeyOutput, error) {
if params == nil {
@@ -131,7 +131,7 @@ type DescribeKeyInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go
index c20b99ffd7..d0be2426ff 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go
@@ -13,11 +13,9 @@ import (
// Sets the state of a KMS key to disabled. This change temporarily prevents use
// of the KMS key for [cryptographic operations].
//
-// For more information about how key state affects the use of a KMS key, see [Key states of KMS keys] in
-// the Key Management Service Developer Guide .
-//
// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+// For more information about how key state affects the use of a KMS key, see [Key states of KMS keys]in
+// the Key Management Service Developer Guide .
//
// Cross-account use: No. You cannot perform this operation on a KMS key in a
// different Amazon Web Services account.
@@ -30,9 +28,9 @@ import (
// more information, see [KMS eventual consistency].
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
// [kms:DisableKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) DisableKey(ctx context.Context, params *DisableKeyInput, optFns ...func(*Options)) (*DisableKeyOutput, error) {
if params == nil {
params = &DisableKeyInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go
index 00fda1fab6..051a923f43 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go
@@ -49,14 +49,14 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
-// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-enable-disable.html
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
// [customer managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
// [kms:DisableKeyRotation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) DisableKeyRotation(ctx context.Context, params *DisableKeyRotationInput, optFns ...func(*Options)) (*DisableKeyRotationOutput, error) {
if params == nil {
params = &DisableKeyRotationInput{}
@@ -91,7 +91,7 @@ type DisableKeyRotationInput struct {
// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks
- // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
//
// This member is required.
KeyId *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go
index b1b0035ce8..6180c2f456 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go
@@ -15,9 +15,9 @@ import (
// external key store from the external key store proxy that communicates with your
// external key manager.
//
-// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
-// and extensive integration of KMS with the isolation and control of a key store
-// that you own and manage.
+// This operation is part of the custom key stores feature in KMS, which combines
+// the convenience and extensive integration of KMS with the isolation and control
+// of a key store that you own and manage.
//
// While a custom key store is disconnected, you can manage the custom key store
// and its KMS keys, but you cannot create or use its KMS keys. You can reconnect
@@ -53,11 +53,10 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
-// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
// [kms:DisconnectCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) DisconnectCustomKeyStore(ctx context.Context, params *DisconnectCustomKeyStoreInput, optFns ...func(*Options)) (*DisconnectCustomKeyStoreOutput, error) {
if params == nil {
params = &DisconnectCustomKeyStoreInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go
index 3b61f6b88c..52d28ad919 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go
@@ -28,8 +28,8 @@ import (
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [kms:EnableKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) EnableKey(ctx context.Context, params *EnableKeyInput, optFns ...func(*Options)) (*EnableKeyOutput, error) {
if params == nil {
params = &EnableKeyInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go
index 9a10a7e3b4..15705fa285 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go
@@ -25,9 +25,10 @@ import (
// in progress rotations. You can use the ListKeyRotationsoperation to view the details of
// completed rotations.
//
-// Automatic key rotation is supported only on [symmetric encryption KMS keys]. You cannot enable automatic
-// rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To enable or disable
-// automatic rotation of a set of related [multi-Region keys], set the property on the primary key.
+// Automatic key rotation is supported only on symmetric encryption KMS keys. You
+// cannot enable automatic rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To
+// enable or disable automatic rotation of a set of related [multi-Region keys], set the property on
+// the primary key.
//
// You cannot enable or disable automatic rotation of [Amazon Web Services managed KMS keys]. KMS always rotates the key
// material of Amazon Web Services managed keys every year. Rotation of [Amazon Web Services owned KMS keys]is managed
@@ -69,18 +70,17 @@ import (
// more information, see [KMS eventual consistency].
//
// [kms:EnableKeyRotation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
-// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
// [customer managed KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
-// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
+// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-enable-disable.html
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
-// [symmetric encryption KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) EnableKeyRotation(ctx context.Context, params *EnableKeyRotationInput, optFns ...func(*Options)) (*EnableKeyRotationOutput, error) {
if params == nil {
params = &EnableKeyRotationInput{}
@@ -116,8 +116,8 @@ type EnableKeyRotationInput struct {
// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
- // [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
- // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ // [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#multi-region-rotate
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
//
// This member is required.
KeyId *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go
index 421d3445f7..43be16d900 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go
@@ -89,9 +89,9 @@ import (
// more information, see [KMS eventual consistency].
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
// [kms:Encrypt]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) Encrypt(ctx context.Context, params *EncryptInput, optFns ...func(*Options)) (*EncryptOutput, error) {
if params == nil {
params = &EncryptInput{}
@@ -141,10 +141,10 @@ type EncryptInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Specifies the encryption algorithm that KMS will use to encrypt the plaintext
@@ -175,8 +175,8 @@ type EncryptInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
EncryptionContext map[string]string
// A list of grant tokens.
@@ -186,7 +186,7 @@ type EncryptInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go
index 5475f22dab..a7b6562b67 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go
@@ -103,12 +103,12 @@ import (
// [Amazon Web Services Encryption SDK]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
// [Amazon DynamoDB Encryption Client]: https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
// [Amazon S3 client-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
// [kms:GenerateDataKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
func (c *Client) GenerateDataKey(ctx context.Context, params *GenerateDataKeyInput, optFns ...func(*Options)) (*GenerateDataKeyOutput, error) {
if params == nil {
@@ -154,10 +154,10 @@ type GenerateDataKeyInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Specifies the encryption context that will be used when encrypting the data key.
@@ -175,7 +175,7 @@ type GenerateDataKeyInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
EncryptionContext map[string]string
// A list of grant tokens.
@@ -185,7 +185,7 @@ type GenerateDataKeyInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// Specifies the length of the data key. Use AES_128 to generate a 128-bit
@@ -253,6 +253,10 @@ type GenerateDataKeyOutput struct {
// [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
KeyId *string
+ // The identifier of the key material used to encrypt the data key. This field is
+ // omitted if the request includes the Recipient parameter.
+ KeyMaterialId *string
+
// The plaintext data key. When you use the HTTP API or the Amazon Web Services
// CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use this
// data key to encrypt your data outside of KMS. Then, remove it from memory as
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go
index 109eb02258..9a977048e3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go
@@ -94,12 +94,12 @@ import (
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [RFC 5280]: https://tools.ietf.org/html/rfc5280
-// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
// [RFC 5958]: https://tools.ietf.org/html/rfc5958
// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
// [kms:GenerateDataKeyPair]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
func (c *Client) GenerateDataKeyPair(ctx context.Context, params *GenerateDataKeyPairInput, optFns ...func(*Options)) (*GenerateDataKeyPairOutput, error) {
if params == nil {
@@ -146,20 +146,21 @@ type GenerateDataKeyPairInput struct {
// Determines the type of data key pair that is generated.
//
// The KMS rule that restricts the use of asymmetric RSA and SM2 KMS keys to
- // encrypt and decrypt or to sign and verify (but not both), and the rule that
- // permits you to use ECC KMS keys only to sign and verify, are not effective on
- // data key pairs, which are used outside of KMS. The SM2 key spec is only
- // available in China Regions.
+ // encrypt and decrypt or to sign and verify (but not both), the rule that permits
+ // you to use ECC KMS keys only to sign and verify, and the rule that permits you
+ // to use ML-DSA key pairs to sign and verify only are not effective on data key
+ // pairs, which are used outside of KMS. The SM2 key spec is only available in
+ // China Regions.
//
// This member is required.
KeyPairSpec types.DataKeyPairSpec
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Specifies the encryption context that will be used when encrypting the private
@@ -178,7 +179,7 @@ type GenerateDataKeyPairInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
EncryptionContext map[string]string
// A list of grant tokens.
@@ -188,7 +189,7 @@ type GenerateDataKeyPairInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
@@ -240,6 +241,9 @@ type GenerateDataKeyPairOutput struct {
// [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
KeyId *string
+ // The identifier of the key material used to encrypt the private key.
+ KeyMaterialId *string
+
// The type of data key pair that was generated.
KeyPairSpec types.DataKeyPairSpec
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go
index ec29b538cc..d56ed2123d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go
@@ -72,9 +72,9 @@ import (
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [RFC 5280]: https://tools.ietf.org/html/rfc5280
-// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
// [kms:GenerateDataKeyPairWithoutPlaintext]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) GenerateDataKeyPairWithoutPlaintext(ctx context.Context, params *GenerateDataKeyPairWithoutPlaintextInput, optFns ...func(*Options)) (*GenerateDataKeyPairWithoutPlaintextOutput, error) {
if params == nil {
params = &GenerateDataKeyPairWithoutPlaintextInput{}
@@ -120,20 +120,21 @@ type GenerateDataKeyPairWithoutPlaintextInput struct {
// Determines the type of data key pair that is generated.
//
// The KMS rule that restricts the use of asymmetric RSA and SM2 KMS keys to
- // encrypt and decrypt or to sign and verify (but not both), and the rule that
- // permits you to use ECC KMS keys only to sign and verify, are not effective on
- // data key pairs, which are used outside of KMS. The SM2 key spec is only
- // available in China Regions.
+ // encrypt and decrypt or to sign and verify (but not both), the rule that permits
+ // you to use ECC KMS keys only to sign and verify, and the rule that permits you
+ // to use ML-DSA key pairs to sign and verify only are not effective on data key
+ // pairs, which are used outside of KMS. The SM2 key spec is only available in
+ // China Regions.
//
// This member is required.
KeyPairSpec types.DataKeyPairSpec
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Specifies the encryption context that will be used when encrypting the private
@@ -152,7 +153,7 @@ type GenerateDataKeyPairWithoutPlaintextInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
EncryptionContext map[string]string
// A list of grant tokens.
@@ -162,7 +163,7 @@ type GenerateDataKeyPairWithoutPlaintextInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
noSmithyDocumentSerde
@@ -175,6 +176,9 @@ type GenerateDataKeyPairWithoutPlaintextOutput struct {
// [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
KeyId *string
+ // The identifier of the key material used to encrypt the private key.
+ KeyMaterialId *string
+
// The type of data key pair that was generated.
KeyPairSpec types.DataKeyPairSpec
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go
index fc5e5a8b34..914f2b0e66 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go
@@ -82,9 +82,9 @@ import (
// more information, see [KMS eventual consistency].
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
// [kms:GenerateDataKeyWithoutPlaintext]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) GenerateDataKeyWithoutPlaintext(ctx context.Context, params *GenerateDataKeyWithoutPlaintextInput, optFns ...func(*Options)) (*GenerateDataKeyWithoutPlaintextOutput, error) {
if params == nil {
params = &GenerateDataKeyWithoutPlaintextInput{}
@@ -129,10 +129,10 @@ type GenerateDataKeyWithoutPlaintextInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Specifies the encryption context that will be used when encrypting the data key.
@@ -150,7 +150,7 @@ type GenerateDataKeyWithoutPlaintextInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
EncryptionContext map[string]string
// A list of grant tokens.
@@ -160,7 +160,7 @@ type GenerateDataKeyWithoutPlaintextInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// The length of the data key. Use AES_128 to generate a 128-bit symmetric key, or
@@ -187,6 +187,9 @@ type GenerateDataKeyWithoutPlaintextOutput struct {
// [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
KeyId *string
+ // The identifier of the key material used to encrypt the data key.
+ KeyMaterialId *string
+
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go
index 8253e75f68..fce1275cc3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go
@@ -47,7 +47,7 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [kms:GenerateMac]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [HMAC keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
func (c *Client) GenerateMac(ctx context.Context, params *GenerateMacInput, optFns ...func(*Options)) (*GenerateMacOutput, error) {
if params == nil {
@@ -97,10 +97,10 @@ type GenerateMacInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -110,7 +110,7 @@ type GenerateMacInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go
index 63e933451d..6e9aa4192f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go
@@ -29,7 +29,8 @@ import (
// Amazon Web Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer
// Guide.
//
-// For more information about entropy and random number generation, see [Key Management Service Cryptographic Details].
+// For more information about entropy and random number generation, see [Entropy and random number generation] in the
+// Key Management Service Developer Guide.
//
// Cross-account use: Not applicable. GenerateRandom does not use any
// account-specific resources, such as KMS keys.
@@ -41,10 +42,10 @@ import (
//
// [kms:GenerateRandom]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
-// [Key Management Service Cryptographic Details]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+// [Entropy and random number generation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#entropy-and-random-numbers
func (c *Client) GenerateRandom(ctx context.Context, params *GenerateRandomInput, optFns ...func(*Options)) (*GenerateRandomOutput, error) {
if params == nil {
params = &GenerateRandomInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go
index bb91505acb..c91dc43430 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go
@@ -24,7 +24,7 @@ import (
//
// [kms:GetKeyPolicy]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) GetKeyPolicy(ctx context.Context, params *GetKeyPolicyInput, optFns ...func(*Options)) (*GetKeyPolicyOutput, error) {
if params == nil {
params = &GetKeyPolicyInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go
index 7f6684bc6d..032f8d4a98 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go
@@ -15,9 +15,10 @@ import (
// including whether [automatic rotation of the key material]is enabled for the specified KMS key, the [rotation period], and the next
// scheduled rotation date.
//
-// Automatic key rotation is supported only on [symmetric encryption KMS keys]. You cannot enable automatic
-// rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To enable or disable
-// automatic rotation of a set of related [multi-Region keys], set the property on the primary key..
+// Automatic key rotation is supported only on symmetric encryption KMS keys. You
+// cannot enable automatic rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To
+// enable or disable automatic rotation of a set of related [multi-Region keys], set the property on
+// the primary key.
//
// You can enable (EnableKeyRotation ) and disable automatic rotation (DisableKeyRotation ) of the key material in
// customer managed KMS keys. Key material rotation of [Amazon Web Services managed KMS keys]is not configurable. KMS
@@ -74,12 +75,11 @@ import (
// [rotation period]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotation-period
// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
// [kms:GetKeyRotationStatus]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-enable-disable.html
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
-// [symmetric encryption KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
-// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) GetKeyRotationStatus(ctx context.Context, params *GetKeyRotationStatusInput, optFns ...func(*Options)) (*GetKeyRotationStatusOutput, error) {
if params == nil {
params = &GetKeyRotationStatusInput{}
@@ -131,12 +131,11 @@ type GetKeyRotationStatusOutput struct {
// Identifies the date and time that an in progress on-demand rotation was
// initiated.
//
- // The KMS API follows an [eventual consistency] model due to the distributed nature of the system. As a
- // result, there might be a slight delay between initiating on-demand key rotation
- // and the rotation's completion. Once the on-demand rotation is complete, use ListKeyRotationsto
- // view the details of the on-demand rotation.
- //
- // [eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+ // KMS uses a background process to perform rotations. As a result, there might be
+ // a slight delay between initiating on-demand key rotation and the rotation's
+ // completion. Once the on-demand rotation is complete, KMS removes this field from
+ // the response. You can use ListKeyRotationsto view the details of the completed on-demand
+ // rotation.
OnDemandRotationStartDate *time.Time
// The number of days between each automatic rotation. The default value is 365
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go
index 53d4dab403..411f555769 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go
@@ -17,8 +17,7 @@ import (
//
// By default, KMS keys are created with key material that KMS generates. This
// operation supports [Importing key material], an advanced feature that lets you generate and import the
-// cryptographic key material for a KMS key. For more information about importing
-// key material into KMS, see [Importing key material]in the Key Management Service Developer Guide.
+// cryptographic key material for a KMS key.
//
// Before calling GetParametersForImport , use the CreateKey operation with an Origin value
// of EXTERNAL to create a KMS key with no key material. You can import key
@@ -80,10 +79,10 @@ import (
// [Importing key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [kms:GetParametersForImport]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [reimport the original key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [reimport the original key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#reimport-key-material
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [multi-Region key]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) GetParametersForImport(ctx context.Context, params *GetParametersForImportInput, optFns ...func(*Options)) (*GetParametersForImportOutput, error) {
if params == nil {
params = &GetParametersForImportInput{}
@@ -122,7 +121,7 @@ type GetParametersForImportInput struct {
KeyId *string
// The algorithm you will use with the RSA public key ( PublicKey ) in the response
- // to protect your key material during import. For more information, see Select a wrapping algorithmin the
+ // to protect your key material during import. For more information, see [Select a wrapping algorithm]in the
// Key Management Service Developer Guide.
//
// For RSA_AES wrapping algorithms, you encrypt your key material with an AES key
@@ -153,6 +152,8 @@ type GetParametersForImportInput struct {
// - RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not
// support the RSAES_PKCS1_V1_5 wrapping algorithm.
//
+ // [Select a wrapping algorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm
+ //
// This member is required.
WrappingAlgorithm types.AlgorithmSpec
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go
index 673de8891b..faeb8c05b2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go
@@ -37,8 +37,8 @@ import (
// secret.
//
// [EncryptionAlgorithms]
-// - or [SigningAlgorithms]: A list of the encryption algorithms or the signing algorithms for the
-// key.
+// - , [KeyAgreementAlgorithms], or [SigningAlgorithms]: A list of the encryption algorithms, key agreement algorithms, or
+// signing algorithms for the key.
//
// Although KMS cannot enforce these restrictions on external operations, it is
// crucial that you use this information to prevent the public key from being used
@@ -70,10 +70,11 @@ import (
// [kms:GetPublicKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [EncryptionAlgorithms]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [KeyAgreementAlgorithms]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyAgreementAlgorithms
// [KeySpec]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec
-// [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+// [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
// [KeyUsage]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) GetPublicKey(ctx context.Context, params *GetPublicKeyInput, optFns ...func(*Options)) (*GetPublicKeyOutput, error) {
if params == nil {
params = &GetPublicKeyInput{}
@@ -121,7 +122,7 @@ type GetPublicKeyInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go
index f5b2bed826..571afbbaa7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go
@@ -13,44 +13,42 @@ import (
)
// Imports or reimports key material into an existing KMS key that was created
-// without key material. ImportKeyMaterial also sets the expiration model and
-// expiration date of the imported key material.
+// without key material. You can also use this operation to set or update the
+// expiration model and expiration date of the imported key material.
//
-// By default, KMS keys are created with key material that KMS generates. This
-// operation supports [Importing key material], an advanced feature that lets you generate and import the
-// cryptographic key material for a KMS key. For more information about importing
-// key material into KMS, see [Importing key material]in the Key Management Service Developer Guide.
+// By default, KMS creates KMS keys with key material that it generates. You can
+// also generate and import your own key material. For more information about
+// importing key material, see [Importing key material].
//
-// After you successfully import key material into a KMS key, you can [reimport the same key material] into that
-// KMS key, but you cannot import different key material. You might reimport key
-// material to replace key material that expired or key material that you deleted.
-// You might also reimport key material to change the expiration model or
-// expiration date of the key material.
+// For asymmetric, HMAC and multi-Region keys, you cannot change the key material
+// after the initial import. You can import multiple key materials into
+// single-Region, symmetric encryption keys and rotate the key material on demand
+// using RotateKeyOnDemand .
+//
+// After you import key material, you can [reimport the same key material] into that KMS key or, if the key
+// supports on-demand rotation, import new key material. You can use the ImportType
+// parameter to indicate whether you are importing new key material or re-importing
+// previously imported key material. You might reimport key material to replace key
+// material that expired or key material that you deleted. You might also reimport
+// key material to change the expiration model or expiration date of the key
+// material.
//
// Each time you import key material into KMS, you can determine whether (
// ExpirationModel ) and when ( ValidTo ) the key material expires. To change the
// expiration of your key material, you must import it again, either by calling
-// ImportKeyMaterial or using the import features of the KMS console.
+// ImportKeyMaterial or using the [import features] of the KMS console.
//
-// Before calling ImportKeyMaterial :
+// Before you call ImportKeyMaterial , complete these steps:
//
-// - Create or identify a KMS key with no key material. The KMS key must have an
-// Origin value of EXTERNAL , which indicates that the KMS key is designed for
-// imported key material.
+// - Create or identify a KMS key with EXTERNAL origin, which indicates that the
+// KMS key is designed for imported key material.
//
-// To create an new KMS key for imported key material, call the CreateKeyoperation with an
+// To create a new KMS key for imported key material, call the CreateKeyoperation with an
//
// Origin value of EXTERNAL . You can create a symmetric encryption KMS key, HMAC
-// KMS key, asymmetric encryption KMS key, or asymmetric signing KMS key. You can
-// also import key material into a multi-Region keyof any supported type. However, you can't
-// import key material into a KMS key in a custom key store.
-//
-// - Use the DescribeKeyoperation to verify that the KeyState of the KMS key is
-// PendingImport , which indicates that the KMS key has no key material.
-//
-// If you are reimporting the same key material into an existing KMS key, you
-//
-// might need to call the DeleteImportedKeyMaterialto delete its existing key material.
+// KMS key, asymmetric encryption KMS key, asymmetric key agreement key, or
+// asymmetric signing KMS key. You can also import key material into a [multi-Region key]of any
+// supported type. However, you can't import key material into a KMS key in a [custom key store].
//
// - Call the GetParametersForImportoperation to get a public key and import token set for importing
// key material.
@@ -63,7 +61,7 @@ import (
//
// - The key ID or key ARN of the KMS key to associate with the imported key
// material. Its Origin must be EXTERNAL and its KeyState must be PendingImport .
-// You cannot perform this operation on a KMS key in a custom key store, or on a KMS key in a
+// You cannot perform this operation on a KMS key in a [custom key store], or on a KMS key in a
// different Amazon Web Services account. To get the Origin and KeyState of a KMS
// key, call DescribeKey.
//
@@ -86,12 +84,15 @@ import (
//
// When this operation is successful, the key state of the KMS key changes from
// PendingImport to Enabled , and you can use the KMS key in cryptographic
-// operations.
+// operations. For single-Region, symmetric encryption keys, you will need to
+// import all of the key materials associated with the KMS key to change its state
+// to Enabled . Use the ListKeyRotations operation to list the ID and import state
+// of each key material associated with a KMS key.
//
// If this operation fails, use the exception to help determine the problem. If
// the error is related to the key material, the import token, or wrapping key, use
// GetParametersForImportto get a new public key and import token for the KMS key and repeat the import
-// procedure. For help, see [How To Import Key Material]in the Key Management Service Developer Guide.
+// procedure. For help, see [Create a KMS key with imported key material]in the Key Management Service Developer Guide.
//
// The KMS key that you use for this operation must be in a compatible key state.
// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
@@ -107,16 +108,24 @@ import (
//
// # GetParametersForImport
//
+// # ListKeyRotations
+//
+// # RotateKeyOnDemand
+//
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
// [Importing key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [How To Import Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview
// [kms:ImportKeyMaterial]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [reimport the same key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material
-// [Setting an expiration time]: https://docs.aws.amazon.com/en_us/kms/latest/developerguide/importing-keys.html#importing-keys-expiration
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [reimport the same key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#reimport-key-material
+// [import features]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#importing-keys-import-key-material-console
+// [Create a KMS key with imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-conceptual.html
+// [Setting an expiration time]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#importing-keys-expiration
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
+//
+// [multi-Region key]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
func (c *Client) ImportKeyMaterial(ctx context.Context, params *ImportKeyMaterialInput, optFns ...func(*Options)) (*ImportKeyMaterialOutput, error) {
if params == nil {
params = &ImportKeyMaterialInput{}
@@ -154,7 +163,7 @@ type ImportKeyMaterialInput struct {
// KeyState must be PendingImport .
//
// The KMS key can be a symmetric encryption KMS key, HMAC KMS key, asymmetric
- // encryption KMS key, or asymmetric signing KMS key, including a multi-Region keyof any supported
+ // encryption KMS key, or asymmetric signing KMS key, including a [multi-Region key]of any supported
// type. You cannot perform this operation on a KMS key in a custom key store, or
// on a KMS key in a different Amazon Web Services account.
//
@@ -169,6 +178,8 @@ type ImportKeyMaterialInput struct {
//
// To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
//
+ // [multi-Region key]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+ //
// This member is required.
KeyId *string
@@ -183,9 +194,38 @@ type ImportKeyMaterialInput struct {
// after the request completes. To change either value, you must reimport the key
// material.
//
- // [Setting an expiration time]: https://docs.aws.amazon.com/en_us/kms/latest/developerguide/importing-keys.html#importing-keys-expiration
+ // [Setting an expiration time]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#importing-keys-expiration
ExpirationModel types.ExpirationModelType
+ // Indicates whether the key material being imported is previously associated with
+ // this KMS key or not. This parameter is optional and only usable with symmetric
+ // encryption keys. The default is EXISTING_KEY_MATERIAL . If no key material has
+ // ever been imported into the KMS key, and this parameter is omitted, the
+ // parameter defaults to NEW_KEY_MATERIAL .
+ ImportType types.ImportType
+
+ // Description for the key material being imported. This parameter is optional and
+ // only usable with symmetric encryption keys. If you do not specify a key material
+ // description, KMS retains the value you specified when you last imported the same
+ // key material into this KMS key.
+ KeyMaterialDescription *string
+
+ // Identifies the key material being imported. This parameter is optional and only
+ // usable with symmetric encryption keys. You cannot specify a key material ID with
+ // ImportType set to NEW_KEY_MATERIAL . Whenever you import key material into a
+ // symmetric encryption key, KMS assigns a unique identifier to the key material
+ // based on the KMS key ID and the imported key material. When you re-import key
+ // material with a specified key material ID, KMS:
+ //
+ // - Computes the identifier for the key material
+ //
+ // - Matches the computed identifier against the specified key material ID
+ //
+ // - Verifies that the key material ID is already associated with the KMS key
+ //
+ // To get the list of key material IDs associated with a KMS key, use ListKeyRotations.
+ KeyMaterialId *string
+
// The date and time when the imported key material expires. This parameter is
// required when the value of the ExpirationModel parameter is KEY_MATERIAL_EXPIRES
// . Otherwise it is not valid.
@@ -206,6 +246,15 @@ type ImportKeyMaterialInput struct {
}
type ImportKeyMaterialOutput struct {
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key into which key material was imported.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // Identifies the imported key material.
+ KeyMaterialId *string
+
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go
index 0dd0f922f4..c48e558f16 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go
@@ -47,10 +47,10 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [KMS aliases quota]: https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit
+// [KMS aliases quota]: https://docs.aws.amazon.com/kms/latest/developerguide/resource-limits.html#aliases-per-key
// [kms:ListAliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/alias-access.html
func (c *Client) ListAliases(ctx context.Context, params *ListAliasesInput, optFns ...func(*Options)) (*ListAliasesOutput, error) {
if params == nil {
params = &ListAliasesInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go
index 086ae2a3aa..0cfe73532e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go
@@ -17,8 +17,8 @@ import (
// grant ID or grantee principal.
//
// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
-// Key Management Service Developer Guide . For examples of working with grants in
-// several programming languages, see [Programming grants].
+// Key Management Service Developer Guide . For examples of creating grants in
+// several programming languages, see [Use CreateGrant with an Amazon Web Services SDK or CLI].
//
// The GranteePrincipal field in the ListGrants response usually contains the user
// or role designated as the grantee principal in the grant. However, when the
@@ -45,11 +45,11 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
// [service principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
+// [Use CreateGrant with an Amazon Web Services SDK or CLI]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_CreateGrant_section.html
// [kms:ListGrants]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) ListGrants(ctx context.Context, params *ListGrantsInput, optFns ...func(*Options)) (*ListGrantsOutput, error) {
if params == nil {
params = &ListGrantsInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go
index 8de34587e7..ce74f3993e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go
@@ -30,7 +30,7 @@ import (
//
// [kms:ListKeyPolicies]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) ListKeyPolicies(ctx context.Context, params *ListKeyPoliciesInput, optFns ...func(*Options)) (*ListKeyPoliciesOutput, error) {
if params == nil {
params = &ListKeyPoliciesInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go
index 57f5af80be..19a7da63f3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go
@@ -11,13 +11,14 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Returns information about all completed key material rotations for the
-// specified KMS key.
+// Returns information about the key materials associated with the specified KMS
+// key. You can use the optional IncludeKeyMaterial parameter to control which key
+// materials are included in the response.
//
// You must specify the KMS key in all requests. You can refine the key rotations
// list by limiting the number of rotations returned.
//
-// For detailed information about automatic and on-demand key rotations, see [Rotating KMS keys] in
+// For detailed information about automatic and on-demand key rotations, see [Rotate KMS keys] in
// the Key Management Service Developer Guide.
//
// Cross-account use: No. You cannot perform this operation on a KMS key in a
@@ -29,18 +30,22 @@ import (
//
// # EnableKeyRotation
//
+// # DeleteImportedKeyMaterial
+//
// # DisableKeyRotation
//
// # GetKeyRotationStatus
//
+// # ImportKeyMaterial
+//
// # RotateKeyOnDemand
//
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [Rotating KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [Rotate KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
// [kms:ListKeyRotations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) ListKeyRotations(ctx context.Context, params *ListKeyRotationsInput, optFns ...func(*Options)) (*ListKeyRotationsOutput, error) {
if params == nil {
params = &ListKeyRotationsInput{}
@@ -74,6 +79,15 @@ type ListKeyRotationsInput struct {
// This member is required.
KeyId *string
+ // Use this optional parameter to control which key materials associated with this
+ // key are listed in the response. The default value of this parameter is
+ // ROTATIONS_ONLY . If you omit this parameter, KMS returns information on the key
+ // materials created by automatic or on-demand key rotation. When you specify a
+ // value of ALL_KEY_MATERIAL , KMS adds the first key material and any imported key
+ // material pending rotation to the response. This parameter can only be used with
+ // KMS keys that support automatic or on-demand key rotation.
+ IncludeKeyMaterial types.IncludeKeyMaterial
+
// Use this parameter to specify the maximum number of items to return. When this
// value is present, KMS does not return more than the specified number of items,
// but it might return fewer.
@@ -96,7 +110,9 @@ type ListKeyRotationsOutput struct {
// for the Marker parameter in a subsequent request.
NextMarker *string
- // A list of completed key material rotations.
+ // A list of completed key material rotations. When the optional input parameter
+ // IncludeKeyMaterial is specified with a value of ALL_KEY_MATERIAL , this list
+ // includes the first key material and any imported key material pending rotation.
Rotations []types.RotationsListEntry
// A flag that indicates whether there are more items in the list. When this value
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go
index 2133b6ccfc..9119d5ac0f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go
@@ -33,7 +33,7 @@ import (
// more information, see [KMS eventual consistency].
//
// [kms:ListKeys]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) ListKeys(ctx context.Context, params *ListKeysInput, optFns ...func(*Options)) (*ListKeysOutput, error) {
if params == nil {
params = &ListKeysInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go
index 5c77544bd0..fa54b4ebc4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go
@@ -15,7 +15,7 @@ import (
//
// For general information about tags, including the format and syntax, see [Tagging Amazon Web Services resources] in
// the Amazon Web Services General Reference. For information about using tags in
-// KMS, see [Tagging keys].
+// KMS, see [Tags in KMS].
//
// Cross-account use: No. You cannot perform this operation on a KMS key in a
// different Amazon Web Services account.
@@ -35,9 +35,9 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [Tagging keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
// [kms:ListResourceTags]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Tags in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
func (c *Client) ListResourceTags(ctx context.Context, params *ListResourceTagsInput, optFns ...func(*Options)) (*ListResourceTagsOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go
index a722cc3804..9244dbeaa0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go
@@ -20,8 +20,8 @@ import (
// determine which grants you may retire. To retire a grant, use the RetireGrantoperation.
//
// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
-// Key Management Service Developer Guide . For examples of working with grants in
-// several programming languages, see [Programming grants].
+// Key Management Service Developer Guide . For examples of creating grants in
+// several programming languages, see [Use CreateGrant with an Amazon Web Services SDK or CLI].
//
// Cross-account use: You must specify a principal in your Amazon Web Services
// account. This operation returns a list of grants where the retiring principal
@@ -52,10 +52,10 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
// [kms:ListRetirableGrants]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Use CreateGrant with an Amazon Web Services SDK or CLI]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_CreateGrant_section.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) ListRetirableGrants(ctx context.Context, params *ListRetirableGrantsInput, optFns ...func(*Options)) (*ListRetirableGrantsOutput, error) {
if params == nil {
params = &ListRetirableGrantsInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go
index e1be982d7c..3280fb324c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go
@@ -15,7 +15,7 @@ import (
// For more information about key policies, see [Key Policies] in the Key Management Service
// Developer Guide. For help writing and formatting a JSON policy document, see the
// [IAM JSON Policy Reference]in the Identity and Access Management User Guide . For examples of adding a key
-// policy in multiple programming languages, see [Setting a key policy]in the Key Management Service
+// policy in multiple programming languages, see [Use PutKeyPolicy with an Amazon Web Services SDK or CLI]in the Key Management Service
// Developer Guide.
//
// Cross-account use: No. You cannot perform this operation on a KMS key in a
@@ -30,9 +30,9 @@ import (
//
// [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
// [kms:PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [Setting a key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy
+// [Use PutKeyPolicy with an Amazon Web Services SDK or CLI]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_PutKeyPolicy_section.html
// [Key Policies]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) PutKeyPolicy(ctx context.Context, params *PutKeyPolicyInput, optFns ...func(*Options)) (*PutKeyPolicyOutput, error) {
if params == nil {
params = &PutKeyPolicyInput{}
@@ -83,6 +83,15 @@ type PutKeyPolicyInput struct {
// be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible]in the Amazon Web
// Services Identity and Access Management User Guide.
//
+ // If either of the required Resource or Action elements are missing from a key
+ // policy statement, the policy statement has no effect. When a key policy
+ // statement is missing one of these elements, the KMS console correctly reports an
+ // error, but the PutKeyPolicy API request succeeds, even though the policy
+ // statement is ineffective.
+ //
+ // For more information on required key policy elements, see [Elements in a key policy] in the Key
+ // Management Service Developer Guide.
+ //
// A key policy document can include only the following characters:
//
// - Printable ASCII characters from the space character ( \u0020 ) through the
@@ -94,11 +103,15 @@ type PutKeyPolicyInput struct {
// - The tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D )
// special characters
//
+ // If the key policy exceeds the length constraint, KMS returns a
+ // LimitExceededException .
+ //
// For information about key policies, see [Key policies in KMS] in the Key Management Service
// Developer Guide.For help writing and formatting a JSON policy document, see the [IAM JSON Policy Reference]
// in the Identity and Access Management User Guide .
//
// [Key policies in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
+ // [Elements in a key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-overview.html#key-policy-elements
// [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
// [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
// [Changes that I make are not always immediately visible]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go
index dabcddcf4e..96c271930a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go
@@ -99,14 +99,14 @@ import (
//
// [Amazon Web Services Encryption SDK]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [asymmetric KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
+// [asymmetric KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
// [key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
// [Amazon S3 client-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
// [kms:ReEncryptTo]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
-// [manually rotate]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-manually
+// [encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
+// [manually rotate]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys-manually.html
// [kms:ReEncryptFrom]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) ReEncrypt(ctx context.Context, params *ReEncryptInput, optFns ...func(*Options)) (*ReEncryptOutput, error) {
if params == nil {
params = &ReEncryptInput{}
@@ -182,15 +182,15 @@ type ReEncryptInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
DestinationEncryptionContext map[string]string
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -200,7 +200,7 @@ type ReEncryptInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// Specifies the encryption algorithm that KMS will use to decrypt the ciphertext
@@ -227,7 +227,7 @@ type ReEncryptInput struct {
//
// For more information, see [Encryption context] in the Key Management Service Developer Guide.
//
- // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
SourceEncryptionContext map[string]string
// Specifies the KMS key that KMS will use to decrypt the ciphertext before it is
@@ -274,6 +274,10 @@ type ReEncryptOutput struct {
// The encryption algorithm that was used to reencrypt the data.
DestinationEncryptionAlgorithm types.EncryptionAlgorithmSpec
+ // The identifier of the key material used to reencrypt the data. This field is
+ // present only when data is reencrypted using a symmetric encryption KMS key.
+ DestinationKeyMaterialId *string
+
// The Amazon Resource Name ([key ARN] ) of the KMS key that was used to reencrypt the data.
//
// [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
@@ -286,6 +290,11 @@ type ReEncryptOutput struct {
// Unique identifier of the KMS key used to originally encrypt the data.
SourceKeyId *string
+ // The identifier of the key material used to originally encrypt the data. This
+ // field is present only when the original encryption used a symmetric encryption
+ // KMS key.
+ SourceKeyMaterialId *string
+
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go
index 3b0c48588e..f896669b94 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go
@@ -28,10 +28,11 @@ import (
// A replica key is a fully-functional KMS key that can be used independently of
// its primary and peer replica keys. A primary key and its replica keys share
// properties that make them interoperable. They have the same [key ID]and key material.
-// They also have the same [key spec], [key usage], [key material origin], and [automatic key rotation status]. KMS automatically synchronizes these shared
-// properties among related multi-Region keys. All other properties of a replica
-// key can differ, including its [key policy], [tags], [aliases], and [Key states of KMS keys]. KMS pricing and quotas for KMS keys
-// apply to each primary key and replica key.
+// They also have the same key spec, key usage, key material origin, and automatic
+// key rotation status. KMS automatically synchronizes these shared properties
+// among related multi-Region keys. All other properties of a replica key can
+// differ, including its [key policy], [tags], [aliases], and [key state]. KMS pricing and quotas for KMS keys apply to
+// each primary key and replica key.
//
// When this operation completes, the new replica key has a transient key state of
// Creating . This key state changes to Enabled (or PendingImport ) after a few
@@ -54,8 +55,7 @@ import (
//
// If you replicate a multi-Region primary key with imported key material, the
// replica key is created with no key material. You must import the same key
-// material that you imported into the primary key. For details, see [Importing key material into multi-Region keys]in the Key
-// Management Service Developer Guide.
+// material that you imported into the primary key.
//
// To convert a replica key to a primary key, use the UpdatePrimaryRegion operation.
//
@@ -86,17 +86,13 @@ import (
// more information, see [KMS eventual consistency].
//
// [key ID]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
-// [automatic key rotation status]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
-// [key usage]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage
// [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
// [key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [key state]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [tags]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
-// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [key spec]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec
-// [Importing key material into multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html
-// [key material origin]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin
// [shared properties]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-sync-properties
func (c *Client) ReplicateKey(ctx context.Context, params *ReplicateKeyInput, optFns ...func(*Options)) (*ReplicateKeyOutput, error) {
if params == nil {
@@ -139,12 +135,6 @@ type ReplicateKeyInput struct {
// Web Services Regions in which KMS is supported, see [KMS service endpoints]in the Amazon Web Services
// General Reference.
//
- // HMAC KMS keys are not supported in all Amazon Web Services Regions. If you try
- // to replicate an HMAC KMS key in an Amazon Web Services Region in which HMAC keys
- // are not supported, the ReplicateKey operation returns an
- // UnsupportedOperationException . For a list of Regions in which HMAC KMS keys are
- // supported, see [HMAC keys in KMS]in the Key Management Service Developer Guide.
- //
// The replica must be in a different Amazon Web Services Region than its primary
// key and other replicas of that primary key, but in the same Amazon Web Services
// partition. KMS must be available in the replica Region. If the Region is not
@@ -156,7 +146,6 @@ type ReplicateKeyInput struct {
// [Disabling a Region]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable
// [Enabling a Region]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable
// [KMS service endpoints]: https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region
- // [HMAC keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
//
// This member is required.
@@ -226,7 +215,7 @@ type ReplicateKeyInput struct {
// [IAM JSON Policy Reference]in the Identity and Access Management User Guide .
//
// [Key policies in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
- // [default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
+ // [default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html
// [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
// [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
// [Changes that I make are not always immediately visible]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
@@ -255,11 +244,11 @@ type ReplicateKeyInput struct {
//
// When you add tags to an Amazon Web Services resource, Amazon Web Services
// generates a cost allocation report with usage and costs aggregated by tags. Tags
- // can also be used to control access to a KMS key. For details, see [Tagging Keys].
+ // can also be used to control access to a KMS key. For details, see [Tags in KMS].
//
// [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
- // [Tagging Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+ // [Tags in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
Tags []types.Tag
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go
index 4ebab0d26d..353e6fa140 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go
@@ -18,12 +18,11 @@ import (
// This operation can be called by the retiring principal for a grant, by the
// grantee principal if the grant allows the RetireGrant operation, and by the
// Amazon Web Services account in which the grant is created. It can also be called
-// by principals to whom permission for retiring a grant is delegated. For details,
-// see [Retiring and revoking grants]in the Key Management Service Developer Guide.
+// by principals to whom permission for retiring a grant is delegated.
//
// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
-// Key Management Service Developer Guide . For examples of working with grants in
-// several programming languages, see [Programming grants].
+// Key Management Service Developer Guide . For examples of creating grants in
+// several programming languages, see [Use CreateGrant with an Amazon Web Services SDK or CLI].
//
// Cross-account use: Yes. You can retire a grant on a KMS key in a different
// Amazon Web Services account.
@@ -44,11 +43,11 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
// [grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
-// [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
+// [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-delete.html
// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Use CreateGrant with an Amazon Web Services SDK or CLI]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_CreateGrant_section.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) RetireGrant(ctx context.Context, params *RetireGrantInput, optFns ...func(*Options)) (*RetireGrantOutput, error) {
if params == nil {
params = &RetireGrantInput{}
@@ -68,10 +67,10 @@ type RetireGrantInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// Identifies the grant to retire. To get the grant ID, use CreateGrant, ListGrants, or ListRetirableGrants.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go
index 242b66d7bd..346d074485 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go
@@ -20,8 +20,8 @@ import (
// Management Service Developer Guide .
//
// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
-// Key Management Service Developer Guide . For examples of working with grants in
-// several programming languages, see [Programming grants].
+// Key Management Service Developer Guide . For examples of creating grants in
+// several programming languages, see [Use CreateGrant with an Amazon Web Services SDK or CLI].
//
// Cross-account use: Yes. To perform this operation on a KMS key in a different
// Amazon Web Services account, specify the key ARN in the value of the KeyId
@@ -43,11 +43,11 @@ import (
// more information, see [KMS eventual consistency].
//
// [Eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency
-// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
// [kms:RevokeGrant]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
+// [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-delete.html
// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Use CreateGrant with an Amazon Web Services SDK or CLI]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_CreateGrant_section.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) RevokeGrant(ctx context.Context, params *RevokeGrantInput, optFns ...func(*Options)) (*RevokeGrantOutput, error) {
if params == nil {
params = &RevokeGrantInput{}
@@ -90,10 +90,10 @@ type RevokeGrantInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go
index abd8c33c04..049f651502 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go
@@ -30,9 +30,14 @@ import (
// monitor rotation of the key material for your KMS keys in CloudTrail and Amazon
// CloudWatch.
//
-// On-demand key rotation is supported only on [symmetric encryption KMS keys]. You cannot perform on-demand
-// rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To perform on-demand
-// rotation of a set of related [multi-Region keys], invoke the on-demand rotation on the primary key.
+// On-demand key rotation is supported only on symmetric encryption KMS keys. You
+// cannot perform on-demand rotation of [asymmetric KMS keys], [HMAC KMS keys], multi-Region KMS keys with [imported key material], or KMS
+// keys in a [custom key store]. When you initiate on-demand key rotation on a symmetric encryption
+// KMS key with imported key material, you must have already imported [new key material]and that key
+// material's state should be PENDING_ROTATION . Use the ListKeyRotations
+// operation to check the state of all key materials associated with a KMS key. To
+// perform on-demand rotation of a set of related [multi-Region keys], invoke the on-demand rotation
+// on the primary key.
//
// You cannot initiate on-demand rotation of [Amazon Web Services managed KMS keys]. KMS always rotates the key material
// of Amazon Web Services managed keys every year. Rotation of [Amazon Web Services owned KMS keys]is managed by the
@@ -54,24 +59,26 @@ import (
//
// # GetKeyRotationStatus
//
+// # ImportKeyMaterial
+//
// # ListKeyRotations
//
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [on-demand rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-on-demand
+// [new key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html
+// [on-demand rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-on-demand.html
// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
-// [automatic key rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
+// [automatic key rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-enable-disable.html
// [kms:RotateKeyOnDemand]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
-// [symmetric encryption KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
func (c *Client) RotateKeyOnDemand(ctx context.Context, params *RotateKeyOnDemandInput, optFns ...func(*Options)) (*RotateKeyOnDemandOutput, error) {
if params == nil {
params = &RotateKeyOnDemandInput{}
@@ -90,8 +97,9 @@ func (c *Client) RotateKeyOnDemand(ctx context.Context, params *RotateKeyOnDeman
type RotateKeyOnDemandInput struct {
// Identifies a symmetric encryption KMS key. You cannot perform on-demand
- // rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To perform on-demand
- // rotation of a set of related [multi-Region keys], invoke the on-demand rotation on the primary key.
+ // rotation of [asymmetric KMS keys], [HMAC KMS keys], multi-Region KMS keys with [imported key material], or KMS keys in a [custom key store]. To perform
+ // on-demand rotation of a set of related [multi-Region keys], invoke the on-demand rotation on the
+ // primary key.
//
// Specify the key ID or key ARN of the KMS key.
//
@@ -107,8 +115,8 @@ type RotateKeyOnDemandInput struct {
// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
- // [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
- // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ // [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#multi-region-rotate
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
//
// This member is required.
KeyId *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go
index 9d6d8abbfd..2d3bba4545 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go
@@ -23,7 +23,7 @@ import (
//
// Deleting a KMS key is a destructive and potentially dangerous operation. When a
// KMS key is deleted, all data that was encrypted under the KMS key is
-// unrecoverable. (The only exception is a [multi-Region replica key], or an asymmetric or HMAC KMS key with imported key material.) To prevent the use of a KMS
+// unrecoverable. (The only exception is a [multi-Region replica key], or an [asymmetric or HMAC KMS key with imported key material].) To prevent the use of a KMS
// key without deleting it, use DisableKey.
//
// You can schedule the deletion of a multi-Region primary key and its replica
@@ -67,12 +67,13 @@ import (
//
// [delete the orphaned key material]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
-// [Deleting a KMS key from an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-xks-key.html
-// [Deleting multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
+// [Deleting a KMS key from an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html#delete-xks-key
+// [Deleting multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html#deleting-mrks
// [Deleting KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
// [multi-Region replica key]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
-// [deletes a KMS key from an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-cmk-keystore.html
+// [asymmetric or HMAC KMS key with imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html#import-delete-key
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
+// [deletes a KMS key from an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html#delete-cmk-keystore
func (c *Client) ScheduleKeyDeletion(ctx context.Context, params *ScheduleKeyDeletionInput, optFns ...func(*Options)) (*ScheduleKeyDeletionOutput, error) {
if params == nil {
params = &ScheduleKeyDeletionInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go
index 506e0902bd..72f9af4068 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go
@@ -17,10 +17,11 @@ import (
// about asymmetric KMS keys, see [Asymmetric KMS keys]in the Key Management Service Developer Guide.
//
// Digital signatures are generated and verified by using asymmetric key pair,
-// such as an RSA or ECC pair that is represented by an asymmetric KMS key. The key
-// owner (or an authorized user) uses their private key to sign a message. Anyone
-// with the public key can verify that the message was signed with that particular
-// private key and that the message hasn't changed since it was signed.
+// such as an RSA, ECC, or ML-DSA pair that is represented by an asymmetric KMS
+// key. The key owner (or an authorized user) uses their private key to sign a
+// message. Anyone with the public key can verify that the message was signed with
+// that particular private key and that the message hasn't changed since it was
+// signed.
//
// To use the Sign operation, provide the following information:
//
@@ -31,8 +32,8 @@ import (
// - Use the Message parameter to specify the message or message digest to sign.
// You can submit messages of up to 4096 bytes. To sign a larger message, generate
// a hash digest of the message, and then provide the hash digest in the Message
-// parameter. To indicate whether the message is a full message or a digest, use
-// the MessageType parameter.
+// parameter. To indicate whether the message is a full message, a digest, or an
+// ML-DSA EXTERNAL_MU, use the MessageType parameter.
//
// - Choose a signing algorithm that is compatible with the KMS key.
//
@@ -67,7 +68,7 @@ import (
// [digital signature]: https://en.wikipedia.org/wiki/Digital_signature
// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
// [kms:Sign]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) Sign(ctx context.Context, params *SignInput, optFns ...func(*Options)) (*SignOutput, error) {
if params == nil {
params = &SignInput{}
@@ -131,10 +132,10 @@ type SignInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -144,29 +145,35 @@ type SignInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// Tells KMS whether the value of the Message parameter should be hashed as part
// of the signing algorithm. Use RAW for unhashed messages; use DIGEST for message
- // digests, which are already hashed.
+ // digests, which are already hashed; use EXTERNAL_MU for 64-byte representative μ
+ // used in ML-DSA signing as defined in NIST FIPS 204 Section 6.2.
//
// When the value of MessageType is RAW , KMS uses the standard signing algorithm,
// which begins with a hash function. When the value is DIGEST , KMS skips the
- // hashing step in the signing algorithm.
+ // hashing step in the signing algorithm. When the value is EXTERNAL_MU KMS skips
+ // the concatenated hashing of the public key hash and the message done in the
+ // ML-DSA signing algorithm.
//
- // Use the DIGEST value only when the value of the Message parameter is a message
- // digest. If you use the DIGEST value with an unhashed message, the security of
- // the signing operation can be compromised.
+ // Use the DIGEST or EXTERNAL_MU value only when the value of the Message
+ // parameter is a message digest. If you use the DIGEST value with an unhashed
+ // message, the security of the signing operation can be compromised.
//
// When the value of MessageType is DIGEST , the length of the Message value must
// match the length of hashed messages for the specified signing algorithm.
//
+ // When the value of MessageType is EXTERNAL_MU the length of the Message value
+ // must be 64 bytes.
+ //
// You can submit a message digest and omit the MessageType or specify RAW so the
// digest is hashed again while signing. However, this can cause verification
// failures when verifying with a system that assumes a single hash.
//
- // The hashing algorithm in that Sign uses is based on the SigningAlgorithm value.
+ // The hashing algorithm that Sign uses is based on the SigningAlgorithm value.
//
// - Signing algorithms that end in SHA_256 use the SHA_256 hashing algorithm.
//
@@ -174,9 +181,12 @@ type SignInput struct {
//
// - Signing algorithms that end in SHA_512 use the SHA_512 hashing algorithm.
//
+ // - Signing algorithms that end in SHAKE_256 use the SHAKE_256 hashing
+ // algorithm.
+ //
// - SM2DSA uses the SM3 hashing algorithm. For details, see [Offline verification with SM2 key pairs].
//
- // [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+ // [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
MessageType types.MessageType
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go
index 713bf6f2dd..6a9d0dbbaa 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go
@@ -55,11 +55,11 @@ import (
// [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
// [Tagging keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
-// [alias]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept
+// [alias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
-// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
// [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go
index 62f7ff4038..3396eab1b3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go
@@ -50,7 +50,7 @@ import (
// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
// [Tagging keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go
index 90c763062a..041d8fdc6e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go
@@ -65,7 +65,7 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
// [kms:UpdateAlias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
func (c *Client) UpdateAlias(ctx context.Context, params *UpdateAliasInput, optFns ...func(*Options)) (*UpdateAliasOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go
index 0e10b4421d..caf5e0aced 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go
@@ -19,9 +19,9 @@ import (
// does not return any property values. To verify the updated property values, use
// the DescribeCustomKeyStoresoperation.
//
-// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
-// and extensive integration of KMS with the isolation and control of a key store
-// that you own and manage.
+// This operation is part of the custom key stores feature in KMS, which combines
+// the convenience and extensive integration of KMS with the isolation and control
+// of a key store that you own and manage.
//
// When updating the properties of an external key store, verify that the updated
// settings connect your key store, via the external key store proxy, to the same
@@ -95,9 +95,8 @@ import (
// Eventual consistency: The KMS API follows an eventual consistency model. For
// more information, see [KMS eventual consistency].
//
-// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
// [kms:UpdateCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) UpdateCustomKeyStore(ctx context.Context, params *UpdateCustomKeyStoreInput, optFns ...func(*Options)) (*UpdateCustomKeyStoreOutput, error) {
if params == nil {
params = &UpdateCustomKeyStoreInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go
index 925fd0cd9c..9fb225c3bc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go
@@ -32,7 +32,7 @@ import (
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [kms:UpdateKeyDescription]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) UpdateKeyDescription(ctx context.Context, params *UpdateKeyDescriptionInput, optFns ...func(*Options)) (*UpdateKeyDescriptionOutput, error) {
if params == nil {
params = &UpdateKeyDescriptionInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go
index d44b70592c..0064f84298 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go
@@ -17,7 +17,7 @@ import (
// have a primary key in us-east-1 and a replica key in eu-west-2 . If you run
// UpdatePrimaryRegion with a PrimaryRegion value of eu-west-2 , the primary key is
// now the key in eu-west-2 , and the key in us-east-1 becomes a replica key. For
-// details, see [Updating the primary Region]in the Key Management Service Developer Guide.
+// details, see [Change the primary key in a set of multi-Region keys]in the Key Management Service Developer Guide.
//
// This operation supports multi-Region keys, an KMS feature that lets you create
// multiple interoperable KMS keys in different Amazon Web Services Regions.
@@ -78,13 +78,13 @@ import (
// [key ID]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [delete the primary key]: https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html
+// [Change the primary key in a set of multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-update.html
// [key usage]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage
-// [Updating the primary Region]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-update
// [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
// [key spec]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec
// [key material origin]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin
// [automatic key rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) UpdatePrimaryRegion(ctx context.Context, params *UpdatePrimaryRegionInput, optFns ...func(*Options)) (*UpdatePrimaryRegionOutput, error) {
if params == nil {
params = &UpdatePrimaryRegionInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go
index b521f2350a..1a82529a13 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go
@@ -59,9 +59,9 @@ import (
//
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
-// [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+// [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
// [kms:Verify]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
func (c *Client) Verify(ctx context.Context, params *VerifyInput, optFns ...func(*Options)) (*VerifyOutput, error) {
if params == nil {
params = &VerifyInput{}
@@ -128,10 +128,10 @@ type VerifyInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -141,31 +141,36 @@ type VerifyInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
// Tells KMS whether the value of the Message parameter should be hashed as part
// of the signing algorithm. Use RAW for unhashed messages; use DIGEST for message
- // digests, which are already hashed.
+ // digests, which are already hashed; use EXTERNAL_MU for 64-byte representative μ
+ // used in ML-DSA signing as defined in NIST FIPS 204 Section 6.2.
//
// When the value of MessageType is RAW , KMS uses the standard signing algorithm,
// which begins with a hash function. When the value is DIGEST , KMS skips the
- // hashing step in the signing algorithm.
+ // hashing step in the signing algorithm. When the value is EXTERNAL_MU KMS skips
+ // the concatenated hashing of the public key hash and the message done in the
+ // ML-DSA signing algorithm.
//
- // Use the DIGEST value only when the value of the Message parameter is a message
- // digest. If you use the DIGEST value with an unhashed message, the security of
- // the verification operation can be compromised.
+ // Use the DIGEST or EXTERNAL_MU value only when the value of the Message
+ // parameter is a message digest. If you use the DIGEST value with an unhashed
+ // message, the security of the signing operation can be compromised.
//
// When the value of MessageType is DIGEST , the length of the Message value must
// match the length of hashed messages for the specified signing algorithm.
//
+ // When the value of MessageType is EXTERNAL_MU the length of the Message value
+ // must be 64 bytes.
+ //
// You can submit a message digest and omit the MessageType or specify RAW so the
// digest is hashed again while signing. However, if the signed message is hashed
// once while signing, but twice while verifying, verification fails, even when the
// message hasn't changed.
//
- // The hashing algorithm in that Verify uses is based on the SigningAlgorithm
- // value.
+ // The hashing algorithm that Verify uses is based on the SigningAlgorithm value.
//
// - Signing algorithms that end in SHA_256 use the SHA_256 hashing algorithm.
//
@@ -173,9 +178,12 @@ type VerifyInput struct {
//
// - Signing algorithms that end in SHA_512 use the SHA_512 hashing algorithm.
//
+ // - Signing algorithms that end in SHAKE_256 use the SHAKE_256 hashing
+ // algorithm.
+ //
// - SM2DSA uses the SM3 hashing algorithm. For details, see [Offline verification with SM2 key pairs].
//
- // [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+ // [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
MessageType types.MessageType
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go
index 2eab7e11c5..42a3447ef6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go
@@ -42,7 +42,7 @@ import (
// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
// [RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104
// [kms:VerifyMac]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
-// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
// [HMAC keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
func (c *Client) VerifyMac(ctx context.Context, params *VerifyMacInput, optFns ...func(*Options)) (*VerifyMacOutput, error) {
if params == nil {
@@ -95,10 +95,10 @@ type VerifyMacInput struct {
// Checks if your request will succeed. DryRun is an optional parameter.
//
- // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // To learn more about how to use this parameter, see [Testing your permissions] in the Key Management
// Service Developer Guide.
//
- // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ // [Testing your permissions]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
DryRun *bool
// A list of grant tokens.
@@ -108,7 +108,7 @@ type VerifyMacInput struct {
// and [Using a grant token]in the Key Management Service Developer Guide.
//
// [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
- // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
GrantTokens []string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go
index 4a408e0fff..1008c7e239 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go
@@ -1214,10 +1214,32 @@ func (m *awsAwsjson11_deserializeOpDeleteImportedKeyMaterial) HandleDeserialize(
output := &DeleteImportedKeyMaterialOutput{}
out.Result = output
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDeleteImportedKeyMaterialOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
}
+ return out, metadata, err
}
return out, metadata, err
@@ -10057,6 +10079,15 @@ func awsAwsjson11_deserializeDocumentKeyMetadata(v **types.KeyMetadata, value in
}
}
+ case "CurrentKeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.CurrentKeyMaterialId = ptr.String(jtv)
+ }
+
case "CustomerMasterKeySpec":
if value != nil {
jtv, ok := value.(string)
@@ -10830,6 +10861,24 @@ func awsAwsjson11_deserializeDocumentRotationsListEntry(v **types.RotationsListE
for key, value := range shape {
switch key {
+ case "ExpirationModel":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExpirationModelType to be of type string, got %T instead", value)
+ }
+ sv.ExpirationModel = types.ExpirationModelType(jtv)
+ }
+
+ case "ImportState":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ImportState to be of type string, got %T instead", value)
+ }
+ sv.ImportState = types.ImportState(jtv)
+ }
+
case "KeyId":
if value != nil {
jtv, ok := value.(string)
@@ -10839,6 +10888,33 @@ func awsAwsjson11_deserializeDocumentRotationsListEntry(v **types.RotationsListE
sv.KeyId = ptr.String(jtv)
}
+ case "KeyMaterialDescription":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyMaterialDescriptionType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialDescription = ptr.String(jtv)
+ }
+
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
+ case "KeyMaterialState":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyMaterialState to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialState = types.KeyMaterialState(jtv)
+ }
+
case "RotationDate":
if value != nil {
switch jtv := value.(type) {
@@ -10864,6 +10940,22 @@ func awsAwsjson11_deserializeDocumentRotationsListEntry(v **types.RotationsListE
sv.RotationType = types.RotationType(jtv)
}
+ case "ValidTo":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.ValidTo = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
default:
_, _ = key, value
@@ -11917,6 +12009,15 @@ func awsAwsjson11_deserializeOpDocumentDecryptOutput(v **DecryptOutput, value in
sv.KeyId = ptr.String(jtv)
}
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
case "Plaintext":
if value != nil {
jtv, ok := value.(string)
@@ -11970,6 +12071,55 @@ func awsAwsjson11_deserializeOpDocumentDeleteCustomKeyStoreOutput(v **DeleteCust
return nil
}
+func awsAwsjson11_deserializeOpDocumentDeleteImportedKeyMaterialOutput(v **DeleteImportedKeyMaterialOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DeleteImportedKeyMaterialOutput
+ if *v == nil {
+ sv = &DeleteImportedKeyMaterialOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdResponseType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
func awsAwsjson11_deserializeOpDocumentDeriveSharedSecretOutput(v **DeriveSharedSecretOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -12294,6 +12444,15 @@ func awsAwsjson11_deserializeOpDocumentGenerateDataKeyOutput(v **GenerateDataKey
sv.KeyId = ptr.String(jtv)
}
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
case "Plaintext":
if value != nil {
jtv, ok := value.(string)
@@ -12360,6 +12519,15 @@ func awsAwsjson11_deserializeOpDocumentGenerateDataKeyPairOutput(v **GenerateDat
sv.KeyId = ptr.String(jtv)
}
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
case "KeyPairSpec":
if value != nil {
jtv, ok := value.(string)
@@ -12448,6 +12616,15 @@ func awsAwsjson11_deserializeOpDocumentGenerateDataKeyPairWithoutPlaintextOutput
sv.KeyId = ptr.String(jtv)
}
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
case "KeyPairSpec":
if value != nil {
jtv, ok := value.(string)
@@ -12536,6 +12713,15 @@ func awsAwsjson11_deserializeOpDocumentGenerateDataKeyWithoutPlaintextOutput(v *
sv.KeyId = ptr.String(jtv)
}
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
default:
_, _ = key, value
@@ -13006,6 +13192,24 @@ func awsAwsjson11_deserializeOpDocumentImportKeyMaterialOutput(v **ImportKeyMate
for key, value := range shape {
switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyMaterialId = ptr.String(jtv)
+ }
+
default:
_, _ = key, value
@@ -13437,6 +13641,15 @@ func awsAwsjson11_deserializeOpDocumentReEncryptOutput(v **ReEncryptOutput, valu
sv.DestinationEncryptionAlgorithm = types.EncryptionAlgorithmSpec(jtv)
}
+ case "DestinationKeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.DestinationKeyMaterialId = ptr.String(jtv)
+ }
+
case "KeyId":
if value != nil {
jtv, ok := value.(string)
@@ -13464,6 +13677,15 @@ func awsAwsjson11_deserializeOpDocumentReEncryptOutput(v **ReEncryptOutput, valu
sv.SourceKeyId = ptr.String(jtv)
}
+ case "SourceKeyMaterialId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected BackingKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.SourceKeyMaterialId = ptr.String(jtv)
+ }
+
default:
_, _ = key, value
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go
index 20c24d766a..4d79124866 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go
@@ -3,4 +3,4 @@
package kms
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.38.1"
+const goModuleVersion = "1.41.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go
index f8eccac0b9..ed69fe866b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go
@@ -87,6 +87,7 @@ func New() *Resolver {
var partitionRegexp = struct {
Aws *regexp.Regexp
AwsCn *regexp.Regexp
+ AwsEusc *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
AwsIsoE *regexp.Regexp
@@ -96,6 +97,7 @@ var partitionRegexp = struct {
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
@@ -184,6 +186,9 @@ var defaultPartitions = endpoints.Partitions{
},
Deprecated: aws.TrueTernary,
},
+ endpoints.EndpointKey{
+ Region: "ap-east-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-1",
}: endpoints.Endpoint{},
@@ -769,6 +774,27 @@ var defaultPartitions = endpoints.Partitions{
}: endpoints.Endpoint{},
},
},
+ {
+ ID: "aws-eusc",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsEusc,
+ IsRegionalized: true,
+ },
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
@@ -907,6 +933,35 @@ var defaultPartitions = endpoints.Partitions{
},
RegionRegex: partitionRegexp.AwsIsoE,
IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ProdFips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-isoe-west-1.cloud.adc-e.uk",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-isoe-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-isoe-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-isoe-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-isoe-west-1.cloud.adc-e.uk",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-isoe-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-isoe-west-1.cloud.adc-e.uk",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-isoe-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
},
{
ID: "aws-iso-f",
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go
index 1f9dabb9c0..348a4d747c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go
@@ -3676,6 +3676,11 @@ func awsAwsjson11_serializeOpDocumentDeleteImportedKeyMaterialInput(v *DeleteImp
ok.String(*v.KeyId)
}
+ if v.KeyMaterialId != nil {
+ ok := object.Key("KeyMaterialId")
+ ok.String(*v.KeyMaterialId)
+ }
+
return nil
}
@@ -4187,11 +4192,26 @@ func awsAwsjson11_serializeOpDocumentImportKeyMaterialInput(v *ImportKeyMaterial
ok.Base64EncodeBytes(v.ImportToken)
}
+ if len(v.ImportType) > 0 {
+ ok := object.Key("ImportType")
+ ok.String(string(v.ImportType))
+ }
+
if v.KeyId != nil {
ok := object.Key("KeyId")
ok.String(*v.KeyId)
}
+ if v.KeyMaterialDescription != nil {
+ ok := object.Key("KeyMaterialDescription")
+ ok.String(*v.KeyMaterialDescription)
+ }
+
+ if v.KeyMaterialId != nil {
+ ok := object.Key("KeyMaterialId")
+ ok.String(*v.KeyMaterialId)
+ }
+
if v.ValidTo != nil {
ok := object.Key("ValidTo")
ok.Double(smithytime.FormatEpochSeconds(*v.ValidTo))
@@ -4280,6 +4300,11 @@ func awsAwsjson11_serializeOpDocumentListKeyRotationsInput(v *ListKeyRotationsIn
object := value.Object()
defer object.Close()
+ if len(v.IncludeKeyMaterial) > 0 {
+ ok := object.Key("IncludeKeyMaterial")
+ ok.String(string(v.IncludeKeyMaterial))
+ }
+
if v.KeyId != nil {
ok := object.Key("KeyId")
ok.String(*v.KeyId)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go
index 9c111656d7..094ff4b978 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go
@@ -306,6 +306,63 @@ func (GrantOperation) Values() []GrantOperation {
}
}
+type ImportState string
+
+// Enum values for ImportState
+const (
+ ImportStateImported ImportState = "IMPORTED"
+ ImportStatePendingImport ImportState = "PENDING_IMPORT"
+)
+
+// Values returns all known values for ImportState. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ImportState) Values() []ImportState {
+ return []ImportState{
+ "IMPORTED",
+ "PENDING_IMPORT",
+ }
+}
+
+type ImportType string
+
+// Enum values for ImportType
+const (
+ ImportTypeNewKeyMaterial ImportType = "NEW_KEY_MATERIAL"
+ ImportTypeExistingKeyMaterial ImportType = "EXISTING_KEY_MATERIAL"
+)
+
+// Values returns all known values for ImportType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ImportType) Values() []ImportType {
+ return []ImportType{
+ "NEW_KEY_MATERIAL",
+ "EXISTING_KEY_MATERIAL",
+ }
+}
+
+type IncludeKeyMaterial string
+
+// Enum values for IncludeKeyMaterial
+const (
+ IncludeKeyMaterialAllKeyMaterial IncludeKeyMaterial = "ALL_KEY_MATERIAL"
+ IncludeKeyMaterialRotationsOnly IncludeKeyMaterial = "ROTATIONS_ONLY"
+)
+
+// Values returns all known values for IncludeKeyMaterial. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (IncludeKeyMaterial) Values() []IncludeKeyMaterial {
+ return []IncludeKeyMaterial{
+ "ALL_KEY_MATERIAL",
+ "ROTATIONS_ONLY",
+ }
+}
+
type KeyAgreementAlgorithmSpec string
// Enum values for KeyAgreementAlgorithmSpec
@@ -359,6 +416,27 @@ func (KeyManagerType) Values() []KeyManagerType {
}
}
+type KeyMaterialState string
+
+// Enum values for KeyMaterialState
+const (
+ KeyMaterialStateNonCurrent KeyMaterialState = "NON_CURRENT"
+ KeyMaterialStateCurrent KeyMaterialState = "CURRENT"
+ KeyMaterialStatePendingRotation KeyMaterialState = "PENDING_ROTATION"
+)
+
+// Values returns all known values for KeyMaterialState. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeyMaterialState) Values() []KeyMaterialState {
+ return []KeyMaterialState{
+ "NON_CURRENT",
+ "CURRENT",
+ "PENDING_ROTATION",
+ }
+}
+
type KeySpec string
// Enum values for KeySpec
@@ -376,6 +454,9 @@ const (
KeySpecHmac384 KeySpec = "HMAC_384"
KeySpecHmac512 KeySpec = "HMAC_512"
KeySpecSm2 KeySpec = "SM2"
+ KeySpecMlDsa44 KeySpec = "ML_DSA_44"
+ KeySpecMlDsa65 KeySpec = "ML_DSA_65"
+ KeySpecMlDsa87 KeySpec = "ML_DSA_87"
)
// Values returns all known values for KeySpec. Note that this can be expanded in
@@ -397,6 +478,9 @@ func (KeySpec) Values() []KeySpec {
"HMAC_384",
"HMAC_512",
"SM2",
+ "ML_DSA_44",
+ "ML_DSA_65",
+ "ML_DSA_87",
}
}
@@ -481,8 +565,9 @@ type MessageType string
// Enum values for MessageType
const (
- MessageTypeRaw MessageType = "RAW"
- MessageTypeDigest MessageType = "DIGEST"
+ MessageTypeRaw MessageType = "RAW"
+ MessageTypeDigest MessageType = "DIGEST"
+ MessageTypeExternalMu MessageType = "EXTERNAL_MU"
)
// Values returns all known values for MessageType. Note that this can be expanded
@@ -493,6 +578,7 @@ func (MessageType) Values() []MessageType {
return []MessageType{
"RAW",
"DIGEST",
+ "EXTERNAL_MU",
}
}
@@ -571,6 +657,7 @@ const (
SigningAlgorithmSpecEcdsaSha384 SigningAlgorithmSpec = "ECDSA_SHA_384"
SigningAlgorithmSpecEcdsaSha512 SigningAlgorithmSpec = "ECDSA_SHA_512"
SigningAlgorithmSpecSm2dsa SigningAlgorithmSpec = "SM2DSA"
+ SigningAlgorithmSpecMlDsaShake256 SigningAlgorithmSpec = "ML_DSA_SHAKE_256"
)
// Values returns all known values for SigningAlgorithmSpec. Note that this can be
@@ -589,6 +676,7 @@ func (SigningAlgorithmSpec) Values() []SigningAlgorithmSpec {
"ECDSA_SHA_384",
"ECDSA_SHA_512",
"SM2DSA",
+ "ML_DSA_SHAKE_256",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go
index a68d1739e1..7082a81e01 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go
@@ -525,8 +525,9 @@ func (e *IncorrectKeyException) ErrorCode() string {
func (e *IncorrectKeyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request was rejected because the key material in the request is, expired,
-// invalid, or is not the same key material that was previously imported into this
-// KMS key.
+// invalid, or does not meet expectations. For example, it is not the same key
+// material that was previously imported or KMS expected new key material but the
+// key material being imported is already associated with the KMS key.
type IncorrectKeyMaterialException struct {
Message *string
@@ -968,8 +969,8 @@ func (e *KMSInvalidStateException) ErrorCode() string {
}
func (e *KMSInvalidStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-// The request was rejected because a quota was exceeded. For more information,
-// see [Quotas]in the Key Management Service Developer Guide.
+// The request was rejected because a length constraint or quota was exceeded. For
+// more information, see [Quotas]in the Key Management Service Developer Guide.
//
// [Quotas]: https://docs.aws.amazon.com/kms/latest/developerguide/limits.html
type LimitExceededException struct {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go
index 62a8f7f8b2..d5b848706f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go
@@ -239,10 +239,10 @@ type CustomKeyStoresListEntry struct {
// includes the specified [encryption context].
//
// KMS applies the grant constraints only to cryptographic operations that support
-// an encryption context, that is, all cryptographic operations with a [symmetric KMS key]. Grant
-// constraints are not applied to operations that do not support an encryption
-// context, such as cryptographic operations with asymmetric KMS keys and
-// management operations, such as DescribeKeyor RetireGrant.
+// an encryption context, that is, all cryptographic operations with a symmetric
+// KMS key. Grant constraints are not applied to operations that do not support an
+// encryption context, such as cryptographic operations with asymmetric KMS keys
+// and management operations, such as DescribeKeyor RetireGrant.
//
// In a cryptographic operation, the encryption context in the decryption
// operation must be an exact, case-sensitive match for the keys and values in the
@@ -255,19 +255,18 @@ type CustomKeyStoresListEntry struct {
// To avoid confusion, do not use multiple encryption context pairs that differ
// only by case. To require a fully case-sensitive encryption context, use the
// kms:EncryptionContext: and kms:EncryptionContextKeys conditions in an IAM or
-// key policy. For details, see [kms:EncryptionContext:]in the Key Management Service Developer Guide .
+// key policy. For details, see [kms:EncryptionContext:context-key]in the Key Management Service Developer Guide .
//
-// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
-// [kms:EncryptionContext:]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-context
-// [encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
-// [symmetric KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#symmetric-cmks
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
+// [encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
+// [kms:EncryptionContext:context-key]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-encryption-context
type GrantConstraints struct {
// A list of key-value pairs that must match the encryption context in the [cryptographic operation]
// request. The grant allows the operation only when the encryption context in the
// request is the same as the encryption context specified in this constraint.
//
- // [cryptographic operation]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ // [cryptographic operation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
EncryptionContextEquals map[string]string
// A list of key-value pairs that must be included in the encryption context of
@@ -275,7 +274,7 @@ type GrantConstraints struct {
// encryption context in the request includes the key-value pairs specified in this
// constraint, although it can include additional key-value pairs.
//
- // [cryptographic operation]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ // [cryptographic operation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
EncryptionContextSubset map[string]string
noSmithyDocumentSerde
@@ -361,16 +360,24 @@ type KeyMetadata struct {
// material for the KMS key in the associated CloudHSM cluster. This field is
// present only when the KMS key is created in an CloudHSM key store.
//
- // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
CloudHsmClusterId *string
// The date and time when the KMS key was created.
CreationDate *time.Time
+ // Identifies the current key material. This value is present for symmetric
+ // encryption keys with AWS_KMS origin and single-Region, symmetric encryption
+ // keys with EXTERNAL origin. These KMS keys support automatic or on-demand key
+ // rotation and can have multiple key materials associated with them. KMS uses the
+ // current key material for both encryption and decryption, and the non-current key
+ // material for decryption operations only.
+ CurrentKeyMaterialId *string
+
// A unique identifier for the [custom key store] that contains the KMS key. This field is present
// only when the KMS key is created in a custom key store.
//
- // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html
CustomKeyStoreId *string
// Instead, use the KeySpec field.
@@ -431,7 +438,7 @@ type KeyMetadata struct {
// The [cryptographic operations] for which you can use the KMS key.
//
- // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
KeyUsage KeyUsageType
// The message authentication code (MAC) algorithm that the HMAC KMS key supports.
@@ -493,10 +500,11 @@ type KeyMetadata struct {
// This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY .
SigningAlgorithms []SigningAlgorithmSpec
- // The time at which the imported key material expires. When the key material
- // expires, KMS deletes the key material and the KMS key becomes unusable. This
- // value is present only for KMS keys whose Origin is EXTERNAL and whose
- // ExpirationModel is KEY_MATERIAL_EXPIRES , otherwise this value is omitted.
+ // The earliest time at which any imported key material permanently associated
+ // with this KMS key expires. When a key material expires, KMS deletes the key
+ // material and the KMS key becomes unusable. This value is present only for KMS
+ // keys whose Origin is EXTERNAL and the ExpirationModel is KEY_MATERIAL_EXPIRES ,
+ // otherwise this value is omitted.
ValidTo *time.Time
// Information about the external key that is associated with a KMS key in an
@@ -566,21 +574,62 @@ type RecipientInfo struct {
noSmithyDocumentSerde
}
-// Contains information about completed key material rotations.
+// Each entry contains information about one of the key materials associated with
+// a KMS key.
type RotationsListEntry struct {
+ // Indicates if the key material is configured to automatically expire. There are
+ // two possible values for this field: KEY_MATERIAL_EXPIRES and
+ // KEY_MATERIAL_DOES_NOT_EXPIRE . For any key material that expires, the expiration
+ // date and time is indicated in ValidTo . This field is only present for symmetric
+ // encryption KMS keys with EXTERNAL origin.
+ ExpirationModel ExpirationModelType
+
+ // Indicates if the key material is currently imported into KMS. It has two
+ // possible values: IMPORTED or PENDING_IMPORT . This field is only present for
+ // symmetric encryption KMS keys with EXTERNAL origin.
+ ImportState ImportState
+
// Unique identifier of the key.
KeyId *string
+ // User-specified description of the key material. This field is only present for
+ // symmetric encryption KMS keys with EXTERNAL origin.
+ KeyMaterialDescription *string
+
+ // Unique identifier of the key material.
+ KeyMaterialId *string
+
+ // There are three possible values for this field: CURRENT , NON_CURRENT and
+ // PENDING_ROTATION . KMS uses CURRENT key material for both encryption and
+ // decryption and NON_CURRENT key material only for decryption. PENDING_ROTATION
+ // identifies key material that has been imported for on-demand key rotation but
+ // the rotation hasn't completed. Key material in PENDING_ROTATION is not
+ // permanently associated with the KMS key. You can delete this key material and
+ // import different key material in its place. The PENDING_ROTATION value is only
+ // used in symmetric encryption keys with imported key material. The other values,
+ // CURRENT and NON_CURRENT , are used for all KMS keys that support automatic or
+ // on-demand key rotation.
+ KeyMaterialState KeyMaterialState
+
// Date and time that the key material rotation completed. Formatted as Unix time.
+ // This field is not present for the first key material or an imported key material
+ // in PENDING_ROTATION state.
RotationDate *time.Time
- // Identifies whether the key material rotation was a scheduled [automatic rotation] or an [on-demand rotation].
+ // Identifies whether the key material rotation was a scheduled [automatic rotation] or an [on-demand rotation]. This
+ // field is not present for the first key material or an imported key material in
+ // PENDING_ROTATION state.
//
- // [automatic rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
- // [on-demand rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-on-demand
+ // [automatic rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-enable-disable.html
+ // [on-demand rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotating-keys-on-demand.html
RotationType RotationType
+ // Date and time at which the key material expires. This field is only present for
+ // symmetric encryption KMS keys with EXTERNAL origin in rotation list entries
+ // with an ExpirationModel value of KEY_MATERIAL_EXPIRES .
+ ValidTo *time.Time
+
noSmithyDocumentSerde
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
index f4c8cac68e..928ffc3901 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
@@ -1,3 +1,11 @@
+# v1.25.4 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.3 (2025-04-03)
+
+* No change notes available for this release.
+
# v1.25.2 (2025-03-25)
* No change notes available for this release.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
index 6de25b907f..5bd6f00784 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
@@ -3,4 +3,4 @@
package sso
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.25.2"
+const goModuleVersion = "1.25.4"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
index f4f531f250..04416606be 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
@@ -87,6 +87,7 @@ func New() *Resolver {
var partitionRegexp = struct {
Aws *regexp.Regexp
AwsCn *regexp.Regexp
+ AwsEusc *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
AwsIsoE *regexp.Regexp
@@ -96,6 +97,7 @@ var partitionRegexp = struct {
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
@@ -434,6 +436,27 @@ var defaultPartitions = endpoints.Partitions{
},
},
},
+ {
+ ID: "aws-eusc",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsEusc,
+ IsRegionalized: true,
+ },
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
index be745460e9..e0d0da2b62 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
@@ -1,3 +1,11 @@
+# v1.30.2 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.1 (2025-04-03)
+
+* No change notes available for this release.
+
# v1.30.0 (2025-03-27)
* **Feature**: This release adds AwsAdditionalDetails in the CreateTokenWithIAM API response.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
index 3c7150d8a0..ac4fcd9b6e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
@@ -3,4 +3,4 @@
package ssooidc
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.30.0"
+const goModuleVersion = "1.30.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
index 35c04ff43a..ba7b4f9eb0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
@@ -87,6 +87,7 @@ func New() *Resolver {
var partitionRegexp = struct {
Aws *regexp.Regexp
AwsCn *regexp.Regexp
+ AwsEusc *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
AwsIsoE *regexp.Regexp
@@ -96,6 +97,7 @@ var partitionRegexp = struct {
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
@@ -434,6 +436,27 @@ var defaultPartitions = endpoints.Partitions{
},
},
},
+ {
+ ID: "aws-eusc",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsEusc,
+ IsRegionalized: true,
+ },
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
index 79ff72d751..1492199249 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
@@ -1,3 +1,19 @@
+# v1.33.21 (2025-06-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.20 (2025-06-06)
+
+* No change notes available for this release.
+
+# v1.33.19 (2025-04-10)
+
+* No change notes available for this release.
+
+# v1.33.18 (2025-04-03)
+
+* No change notes available for this release.
+
# v1.33.17 (2025-03-04.2)
* **Bug Fix**: Add assurance test for operation order.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
index 18e1e47356..0b59c0fa3d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
@@ -3,4 +3,4 @@
package sts
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.33.17"
+const goModuleVersion = "1.33.21"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
index 8fc2012a69..3dfa51e5f4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
@@ -87,6 +87,7 @@ func New() *Resolver {
var partitionRegexp = struct {
Aws *regexp.Regexp
AwsCn *regexp.Regexp
+ AwsEusc *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
AwsIsoE *regexp.Regexp
@@ -96,6 +97,7 @@ var partitionRegexp = struct {
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
@@ -145,6 +147,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ap-east-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-east-2",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-1",
}: endpoints.Endpoint{},
@@ -348,6 +353,27 @@ var defaultPartitions = endpoints.Partitions{
}: endpoints.Endpoint{},
},
},
+ {
+ ID: "aws-eusc",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.amazonaws.eu",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsEusc,
+ IsRegionalized: true,
+ },
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
@@ -423,6 +449,11 @@ var defaultPartitions = endpoints.Partitions{
},
RegionRegex: partitionRegexp.AwsIsoE,
IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "eu-isoe-west-1",
+ }: endpoints.Endpoint{},
+ },
},
{
ID: "aws-iso-f",
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 7ab65bae79..e72db4de1e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.55.6"
+const SDKVersion = "1.55.7"
diff --git a/vendor/github.com/cenkalti/backoff/v5/.gitignore b/vendor/github.com/cenkalti/backoff/v5/.gitignore
new file mode 100644
index 0000000000..50d95c548b
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/.gitignore
@@ -0,0 +1,25 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+
+# IDEs
+.idea/
diff --git a/vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md b/vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md
new file mode 100644
index 0000000000..658c37436d
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md
@@ -0,0 +1,29 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [5.0.0] - 2024-12-19
+
+### Added
+
+- RetryAfterError can be returned from an operation to indicate how long to wait before the next retry.
+
+### Changed
+
+- Retry function now accepts additional options for specifying max number of tries and max elapsed time.
+- Retry function now accepts a context.Context.
+- Operation function signature changed to return result (any type) and error.
+
+### Removed
+
+- RetryNotify* and RetryWithData functions. Only single Retry function remains.
+- Optional arguments from ExponentialBackoff constructor.
+- Clock and Timer interfaces.
+
+### Fixed
+
+- The original error is returned from Retry if there's a PermanentError. (#144)
+- The Retry function respects the wrapped PermanentError. (#140)
diff --git a/vendor/github.com/cenkalti/backoff/v5/LICENSE b/vendor/github.com/cenkalti/backoff/v5/LICENSE
new file mode 100644
index 0000000000..89b8179965
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Cenk Altı
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/cenkalti/backoff/v5/README.md b/vendor/github.com/cenkalti/backoff/v5/README.md
new file mode 100644
index 0000000000..4611b1d170
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/README.md
@@ -0,0 +1,31 @@
+# Exponential Backoff [![GoDoc][godoc image]][godoc]
+
+This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client].
+
+[Exponential backoff][exponential backoff wiki]
+is an algorithm that uses feedback to multiplicatively decrease the rate of some process,
+in order to gradually find an acceptable rate.
+The retries exponentially increase and stop increasing when a certain threshold is met.
+
+## Usage
+
+Import path is `github.com/cenkalti/backoff/v5`. Please note the version part at the end.
+
+For most cases, use `Retry` function. See [example_test.go][example] for an example.
+
+If you have specific needs, copy `Retry` function (from [retry.go][retry-src]) into your code and modify it as needed.
+
+## Contributing
+
+* I would like to keep this library as small as possible.
+* Please don't send a PR without opening an issue and discussing it first.
+* If proposed change is not a common use case, I will probably not accept it.
+
+[godoc]: https://pkg.go.dev/github.com/cenkalti/backoff/v5
+[godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png
+
+[google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java
+[exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff
+
+[retry-src]: https://github.com/cenkalti/backoff/blob/v5/retry.go
+[example]: https://github.com/cenkalti/backoff/blob/v5/example_test.go
diff --git a/vendor/github.com/cenkalti/backoff/v5/backoff.go b/vendor/github.com/cenkalti/backoff/v5/backoff.go
new file mode 100644
index 0000000000..dd2b24ca73
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/backoff.go
@@ -0,0 +1,66 @@
+// Package backoff implements backoff algorithms for retrying operations.
+//
+// Use Retry function for retrying operations that may fail.
+// If Retry does not meet your needs,
+// copy/paste the function into your project and modify as you wish.
+//
+// There is also Ticker type similar to time.Ticker.
+// You can use it if you need to work with channels.
+//
+// See Examples section below for usage examples.
+package backoff
+
+import "time"
+
+// BackOff is a backoff policy for retrying an operation.
+type BackOff interface {
+ // NextBackOff returns the duration to wait before retrying the operation,
+ // backoff.Stop to indicate that no more retries should be made.
+ //
+ // Example usage:
+ //
+ // duration := backoff.NextBackOff()
+ // if duration == backoff.Stop {
+ // // Do not retry operation.
+ // } else {
+ // // Sleep for duration and retry operation.
+ // }
+ //
+ NextBackOff() time.Duration
+
+ // Reset to initial state.
+ Reset()
+}
+
+// Stop indicates that no more retries should be made for use in NextBackOff().
+const Stop time.Duration = -1
+
+// ZeroBackOff is a fixed backoff policy whose backoff time is always zero,
+// meaning that the operation is retried immediately without waiting, indefinitely.
+type ZeroBackOff struct{}
+
+func (b *ZeroBackOff) Reset() {}
+
+func (b *ZeroBackOff) NextBackOff() time.Duration { return 0 }
+
+// StopBackOff is a fixed backoff policy that always returns backoff.Stop for
+// NextBackOff(), meaning that the operation should never be retried.
+type StopBackOff struct{}
+
+func (b *StopBackOff) Reset() {}
+
+func (b *StopBackOff) NextBackOff() time.Duration { return Stop }
+
+// ConstantBackOff is a backoff policy that always returns the same backoff delay.
+// This is in contrast to an exponential backoff policy,
+// which returns a delay that grows longer as you call NextBackOff() over and over again.
+type ConstantBackOff struct {
+ Interval time.Duration
+}
+
+func (b *ConstantBackOff) Reset() {}
+func (b *ConstantBackOff) NextBackOff() time.Duration { return b.Interval }
+
+func NewConstantBackOff(d time.Duration) *ConstantBackOff {
+ return &ConstantBackOff{Interval: d}
+}
diff --git a/vendor/github.com/cenkalti/backoff/v5/error.go b/vendor/github.com/cenkalti/backoff/v5/error.go
new file mode 100644
index 0000000000..beb2b38a23
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/error.go
@@ -0,0 +1,46 @@
+package backoff
+
+import (
+ "fmt"
+ "time"
+)
+
+// PermanentError signals that the operation should not be retried.
+type PermanentError struct {
+ Err error
+}
+
+// Permanent wraps the given err in a *PermanentError.
+func Permanent(err error) error {
+ if err == nil {
+ return nil
+ }
+ return &PermanentError{
+ Err: err,
+ }
+}
+
+// Error returns a string representation of the Permanent error.
+func (e *PermanentError) Error() string {
+ return e.Err.Error()
+}
+
+// Unwrap returns the wrapped error.
+func (e *PermanentError) Unwrap() error {
+ return e.Err
+}
+
+// RetryAfterError signals that the operation should be retried after the given duration.
+type RetryAfterError struct {
+ Duration time.Duration
+}
+
+// RetryAfter returns a RetryAfter error that specifies how long to wait before retrying.
+func RetryAfter(seconds int) error {
+ return &RetryAfterError{Duration: time.Duration(seconds) * time.Second}
+}
+
+// Error returns a string representation of the RetryAfter error.
+func (e *RetryAfterError) Error() string {
+ return fmt.Sprintf("retry after %s", e.Duration)
+}
diff --git a/vendor/github.com/cenkalti/backoff/v5/exponential.go b/vendor/github.com/cenkalti/backoff/v5/exponential.go
new file mode 100644
index 0000000000..c1f3e442d3
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/exponential.go
@@ -0,0 +1,125 @@
+package backoff
+
+import (
+ "math/rand"
+ "time"
+)
+
+/*
+ExponentialBackOff is a backoff implementation that increases the backoff
+period for each retry attempt using a randomization function that grows exponentially.
+
+NextBackOff() is calculated using the following formula:
+
+ randomized interval =
+ RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])
+
+In other words NextBackOff() will range between the randomization factor
+percentage below and above the retry interval.
+
+For example, given the following parameters:
+
+ RetryInterval = 2
+ RandomizationFactor = 0.5
+ Multiplier = 2
+
+the actual backoff period used in the next retry attempt will range between 1 and 3 seconds,
+multiplied by the exponential, that is, between 2 and 6 seconds.
+
+Note: MaxInterval caps the RetryInterval and not the randomized interval.
+
+If the time elapsed since an ExponentialBackOff instance is created goes past the
+MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop.
+
+The elapsed time can be reset by calling Reset().
+
+Example: Given the following default arguments, for 10 tries the sequence will be,
+and assuming we go over the MaxElapsedTime on the 10th try:
+
+ Request # RetryInterval (seconds) Randomized Interval (seconds)
+
+ 1 0.5 [0.25, 0.75]
+ 2 0.75 [0.375, 1.125]
+ 3 1.125 [0.562, 1.687]
+ 4 1.687 [0.8435, 2.53]
+ 5 2.53 [1.265, 3.795]
+ 6 3.795 [1.897, 5.692]
+ 7 5.692 [2.846, 8.538]
+ 8 8.538 [4.269, 12.807]
+ 9 12.807 [6.403, 19.210]
+ 10 19.210 backoff.Stop
+
+Note: Implementation is not thread-safe.
+*/
+type ExponentialBackOff struct {
+ InitialInterval time.Duration
+ RandomizationFactor float64
+ Multiplier float64
+ MaxInterval time.Duration
+
+ currentInterval time.Duration
+}
+
+// Default values for ExponentialBackOff.
+const (
+ DefaultInitialInterval = 500 * time.Millisecond
+ DefaultRandomizationFactor = 0.5
+ DefaultMultiplier = 1.5
+ DefaultMaxInterval = 60 * time.Second
+)
+
+// NewExponentialBackOff creates an instance of ExponentialBackOff using default values.
+func NewExponentialBackOff() *ExponentialBackOff {
+ return &ExponentialBackOff{
+ InitialInterval: DefaultInitialInterval,
+ RandomizationFactor: DefaultRandomizationFactor,
+ Multiplier: DefaultMultiplier,
+ MaxInterval: DefaultMaxInterval,
+ }
+}
+
+// Reset the interval back to the initial retry interval and restarts the timer.
+// Reset must be called before using b.
+func (b *ExponentialBackOff) Reset() {
+ b.currentInterval = b.InitialInterval
+}
+
+// NextBackOff calculates the next backoff interval using the formula:
+//
+// Randomized interval = RetryInterval * (1 ± RandomizationFactor)
+func (b *ExponentialBackOff) NextBackOff() time.Duration {
+ if b.currentInterval == 0 {
+ b.currentInterval = b.InitialInterval
+ }
+
+ next := getRandomValueFromInterval(b.RandomizationFactor, rand.Float64(), b.currentInterval)
+ b.incrementCurrentInterval()
+ return next
+}
+
+// Increments the current interval by multiplying it with the multiplier.
+func (b *ExponentialBackOff) incrementCurrentInterval() {
+ // Check for overflow, if overflow is detected set the current interval to the max interval.
+ if float64(b.currentInterval) >= float64(b.MaxInterval)/b.Multiplier {
+ b.currentInterval = b.MaxInterval
+ } else {
+ b.currentInterval = time.Duration(float64(b.currentInterval) * b.Multiplier)
+ }
+}
+
+// Returns a random value from the following interval:
+//
+// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval].
+func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration {
+ if randomizationFactor == 0 {
+ return currentInterval // make sure no randomness is used when randomizationFactor is 0.
+ }
+ var delta = randomizationFactor * float64(currentInterval)
+ var minInterval = float64(currentInterval) - delta
+ var maxInterval = float64(currentInterval) + delta
+
+ // Get a random value from the range [minInterval, maxInterval].
+ // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then
+ // we want a 33% chance for selecting either 1, 2 or 3.
+ return time.Duration(minInterval + (random * (maxInterval - minInterval + 1)))
+}
diff --git a/vendor/github.com/cenkalti/backoff/v5/retry.go b/vendor/github.com/cenkalti/backoff/v5/retry.go
new file mode 100644
index 0000000000..e43f47fb8a
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/retry.go
@@ -0,0 +1,139 @@
+package backoff
+
+import (
+ "context"
+ "errors"
+ "time"
+)
+
+// DefaultMaxElapsedTime sets a default limit for the total retry duration.
+const DefaultMaxElapsedTime = 15 * time.Minute
+
+// Operation is a function that attempts an operation and may be retried.
+type Operation[T any] func() (T, error)
+
+// Notify is a function called on operation error with the error and backoff duration.
+type Notify func(error, time.Duration)
+
+// retryOptions holds configuration settings for the retry mechanism.
+type retryOptions struct {
+ BackOff BackOff // Strategy for calculating backoff periods.
+ Timer timer // Timer to manage retry delays.
+ Notify Notify // Optional function to notify on each retry error.
+ MaxTries uint // Maximum number of retry attempts.
+ MaxElapsedTime time.Duration // Maximum total time for all retries.
+}
+
+type RetryOption func(*retryOptions)
+
+// WithBackOff configures a custom backoff strategy.
+func WithBackOff(b BackOff) RetryOption {
+ return func(args *retryOptions) {
+ args.BackOff = b
+ }
+}
+
+// withTimer sets a custom timer for managing delays between retries.
+func withTimer(t timer) RetryOption {
+ return func(args *retryOptions) {
+ args.Timer = t
+ }
+}
+
+// WithNotify sets a notification function to handle retry errors.
+func WithNotify(n Notify) RetryOption {
+ return func(args *retryOptions) {
+ args.Notify = n
+ }
+}
+
+// WithMaxTries limits the number of retry attempts.
+func WithMaxTries(n uint) RetryOption {
+ return func(args *retryOptions) {
+ args.MaxTries = n
+ }
+}
+
+// WithMaxElapsedTime limits the total duration for retry attempts.
+func WithMaxElapsedTime(d time.Duration) RetryOption {
+ return func(args *retryOptions) {
+ args.MaxElapsedTime = d
+ }
+}
+
+// Retry attempts the operation until success, a permanent error, or backoff completion.
+// It ensures the operation is executed at least once.
+//
+// Returns the operation result or error if retries are exhausted or context is cancelled.
+func Retry[T any](ctx context.Context, operation Operation[T], opts ...RetryOption) (T, error) {
+ // Initialize default retry options.
+ args := &retryOptions{
+ BackOff: NewExponentialBackOff(),
+ Timer: &defaultTimer{},
+ MaxElapsedTime: DefaultMaxElapsedTime,
+ }
+
+ // Apply user-provided options to the default settings.
+ for _, opt := range opts {
+ opt(args)
+ }
+
+ defer args.Timer.Stop()
+
+ startedAt := time.Now()
+ args.BackOff.Reset()
+ for numTries := uint(1); ; numTries++ {
+ // Execute the operation.
+ res, err := operation()
+ if err == nil {
+ return res, nil
+ }
+
+ // Stop retrying if maximum tries exceeded.
+ if args.MaxTries > 0 && numTries >= args.MaxTries {
+ return res, err
+ }
+
+ // Handle permanent errors without retrying.
+ var permanent *PermanentError
+ if errors.As(err, &permanent) {
+ return res, err
+ }
+
+ // Stop retrying if context is cancelled.
+ if cerr := context.Cause(ctx); cerr != nil {
+ return res, cerr
+ }
+
+ // Calculate next backoff duration.
+ next := args.BackOff.NextBackOff()
+ if next == Stop {
+ return res, err
+ }
+
+ // Reset backoff if RetryAfterError is encountered.
+ var retryAfter *RetryAfterError
+ if errors.As(err, &retryAfter) {
+ next = retryAfter.Duration
+ args.BackOff.Reset()
+ }
+
+ // Stop retrying if maximum elapsed time exceeded.
+ if args.MaxElapsedTime > 0 && time.Since(startedAt)+next > args.MaxElapsedTime {
+ return res, err
+ }
+
+ // Notify on error if a notifier function is provided.
+ if args.Notify != nil {
+ args.Notify(err, next)
+ }
+
+ // Wait for the next backoff period or context cancellation.
+ args.Timer.Start(next)
+ select {
+ case <-args.Timer.C():
+ case <-ctx.Done():
+ return res, context.Cause(ctx)
+ }
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v5/ticker.go b/vendor/github.com/cenkalti/backoff/v5/ticker.go
new file mode 100644
index 0000000000..f0d4b2ae72
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/ticker.go
@@ -0,0 +1,83 @@
+package backoff
+
+import (
+ "sync"
+ "time"
+)
+
+// Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff.
+//
+// Ticks will continue to arrive when the previous operation is still running,
+// so operations that take a while to fail could run in quick succession.
+type Ticker struct {
+ C <-chan time.Time
+ c chan time.Time
+ b BackOff
+ timer timer
+ stop chan struct{}
+ stopOnce sync.Once
+}
+
+// NewTicker returns a new Ticker containing a channel that will send
+// the time at times specified by the BackOff argument. Ticker is
+// guaranteed to tick at least once. The channel is closed when Stop
+// method is called or BackOff stops. It is not safe to manipulate the
+// provided backoff policy (notably calling NextBackOff or Reset)
+// while the ticker is running.
+func NewTicker(b BackOff) *Ticker {
+ c := make(chan time.Time)
+ t := &Ticker{
+ C: c,
+ c: c,
+ b: b,
+ timer: &defaultTimer{},
+ stop: make(chan struct{}),
+ }
+ t.b.Reset()
+ go t.run()
+ return t
+}
+
+// Stop turns off a ticker. After Stop, no more ticks will be sent.
+func (t *Ticker) Stop() {
+ t.stopOnce.Do(func() { close(t.stop) })
+}
+
+func (t *Ticker) run() {
+ c := t.c
+ defer close(c)
+
+ // Ticker is guaranteed to tick at least once.
+ afterC := t.send(time.Now())
+
+ for {
+ if afterC == nil {
+ return
+ }
+
+ select {
+ case tick := <-afterC:
+ afterC = t.send(tick)
+ case <-t.stop:
+ t.c = nil // Prevent future ticks from being sent to the channel.
+ return
+ }
+ }
+}
+
+func (t *Ticker) send(tick time.Time) <-chan time.Time {
+ select {
+ case t.c <- tick:
+ case <-t.stop:
+ return nil
+ }
+
+ next := t.b.NextBackOff()
+ if next == Stop {
+ t.Stop()
+ return nil
+ }
+
+ t.timer.Start(next)
+ return t.timer.C()
+}
diff --git a/vendor/github.com/cenkalti/backoff/v5/timer.go b/vendor/github.com/cenkalti/backoff/v5/timer.go
new file mode 100644
index 0000000000..a895309747
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v5/timer.go
@@ -0,0 +1,35 @@
+package backoff
+
+import "time"
+
+type timer interface {
+ Start(duration time.Duration)
+ Stop()
+ C() <-chan time.Time
+}
+
+// defaultTimer implements Timer interface using time.Timer
+type defaultTimer struct {
+ timer *time.Timer
+}
+
+// C returns the timers channel which receives the current time when the timer fires.
+func (t *defaultTimer) C() <-chan time.Time {
+ return t.timer.C
+}
+
+// Start starts the timer to fire after the given duration
+func (t *defaultTimer) Start(duration time.Duration) {
+ if t.timer == nil {
+ t.timer = time.NewTimer(duration)
+ } else {
+ t.timer.Reset(duration)
+ }
+}
+
+// Stop is called when the timer is not used anymore and resources may be freed.
+func (t *defaultTimer) Stop() {
+ if t.timer != nil {
+ t.timer.Stop()
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/LICENSE b/vendor/github.com/cloudflare/circl/LICENSE
deleted file mode 100644
index 67edaa90a0..0000000000
--- a/vendor/github.com/cloudflare/circl/LICENSE
+++ /dev/null
@@ -1,57 +0,0 @@
-Copyright (c) 2019 Cloudflare. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Cloudflare nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-========================================================================
-
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve.go
deleted file mode 100644
index f9057c2b86..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package x25519
-
-import (
- fp "github.com/cloudflare/circl/math/fp25519"
-)
-
-// ladderJoye calculates a fixed-point multiplication with the generator point.
-// The algorithm is the right-to-left Joye's ladder as described
-// in "How to precompute a ladder" in SAC'2017.
-func ladderJoye(k *Key) {
- w := [5]fp.Elt{} // [mu,x1,z1,x2,z2] order must be preserved.
- fp.SetOne(&w[1]) // x1 = 1
- fp.SetOne(&w[2]) // z1 = 1
- w[3] = fp.Elt{ // x2 = G-S
- 0xbd, 0xaa, 0x2f, 0xc8, 0xfe, 0xe1, 0x94, 0x7e,
- 0xf8, 0xed, 0xb2, 0x14, 0xae, 0x95, 0xf0, 0xbb,
- 0xe2, 0x48, 0x5d, 0x23, 0xb9, 0xa0, 0xc7, 0xad,
- 0x34, 0xab, 0x7c, 0xe2, 0xee, 0xcd, 0xae, 0x1e,
- }
- fp.SetOne(&w[4]) // z2 = 1
-
- const n = 255
- const h = 3
- swap := uint(1)
- for s := 0; s < n-h; s++ {
- i := (s + h) / 8
- j := (s + h) % 8
- bit := uint((k[i] >> uint(j)) & 1)
- copy(w[0][:], tableGenerator[s*Size:(s+1)*Size])
- diffAdd(&w, swap^bit)
- swap = bit
- }
- for s := 0; s < h; s++ {
- double(&w[1], &w[2])
- }
- toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
-}
-
-// ladderMontgomery calculates a generic scalar point multiplication
-// The algorithm implemented is the left-to-right Montgomery's ladder.
-func ladderMontgomery(k, xP *Key) {
- w := [5]fp.Elt{} // [x1, x2, z2, x3, z3] order must be preserved.
- w[0] = *(*fp.Elt)(xP) // x1 = xP
- fp.SetOne(&w[1]) // x2 = 1
- w[3] = *(*fp.Elt)(xP) // x3 = xP
- fp.SetOne(&w[4]) // z3 = 1
-
- move := uint(0)
- for s := 255 - 1; s >= 0; s-- {
- i := s / 8
- j := s % 8
- bit := uint((k[i] >> uint(j)) & 1)
- ladderStep(&w, move^bit)
- move = bit
- }
- toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
-}
-
-func toAffine(k *[fp.Size]byte, x, z *fp.Elt) {
- fp.Inv(z, z)
- fp.Mul(x, x, z)
- _ = fp.ToBytes(k[:], x)
-}
-
-var lowOrderPoints = [5]fp.Elt{
- { /* (0,_,1) point of order 2 on Curve25519 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- { /* (1,_,1) point of order 4 on Curve25519 */
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- { /* (x,_,1) first point of order 8 on Curve25519 */
- 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae,
- 0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a,
- 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd,
- 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x00,
- },
- { /* (x,_,1) second point of order 8 on Curve25519 */
- 0x5f, 0x9c, 0x95, 0xbc, 0xa3, 0x50, 0x8c, 0x24,
- 0xb1, 0xd0, 0xb1, 0x55, 0x9c, 0x83, 0xef, 0x5b,
- 0x04, 0x44, 0x5c, 0xc4, 0x58, 0x1c, 0x8e, 0x86,
- 0xd8, 0x22, 0x4e, 0xdd, 0xd0, 0x9f, 0x11, 0x57,
- },
- { /* (-1,_,1) a point of order 4 on the twist of Curve25519 */
- 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
- },
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go
deleted file mode 100644
index 8a3d54c570..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go
+++ /dev/null
@@ -1,30 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-package x25519
-
-import (
- fp "github.com/cloudflare/circl/math/fp25519"
- "golang.org/x/sys/cpu"
-)
-
-var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
-
-var _ = hasBmi2Adx
-
-func double(x, z *fp.Elt) { doubleAmd64(x, z) }
-func diffAdd(w *[5]fp.Elt, b uint) { diffAddAmd64(w, b) }
-func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
-func mulA24(z, x *fp.Elt) { mulA24Amd64(z, x) }
-
-//go:noescape
-func ladderStepAmd64(w *[5]fp.Elt, b uint)
-
-//go:noescape
-func diffAddAmd64(w *[5]fp.Elt, b uint)
-
-//go:noescape
-func doubleAmd64(x, z *fp.Elt)
-
-//go:noescape
-func mulA24Amd64(z, x *fp.Elt)
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.h b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.h
deleted file mode 100644
index 8c1ae4d0fb..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#define ladderStepLeg \
- addSub(x2,z2) \
- addSub(x3,z3) \
- integerMulLeg(b0,x2,z3) \
- integerMulLeg(b1,x3,z2) \
- reduceFromDoubleLeg(t0,b0) \
- reduceFromDoubleLeg(t1,b1) \
- addSub(t0,t1) \
- cselect(x2,x3,regMove) \
- cselect(z2,z3,regMove) \
- integerSqrLeg(b0,t0) \
- integerSqrLeg(b1,t1) \
- reduceFromDoubleLeg(x3,b0) \
- reduceFromDoubleLeg(z3,b1) \
- integerMulLeg(b0,x1,z3) \
- reduceFromDoubleLeg(z3,b0) \
- integerSqrLeg(b0,x2) \
- integerSqrLeg(b1,z2) \
- reduceFromDoubleLeg(x2,b0) \
- reduceFromDoubleLeg(z2,b1) \
- subtraction(t0,x2,z2) \
- multiplyA24Leg(t1,t0) \
- additionLeg(t1,t1,z2) \
- integerMulLeg(b0,x2,z2) \
- integerMulLeg(b1,t0,t1) \
- reduceFromDoubleLeg(x2,b0) \
- reduceFromDoubleLeg(z2,b1)
-
-#define ladderStepBmi2Adx \
- addSub(x2,z2) \
- addSub(x3,z3) \
- integerMulAdx(b0,x2,z3) \
- integerMulAdx(b1,x3,z2) \
- reduceFromDoubleAdx(t0,b0) \
- reduceFromDoubleAdx(t1,b1) \
- addSub(t0,t1) \
- cselect(x2,x3,regMove) \
- cselect(z2,z3,regMove) \
- integerSqrAdx(b0,t0) \
- integerSqrAdx(b1,t1) \
- reduceFromDoubleAdx(x3,b0) \
- reduceFromDoubleAdx(z3,b1) \
- integerMulAdx(b0,x1,z3) \
- reduceFromDoubleAdx(z3,b0) \
- integerSqrAdx(b0,x2) \
- integerSqrAdx(b1,z2) \
- reduceFromDoubleAdx(x2,b0) \
- reduceFromDoubleAdx(z2,b1) \
- subtraction(t0,x2,z2) \
- multiplyA24Adx(t1,t0) \
- additionAdx(t1,t1,z2) \
- integerMulAdx(b0,x2,z2) \
- integerMulAdx(b1,t0,t1) \
- reduceFromDoubleAdx(x2,b0) \
- reduceFromDoubleAdx(z2,b1)
-
-#define difAddLeg \
- addSub(x1,z1) \
- integerMulLeg(b0,z1,ui) \
- reduceFromDoubleLeg(z1,b0) \
- addSub(x1,z1) \
- integerSqrLeg(b0,x1) \
- integerSqrLeg(b1,z1) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1) \
- integerMulLeg(b0,x1,z2) \
- integerMulLeg(b1,z1,x2) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1)
-
-#define difAddBmi2Adx \
- addSub(x1,z1) \
- integerMulAdx(b0,z1,ui) \
- reduceFromDoubleAdx(z1,b0) \
- addSub(x1,z1) \
- integerSqrAdx(b0,x1) \
- integerSqrAdx(b1,z1) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1) \
- integerMulAdx(b0,x1,z2) \
- integerMulAdx(b1,z1,x2) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1)
-
-#define doubleLeg \
- addSub(x1,z1) \
- integerSqrLeg(b0,x1) \
- integerSqrLeg(b1,z1) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1) \
- subtraction(t0,x1,z1) \
- multiplyA24Leg(t1,t0) \
- additionLeg(t1,t1,z1) \
- integerMulLeg(b0,x1,z1) \
- integerMulLeg(b1,t0,t1) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1)
-
-#define doubleBmi2Adx \
- addSub(x1,z1) \
- integerSqrAdx(b0,x1) \
- integerSqrAdx(b1,z1) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1) \
- subtraction(t0,x1,z1) \
- multiplyA24Adx(t1,t0) \
- additionAdx(t1,t1,z1) \
- integerMulAdx(b0,x1,z1) \
- integerMulAdx(b1,t0,t1) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1)
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
deleted file mode 100644
index ce9f062894..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
+++ /dev/null
@@ -1,157 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-#include "textflag.h"
-
-// Depends on circl/math/fp25519 package
-#include "../../math/fp25519/fp_amd64.h"
-#include "curve_amd64.h"
-
-// CTE_A24 is (A+2)/4 from Curve25519
-#define CTE_A24 121666
-
-#define Size 32
-
-// multiplyA24Leg multiplies x times CTE_A24 and stores in z
-// Uses: AX, DX, R8-R13, FLAGS
-// Instr: x86_64, cmov
-#define multiplyA24Leg(z,x) \
- MOVL $CTE_A24, AX; MULQ 0+x; MOVQ AX, R8; MOVQ DX, R9; \
- MOVL $CTE_A24, AX; MULQ 8+x; MOVQ AX, R12; MOVQ DX, R10; \
- MOVL $CTE_A24, AX; MULQ 16+x; MOVQ AX, R13; MOVQ DX, R11; \
- MOVL $CTE_A24, AX; MULQ 24+x; \
- ADDQ R12, R9; \
- ADCQ R13, R10; \
- ADCQ AX, R11; \
- ADCQ $0, DX; \
- MOVL $38, AX; /* 2*C = 38 = 2^256 MOD 2^255-19*/ \
- IMULQ AX, DX; \
- ADDQ DX, R8; \
- ADCQ $0, R9; MOVQ R9, 8+z; \
- ADCQ $0, R10; MOVQ R10, 16+z; \
- ADCQ $0, R11; MOVQ R11, 24+z; \
- MOVQ $0, DX; \
- CMOVQCS AX, DX; \
- ADDQ DX, R8; MOVQ R8, 0+z;
-
-// multiplyA24Adx multiplies x times CTE_A24 and stores in z
-// Uses: AX, DX, R8-R12, FLAGS
-// Instr: x86_64, cmov, bmi2
-#define multiplyA24Adx(z,x) \
- MOVQ $CTE_A24, DX; \
- MULXQ 0+x, R8, R10; \
- MULXQ 8+x, R9, R11; ADDQ R10, R9; \
- MULXQ 16+x, R10, AX; ADCQ R11, R10; \
- MULXQ 24+x, R11, R12; ADCQ AX, R11; \
- ;;;;;;;;;;;;;;;;;;;;; ADCQ $0, R12; \
- MOVL $38, DX; /* 2*C = 38 = 2^256 MOD 2^255-19*/ \
- IMULQ DX, R12; \
- ADDQ R12, R8; \
- ADCQ $0, R9; MOVQ R9, 8+z; \
- ADCQ $0, R10; MOVQ R10, 16+z; \
- ADCQ $0, R11; MOVQ R11, 24+z; \
- MOVQ $0, R12; \
- CMOVQCS DX, R12; \
- ADDQ R12, R8; MOVQ R8, 0+z;
-
-#define mulA24Legacy \
- multiplyA24Leg(0(DI),0(SI))
-#define mulA24Bmi2Adx \
- multiplyA24Adx(0(DI),0(SI))
-
-// func mulA24Amd64(z, x *fp255.Elt)
-TEXT ·mulA24Amd64(SB),NOSPLIT,$0-16
- MOVQ z+0(FP), DI
- MOVQ x+8(FP), SI
- CHECK_BMI2ADX(LMA24, mulA24Legacy, mulA24Bmi2Adx)
-
-
-// func ladderStepAmd64(w *[5]fp255.Elt, b uint)
-// ladderStepAmd64 calculates a point addition and doubling as follows:
-// (x2,z2) = 2*(x2,z2) and (x3,z3) = (x2,z2)+(x3,z3) using as a difference (x1,-).
-// work = (x1,x2,z2,x3,z3) are five fp255.Elt of 32 bytes.
-// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
-// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
-TEXT ·ladderStepAmd64(SB),NOSPLIT,$192-16
- // Parameters
- #define regWork DI
- #define regMove SI
- #define x1 0*Size(regWork)
- #define x2 1*Size(regWork)
- #define z2 2*Size(regWork)
- #define x3 3*Size(regWork)
- #define z3 4*Size(regWork)
- // Local variables
- #define t0 0*Size(SP)
- #define t1 1*Size(SP)
- #define b0 2*Size(SP)
- #define b1 4*Size(SP)
- MOVQ w+0(FP), regWork
- MOVQ b+8(FP), regMove
- CHECK_BMI2ADX(LLADSTEP, ladderStepLeg, ladderStepBmi2Adx)
- #undef regWork
- #undef regMove
- #undef x1
- #undef x2
- #undef z2
- #undef x3
- #undef z3
- #undef t0
- #undef t1
- #undef b0
- #undef b1
-
-// func diffAddAmd64(w *[5]fp255.Elt, b uint)
-// diffAddAmd64 calculates a differential point addition using a precomputed point.
-// (x1,z1) = (x1,z1)+(mu) using a difference point (x2,z2)
-// w = (mu,x1,z1,x2,z2) are five fp.Elt, and
-// stack = (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
-TEXT ·diffAddAmd64(SB),NOSPLIT,$128-16
- // Parameters
- #define regWork DI
- #define regSwap SI
- #define ui 0*Size(regWork)
- #define x1 1*Size(regWork)
- #define z1 2*Size(regWork)
- #define x2 3*Size(regWork)
- #define z2 4*Size(regWork)
- // Local variables
- #define b0 0*Size(SP)
- #define b1 2*Size(SP)
- MOVQ w+0(FP), regWork
- MOVQ b+8(FP), regSwap
- cswap(x1,x2,regSwap)
- cswap(z1,z2,regSwap)
- CHECK_BMI2ADX(LDIFADD, difAddLeg, difAddBmi2Adx)
- #undef regWork
- #undef regSwap
- #undef ui
- #undef x1
- #undef z1
- #undef x2
- #undef z2
- #undef b0
- #undef b1
-
-// func doubleAmd64(x, z *fp255.Elt)
-// doubleAmd64 calculates a point doubling (x1,z1) = 2*(x1,z1).
-// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
-// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
-TEXT ·doubleAmd64(SB),NOSPLIT,$192-16
- // Parameters
- #define x1 0(DI)
- #define z1 0(SI)
- // Local variables
- #define t0 0*Size(SP)
- #define t1 1*Size(SP)
- #define b0 2*Size(SP)
- #define b1 4*Size(SP)
- MOVQ x+0(FP), DI
- MOVQ z+8(FP), SI
- CHECK_BMI2ADX(LDOUB,doubleLeg,doubleBmi2Adx)
- #undef x1
- #undef z1
- #undef t0
- #undef t1
- #undef b0
- #undef b1
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_generic.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve_generic.go
deleted file mode 100644
index dae67ea37d..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve_generic.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package x25519
-
-import (
- "encoding/binary"
- "math/bits"
-
- fp "github.com/cloudflare/circl/math/fp25519"
-)
-
-func doubleGeneric(x, z *fp.Elt) {
- t0, t1 := &fp.Elt{}, &fp.Elt{}
- fp.AddSub(x, z)
- fp.Sqr(x, x)
- fp.Sqr(z, z)
- fp.Sub(t0, x, z)
- mulA24Generic(t1, t0)
- fp.Add(t1, t1, z)
- fp.Mul(x, x, z)
- fp.Mul(z, t0, t1)
-}
-
-func diffAddGeneric(w *[5]fp.Elt, b uint) {
- mu, x1, z1, x2, z2 := &w[0], &w[1], &w[2], &w[3], &w[4]
- fp.Cswap(x1, x2, b)
- fp.Cswap(z1, z2, b)
- fp.AddSub(x1, z1)
- fp.Mul(z1, z1, mu)
- fp.AddSub(x1, z1)
- fp.Sqr(x1, x1)
- fp.Sqr(z1, z1)
- fp.Mul(x1, x1, z2)
- fp.Mul(z1, z1, x2)
-}
-
-func ladderStepGeneric(w *[5]fp.Elt, b uint) {
- x1, x2, z2, x3, z3 := &w[0], &w[1], &w[2], &w[3], &w[4]
- t0 := &fp.Elt{}
- t1 := &fp.Elt{}
- fp.AddSub(x2, z2)
- fp.AddSub(x3, z3)
- fp.Mul(t0, x2, z3)
- fp.Mul(t1, x3, z2)
- fp.AddSub(t0, t1)
- fp.Cmov(x2, x3, b)
- fp.Cmov(z2, z3, b)
- fp.Sqr(x3, t0)
- fp.Sqr(z3, t1)
- fp.Mul(z3, x1, z3)
- fp.Sqr(x2, x2)
- fp.Sqr(z2, z2)
- fp.Sub(t0, x2, z2)
- mulA24Generic(t1, t0)
- fp.Add(t1, t1, z2)
- fp.Mul(x2, x2, z2)
- fp.Mul(z2, t0, t1)
-}
-
-func mulA24Generic(z, x *fp.Elt) {
- const A24 = 121666
- const n = 8
- var xx [4]uint64
- for i := range xx {
- xx[i] = binary.LittleEndian.Uint64(x[i*n : (i+1)*n])
- }
-
- h0, l0 := bits.Mul64(xx[0], A24)
- h1, l1 := bits.Mul64(xx[1], A24)
- h2, l2 := bits.Mul64(xx[2], A24)
- h3, l3 := bits.Mul64(xx[3], A24)
-
- var c3 uint64
- l1, c0 := bits.Add64(h0, l1, 0)
- l2, c1 := bits.Add64(h1, l2, c0)
- l3, c2 := bits.Add64(h2, l3, c1)
- l4, _ := bits.Add64(h3, 0, c2)
- _, l4 = bits.Mul64(l4, 38)
- l0, c0 = bits.Add64(l0, l4, 0)
- xx[1], c1 = bits.Add64(l1, 0, c0)
- xx[2], c2 = bits.Add64(l2, 0, c1)
- xx[3], c3 = bits.Add64(l3, 0, c2)
- xx[0], _ = bits.Add64(l0, (-c3)&38, 0)
- for i := range xx {
- binary.LittleEndian.PutUint64(z[i*n:(i+1)*n], xx[i])
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go
deleted file mode 100644
index 07fab97d2a..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go
+++ /dev/null
@@ -1,11 +0,0 @@
-//go:build !amd64 || purego
-// +build !amd64 purego
-
-package x25519
-
-import fp "github.com/cloudflare/circl/math/fp25519"
-
-func double(x, z *fp.Elt) { doubleGeneric(x, z) }
-func diffAdd(w *[5]fp.Elt, b uint) { diffAddGeneric(w, b) }
-func ladderStep(w *[5]fp.Elt, b uint) { ladderStepGeneric(w, b) }
-func mulA24(z, x *fp.Elt) { mulA24Generic(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/doc.go b/vendor/github.com/cloudflare/circl/dh/x25519/doc.go
deleted file mode 100644
index 3ce102d145..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
-
-Validation of public keys.
-
-The Diffie-Hellman function, as described in RFC-7748 [1], works for any
-public key. However, if a different protocol requires contributory
-behaviour [2,3], then the public keys must be validated against low-order
-points [3,4]. To do that, the Shared function performs this validation
-internally and returns false when the public key is invalid (i.e., it
-is a low-order point).
-
-References:
- - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
- - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
- - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
- - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
-*/
-package x25519
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/key.go b/vendor/github.com/cloudflare/circl/dh/x25519/key.go
deleted file mode 100644
index c76f72ac7f..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/key.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package x25519
-
-import (
- "crypto/subtle"
-
- fp "github.com/cloudflare/circl/math/fp25519"
-)
-
-// Size is the length in bytes of a X25519 key.
-const Size = 32
-
-// Key represents a X25519 key.
-type Key [Size]byte
-
-func (k *Key) clamp(in *Key) *Key {
- *k = *in
- k[0] &= 248
- k[31] = (k[31] & 127) | 64
- return k
-}
-
-// isValidPubKey verifies if the public key is not a low-order point.
-func (k *Key) isValidPubKey() bool {
- fp.Modp((*fp.Elt)(k))
- var isLowOrder int
- for _, P := range lowOrderPoints {
- isLowOrder |= subtle.ConstantTimeCompare(P[:], k[:])
- }
- return isLowOrder == 0
-}
-
-// KeyGen obtains a public key given a secret key.
-func KeyGen(public, secret *Key) {
- ladderJoye(public.clamp(secret))
-}
-
-// Shared calculates Alice's shared key from Alice's secret key and Bob's
-// public key returning true on success. A failure case happens when the public
-// key is a low-order point, thus the shared key is all-zeros and the function
-// returns false.
-func Shared(shared, secret, public *Key) bool {
- validPk := *public
- validPk[31] &= (1 << (255 % 8)) - 1
- ok := validPk.isValidPubKey()
- ladderMontgomery(shared.clamp(secret), &validPk)
- return ok
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/table.go b/vendor/github.com/cloudflare/circl/dh/x25519/table.go
deleted file mode 100644
index 28c8c4ac03..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x25519/table.go
+++ /dev/null
@@ -1,268 +0,0 @@
-package x25519
-
-import "github.com/cloudflare/circl/math/fp25519"
-
-// tableGenerator contains the set of points:
-//
-// t[i] = (xi+1)/(xi-1),
-//
-// where (xi,yi) = 2^iG and G is the generator point
-// Size = (256)*(256/8) = 8192 bytes.
-var tableGenerator = [256 * fp25519.Size]byte{
- /* (2^ 0)P */ 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f,
- /* (2^ 1)P */ 0x96, 0xfe, 0xaa, 0x16, 0xf4, 0x20, 0x82, 0x6b, 0x34, 0x6a, 0x56, 0x4f, 0x2b, 0xeb, 0xeb, 0x82, 0x0f, 0x95, 0xa5, 0x75, 0xb0, 0xa5, 0xa9, 0xd5, 0xf4, 0x88, 0x24, 0x4b, 0xcf, 0xb2, 0x42, 0x51,
- /* (2^ 2)P */ 0x0c, 0x68, 0x69, 0x00, 0x75, 0xbc, 0xae, 0x6a, 0x41, 0x9c, 0xf9, 0xa0, 0x20, 0x78, 0xcf, 0x89, 0xf4, 0xd0, 0x56, 0x3b, 0x18, 0xd9, 0x58, 0x2a, 0xa4, 0x11, 0x60, 0xe3, 0x80, 0xca, 0x5a, 0x4b,
- /* (2^ 3)P */ 0x5d, 0x74, 0x29, 0x8c, 0x34, 0x32, 0x91, 0x32, 0xd7, 0x2f, 0x64, 0xe1, 0x16, 0xe6, 0xa2, 0xf4, 0x34, 0xbc, 0x67, 0xff, 0x03, 0xbb, 0x45, 0x1e, 0x4a, 0x9b, 0x2a, 0xf4, 0xd0, 0x12, 0x69, 0x30,
- /* (2^ 4)P */ 0x54, 0x71, 0xaf, 0xe6, 0x07, 0x65, 0x88, 0xff, 0x2f, 0xc8, 0xee, 0xdf, 0x13, 0x0e, 0xf5, 0x04, 0xce, 0xb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0xac, 0xcc, 0x91, 0x7c, 0x68, 0x7a, 0x43, 0xd4, 0xee, 0xf7, 0x23,
- /* (2^ 37)P */ 0x00, 0xd8, 0x9b, 0x8d, 0x11, 0xb1, 0x73, 0x51, 0xa7, 0xd4, 0x89, 0x31, 0xb6, 0x41, 0xd6, 0x29, 0x86, 0xc5, 0xbb, 0x88, 0x79, 0x17, 0xbf, 0xfd, 0xf5, 0x1d, 0xd8, 0xca, 0x4f, 0x89, 0x59, 0x29,
- /* (2^ 38)P */ 0x99, 0xc8, 0xbb, 0xb4, 0xf3, 0x8e, 0xbc, 0xae, 0xb9, 0x92, 0x69, 0xb2, 0x5a, 0x99, 0x48, 0x41, 0xfb, 0x2c, 0xf9, 0x34, 0x01, 0x0b, 0xe2, 0x24, 0xe8, 0xde, 0x05, 0x4a, 0x89, 0x58, 0xd1, 0x40,
- /* (2^ 39)P */ 0xf6, 0x76, 0xaf, 0x85, 0x11, 0x0b, 0xb0, 0x46, 0x79, 0x7a, 0x18, 0x73, 0x78, 0xc7, 0xba, 0x26, 0x5f, 0xff, 0x8f, 0xab, 0x95, 0xbf, 0xc0, 0x3d, 0xd7, 0x24, 0x55, 0x94, 0xd8, 0x8b, 0x60, 0x2a,
- /* (2^ 40)P */ 0x02, 0x63, 0x44, 0xbd, 0x88, 0x95, 0x44, 0x26, 0x9c, 0x43, 0x88, 0x03, 0x1c, 0xc2, 0x4b, 0x7c, 0xb2, 0x11, 0xbd, 0x83, 0xf3, 0xa4, 0x98, 0x8e, 0xb9, 0x76, 0xd8, 0xc9, 0x7b, 0x8d, 0x21, 0x26,
- /* (2^ 41)P */ 0x8a, 0x17, 0x7c, 0x99, 0x42, 0x15, 0x08, 0xe3, 0x6f, 0x60, 0xb6, 0x6f, 0xa8, 0x29, 0x2d, 0x3c, 0x74, 0x93, 0x27, 0xfa, 0x36, 0x77, 0x21, 0x5c, 0xfa, 0xb1, 0xfe, 0x4a, 0x73, 0x05, 0xde, 0x7d,
- /* (2^ 42)P */ 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0xee, 0x33, 0xcc, 0x2c, 0x9d, 0xa6, 0x73, 0x61, 0x25, 0x59,
- /* (2^ 69)P */ 0x41, 0xfc, 0x18, 0x4e, 0xaa, 0x07, 0xea, 0x41, 0x1e, 0xa5, 0x87, 0x7c, 0x52, 0x19, 0xfc, 0xd9, 0x6f, 0xca, 0x31, 0x58, 0x80, 0xcb, 0xaa, 0xbd, 0x4f, 0x69, 0x16, 0xc9, 0x2d, 0x65, 0x5b, 0x44,
- /* (2^ 70)P */ 0x15, 0x23, 0x17, 0xf2, 0xa7, 0xa3, 0x92, 0xce, 0x64, 0x99, 0x1b, 0xe1, 0x2d, 0x28, 0xdc, 0x1e, 0x4a, 0x31, 0x4c, 0xe0, 0xaf, 0x3a, 0x82, 0xa1, 0x86, 0xf5, 0x7c, 0x43, 0x94, 0x2d, 0x0a, 0x79,
- /* (2^ 71)P */ 0x09, 0xe0, 0xf6, 0x93, 0xfb, 0x47, 0xc4, 0x71, 0x76, 0x52, 0x84, 0x22, 0x67, 0xa5, 0x22, 0x89, 0x69, 0x51, 0x4f, 0x20, 0x3b, 0x90, 0x70, 0xbf, 0xfe, 0x19, 0xa3, 0x1b, 0x89, 0x89, 0x7a, 0x2f,
- /* (2^ 72)P */ 0x0c, 0x14, 0xe2, 0x77, 0xb5, 0x8e, 0xa0, 0x02, 0xf4, 0xdc, 0x7b, 0x42, 0xd4, 0x4e, 0x9a, 0xed, 0xd1, 0x3c, 0x32, 0xe4, 0x44, 0xec, 0x53, 0x52, 0x5b, 0x35, 0xe9, 0x14, 0x3c, 0x36, 0x88, 0x3e,
- /* (2^ 73)P */ 0x8c, 0x0b, 0x11, 0x77, 0x42, 0xc1, 0x66, 0xaa, 0x90, 0x33, 0xa2, 0x10, 0x16, 0x39, 0xe0, 0x1a, 0xa2, 0xc2, 0x3f, 0xc9, 0x12, 0xbd, 0x30, 0x20, 0xab, 0xc7, 0x55, 0x95, 0x57, 0x41, 0xe1, 0x3e,
- /* (2^ 74)P */ 0x41, 0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4b, 0x11, 0xc6, 0x15, 0x6e,
- /* (2^101)P */ 0x6b, 0xa7, 0xb1, 0xcf, 0x98, 0xa3, 0xf2, 0x4d, 0xb1, 0xf6, 0xf2, 0x19, 0x74, 0x6c, 0x25, 0x11, 0x43, 0x60, 0x6e, 0x06, 0x62, 0x79, 0x49, 0x4a, 0x44, 0x5b, 0x35, 0x41, 0xab, 0x3a, 0x5b, 0x70,
- /* (2^102)P */ 0xd8, 0xb1, 0x97, 0xd7, 0x36, 0xf5, 0x5e, 0x36, 0xdb, 0xf0, 0xdd, 0x22, 0xd6, 0x6b, 0x07, 0x00, 0x88, 0x5a, 0x57, 0xe0, 0xb0, 0x33, 0xbf, 0x3b, 0x4d, 0xca, 0xe4, 0xc8, 0x05, 0xaa, 0x77, 0x37,
- /* (2^103)P */ 0x5f, 0xdb, 0x78, 0x55, 0xc8, 0x45, 0x27, 0x39, 0xe2, 0x5a, 0xae, 0xdb, 0x49, 0x41, 0xda, 0x6f, 0x67, 0x98, 0xdc, 0x8a, 0x0b, 0xb0, 0xf0, 0xb1, 0xa3, 0x1d, 0x6f, 0xd3, 0x37, 0x34, 0x96, 0x09,
- /* (2^104)P */ 0x53, 0x38, 0xdc, 0xa5, 0x90, 0x4e, 0x82, 0x7e, 0xbd, 0x5c, 0x13, 0x1f, 0x64, 0xf6, 0xb5, 0xcc, 0xcc, 0x8f, 0xce, 0x87, 0x6c, 0xd8, 0x36, 0x67, 0x9f, 0x24, 0x04, 0x66, 0xe2, 0x3c, 0x5f, 0x62,
- /* (2^105)P */ 0x3f, 0xf6, 0x02, 0x95, 0x05, 0xc8, 0x8a, 0xaf, 0x69, 0x14, 0x35, 0x2e, 0x0a, 0xe7, 0x05, 0x0c, 0x05, 0x63, 0x4b, 0x76, 0x9c, 0x2e, 0x29, 0x35, 0xc3, 0x3a, 0xe2, 0xc7, 0x60, 0x43, 0x39, 0x1a,
- /* (2^106)P */ 0x64, 0x32, 0x18, 0x51, 0x32, 0xd5, 0xc6, 0x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1, 0x1b, 0x32, 0xb3, 0x8e, 0xbe, 0x5f, 0x0c, 0x60, 0x4f, 0xc1, 0x48,
- /* (2^112)P */ 0x03, 0xc8, 0xa6, 0x4a, 0x26, 0x1c, 0x45, 0x66, 0xa6, 0x7d, 0xfa, 0xa4, 0x04, 0x39, 0x6e, 0xb6, 0x95, 0x83, 0x12, 0xb3, 0xb0, 0x19, 0x5f, 0xd4, 0x10, 0xbc, 0xc9, 0xc3, 0x27, 0x26, 0x60, 0x31,
- /* (2^113)P */ 0x0d, 0xe1, 0xe4, 0x32, 0x48, 0xdc, 0x20, 0x31, 0xf7, 0x17, 0xc7, 0x56, 0x67, 0xc4, 0x20, 0xeb, 0x94, 0x02, 0x28, 0x67, 0x3f, 0x2e, 0xf5, 0x00, 0x09, 0xc5, 0x30, 0x47, 0xc1, 0x4f, 0x6d, 0x56,
- /* (2^114)P */ 0x06, 0x72, 0x83, 0xfd, 0x40, 0x5d, 0x3a, 0x7e, 0x7a, 0x54, 0x59, 0x71, 0xdc, 0x26, 0xe9, 0xc1, 0x95, 0x60, 0x8d, 0xa6, 0xfb, 0x30, 0x67, 0x21, 0xa7, 0xce, 0x69, 0x3f, 0x84, 0xc3, 0xe8, 0x22,
- /* (2^115)P */ 0x2b, 0x4b, 0x0e, 0x93, 0xe8, 0x74, 0xd0, 0x33, 0x16, 0x58, 0xd1, 0x84, 0x0e, 0x35, 0xe4, 0xb6, 0x65, 0x23, 0xba, 0xd6, 0x6a, 0xc2, 0x34, 0x55, 0xf3, 0xf3, 0xf1, 0x89, 0x2f, 0xc1, 0x73, 0x77,
- /* (2^116)P */ 0xaa, 0x62, 0x79, 0xa5, 0x4d, 0x40, 0xba, 0x8c, 0x56, 0xce, 0x99, 0x19, 0xa8, 0x97, 0x98, 0x5b, 0xfc, 0x92, 0x16, 0x12, 0x2f, 0x86, 0x8e, 0x50, 0x91, 0xc2, 0x93, 0xa0, 0x7f, 0x90, 0x81, 0x3a,
- /* (2^117)P */ 0x10, 0xa5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a0, 0xde, 0x53, 0xfe, 0x2c,
- /* (2^128)P */ 0xb0, 0x52, 0xcd, 0x85, 0xcd, 0x92, 0x73, 0x68, 0x31, 0x98, 0xe2, 0x10, 0xc9, 0x66, 0xff, 0x27, 0x06, 0x2d, 0x83, 0xa9, 0x56, 0x45, 0x13, 0x97, 0xa0, 0xf8, 0x84, 0x0a, 0x36, 0xb0, 0x9b, 0x26,
- /* (2^129)P */ 0x5c, 0xf8, 0x43, 0x76, 0x45, 0x55, 0x6e, 0x70, 0x1b, 0x7d, 0x59, 0x9b, 0x8c, 0xa4, 0x34, 0x37, 0x72, 0xa4, 0xef, 0xc6, 0xe8, 0x91, 0xee, 0x7a, 0xe0, 0xd9, 0xa9, 0x98, 0xc1, 0xab, 0xd6, 0x5c,
- /* (2^130)P */ 0x1a, 0xe4, 0x3c, 0xcb, 0x06, 0xde, 0x04, 0x0e, 0x38, 0xe1, 0x02, 0x34, 0x89, 0xeb, 0xc6, 0xd8, 0x72, 0x37, 0x6e, 0x68, 0xbb, 0x59, 0x46, 0x90, 0xc8, 0xa8, 0x6b, 0x74, 0x71, 0xc3, 0x15, 0x72,
- /* (2^131)P */ 0xd9, 0xa2, 0xe4, 0xea, 0x7e, 0xa9, 0x12, 0xfd, 0xc5, 0xf2, 0x94, 0x63, 0x51, 0xb7, 0x14, 0x95, 0x94, 0xf2, 0x08, 0x92, 0x80, 0xd5, 0x6f, 0x26, 0xb9, 0x26, 0x9a, 0x61, 0x85, 0x70, 0x84, 0x5c,
- /* (2^132)P */ 0xea, 0x94, 0xd6, 0xfe, 0x10, 0x54, 0x98, 0x52, 0x54, 0xd2, 0x2e, 0x4a, 0x93, 0x5b, 0x90, 0x3c, 0x67, 0xe4, 0x3b, 0x2d, 0x69, 0x47, 0xbb, 0x10, 0xe1, 0xe9, 0xe5, 0x69, 0x2d, 0x3d, 0x3b, 0x06,
- /* (2^133)P */ 0xeb, 0x7d, 0xa5, 0xdd, 0xee, 0x26, 0x27, 0x47, 0x91, 0x18, 0xf4, 0x10, 0xae, 0xc4, 0xb6, 0xef, 0x14, 0x76, 0x30, 0x7b, 0x91, 0x41, 0x16, 0x2b, 0x7c, 0x5b, 0xf4, 0xc4, 0x4f, 0x55, 0x7c, 0x11,
- /* (2^134)P */ 0x12, 0x88, 0x9d, 0x8f, 0x11, 0xf3, 0x7c, 0xc0, 0x39, 0x79, 0x01, 0x50, 0x20, 0xd8, 0xdb, 0x01, 0x27, 0x28, 0x1b, 0x17, 0xf4, 0x03, 0xe8, 0xd7, 0xea, 0x25, 0xd2, 0x87, 0x74, 0xe8, 0x15, 0x10,
- /* (2^135)P */ 0x4d, 0xcc, 0x3a, 0xd2, 0xfe, 0xe3, 0x8d, 0xc5, 0x2d, 0xbe, 0xa7, 0x94, 0xc2, 0x91, 0xdb, 0x50, 0x57, 0xf4, 0x9c, 0x1c, 0x3d, 0xd4, 0x94, 0x0b, 0x4a, 0x52, 0x37, 0x6e, 0xfa, 0x40, 0x16, 0x6b,
- /* (2^136)P */ 0x09, 0x0d, 0xda, 0x5f, 0x6c, 0x34, 0x2f, 0x69, 0x51, 0x31, 0x4d, 0xfa, 0x59, 0x1c, 0x0b, 0x20, 0x96, 0xa2, 0x77, 0x07, 0x76, 0x6f, 0xc4, 0xb8, 0xcf, 0xfb, 0xfd, 0x3f, 0x5f, 0x39, 0x38, 0x4b,
- /* (2^137)P */ 0x71, 0xd6, 0x54, 0xbe, 0x00, 0x5e, 0xd2, 0x18, 0xa6, 0xab, 0xc8, 0xbe, 0x82, 0x05, 0xd5, 0x60, 0x82, 0xb9, 0x78, 0x3b, 0x26, 0x8f, 0xad, 0x87, 0x32, 0x04, 0xda, 0x9c, 0x4e, 0xf6, 0xfd, 0x50,
- /* (2^138)P */ 0xf0, 0xdc, 0x78, 0xc5, 0xaa, 0x67, 0xf5, 0x90, 0x3b, 0x13, 0xa3, 0xf2, 0x0e, 0x9b, 0x1e, 0xef, 0x71, 0xde, 0xd9, 0x42, 0x92, 0xba, 0xeb, 0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, 0x30, 0x3c, 0xb6, 0x8f, 0xce, 0xe9, 0xf4, 0xf9, 0xe1, 0x65, 0x35, 0xf6, 0x76, 0x53, 0xf1, 0x93, 0x63, 0x5a, 0xb3, 0xcf, 0xaf, 0xd1, 0x06, 0x35, 0x62, 0xe5, 0xed, 0xa1, 0x32, 0x66,
- /* (2^145)P */ 0x4c, 0xed, 0x2d, 0x0c, 0x39, 0x6c, 0x7d, 0x0b, 0x1f, 0xcb, 0x04, 0xdf, 0x81, 0x32, 0xcb, 0x56, 0xc7, 0xc3, 0xec, 0x49, 0x12, 0x5a, 0x30, 0x66, 0x2a, 0xa7, 0x8c, 0xa3, 0x60, 0x8b, 0x58, 0x5d,
- /* (2^146)P */ 0x2d, 0xf4, 0xe5, 0xe8, 0x78, 0xbf, 0xec, 0xa6, 0xec, 0x3e, 0x8a, 0x3c, 0x4b, 0xb4, 0xee, 0x86, 0x04, 0x16, 0xd2, 0xfb, 0x48, 0x9c, 0x21, 0xec, 0x31, 0x67, 0xc3, 0x17, 0xf5, 0x1a, 0xaf, 0x1a,
- /* (2^147)P */ 0xe7, 0xbd, 0x69, 0x67, 0x83, 0xa2, 0x06, 0xc3, 0xdb, 0x2a, 0x1e, 0x2b, 0x62, 0x80, 0x82, 0x20, 0xa6, 0x94, 0xff, 0xfb, 0x1f, 0xf5, 0x27, 0x80, 0x6b, 0xf2, 0x24, 0x11, 0xce, 0xa1, 0xcf, 0x76,
- /* (2^148)P */ 0xb6, 0xab, 0x22, 0x24, 0x56, 0x00, 0xeb, 0x18, 0xc3, 0x29, 0x8c, 0x8f, 0xd5, 0xc4, 0x77, 0xf3, 0x1a, 0x56, 0x31, 0xf5, 0x07, 0xc2, 0xbb, 0x4d, 0x27, 0x8a, 0x12, 0x82, 0xf0, 0xb7, 0x53, 0x02,
- /* (2^149)P */ 0xe0, 0x17, 0x2c, 0xb6, 0x1c, 0x09, 0x1f, 0x3d, 0xa9, 0x28, 0x46, 0xd6, 0xab, 0xe1, 0x60, 0x48, 0x53, 0x42, 0x9d, 0x30, 0x36, 0x74, 0xd1, 0x52, 0x76, 0xe5, 0xfa, 0x3e, 0xe1, 0x97, 0x6f, 0x35,
- /* (2^150)P */ 0x5b, 0x53, 0x50, 0xa1, 0x1a, 0xe1, 0x51, 0xd3, 0xcc, 0x78, 0xd8, 0x1d, 0xbb, 0x45, 0x6b, 0x3e, 0x98, 0x2c, 0xd9, 0xbe, 0x28, 0x61, 0x77, 0x0c, 0xb8, 0x85, 0x28, 0x03, 0x93, 0xae, 0x34, 0x1d,
- /* (2^151)P */ 0xc3, 0xa4, 0x5b, 0xa8, 0x8c, 0x48, 0xa0, 0x4b, 0xce, 0xe6, 0x9c, 0x3c, 0xc3, 0x48, 0x53, 0x98, 0x70, 0xa7, 0xbd, 0x97, 0x6f, 0x4c, 0x12, 0x66, 0x4a, 0x12, 0x54, 0x06, 0x29, 0xa0, 0x81, 0x0f,
- /* (2^152)P */ 0xfd, 0x86, 0x9b, 0x56, 0xa6, 0x9c, 0xd0, 0x9e, 0x2d, 0x9a, 0xaf, 0x18, 0xfd, 0x09, 0x10, 0x81, 0x0a, 0xc2, 0xd8, 0x93, 0x3f, 0xd0, 0x08, 0xff, 0x6b, 0xf2, 0xae, 0x9f, 0x19, 0x48, 0xa1, 0x52,
- /* (2^153)P */ 0x73, 0x1b, 0x8d, 0x2d, 0xdc, 0xf9, 0x03, 0x3e, 0x70, 0x1a, 0x96, 0x73, 0x18, 0x80, 0x05, 0x42, 0x70, 0x59, 0xa3, 0x41, 0xf0, 0x87, 0xd9, 0xc0, 0x49, 0xd5, 0xc0, 0xa1, 0x15, 0x1f, 0xaa, 0x07,
- /* (2^154)P */ 0x24, 0x72, 0xd2, 0x8c, 0xe0, 0x6c, 0xd4, 0xdf, 0x39, 0x42, 0x4e, 0x93, 0x4f, 0x02, 0x0a, 0x6d, 0x59, 0x7b, 0x89, 0x99, 0x63, 0x7a, 0x8a, 0x80, 0xa2, 0x95, 0x3d, 0xe1, 0xe9, 0x56, 0x45, 0x0a,
- /* (2^155)P */ 0x45, 0x30, 0xc1, 0xe9, 0x1f, 0x99, 0x1a, 0xd2, 0xb8, 0x51, 0x77, 0xfe, 0x48, 0x85, 0x0e, 0x9b, 0x35, 0x00, 0xf3, 0x4b, 0xcb, 0x43, 0xa6, 0x5d, 0x21, 0xf7, 0x40, 0x39, 0xd6, 0x28, 0xdb, 0x77,
- /* (2^156)P */ 0x11, 0x90, 0xdc, 0x4a, 0x61, 0xeb, 0x5e, 0xfc, 0xeb, 0x11, 0xc4, 0xe8, 0x9a, 0x41, 0x29, 0x52, 0x74, 0xcf, 0x1d, 0x7d, 0x78, 0xe7, 0xc3, 0x9e, 0xb5, 0x4c, 0x6e, 0x21, 0x3e, 0x05, 0x0d, 0x34,
- /* (2^157)P */ 0xb4, 0xf2, 0x8d, 0xb4, 0x39, 0xaf, 0xc7, 0xca, 0x94, 0x0a, 0xa1, 0x71, 0x28, 0xec, 0xfa, 0xc0, 0xed, 0x75, 0xa5, 0x5c, 0x24, 0x69, 0x0a, 0x14, 0x4c, 0x3a, 0x27, 0x34, 0x71, 0xc3, 0xf1, 0x0c,
- /* (2^158)P */ 0xa5, 0xb8, 0x24, 0xc2, 0x6a, 0x30, 0xee, 0xc8, 0xb0, 0x30, 0x49, 0xcb, 0x7c, 0xee, 0xea, 0x57, 0x4f, 0xe7, 0xcb, 0xaa, 0xbd, 0x06, 0xe8, 0xa1, 0x7d, 0x65, 0xeb, 0x2e, 0x74, 0x62, 0x9a, 0x7d,
- /* (2^159)P */ 0x30, 0x48, 0x6c, 0x54, 0xef, 0xb6, 0xb6, 0x9e, 0x2e, 0x6e, 0xb3, 0xdd, 0x1f, 0xca, 0x5c, 0x88, 0x05, 0x71, 0x0d, 0xef, 0x83, 0xf3, 0xb9, 0xe6, 0x12, 0x04, 0x2e, 0x9d, 0xef, 0x4f, 0x65, 0x58,
- /* (2^160)P */ 0x26, 0x8e, 0x0e, 0xbe, 0xff, 0xc4, 0x05, 0xa9, 0x6e, 0x81, 0x31, 0x9b, 0xdf, 0xe5, 0x2d, 0x94, 0xe1, 0x88, 0x2e, 0x80, 0x3f, 0x72, 0x7d, 0x49, 0x8d, 0x40, 0x2f, 0x60, 0xea, 0x4d, 0x68, 0x30,
- /* (2^161)P */ 0x34, 0xcb, 0xe6, 0xa3, 0x78, 0xa2, 0xe5, 0x21, 0xc4, 0x1d, 0x15, 0x5b, 0x6f, 0x6e, 0xfb, 0xae, 0x15, 0xca, 0x77, 0x9d, 0x04, 0x8e, 0x0b, 0xb3, 0x81, 0x89, 0xb9, 0x53, 0xcf, 0xc9, 0xc3, 0x28,
- /* (2^162)P */ 0x2a, 0xdd, 0x6c, 0x55, 0x21, 0xb7, 0x7f, 0x28, 0x74, 0x22, 0x02, 0x97, 0xa8, 0x7c, 0x31, 0x0d, 0x58, 0x32, 0x54, 0x3a, 0x42, 0xc7, 0x68, 0x74, 0x2f, 0x64, 0xb5, 0x4e, 0x46, 0x11, 0x7f, 0x4a,
- /* (2^163)P */ 0xa6, 0x3a, 0x19, 0x4d, 0x77, 0xa4, 0x37, 0xa2, 0xa1, 0x29, 0x21, 0xa9, 0x6e, 0x98, 0x65, 0xd8, 0x88, 0x1a, 0x7c, 0xf8, 0xec, 0x15, 0xc5, 0x24, 0xeb, 0xf5, 0x39, 0x5f, 0x57, 0x03, 0x40, 0x60,
- /* (2^164)P */ 0x27, 0x9b, 0x0a, 0x57, 0x89, 0xf1, 0xb9, 0x47, 0x78, 0x4b, 0x5e, 0x46, 0xde, 0xce, 0x98, 0x2b, 0x20, 0x5c, 0xb8, 0xdb, 0x51, 0xf5, 0x6d, 0x02, 0x01, 0x19, 0xe2, 0x47, 0x10, 0xd9, 0xfc, 0x74,
- /* (2^165)P */ 0xa3, 0xbf, 0xc1, 0x23, 0x0a, 0xa9, 0xe2, 0x13, 0xf6, 0x19, 0x85, 0x47, 0x4e, 0x07, 0xb0, 0x0c, 0x44, 0xcf, 0xf6, 0x3a, 0xbe, 0xcb, 0xf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xb9, 0xb3, 0x31, 0x6a, 0xf6, 0xe8, 0xc6, 0xd5, 0x49, 0xdf, 0x94, 0xa4, 0x14, 0x15, 0x28, 0xa7, 0x3d, 0xb2, 0xc8, 0xdf, 0x6f, 0x72, 0xd1, 0x48, 0xe5, 0xde, 0x03, 0xd1, 0xe7, 0x3a, 0x4b,
- /* (2^172)P */ 0x7e, 0x9d, 0x4b, 0xce, 0x19, 0x6e, 0x25, 0xc6, 0x1c, 0xc6, 0xe3, 0x86, 0xf1, 0x5c, 0x5c, 0xff, 0x45, 0xc1, 0x8e, 0x4b, 0xa3, 0x3c, 0xc6, 0xac, 0x74, 0x65, 0xe6, 0xfe, 0x88, 0x18, 0x62, 0x74,
- /* (2^173)P */ 0x1e, 0x0a, 0x29, 0x45, 0x96, 0x40, 0x6f, 0x95, 0x2e, 0x96, 0x3a, 0x26, 0xe3, 0xf8, 0x0b, 0xef, 0x7b, 0x64, 0xc2, 0x5e, 0xeb, 0x50, 0x6a, 0xed, 0x02, 0x75, 0xca, 0x9d, 0x3a, 0x28, 0x94, 0x06,
- /* (2^174)P */ 0xd1, 0xdc, 0xa2, 0x43, 0x36, 0x96, 0x9b, 0x76, 0x53, 0x53, 0xfc, 0x09, 0xea, 0xc8, 0xb7, 0x42, 0xab, 0x7e, 0x39, 0x13, 0xee, 0x2a, 0x00, 0x4f, 0x3a, 0xd6, 0xb7, 0x19, 0x2c, 0x5e, 0x00, 0x63,
- /* (2^175)P */ 0xea, 0x3b, 0x02, 0x63, 0xda, 0x36, 0x67, 0xca, 0xb7, 0x99, 0x2a, 0xb1, 0x6d, 0x7f, 0x6c, 0x96, 0xe1, 0xc5, 0x37, 0xc5, 0x90, 0x93, 0xe0, 0xac, 0xee, 0x89, 0xaa, 0xa1, 0x63, 0x60, 0x69, 0x0b,
- /* (2^176)P */ 0xe5, 0x56, 0x8c, 0x28, 0x97, 0x3e, 0xb0, 0xeb, 0xe8, 0x8b, 0x8c, 0x93, 0x9f, 0x9f, 0x2a, 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, 0x41, 0xec, 0xd6, 0x8c, 0x07,
- /* (2^182)P */ 0x2f, 0x0d, 0x90, 0xad, 0x41, 0x4a, 0x58, 0x4a, 0x52, 0x4c, 0xc7, 0xe2, 0x78, 0x2b, 0x14, 0x32, 0x78, 0xc9, 0x31, 0x84, 0x33, 0xe8, 0xc4, 0x68, 0xc2, 0x9f, 0x68, 0x08, 0x90, 0xea, 0x69, 0x7f,
- /* (2^183)P */ 0x65, 0x82, 0xa3, 0x46, 0x1e, 0xc8, 0xf2, 0x52, 0xfd, 0x32, 0xa8, 0x04, 0x2d, 0x07, 0x78, 0xfd, 0x94, 0x9e, 0x35, 0x25, 0xfa, 0xd5, 0xd7, 0x8c, 0xd2, 0x29, 0xcc, 0x54, 0x74, 0x1b, 0xe7, 0x4d,
- /* (2^184)P */ 0xc9, 0x6a, 0xda, 0x1e, 0xad, 0x60, 0xeb, 0x42, 0x3a, 0x9c, 0xc0, 0xdb, 0xdf, 0x37, 0xad, 0x0a, 0x91, 0xc1, 0x3c, 0xe3, 0x71, 0x4b, 0x00, 0x81, 0x3c, 0x80, 0x22, 0x51, 0x34, 0xbe, 0xe6, 0x44,
- /* (2^185)P */ 0xdb, 0x20, 0x19, 0xba, 0x88, 0x83, 0xfe, 0x03, 0x08, 0xb0, 0x0d, 0x15, 0x32, 0x7c, 0xd5, 0xf5, 0x29, 0x0c, 0xf6, 0x1a, 0x28, 0xc4, 0xc8, 0x49, 0xee, 0x1a, 0x70, 0xde, 0x18, 0xb5, 0xed, 0x21,
- /* (2^186)P */ 0x99, 0xdc, 0x06, 0x8f, 0x41, 0x3e, 0xb6, 0x7f, 0xb8, 0xd7, 0x66, 0xc1, 0x99, 0x0d, 0x46, 0xa4, 0x83, 0x0a, 0x52, 0xce, 0x48, 0x52, 0xdd, 0x24, 0x58, 0x83, 0x92, 0x2b, 0x71, 0xad, 0xc3, 0x5e,
- /* (2^187)P */ 0x0f, 0x93, 0x17, 0xbd, 0x5f, 0x2a, 0x02, 0x15, 0xe3, 0x70, 0x25, 0xd8, 0x77, 0x4a, 0xf6, 0xa4, 0x12, 0x37, 0x78, 0x15, 0x69, 0x8d, 0xbc, 0x12, 0xbb, 0x0a, 0x62, 0xfc, 0xc0, 0x94, 0x81, 0x49,
- /* (2^188)P */ 0x82, 0x6c, 0x68, 0x55, 0xd2, 0xd9, 0xa2, 0x38, 0xf0, 0x21, 0x3e, 0x19, 0xd9, 0x6b, 0x5c, 0x78, 0x84, 0x54, 0x4a, 0xb2, 0x1a, 0xc8, 0xd5, 0xe4, 0x89, 0x09, 0xe2, 0xb2, 0x60, 0x78, 0x30, 0x56,
- /* (2^189)P */ 0xc4, 0x74, 0x4d, 0x8b, 0xf7, 0x55, 0x9d, 0x42, 0x31, 0x01, 0x35, 0x43, 0x46, 0x83, 0xf1, 0x22, 0xff, 0x1f, 0xc7, 0x98, 0x45, 0xc2, 0x60, 0x1e, 0xef, 0x83, 0x99, 0x97, 0x14, 0xf0, 0xf2, 0x59,
- /* (2^190)P */ 0x44, 0x4a, 0x49, 0xeb, 0x56, 0x7d, 0xa4, 0x46, 0x8e, 0xa1, 0x36, 0xd6, 0x54, 0xa8, 0x22, 0x3e, 0x3b, 0x1c, 0x49, 0x74, 0x52, 0xe1, 0x46, 0xb3, 0xe7, 0xcd, 0x90, 0x53, 0x4e, 0xfd, 0xea, 0x2c,
- /* (2^191)P */ 0x75, 0x66, 0x0d, 0xbe, 0x38, 0x85, 0x8a, 0xba, 0x23, 0x8e, 0x81, 0x50, 0xbb, 0x74, 0x90, 0x4b, 0xc3, 0x04, 0xd3, 0x85, 0x90, 0xb8, 0xda, 0xcb, 0xc4, 0x92, 0x61, 0xe5, 0xe0, 0x4f, 0xa2, 0x61,
- /* (2^192)P */ 0xcb, 0x5b, 0x52, 0xdb, 0xe6, 0x15, 0x76, 0xcb, 0xca, 0xe4, 0x67, 0xa5, 0x35, 0x8c, 0x7d, 0xdd, 0x69, 0xdd, 0xfc, 0xca, 0x3a, 0x15, 0xb4, 0xe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, 0xa4, 0xbe, 0x17, 0xe9, 0xf0, 0x24, 0x96, 0x97, 0x33, 0x30, 0x6b, 0x35, 0x27, 0xc5, 0x8d, 0x01, 0x2c,
- /* (2^204)P */ 0xd4, 0xb3, 0x30, 0xe3, 0x24, 0x50, 0x41, 0xa5, 0xd3, 0x52, 0x16, 0x69, 0x96, 0x3d, 0xff, 0x73, 0xf1, 0x59, 0x9b, 0xef, 0xc4, 0x42, 0xec, 0x94, 0x5a, 0x8e, 0xd0, 0x18, 0x16, 0x20, 0x47, 0x07,
- /* (2^205)P */ 0x53, 0x1c, 0x41, 0xca, 0x8a, 0xa4, 0x6c, 0x4d, 0x19, 0x61, 0xa6, 0xcf, 0x2f, 0x5f, 0x41, 0x66, 0xff, 0x27, 0xe2, 0x51, 0x00, 0xd4, 0x4d, 0x9c, 0xeb, 0xf7, 0x02, 0x9a, 0xc0, 0x0b, 0x81, 0x59,
- /* (2^206)P */ 0x1d, 0x10, 0xdc, 0xb3, 0x71, 0xb1, 0x7e, 0x2a, 0x8e, 0xf6, 0xfe, 0x9f, 0xb9, 0x5a, 0x1c, 0x44, 0xea, 0x59, 0xb3, 0x93, 0x9b, 0x5c, 0x02, 0x32, 0x2f, 0x11, 0x9d, 0x1e, 0xa7, 0xe0, 0x8c, 0x5e,
- /* (2^207)P */ 0xfd, 0x03, 0x95, 0x42, 0x92, 0xcb, 0xcc, 0xbf, 0x55, 0x5d, 0x09, 0x2f, 0x75, 0xba, 0x71, 0xd2, 0x1e, 0x09, 0x2d, 0x97, 0x5e, 0xad, 0x5e, 0x34, 0xba, 0x03, 0x31, 0xa8, 0x11, 0xdf, 0xc8, 0x18,
- /* (2^208)P */ 0x4c, 0x0f, 0xed, 0x9a, 0x9a, 0x94, 0xcd, 0x90, 0x7e, 0xe3, 0x60, 0x66, 0xcb, 0xf4, 0xd1, 0xc5, 0x0b, 0x2e, 0xc5, 0x56, 0x2d, 0xc5, 0xca, 0xb8, 0x0d, 0x8e, 0x80, 0xc5, 0x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x53, 0x68, 0xb9, 0x49, 0xa8, 0x20, 0x14, 0x60, 0x19, 0xa3, 0x80, 0x49,
- /* (2^220)P */ 0x42, 0x2c, 0x55, 0x2f, 0xe1, 0xb9, 0x65, 0x95, 0x96, 0xfe, 0x00, 0x71, 0xdb, 0x18, 0x53, 0x8a, 0xd7, 0xd0, 0xad, 0x43, 0x4d, 0x0b, 0xc9, 0x05, 0xda, 0x4e, 0x5d, 0x6a, 0xd6, 0x4c, 0x8b, 0x53,
- /* (2^221)P */ 0x9f, 0x03, 0x9f, 0xe8, 0xc3, 0x4f, 0xe9, 0xf4, 0x45, 0x80, 0x61, 0x6f, 0xf2, 0x9a, 0x2c, 0x59, 0x50, 0x95, 0x4b, 0xfd, 0xb5, 0x6e, 0xa3, 0x08, 0x19, 0x14, 0xed, 0xc2, 0xf6, 0xfa, 0xff, 0x25,
- /* (2^222)P */ 0x54, 0xd3, 0x79, 0xcc, 0x59, 0x44, 0x43, 0x34, 0x6b, 0x47, 0xd5, 0xb1, 0xb4, 0xbf, 0xec, 0xee, 0x99, 0x5d, 0x61, 0x61, 0xa0, 0x34, 0xeb, 0xdd, 0x73, 0xb7, 0x64, 0xeb, 0xcc, 0xce, 0x29, 0x51,
- /* (2^223)P */ 0x20, 0x35, 0x99, 0x94, 0x58, 0x21, 0x43, 0xee, 0x3b, 0x0b, 0x4c, 0xf1, 0x7c, 0x9c, 0x2f, 0x77, 0xd5, 0xda, 0xbe, 0x06, 0xe3, 0xfc, 0xe2, 0xd2, 0x97, 0x6a, 0xf0, 0x46, 0xb5, 0x42, 0x5f, 0x71,
- /* (2^224)P */ 0x1a, 0x5f, 0x5b, 0xda, 0xce, 0xcd, 0x4e, 0x43, 0xa9, 0x41, 0x97, 0xa4, 0x15, 0x71, 0xa1, 0x0d, 0x2e, 0xad, 0xed, 0x73, 0x7c, 0xd7, 0x0b, 0x68, 0x41, 0x90, 0xdd, 0x4e, 0x35, 0x02, 0x7c, 0x48,
- /* (2^225)P */ 0xc4, 0xd9, 0x0e, 0xa7, 0xf3, 0xef, 0xef, 0xb8, 0x02, 0xe3, 0x57, 0xe8, 0xa3, 0x2a, 0xa3, 0x56, 0xa0, 0xa5, 0xa2, 0x48, 0xbd, 0x68, 0x3a, 0xdf, 0x44, 0xc4, 0x76, 0x31, 0xb7, 0x50, 0xf6, 0x07,
- /* (2^226)P */ 0xb1, 0xcc, 0xe0, 0x26, 0x16, 0x9b, 0x8b, 0xe3, 0x36, 0xfb, 0x09, 0x8b, 0xc1, 0x53, 0xe0, 0x79, 0x64, 0x49, 0xf9, 0xc9, 0x19, 0x03, 0xd9, 0x56, 0xc4, 0xf5, 0x9f, 0xac, 0xe7, 0x41, 0xa9, 0x1c,
- /* (2^227)P */ 0xbb, 0xa0, 0x2f, 0x16, 0x29, 0xdf, 0xc4, 0x49, 0x05, 0x33, 0xb3, 0x82, 0x32, 0xcf, 0x88, 0x84, 0x7d, 0x43, 0xbb, 0xca, 0x14, 0xda, 0xdf, 0x95, 0x86, 0xad, 0xd5, 0x64, 0x82, 0xf7, 0x91, 0x33,
- /* (2^228)P */ 0x5d, 0x09, 0xb5, 0xe2, 0x6a, 0xe0, 0x9a, 0x72, 0x46, 0xa9, 0x59, 0x32, 0xd7, 0x58, 0x8a, 0xd5, 0xed, 0x21, 0x39, 0xd1, 0x62, 0x42, 0x83, 0xe9, 0x92, 0xb5, 0x4b, 0xa5, 0xfa, 0xda, 0xfe, 0x27,
- /* (2^229)P */ 0xbb, 0x48, 0xad, 0x29, 0xb8, 0xc5, 0x9d, 0xa9, 0x60, 0xe2, 0x9e, 0x49, 0x42, 0x57, 0x02, 0x5f, 0xfd, 0x13, 0x75, 0x5d, 0xcd, 0x8e, 0x2c, 0x80, 0x38, 0xd9, 0x6d, 0x3f, 0xef, 0xb3, 0xce, 0x78,
- /* (2^230)P */ 0x94, 0x5d, 0x13, 0x8a, 0x4f, 0xf4, 0x42, 0xc3, 0xa3, 0xdd, 0x8c, 0x82, 0x44, 0xdb, 0x9e, 0x7b, 0xe7, 0xcf, 0x37, 0x05, 0x1a, 0xd1, 0x36, 0x94, 0xc8, 0xb4, 0x1a, 0xec, 0x64, 0xb1, 0x64, 0x50,
- /* (2^231)P */ 0xfc, 0xb2, 0x7e, 0xd3, 0xcf, 0xec, 0x20, 0x70, 0xfc, 0x25, 0x0d, 0xd9, 0x3e, 0xea, 0x31, 0x1f, 0x34, 0xbb, 0xa1, 0xdf, 0x7b, 0x0d, 0x93, 0x1b, 0x44, 0x30, 0x11, 0x48, 0x7a, 0x46, 0x44, 0x53,
- /* (2^232)P */ 0xfb, 0x6d, 0x5e, 0xf2, 0x70, 0x31, 0x07, 0x70, 0xc8, 0x4c, 0x11, 0x50, 0x1a, 0xdc, 0x85, 0xe3, 0x00, 0x4f, 0xfc, 0xc8, 0x8a, 0x69, 0x48, 0x23, 0xd8, 0x40, 0xdd, 0x84, 0x52, 0xa5, 0x77, 0x2a,
- /* (2^233)P */ 0xe4, 0x6c, 0x8c, 0xc9, 0xe0, 0xaf, 0x06, 0xfe, 0xe4, 0xd6, 0xdf, 0xdd, 0x96, 0xdf, 0x35, 0xc2, 0xd3, 0x1e, 0xbf, 0x33, 0x1e, 0xd0, 0x28, 0x14, 0xaf, 0xbd, 0x00, 0x93, 0xec, 0x68, 0x57, 0x78,
- /* (2^234)P */ 0x3b, 0xb6, 0xde, 0x91, 0x7a, 0xe5, 0x02, 0x97, 0x80, 0x8b, 0xce, 0xe5, 0xbf, 0xb8, 0xbd, 0x61, 0xac, 0x58, 0x1d, 0x3d, 0x6f, 0x42, 0x5b, 0x64, 0xbc, 0x57, 0xa5, 0x27, 0x22, 0xa8, 0x04, 0x48,
- /* (2^235)P */ 0x01, 0x26, 0x4d, 0xb4, 0x8a, 0x04, 0x57, 0x8e, 0x35, 0x69, 0x3a, 0x4b, 0x1a, 0x50, 0xd6, 0x68, 0x93, 0xc2, 0xe1, 0xf9, 0xc3, 0x9e, 0x9c, 0xc3, 0xe2, 0x63, 0xde, 0xd4, 0x57, 0xf2, 0x72, 0x41,
- /* (2^236)P */ 0x01, 0x64, 0x0c, 0x33, 0x50, 0xb4, 0x68, 0xd3, 0x91, 0x23, 0x8f, 0x41, 0x17, 0x30, 0x0d, 0x04, 0x0d, 0xd9, 0xb7, 0x90, 0x60, 0xbb, 0x34, 0x2c, 0x1f, 0xd5, 0xdf, 0x8f, 0x22, 0x49, 0xf6, 0x16,
- /* (2^237)P */ 0xf5, 0x8e, 0x92, 0x2b, 0x8e, 0x81, 0xa6, 0xbe, 0x72, 0x1e, 0xc1, 0xcd, 0x91, 0xcf, 0x8c, 0xe2, 0xcd, 0x36, 0x7a, 0xe7, 0x68, 0xaa, 0x4a, 0x59, 0x0f, 0xfd, 0x7f, 0x6c, 0x80, 0x34, 0x30, 0x31,
- /* (2^238)P */ 0x65, 0xbd, 0x49, 0x22, 0xac, 0x27, 0x9d, 0x8a, 0x12, 0x95, 0x8e, 0x01, 0x64, 0xb4, 0xa3, 0x19, 0xc7, 0x7e, 0xb3, 0x52, 0xf3, 0xcf, 0x6c, 0xc2, 0x21, 0x7b, 0x79, 0x1d, 0x34, 0x68, 0x6f, 0x05,
- /* (2^239)P */ 0x27, 0x23, 0xfd, 0x7e, 0x75, 0xd6, 0x79, 0x5e, 0x15, 0xfe, 0x3a, 0x55, 0xb6, 0xbc, 0xbd, 0xfa, 0x60, 0x5a, 0xaf, 0x6e, 0x2c, 0x22, 0xe7, 0xd3, 0x3b, 0x74, 0xae, 0x4d, 0x6d, 0xc7, 0x46, 0x70,
- /* (2^240)P */ 0x55, 0x4a, 0x8d, 0xb1, 0x72, 0xe8, 0x0b, 0x66, 0x96, 0x14, 0x4e, 0x57, 0x18, 0x25, 0x99, 0x19, 0xbb, 0xdc, 0x2b, 0x30, 0x3a, 0x05, 0x03, 0xc1, 0x8e, 0x8e, 0x21, 0x0b, 0x80, 0xe9, 0xd8, 0x3e,
- /* (2^241)P */ 0x3e, 0xe0, 0x75, 0xfa, 0x39, 0x92, 0x0b, 0x7b, 0x83, 0xc0, 0x33, 0x46, 0x68, 0xfb, 0xe9, 0xef, 0x93, 0x77, 0x1a, 0x39, 0xbe, 0x5f, 0xa3, 0x98, 0x34, 0xfe, 0xd0, 0xe2, 0x0f, 0x51, 0x65, 0x60,
- /* (2^242)P */ 0x0c, 0xad, 0xab, 0x48, 0x85, 0x66, 0xcb, 0x55, 0x27, 0xe5, 0x87, 0xda, 0x48, 0x45, 0x58, 0xb4, 0xdd, 0xc1, 0x07, 0x01, 0xea, 0xec, 0x43, 0x2c, 0x35, 0xde, 0x72, 0x93, 0x80, 0x28, 0x60, 0x52,
- /* (2^243)P */ 0x1f, 0x3b, 0x21, 0xf9, 0x6a, 0xc5, 0x15, 0x34, 0xdb, 0x98, 0x7e, 0x01, 0x4d, 0x1a, 0xee, 0x5b, 0x9b, 0x70, 0xcf, 0xb5, 0x05, 0xb1, 0xf6, 0x13, 0xb6, 0x9a, 0xb2, 0x82, 0x34, 0x0e, 0xf2, 0x5f,
- /* (2^244)P */ 0x90, 0x6c, 0x2e, 0xcc, 0x75, 0x9c, 0xa2, 0x0a, 0x06, 0xe2, 0x70, 0x3a, 0xca, 0x73, 0x7d, 0xfc, 0x15, 0xc5, 0xb5, 0xc4, 0x8f, 0xc3, 0x9f, 0x89, 0x07, 0xc2, 0xff, 0x24, 0xb1, 0x86, 0x03, 0x25,
- /* (2^245)P */ 0x56, 0x2b, 0x3d, 0xae, 0xd5, 0x28, 0xea, 0x54, 0xce, 0x60, 0xde, 0xd6, 0x9d, 0x14, 0x13, 0x99, 0xc1, 0xd6, 0x06, 0x8f, 0xc5, 0x4f, 0x69, 0x16, 0xc7, 0x8f, 0x01, 0xeb, 0x75, 0x39, 0xb2, 0x46,
- /* (2^246)P */ 0xe2, 0xb4, 0xb7, 0xb4, 0x0f, 0x6a, 0x0a, 0x47, 0xde, 0x53, 0x72, 0x8f, 0x5a, 0x47, 0x92, 0x5d, 0xdb, 0x3a, 0xbd, 0x2f, 0xb5, 0xe5, 0xee, 0x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0x45, 0xff, 0xad, 0x60, 0xc3, 0x98, 0xcb, 0x19, 0x15, 0xdb, 0x4b, 0xd2, 0x01, 0x71, 0x44, 0xd5, 0x15, 0xfb, 0x75, 0x74, 0xc8, 0xc4, 0x98, 0x7d, 0xa2, 0x22, 0x6e, 0x6d, 0xc7, 0xf8, 0x05,
- /* (2^253)P */ 0x94, 0xf4, 0xb9, 0xfe, 0xdf, 0xe5, 0x69, 0xab, 0x75, 0x6b, 0x40, 0x18, 0x9d, 0xc7, 0x09, 0xae, 0x1d, 0x2d, 0xa4, 0x94, 0xfb, 0x45, 0x9b, 0x19, 0x84, 0xfa, 0x2a, 0xae, 0xeb, 0x0a, 0x71, 0x79,
- /* (2^254)P */ 0xdf, 0xd2, 0x34, 0xf3, 0xa7, 0xed, 0xad, 0xa6, 0xb4, 0x57, 0x2a, 0xaf, 0x51, 0x9c, 0xde, 0x7b, 0xa8, 0xea, 0xdc, 0x86, 0x4f, 0xc6, 0x8f, 0xa9, 0x7b, 0xd0, 0x0e, 0xc2, 0x35, 0x03, 0xbe, 0x6b,
- /* (2^255)P */ 0x44, 0x43, 0x98, 0x53, 0xbe, 0xdc, 0x7f, 0x66, 0xa8, 0x49, 0x59, 0x00, 0x1c, 0xbc, 0x72, 0x07, 0x8e, 0xd6, 0xbe, 0x4e, 0x9f, 0xa4, 0x07, 0xba, 0xbf, 0x30, 0xdf, 0xba, 0x85, 0xb0, 0xa7, 0x1f,
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve.go b/vendor/github.com/cloudflare/circl/dh/x448/curve.go
deleted file mode 100644
index d59564e4b4..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package x448
-
-import (
- fp "github.com/cloudflare/circl/math/fp448"
-)
-
-// ladderJoye calculates a fixed-point multiplication with the generator point.
-// The algorithm is the right-to-left Joye's ladder as described
-// in "How to precompute a ladder" in SAC'2017.
-func ladderJoye(k *Key) {
- w := [5]fp.Elt{} // [mu,x1,z1,x2,z2] order must be preserved.
- w[1] = fp.Elt{ // x1 = S
- 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- }
- fp.SetOne(&w[2]) // z1 = 1
- w[3] = fp.Elt{ // x2 = G-S
- 0x20, 0x27, 0x9d, 0xc9, 0x7d, 0x19, 0xb1, 0xac,
- 0xf8, 0xba, 0x69, 0x1c, 0xff, 0x33, 0xac, 0x23,
- 0x51, 0x1b, 0xce, 0x3a, 0x64, 0x65, 0xbd, 0xf1,
- 0x23, 0xf8, 0xc1, 0x84, 0x9d, 0x45, 0x54, 0x29,
- 0x67, 0xb9, 0x81, 0x1c, 0x03, 0xd1, 0xcd, 0xda,
- 0x7b, 0xeb, 0xff, 0x1a, 0x88, 0x03, 0xcf, 0x3a,
- 0x42, 0x44, 0x32, 0x01, 0x25, 0xb7, 0xfa, 0xf0,
- }
- fp.SetOne(&w[4]) // z2 = 1
-
- const n = 448
- const h = 2
- swap := uint(1)
- for s := 0; s < n-h; s++ {
- i := (s + h) / 8
- j := (s + h) % 8
- bit := uint((k[i] >> uint(j)) & 1)
- copy(w[0][:], tableGenerator[s*Size:(s+1)*Size])
- diffAdd(&w, swap^bit)
- swap = bit
- }
- for s := 0; s < h; s++ {
- double(&w[1], &w[2])
- }
- toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
-}
-
-// ladderMontgomery calculates a generic scalar point multiplication
-// The algorithm implemented is the left-to-right Montgomery's ladder.
-func ladderMontgomery(k, xP *Key) {
- w := [5]fp.Elt{} // [x1, x2, z2, x3, z3] order must be preserved.
- w[0] = *(*fp.Elt)(xP) // x1 = xP
- fp.SetOne(&w[1]) // x2 = 1
- w[3] = *(*fp.Elt)(xP) // x3 = xP
- fp.SetOne(&w[4]) // z3 = 1
-
- move := uint(0)
- for s := 448 - 1; s >= 0; s-- {
- i := s / 8
- j := s % 8
- bit := uint((k[i] >> uint(j)) & 1)
- ladderStep(&w, move^bit)
- move = bit
- }
- toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
-}
-
-func toAffine(k *[fp.Size]byte, x, z *fp.Elt) {
- fp.Inv(z, z)
- fp.Mul(x, x, z)
- _ = fp.ToBytes(k[:], x)
-}
-
-var lowOrderPoints = [3]fp.Elt{
- { /* (0,_,1) point of order 2 on Curve448 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- { /* (1,_,1) a point of order 4 on the twist of Curve448 */
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- },
- { /* (-1,_,1) point of order 4 on Curve448 */
- 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- },
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go
deleted file mode 100644
index a062266613..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go
+++ /dev/null
@@ -1,30 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-package x448
-
-import (
- fp "github.com/cloudflare/circl/math/fp448"
- "golang.org/x/sys/cpu"
-)
-
-var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
-
-var _ = hasBmi2Adx
-
-func double(x, z *fp.Elt) { doubleAmd64(x, z) }
-func diffAdd(w *[5]fp.Elt, b uint) { diffAddAmd64(w, b) }
-func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
-func mulA24(z, x *fp.Elt) { mulA24Amd64(z, x) }
-
-//go:noescape
-func doubleAmd64(x, z *fp.Elt)
-
-//go:noescape
-func diffAddAmd64(w *[5]fp.Elt, b uint)
-
-//go:noescape
-func ladderStepAmd64(w *[5]fp.Elt, b uint)
-
-//go:noescape
-func mulA24Amd64(z, x *fp.Elt)
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.h b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.h
deleted file mode 100644
index 8c1ae4d0fb..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#define ladderStepLeg \
- addSub(x2,z2) \
- addSub(x3,z3) \
- integerMulLeg(b0,x2,z3) \
- integerMulLeg(b1,x3,z2) \
- reduceFromDoubleLeg(t0,b0) \
- reduceFromDoubleLeg(t1,b1) \
- addSub(t0,t1) \
- cselect(x2,x3,regMove) \
- cselect(z2,z3,regMove) \
- integerSqrLeg(b0,t0) \
- integerSqrLeg(b1,t1) \
- reduceFromDoubleLeg(x3,b0) \
- reduceFromDoubleLeg(z3,b1) \
- integerMulLeg(b0,x1,z3) \
- reduceFromDoubleLeg(z3,b0) \
- integerSqrLeg(b0,x2) \
- integerSqrLeg(b1,z2) \
- reduceFromDoubleLeg(x2,b0) \
- reduceFromDoubleLeg(z2,b1) \
- subtraction(t0,x2,z2) \
- multiplyA24Leg(t1,t0) \
- additionLeg(t1,t1,z2) \
- integerMulLeg(b0,x2,z2) \
- integerMulLeg(b1,t0,t1) \
- reduceFromDoubleLeg(x2,b0) \
- reduceFromDoubleLeg(z2,b1)
-
-#define ladderStepBmi2Adx \
- addSub(x2,z2) \
- addSub(x3,z3) \
- integerMulAdx(b0,x2,z3) \
- integerMulAdx(b1,x3,z2) \
- reduceFromDoubleAdx(t0,b0) \
- reduceFromDoubleAdx(t1,b1) \
- addSub(t0,t1) \
- cselect(x2,x3,regMove) \
- cselect(z2,z3,regMove) \
- integerSqrAdx(b0,t0) \
- integerSqrAdx(b1,t1) \
- reduceFromDoubleAdx(x3,b0) \
- reduceFromDoubleAdx(z3,b1) \
- integerMulAdx(b0,x1,z3) \
- reduceFromDoubleAdx(z3,b0) \
- integerSqrAdx(b0,x2) \
- integerSqrAdx(b1,z2) \
- reduceFromDoubleAdx(x2,b0) \
- reduceFromDoubleAdx(z2,b1) \
- subtraction(t0,x2,z2) \
- multiplyA24Adx(t1,t0) \
- additionAdx(t1,t1,z2) \
- integerMulAdx(b0,x2,z2) \
- integerMulAdx(b1,t0,t1) \
- reduceFromDoubleAdx(x2,b0) \
- reduceFromDoubleAdx(z2,b1)
-
-#define difAddLeg \
- addSub(x1,z1) \
- integerMulLeg(b0,z1,ui) \
- reduceFromDoubleLeg(z1,b0) \
- addSub(x1,z1) \
- integerSqrLeg(b0,x1) \
- integerSqrLeg(b1,z1) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1) \
- integerMulLeg(b0,x1,z2) \
- integerMulLeg(b1,z1,x2) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1)
-
-#define difAddBmi2Adx \
- addSub(x1,z1) \
- integerMulAdx(b0,z1,ui) \
- reduceFromDoubleAdx(z1,b0) \
- addSub(x1,z1) \
- integerSqrAdx(b0,x1) \
- integerSqrAdx(b1,z1) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1) \
- integerMulAdx(b0,x1,z2) \
- integerMulAdx(b1,z1,x2) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1)
-
-#define doubleLeg \
- addSub(x1,z1) \
- integerSqrLeg(b0,x1) \
- integerSqrLeg(b1,z1) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1) \
- subtraction(t0,x1,z1) \
- multiplyA24Leg(t1,t0) \
- additionLeg(t1,t1,z1) \
- integerMulLeg(b0,x1,z1) \
- integerMulLeg(b1,t0,t1) \
- reduceFromDoubleLeg(x1,b0) \
- reduceFromDoubleLeg(z1,b1)
-
-#define doubleBmi2Adx \
- addSub(x1,z1) \
- integerSqrAdx(b0,x1) \
- integerSqrAdx(b1,z1) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1) \
- subtraction(t0,x1,z1) \
- multiplyA24Adx(t1,t0) \
- additionAdx(t1,t1,z1) \
- integerMulAdx(b0,x1,z1) \
- integerMulAdx(b1,t0,t1) \
- reduceFromDoubleAdx(x1,b0) \
- reduceFromDoubleAdx(z1,b1)
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
deleted file mode 100644
index ed33ba3d03..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
+++ /dev/null
@@ -1,194 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-#include "textflag.h"
-
-// Depends on circl/math/fp448 package
-#include "../../math/fp448/fp_amd64.h"
-#include "curve_amd64.h"
-
-// CTE_A24 is (A+2)/4 from Curve448
-#define CTE_A24 39082
-
-#define Size 56
-
-// multiplyA24Leg multiplies x times CTE_A24 and stores in z
-// Uses: AX, DX, R8-R15, FLAGS
-// Instr: x86_64, cmov, adx
-#define multiplyA24Leg(z,x) \
- MOVQ $CTE_A24, R15; \
- MOVQ 0+x, AX; MULQ R15; MOVQ AX, R8; ;;;;;;;;;;;; MOVQ DX, R9; \
- MOVQ 8+x, AX; MULQ R15; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; \
- MOVQ 16+x, AX; MULQ R15; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; \
- MOVQ 24+x, AX; MULQ R15; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; \
- MOVQ 32+x, AX; MULQ R15; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; \
- MOVQ 40+x, AX; MULQ R15; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX, R14; \
- MOVQ 48+x, AX; MULQ R15; ADDQ AX, R14; ADCQ $0, DX; \
- MOVQ DX, AX; \
- SHLQ $32, AX; \
- ADDQ DX, R8; MOVQ $0, DX; \
- ADCQ $0, R9; \
- ADCQ $0, R10; \
- ADCQ AX, R11; \
- ADCQ $0, R12; \
- ADCQ $0, R13; \
- ADCQ $0, R14; \
- ADCQ $0, DX; \
- MOVQ DX, AX; \
- SHLQ $32, AX; \
- ADDQ DX, R8; \
- ADCQ $0, R9; \
- ADCQ $0, R10; \
- ADCQ AX, R11; \
- ADCQ $0, R12; \
- ADCQ $0, R13; \
- ADCQ $0, R14; \
- MOVQ R8, 0+z; \
- MOVQ R9, 8+z; \
- MOVQ R10, 16+z; \
- MOVQ R11, 24+z; \
- MOVQ R12, 32+z; \
- MOVQ R13, 40+z; \
- MOVQ R14, 48+z;
-
-// multiplyA24Adx multiplies x times CTE_A24 and stores in z
-// Uses: AX, DX, R8-R14, FLAGS
-// Instr: x86_64, bmi2
-#define multiplyA24Adx(z,x) \
- MOVQ $CTE_A24, DX; \
- MULXQ 0+x, R8, R9; \
- MULXQ 8+x, AX, R10; ADDQ AX, R9; \
- MULXQ 16+x, AX, R11; ADCQ AX, R10; \
- MULXQ 24+x, AX, R12; ADCQ AX, R11; \
- MULXQ 32+x, AX, R13; ADCQ AX, R12; \
- MULXQ 40+x, AX, R14; ADCQ AX, R13; \
- MULXQ 48+x, AX, DX; ADCQ AX, R14; \
- ;;;;;;;;;;;;;;;;;;;; ADCQ $0, DX; \
- MOVQ DX, AX; \
- SHLQ $32, AX; \
- ADDQ DX, R8; MOVQ $0, DX; \
- ADCQ $0, R9; \
- ADCQ $0, R10; \
- ADCQ AX, R11; \
- ADCQ $0, R12; \
- ADCQ $0, R13; \
- ADCQ $0, R14; \
- ADCQ $0, DX; \
- MOVQ DX, AX; \
- SHLQ $32, AX; \
- ADDQ DX, R8; \
- ADCQ $0, R9; \
- ADCQ $0, R10; \
- ADCQ AX, R11; \
- ADCQ $0, R12; \
- ADCQ $0, R13; \
- ADCQ $0, R14; \
- MOVQ R8, 0+z; \
- MOVQ R9, 8+z; \
- MOVQ R10, 16+z; \
- MOVQ R11, 24+z; \
- MOVQ R12, 32+z; \
- MOVQ R13, 40+z; \
- MOVQ R14, 48+z;
-
-#define mulA24Legacy \
- multiplyA24Leg(0(DI),0(SI))
-#define mulA24Bmi2Adx \
- multiplyA24Adx(0(DI),0(SI))
-
-// func mulA24Amd64(z, x *fp448.Elt)
-TEXT ·mulA24Amd64(SB),NOSPLIT,$0-16
- MOVQ z+0(FP), DI
- MOVQ x+8(FP), SI
- CHECK_BMI2ADX(LMA24, mulA24Legacy, mulA24Bmi2Adx)
-
-// func ladderStepAmd64(w *[5]fp448.Elt, b uint)
-// ladderStepAmd64 calculates a point addition and doubling as follows:
-// (x2,z2) = 2*(x2,z2) and (x3,z3) = (x2,z2)+(x3,z3) using as a difference (x1,-).
-// w = {x1,x2,z2,x3,z4} are five fp255.Elt of 56 bytes.
-// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
-// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
-TEXT ·ladderStepAmd64(SB),NOSPLIT,$336-16
- // Parameters
- #define regWork DI
- #define regMove SI
- #define x1 0*Size(regWork)
- #define x2 1*Size(regWork)
- #define z2 2*Size(regWork)
- #define x3 3*Size(regWork)
- #define z3 4*Size(regWork)
- // Local variables
- #define t0 0*Size(SP)
- #define t1 1*Size(SP)
- #define b0 2*Size(SP)
- #define b1 4*Size(SP)
- MOVQ w+0(FP), regWork
- MOVQ b+8(FP), regMove
- CHECK_BMI2ADX(LLADSTEP, ladderStepLeg, ladderStepBmi2Adx)
- #undef regWork
- #undef regMove
- #undef x1
- #undef x2
- #undef z2
- #undef x3
- #undef z3
- #undef t0
- #undef t1
- #undef b0
- #undef b1
-
-// func diffAddAmd64(work *[5]fp.Elt, swap uint)
-// diffAddAmd64 calculates a differential point addition using a precomputed point.
-// (x1,z1) = (x1,z1)+(mu) using a difference point (x2,z2)
-// work = {mu,x1,z1,x2,z2} are five fp448.Elt of 56 bytes, and
-// stack = (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
-// This is Equation 7 at https://eprint.iacr.org/2017/264.
-TEXT ·diffAddAmd64(SB),NOSPLIT,$224-16
- // Parameters
- #define regWork DI
- #define regSwap SI
- #define ui 0*Size(regWork)
- #define x1 1*Size(regWork)
- #define z1 2*Size(regWork)
- #define x2 3*Size(regWork)
- #define z2 4*Size(regWork)
- // Local variables
- #define b0 0*Size(SP)
- #define b1 2*Size(SP)
- MOVQ w+0(FP), regWork
- MOVQ b+8(FP), regSwap
- cswap(x1,x2,regSwap)
- cswap(z1,z2,regSwap)
- CHECK_BMI2ADX(LDIFADD, difAddLeg, difAddBmi2Adx)
- #undef regWork
- #undef regSwap
- #undef ui
- #undef x1
- #undef z1
- #undef x2
- #undef z2
- #undef b0
- #undef b1
-
-// func doubleAmd64(x, z *fp448.Elt)
-// doubleAmd64 calculates a point doubling (x1,z1) = 2*(x1,z1).
-// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
-// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
-TEXT ·doubleAmd64(SB),NOSPLIT,$336-16
- // Parameters
- #define x1 0(DI)
- #define z1 0(SI)
- // Local variables
- #define t0 0*Size(SP)
- #define t1 1*Size(SP)
- #define b0 2*Size(SP)
- #define b1 4*Size(SP)
- MOVQ x+0(FP), DI
- MOVQ z+8(FP), SI
- CHECK_BMI2ADX(LDOUB,doubleLeg,doubleBmi2Adx)
- #undef x1
- #undef z1
- #undef t0
- #undef t1
- #undef b0
- #undef b1
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_generic.go b/vendor/github.com/cloudflare/circl/dh/x448/curve_generic.go
deleted file mode 100644
index b0b65ccf7e..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve_generic.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package x448
-
-import (
- "encoding/binary"
- "math/bits"
-
- "github.com/cloudflare/circl/math/fp448"
-)
-
-func doubleGeneric(x, z *fp448.Elt) {
- t0, t1 := &fp448.Elt{}, &fp448.Elt{}
- fp448.AddSub(x, z)
- fp448.Sqr(x, x)
- fp448.Sqr(z, z)
- fp448.Sub(t0, x, z)
- mulA24Generic(t1, t0)
- fp448.Add(t1, t1, z)
- fp448.Mul(x, x, z)
- fp448.Mul(z, t0, t1)
-}
-
-func diffAddGeneric(w *[5]fp448.Elt, b uint) {
- mu, x1, z1, x2, z2 := &w[0], &w[1], &w[2], &w[3], &w[4]
- fp448.Cswap(x1, x2, b)
- fp448.Cswap(z1, z2, b)
- fp448.AddSub(x1, z1)
- fp448.Mul(z1, z1, mu)
- fp448.AddSub(x1, z1)
- fp448.Sqr(x1, x1)
- fp448.Sqr(z1, z1)
- fp448.Mul(x1, x1, z2)
- fp448.Mul(z1, z1, x2)
-}
-
-func ladderStepGeneric(w *[5]fp448.Elt, b uint) {
- x1, x2, z2, x3, z3 := &w[0], &w[1], &w[2], &w[3], &w[4]
- t0 := &fp448.Elt{}
- t1 := &fp448.Elt{}
- fp448.AddSub(x2, z2)
- fp448.AddSub(x3, z3)
- fp448.Mul(t0, x2, z3)
- fp448.Mul(t1, x3, z2)
- fp448.AddSub(t0, t1)
- fp448.Cmov(x2, x3, b)
- fp448.Cmov(z2, z3, b)
- fp448.Sqr(x3, t0)
- fp448.Sqr(z3, t1)
- fp448.Mul(z3, x1, z3)
- fp448.Sqr(x2, x2)
- fp448.Sqr(z2, z2)
- fp448.Sub(t0, x2, z2)
- mulA24Generic(t1, t0)
- fp448.Add(t1, t1, z2)
- fp448.Mul(x2, x2, z2)
- fp448.Mul(z2, t0, t1)
-}
-
-func mulA24Generic(z, x *fp448.Elt) {
- const A24 = 39082
- const n = 8
- var xx [7]uint64
- for i := range xx {
- xx[i] = binary.LittleEndian.Uint64(x[i*n : (i+1)*n])
- }
- h0, l0 := bits.Mul64(xx[0], A24)
- h1, l1 := bits.Mul64(xx[1], A24)
- h2, l2 := bits.Mul64(xx[2], A24)
- h3, l3 := bits.Mul64(xx[3], A24)
- h4, l4 := bits.Mul64(xx[4], A24)
- h5, l5 := bits.Mul64(xx[5], A24)
- h6, l6 := bits.Mul64(xx[6], A24)
-
- l1, c0 := bits.Add64(h0, l1, 0)
- l2, c1 := bits.Add64(h1, l2, c0)
- l3, c2 := bits.Add64(h2, l3, c1)
- l4, c3 := bits.Add64(h3, l4, c2)
- l5, c4 := bits.Add64(h4, l5, c3)
- l6, c5 := bits.Add64(h5, l6, c4)
- l7, _ := bits.Add64(h6, 0, c5)
-
- l0, c0 = bits.Add64(l0, l7, 0)
- l1, c1 = bits.Add64(l1, 0, c0)
- l2, c2 = bits.Add64(l2, 0, c1)
- l3, c3 = bits.Add64(l3, l7<<32, c2)
- l4, c4 = bits.Add64(l4, 0, c3)
- l5, c5 = bits.Add64(l5, 0, c4)
- l6, l7 = bits.Add64(l6, 0, c5)
-
- xx[0], c0 = bits.Add64(l0, l7, 0)
- xx[1], c1 = bits.Add64(l1, 0, c0)
- xx[2], c2 = bits.Add64(l2, 0, c1)
- xx[3], c3 = bits.Add64(l3, l7<<32, c2)
- xx[4], c4 = bits.Add64(l4, 0, c3)
- xx[5], c5 = bits.Add64(l5, 0, c4)
- xx[6], _ = bits.Add64(l6, 0, c5)
-
- for i := range xx {
- binary.LittleEndian.PutUint64(z[i*n:(i+1)*n], xx[i])
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go b/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go
deleted file mode 100644
index 3755b7c83b..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go
+++ /dev/null
@@ -1,11 +0,0 @@
-//go:build !amd64 || purego
-// +build !amd64 purego
-
-package x448
-
-import fp "github.com/cloudflare/circl/math/fp448"
-
-func double(x, z *fp.Elt) { doubleGeneric(x, z) }
-func diffAdd(w *[5]fp.Elt, b uint) { diffAddGeneric(w, b) }
-func ladderStep(w *[5]fp.Elt, b uint) { ladderStepGeneric(w, b) }
-func mulA24(z, x *fp.Elt) { mulA24Generic(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/doc.go b/vendor/github.com/cloudflare/circl/dh/x448/doc.go
deleted file mode 100644
index c02904feda..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Package x448 provides Diffie-Hellman functions as specified in RFC-7748.
-
-Validation of public keys.
-
-The Diffie-Hellman function, as described in RFC-7748 [1], works for any
-public key. However, if a different protocol requires contributory
-behaviour [2,3], then the public keys must be validated against low-order
-points [3,4]. To do that, the Shared function performs this validation
-internally and returns false when the public key is invalid (i.e., it
-is a low-order point).
-
-References:
- - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
- - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
- - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
- - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
-*/
-package x448
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/key.go b/vendor/github.com/cloudflare/circl/dh/x448/key.go
deleted file mode 100644
index 2fdde51168..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/key.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package x448
-
-import (
- "crypto/subtle"
-
- fp "github.com/cloudflare/circl/math/fp448"
-)
-
-// Size is the length in bytes of a X448 key.
-const Size = 56
-
-// Key represents a X448 key.
-type Key [Size]byte
-
-func (k *Key) clamp(in *Key) *Key {
- *k = *in
- k[0] &= 252
- k[55] |= 128
- return k
-}
-
-// isValidPubKey verifies if the public key is not a low-order point.
-func (k *Key) isValidPubKey() bool {
- fp.Modp((*fp.Elt)(k))
- var isLowOrder int
- for _, P := range lowOrderPoints {
- isLowOrder |= subtle.ConstantTimeCompare(P[:], k[:])
- }
- return isLowOrder == 0
-}
-
-// KeyGen obtains a public key given a secret key.
-func KeyGen(public, secret *Key) {
- ladderJoye(public.clamp(secret))
-}
-
-// Shared calculates Alice's shared key from Alice's secret key and Bob's
-// public key returning true on success. A failure case happens when the public
-// key is a low-order point, thus the shared key is all-zeros and the function
-// returns false.
-func Shared(shared, secret, public *Key) bool {
- validPk := *public
- ok := validPk.isValidPubKey()
- ladderMontgomery(shared.clamp(secret), &validPk)
- return ok
-}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/table.go b/vendor/github.com/cloudflare/circl/dh/x448/table.go
deleted file mode 100644
index eef53c30f8..0000000000
--- a/vendor/github.com/cloudflare/circl/dh/x448/table.go
+++ /dev/null
@@ -1,460 +0,0 @@
-package x448
-
-import fp "github.com/cloudflare/circl/math/fp448"
-
-// tableGenerator contains the set of points:
-//
-// t[i] = (xi+1)/(xi-1),
-//
-// where (xi,yi) = 2^iG and G is the generator point
-// Size = (448)*(448/8) = 25088 bytes.
-var tableGenerator = [448 * fp.Size]byte{
- /* (2^ 0)P */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
- /* (2^ 1)P */ 0x37, 0xfa, 0xaa, 0x0d, 0x86, 0xa6, 0x24, 0xe9, 0x6c, 0x95, 0x08, 0x34, 0xba, 0x1a, 0x81, 0x3a, 0xae, 0x01, 0xa5, 0xa7, 0x05, 0x85, 0x96, 0x00, 0x06, 0x5a, 0xd7, 0xff, 0xee, 0x8e, 0x8f, 0x94, 0xd2, 0xdc, 0xd7, 0xfc, 0xe7, 0xe5, 0x99, 0x1d, 0x05, 0x46, 0x43, 0xe8, 0xbc, 0x12, 0xb7, 0xeb, 0x30, 0x5e, 0x7a, 0x85, 0x68, 0xed, 0x9d, 0x28,
- /* (2^ 2)P */ 0xf1, 0x7d, 0x08, 0x2b, 0x32, 0x4a, 0x62, 0x80, 0x36, 0xe7, 0xa4, 0x76, 0x5a, 0x2a, 0x1e, 0xf7, 0x9e, 0x3c, 0x40, 0x46, 0x9a, 0x1b, 0x61, 0xc1, 0xbf, 0x1a, 0x1b,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2^132)P */ 0x8d, 0x25, 0xe9, 0x0e, 0x7d, 0x50, 0x76, 0xe4, 0x58, 0x7e, 0xb9, 0x33, 0xe6, 0x65, 0x90, 0xc2, 0x50, 0x9d, 0x50, 0x2e, 0x11, 0xad, 0xd5, 0x43, 0x52, 0x32, 0x41, 0x4f, 0x7b, 0xb6, 0xa0, 0xec, 0x81, 0x75, 0x36, 0x7c, 0x77, 0x85, 0x59, 0x70, 0xe4, 0xf9, 0xef, 0x66, 0x8d, 0x35, 0xc8, 0x2a, 0x6e, 0x5b, 0xc6, 0x0d, 0x0b, 0x29, 0x60, 0x68,
- /* (2^133)P */ 0xf8, 0xce, 0xb0, 0x3a, 0x56, 0x7d, 0x51, 0x9a, 0x25, 0x73, 0xea, 0xdd, 0xe4, 0xe0, 0x0e, 0xf0, 0x07, 0xc0, 0x31, 0x00, 0x73, 0x35, 0xd0, 0x39, 0xc4, 0x9b, 0xb7, 0x95, 0xe0, 0x62, 0x70, 0x36, 0x0b, 0xcb, 0xa0, 0x42, 0xde, 0x51, 0xcf, 0x41, 0xe0, 0xb8, 0xb4, 0xc0, 0xe5, 0x46, 0x99, 0x9f, 0x02, 0x7f, 0x14, 0x8c, 0xc1, 0x4e, 0xef, 0xe8,
- /* (2^134)P */ 0x10, 0x01, 0x57, 0x0a, 0xbe, 0x8b, 0x18, 0xc8, 0xca, 0x00, 0x28, 0x77, 0x4a, 0x9a, 0xc7, 0x55, 0x2a, 0xcc, 0x0c, 0x7b, 0xb9, 0xe9, 0xc8, 0x97, 0x7c, 0x02, 0xe3, 0x09, 0x2f, 0x62, 0x30, 0xb8, 0x40, 0x09, 0x65, 0xe9, 0x55, 0x63, 0xb5, 0x07, 0xca, 0x9f, 0x00, 0xdf, 0x9d, 0x5c, 0xc7, 0xee, 0x57, 0xa5, 0x90, 0x15, 0x1e, 0x22, 0xa0, 0x12,
- /* (2^135)P */ 0x71, 0x2d, 0xc9, 0xef, 0x27, 0xb9, 0xd8, 0x12, 0x43, 0x6b,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6b, 0xc0, 0x38, 0xb1, 0xd5, 0x2d, 0x96, 0x84, 0x16, 0xfa, 0x26, 0xb9, 0xcc, 0x3f, 0x16, 0x47, 0x23, 0x74,
- /* (2^145)P */ 0x9b, 0x61, 0x2a, 0x1c, 0xdd, 0x39, 0xa5, 0xfa, 0x1c, 0x7d, 0x63, 0x50, 0xca, 0xe6, 0x9d, 0xfa, 0xb7, 0xc4, 0x4c, 0x6a, 0x97, 0x5f, 0x36, 0x4e, 0x47, 0xdd, 0x17, 0xf7, 0xf9, 0x19, 0xce, 0x75, 0x17, 0xad, 0xce, 0x2a, 0xf3, 0xfe, 0x27, 0x8f, 0x3e, 0x48, 0xc0, 0x60, 0x87, 0x24, 0x19, 0xae, 0x59, 0xe4, 0x5a, 0x00, 0x2a, 0xba, 0xa2, 0x1f,
- /* (2^146)P */ 0x26, 0x88, 0x42, 0x60, 0x9f, 0x6e, 0x2c, 0x7c, 0x39, 0x0f, 0x47, 0x6a, 0x0e, 0x02, 0xbb, 0x4b, 0x34, 0x29, 0x55, 0x18, 0x36, 0xcf, 0x3b, 0x47, 0xf1, 0x2e, 0xfc, 0x6e, 0x94, 0xff, 0xe8, 0x6b, 0x06, 0xd2, 0xba, 0x77, 0x5e, 0x60, 0xd7, 0x19, 0xef, 0x02, 0x9d, 0x3a, 0xc2, 0xb7, 0xa9, 0xd8, 0x57, 0xee, 0x7e, 0x2b, 0xf2, 0x6d, 0x28, 0xda,
- /* (2^147)P */ 0xdf, 0xd9, 0x92, 0x11, 0x98, 0x23, 0xe2, 0x45, 0x2f, 0x74, 0x70, 0xee, 0x0e, 0x55, 0x65, 0x79, 0x86, 0x38, 0x17, 0x92, 0x85, 0x87, 0x99, 0x50, 0xd9, 0x7c, 0xdb, 0xa1, 0x10, 0xec, 0x30, 0xb7, 0x40, 0xa3, 0x23, 0x9b, 0x0e, 0x27, 0x49, 0x29, 0x03, 0x94, 0xff, 0x53, 0xdc, 0xd7, 0xed, 0x49, 0xa9, 0x5a, 0x3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, 0x85, 0xca, 0x74, 0x6d, 0x49, 0xb8, 0xce, 0x80, 0x44, 0xe0, 0xda, 0x5b, 0xcf, 0x2f, 0x79, 0x74, 0xfe, 0xb4, 0x2c, 0x99, 0x20, 0x6e, 0x09, 0x04, 0xfb, 0x6d, 0x57, 0x5b, 0x95, 0x0c, 0x45, 0xda, 0x4f, 0x7f, 0x63, 0xcc, 0x85, 0x5a, 0x67, 0x50, 0x68, 0x71, 0xb4, 0x67, 0xb1, 0x2e, 0xc1, 0x1c, 0xdc, 0xff, 0x2a, 0x7c, 0x10, 0x5e,
- /* (2^152)P */ 0xa6, 0xde, 0xf3, 0xd4, 0x22, 0x30, 0x24, 0x9e, 0x0b, 0x30, 0x54, 0x59, 0x7e, 0xa2, 0xeb, 0x89, 0x54, 0x65, 0x3e, 0x40, 0xd1, 0xde, 0xe6, 0xee, 0x4d, 0xbf, 0x5e, 0x40, 0x1d, 0xee, 0x4f, 0x68, 0xd9, 0xa7, 0x2f, 0xb3, 0x64, 0xb3, 0xf5, 0xc8, 0xd3, 0xaa, 0x70, 0x70, 0x3d, 0xef, 0xd3, 0x95, 0x54, 0xdb, 0x3e, 0x94, 0x95, 0x92, 0x1f, 0x45,
- /* (2^153)P */ 0x22, 0x80, 0x1d, 0x9d, 0x96, 0xa5, 0x78, 0x6f, 0xe0, 0x1e, 0x1b, 0x66, 0x42, 0xc8, 0xae, 0x9e, 0x46, 0x45, 0x08, 0x41, 0xdf, 0x80, 0xae, 0x6f, 0xdb, 0x15, 0x5a, 0x21, 0x31, 0x7a, 0xd0, 0xf2, 0x54, 0x15, 0x88, 0xd3, 0x0f, 0x7f, 0x14, 0x5a, 0x14, 0x97, 0xab, 0xf4, 0x58, 0x6a, 0x9f, 0xea, 0x74, 0xe5, 0x6b, 0x90, 0x59, 0x2b, 0x48, 0xd9,
- /* (2^154)P */ 0x12, 0x24, 0x04, 0xf5, 0x50, 0xc2, 0x8c, 0xb0, 0x7c, 0x46, 0x98, 0xd5, 0x24, 0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df, 0x55, 0x24, 0x25, 0x35, 0x51, 0x61, 0x92, 0xf0, 0xb1, 0xce, 0xf5, 0xd4, 0x7b, 0x6c, 0x21, 0x9d, 0x56, 0x52, 0xf8, 0xa1, 0x4c, 0xe9, 0x27, 0x55, 0xac, 0x91,
- /* (2^180)P */ 0x03, 0x3e, 0x30, 0xd2, 0x0a, 0xfa, 0x7d, 0x82, 0x3d, 0x1f, 0x8b, 0xcb, 0xb6, 0x04, 0x5c, 0xcc, 0x8b, 0xda, 0xe2, 0x68, 0x74, 0x08, 0x8c, 0x44, 0x83, 0x57, 0x6d, 0x6f, 0x80, 0xb0, 0x7e, 0xa9, 0x82, 0x91, 0x7b, 0x4c, 0x37, 0x97, 0xd1, 0x63, 0xd1, 0xbd, 0x45, 0xe6, 0x8a, 0x86, 0xd6, 0x89, 0x54, 0xfd, 0xd2, 0xb1, 0xd7, 0x54, 0xad, 0xaf,
- /* (2^181)P */ 0x8b, 0x33, 0x62, 0x49, 0x9f, 0x63, 0xf9, 0x87, 0x42, 0x58, 0xbf, 0xb3, 0xe6, 0x68, 0x02, 0x60, 0x5c, 0x76, 0x62, 0xf7, 0x61, 0xd7, 0x36, 0x31, 0xf7, 0x9c, 0xb5, 0xe5, 0x13, 0x6c, 0xea, 0x78, 0xae, 0xcf, 0xde, 0xbf, 0xb6, 0xeb, 0x4f, 0xc8, 0x2a, 0xb4, 0x9a, 0x9f, 0xf3, 0xd1, 0x6a, 0xec, 0x0c, 0xbd, 0x85, 0x98, 0x40, 0x06, 0x1c, 0x2a,
- /* (2^182)P */ 0x74, 0x3b, 0xe7, 0x81, 0xd5, 0xae, 0x54, 0x56, 0x03, 0xe8, 0x97, 0x16, 0x76, 0xcf, 0x24, 0x96, 0x96, 0x5b, 0xcc, 0x09, 0xab, 0x23, 0x6f, 0x54, 0xae, 0x8f, 0xe4, 0x12, 0xcb, 0xfd, 0xbc, 0xac, 0x93, 0x45, 0x3d, 0x68, 0x08, 0x22, 0x59, 0xc6, 0xf0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 0xa0, 0x3a, 0x05, 0x47, 0xb2, 0xc0, 0xac, 0xd1, 0xcc, 0x3f, 0x82, 0xb8, 0x8a, 0x88, 0xbc, 0xf5, 0x33, 0xa1, 0x35, 0x0f, 0xf6, 0xe2, 0xef, 0x6c, 0xf7, 0x37, 0x9e, 0xe8, 0x10, 0xca, 0xb0, 0x8e, 0x80, 0x86, 0x00, 0x23, 0xd0, 0x4a, 0x76, 0x9f, 0xf7, 0x2c, 0x52, 0x15, 0x0e,
- /* (2^212)P */ 0x5e, 0x49, 0xe1, 0x2c, 0x9a, 0x01, 0x76, 0xa6, 0xb3, 0x07, 0x5b, 0xa4, 0x07, 0xef, 0x1d, 0xc3, 0x6a, 0xbb, 0x64, 0xbe, 0x71, 0x15, 0x6e, 0x32, 0x31, 0x46, 0x9a, 0x9e, 0x8f, 0x45, 0x73, 0xce, 0x0b, 0x94, 0x1a, 0x52, 0x07, 0xf4, 0x50, 0x30, 0x49, 0x53, 0x50, 0xfb, 0x71, 0x1f, 0x5a, 0x03, 0xa9, 0x76, 0xf2, 0x8f, 0x42, 0xff, 0xed, 0xed,
- /* (2^213)P */ 0xed, 0x08, 0xdb, 0x91, 0x1c, 0xee, 0xa2, 0xb4, 0x47, 0xa2, 0xfa, 0xcb, 0x03, 0xd1, 0xff, 0x8c, 0xad, 0x64, 0x50, 0x61, 0xcd, 0xfc, 0x88, 0xa0, 0x31, 0x95, 0x30, 0xb9, 0x58, 0xdd, 0xd7, 0x43, 0xe4, 0x46, 0xc2, 0x16, 0xd9, 0x72, 0x4a, 0x56, 0x51, 0x70, 0x85, 0xf1, 0xa1, 0x80, 0x40, 0xd5, 0xba, 0x67, 0x81, 0xda, 0xcd, 0x03, 0xea, 0x51,
- /* (2^214)P */ 0x42, 0x50, 0xf0, 0xef, 0x37, 0x61, 0x72, 0x85, 0xe1, 0xf1, 0xff, 0x6f, 0x3d, 0xe8, 0x7b, 0x21, 0x5c, 0xe5, 0x50, 0x03, 0xde, 0x00, 0xc1, 0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x26, 0xa3, 0xc8, 0x07, 0x46, 0xda, 0x3b, 0x70, 0x65, 0xec, 0x7a, 0x2b, 0x34, 0x94, 0xa8, 0xb6, 0x14, 0xf8, 0x1a, 0xce, 0xf7, 0xc8, 0x60, 0xf3, 0x88, 0xf4, 0x33, 0x60, 0x7b, 0xd1, 0x02, 0xe7, 0xda, 0x00, 0x4a, 0xea, 0xd2, 0xfd, 0x88, 0xd2, 0x99, 0x28, 0xf3,
- /* (2^231)P */ 0x28, 0x24, 0x1d, 0x26, 0xc2, 0xeb, 0x8b, 0x3b, 0xb4, 0x6b, 0xbe, 0x6b, 0x77, 0xff, 0xf3, 0x21, 0x3b, 0x26, 0x6a, 0x8c, 0x8e, 0x2a, 0x44, 0xa8, 0x01, 0x2b, 0x71, 0xea, 0x64, 0x30, 0xfd, 0xfd, 0x95, 0xcb, 0x39, 0x38, 0x48, 0xfa, 0x96, 0x97, 0x8c, 0x2f, 0x33, 0xca, 0x03, 0xe6, 0xd7, 0x94, 0x55, 0x6c, 0xc3, 0xb3, 0xa8, 0xf7, 0xae, 0x8c,
- /* (2^232)P */ 0xea, 0x62, 0x8a, 0xb4, 0xeb, 0x74, 0xf7, 0xb8, 0xae, 0xc5, 0x20, 0x71, 0x06, 0xd6, 0x7c, 0x62, 0x9b, 0x69, 0x74, 0xef, 0xa7, 0x6d, 0xd6, 0x8c, 0x37, 0xb9, 0xbf, 0xcf, 0xeb, 0xe4, 0x2f, 0x04, 0x02, 0x21, 0x7d, 0x75, 0x6b, 0x92, 0x48, 0xf8, 0x70, 0xad, 0x69, 0xe2, 0xea, 0x0e, 0x88, 0x67, 0x72, 0xcc, 0x2d, 0x10, 0xce, 0x2d, 0xcf, 0x65,
- /* (2^233)P */ 0x49, 0xf3, 0x57, 0x64, 0xe5, 0x5c, 0xc5, 0x65, 0x49, 0x97, 0xc4, 0x8a, 0xcc, 0xa9, 0xca, 0x94, 0x7b, 0x86, 0x88, 0xb6, 0x51, 0x27, 0x69, 0xa5, 0x0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d4, 0x8a, 0xb2, 0xbe, 0x78, 0x52, 0x2b, 0x52, 0x94, 0x37, 0x41, 0xd6, 0xb4, 0xb6, 0x45, 0x20, 0x76, 0xe0, 0x1f, 0x31, 0xdb, 0xb1, 0xa1, 0x43, 0xf0, 0x18,
- /* (2^256)P */ 0x74, 0xa9, 0xa4, 0xa9, 0xdd, 0x6e, 0x3e, 0x68, 0xe5, 0xc3, 0x2e, 0x92, 0x17, 0xa4, 0xcb, 0x80, 0xb1, 0xf0, 0x06, 0x93, 0xef, 0xe6, 0x00, 0xe6, 0x3b, 0xb1, 0x32, 0x65, 0x7b, 0x83, 0xb6, 0x8a, 0x49, 0x1b, 0x14, 0x89, 0xee, 0xba, 0xf5, 0x6a, 0x8d, 0x36, 0xef, 0xb0, 0xd8, 0xb2, 0x16, 0x99, 0x17, 0x35, 0x02, 0x16, 0x55, 0x58, 0xdd, 0x82,
- /* (2^257)P */ 0x36, 0x95, 0xe8, 0xf4, 0x36, 0x42, 0xbb, 0xc5, 0x3e, 0xfa, 0x30, 0x84, 0x9e, 0x59, 0xfd, 0xd2, 0x95, 0x42, 0xf8, 0x64, 0xd9, 0xb9, 0x0e, 0x9f, 0xfa, 0xd0, 0x7b, 0x20, 0x31, 0x77, 0x48, 0x29, 0x4d, 0xd0, 0x32, 0x57, 0x56, 0x30, 0xa6, 0x17, 0x53, 0x04, 0xbf, 0x08, 0x28, 0xec, 0xb8, 0x46, 0xc1, 0x03, 0x89, 0xdc, 0xed, 0xa0, 0x35, 0x53,
- /* (2^258)P */ 0xc5, 0x7f, 0x9e, 0xd8, 0xc5, 0xba, 0x5f, 0x68, 0xc8, 0x23, 0x75, 0xea, 0x0d, 0xd9, 0x5a, 0xfd, 0x61, 0x1a, 0xa3, 0x2e, 0x45, 0x63, 0x14, 0x55, 0x86, 0x21, 0x29, 0xbe, 0xef, 0x5e, 0x50, 0xe5, 0x18, 0x59, 0xe7, 0xe3, 0xce, 0x4d, 0x8c, 0x15, 0x8f, 0x89, 0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10, 0xb7, 0xd0, 0x63, 0x8c, 0xcf, 0x16, 0x00, 0x7c, 0x58, 0xdf, 0x86, 0xdc, 0x4e, 0xca, 0x9c, 0x40, 0x5a, 0x42, 0xfd, 0xec, 0x98, 0xa4, 0x42, 0x53, 0xae, 0x16, 0x9d, 0xfd, 0x75, 0x5a, 0x12, 0x56, 0x1e, 0xc6, 0x57, 0xcc, 0x79, 0x27, 0x96, 0x00, 0xcf, 0x80, 0x4f, 0x8a, 0x36, 0x5c, 0xbb, 0xe9, 0x12, 0xdb, 0xb6, 0x2b, 0xad, 0x96,
- /* (2^304)P */ 0x92, 0x32, 0x1f, 0xfd, 0xc6, 0x02, 0x94, 0x08, 0x1b, 0x60, 0x6a, 0x9f, 0x8b, 0xd6, 0xc8, 0xad, 0xd5, 0x1b, 0x27, 0x4e, 0xa4, 0x4d, 0x4a, 0x00, 0x10, 0x5f, 0x86, 0x11, 0xf5, 0xe3, 0x14, 0x32, 0x43, 0xee, 0xb9, 0xc7, 0xab, 0xf4, 0x6f, 0xe5, 0x66, 0x0c, 0x06, 0x0d, 0x96, 0x79, 0x28, 0xaf, 0x45, 0x2b, 0x56, 0xbe, 0xe4, 0x4a, 0x52, 0xd6,
- /* (2^305)P */ 0x15, 0x16, 0x69, 0xef, 0x60, 0xca, 0x82, 0x25, 0x0f, 0xc6, 0x30, 0xa0, 0x0a, 0xd1, 0x83, 0x29, 0xcd, 0xb6, 0x89, 0x6c, 0xf5, 0xb2, 0x08, 0x38, 0xe6, 0xca, 0x6b, 0x19, 0x93, 0xc6, 0x5f, 0x75, 0x8e, 0x60, 0x34, 0x23, 0xc4, 0x13, 0x17, 0x69, 0x55, 0xcc, 0x72, 0x9c, 0x2b, 0x6c, 0x80, 0xf4, 0x4b, 0x8b, 0xb6, 0x97, 0x65, 0x07, 0xb6, 0xfb,
- /* (2^306)P */ 0x01, 0x99, 0x74, 0x28, 0xa6, 0x67, 0xa3, 0xe5, 0x25, 0xfb, 0xdf, 0x82, 0x93, 0xe7, 0x35, 0x74, 0xce, 0xe3, 0x15, 0x1c, 0x1d, 0x79, 0x52, 0x84, 0x08, 0x04, 0x2f, 0x5c, 0xb8, 0xcd, 0x7f, 0x89, 0xb0, 0x39, 0x93, 0x63, 0xc9, 0x5d, 0x06, 0x01, 0x59, 0xf7, 0x7e, 0xf1, 0x4c, 0x3d, 0x12, 0x8d, 0x69, 0x1d, 0xb7, 0x21, 0x5e, 0x88, 0x82, 0xa2,
- /* (2^307)P */ 0x8e, 0x69, 0xaf, 0x9a, 0x41, 0x0d, 0x9d, 0xcf, 0x8e, 0x8d, 0x5c, 0x51, 0x6e, 0xde, 0x0e, 0x48, 0x23, 0x89, 0xe5, 0x37, 0x80, 0xd6, 0x9d, 0x72, 0x32, 0x26, 0x38, 0x2d, 0x63, 0xa0, 0xfa, 0xd3, 0x40, 0xc0, 0x8c, 0x68, 0x6f, 0x2b, 0x1e, 0x9a, 0x39, 0x51, 0x78, 0x74, 0x9a, 0x7b, 0x4a, 0x8f, 0x0c, 0xa0, 0x88, 0x60, 0xa5, 0x21, 0xcd, 0xc7,
- /* (2^308)P */ 0x3a, 0x7f, 0x73, 0x14, 0xbf, 0x89, 0x6a, 0x4c, 0x09, 0x5d, 0xf2, 0x93, 0x20, 0x2d, 0xc4, 0x29, 0x86, 0x06, 0x95, 0xab, 0x22, 0x76, 0x4c, 0x54, 0xe1, 0x7e, 0x80, 0x6d, 0xab, 0x29, 0x61, 0x87, 0x77, 0xf6, 0xc0, 0x3e, 0xda, 0xab, 0x65, 0x7e, 0x39, 0x12, 0xa1, 0x6b, 0x42, 0xf7, 0xc5, 0x97, 0x77, 0xec, 0x6f, 0x22, 0xbe, 0x44, 0xc7, 0x03,
- /* (2^309)P */ 0xa5, 0x23, 0x90, 0x41, 0xa3, 0xc5, 0x3e, 0xe0, 0xa5, 0x32, 0x49, 0x1f, 0x39, 0x78, 0xb1, 0xd8, 0x24, 0xea, 0xd4, 0x87, 0x53, 0x42, 0x51, 0xf4, 0xd9, 0x46, 0x25, 0x2f, 0x62, 0xa9, 0x90, 0x9a, 0x4a, 0x25, 0x8a, 0xd2, 0x10, 0xe7, 0x3c, 0xbc, 0x58, 0x8d, 0x16, 0x14, 0x96, 0xa4, 0x6f, 0xf8, 0x12, 0x69, 0x91, 0x73, 0xe2, 0xfa, 0xf4, 0x57,
- /* (2^310)P */ 0x51, 0x45, 0x3f, 0x96, 0xdc, 0x97, 0x38, 0xa6, 0x01, 0x63, 0x09, 0xea, 0xc2, 0x13, 0x30, 0xb0, 0x00, 0xb8, 0x0a, 0xce, 0xd1, 0x8f, 0x3e, 0x69, 0x62, 0x46, 0x33, 0x9c, 0xbf, 0x4b, 0xcb, 0x0c, 0x90, 0x1c, 0x45, 0xcf, 0x37, 0x5b, 0xf7, 0x4b, 0x5e, 0x95, 0xc3, 0x28, 0x9f, 0x08, 0x83, 0x53, 0x74, 0xab, 0x0c, 0xb4, 0xc0, 0xa1, 0xbc, 0x89,
- /* (2^311)P */ 0x06, 0xb1, 0x51, 0x15, 0x65, 0x60, 0x21, 0x17, 0x7a, 0x20, 0x65, 0xee, 0x12, 0x35, 0x4d, 0x46, 0xf4, 0xf8, 0xd0, 0xb1, 0xca, 0x09, 0x30, 0x08, 0x89, 0x23, 0x3b, 0xe7, 0xab, 0x8b, 0x77, 0xa6, 0xad, 0x25, 0xdd, 0xea, 0x3c, 0x7d, 0xa5, 0x24, 0xb3, 0xe8, 0xfa, 0xfb, 0xc9, 0xf2, 0x71, 0xe9, 0xfa, 0xf2, 0xdc, 0x54, 0xdd, 0x55, 0x2e, 0x2f,
- /* (2^312)P */ 0x7f, 0x96, 0x96, 0xfb, 0x52, 0x86, 0xcf, 0xea, 0x62, 0x18, 0xf1, 0x53, 0x1f, 0x61, 0x2a, 0x9f, 0x8c, 0x51, 0xca, 0x2c, 0xde, 0x6d, 0xce, 0xab, 0x58, 0x32, 0x0b, 0x33, 0x9b, 0x99, 0xb4, 0x5c, 0x88, 0x2a, 0x76, 0xcc, 0x3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0xc8, 0x0f, 0x5e, 0xbc, 0x71, 0xf9, 0x0d, 0xce, 0xf5,
- /* (2^316)P */ 0x93, 0x97, 0x00, 0x85, 0xf4, 0xb4, 0x40, 0xec, 0xd9, 0x2b, 0x6c, 0xd6, 0x63, 0x9e, 0x93, 0x0a, 0x5a, 0xf4, 0xa7, 0x9a, 0xe3, 0x3c, 0xf0, 0x55, 0xd1, 0x96, 0x6c, 0xf5, 0x2a, 0xce, 0xd7, 0x95, 0x72, 0xbf, 0xc5, 0x0c, 0xce, 0x79, 0xa2, 0x0a, 0x78, 0xe0, 0x72, 0xd0, 0x66, 0x28, 0x05, 0x75, 0xd3, 0x23, 0x09, 0x91, 0xed, 0x7e, 0xc4, 0xbc,
- /* (2^317)P */ 0x77, 0xc2, 0x9a, 0xf7, 0xa6, 0xe6, 0x18, 0xb4, 0xe7, 0xf6, 0xda, 0xec, 0x44, 0x6d, 0xfb, 0x08, 0xee, 0x65, 0xa8, 0x92, 0x85, 0x1f, 0xba, 0x38, 0x93, 0x20, 0x5c, 0x4d, 0xd2, 0x18, 0x0f, 0x24, 0xbe, 0x1a, 0x96, 0x44, 0x7d, 0xeb, 0xb3, 0xda, 0x95, 0xf4, 0xaf, 0x6c, 0x06, 0x0f, 0x47, 0x37, 0xc8, 0x77, 0x63, 0xe1, 0x29, 0xef, 0xff, 0xa5,
- /* (2^318)P */ 0x16, 0x12, 0xd9, 0x47, 0x90, 0x22, 0x9b, 0x05, 0xf2, 0xa5, 0x9a, 0xae, 0x83, 0x98, 0xb5, 0xac, 0xab, 0x29, 0xaa, 0xdc, 0x5f, 0xde, 0xcd, 0xf7, 0x42, 0xad, 0x3b, 0x96, 0xd6, 0x3e, 0x6e, 0x52, 0x47, 0xb1, 0xab, 0x51, 0xde, 0x49, 0x7c, 0x87, 0x8d, 0x86, 0xe2, 0x70, 0x13, 0x21, 0x51, 0x1c, 0x0c, 0x25, 0xc1, 0xb0, 0xe6, 0x19, 0xcf, 0x12,
- /* (2^319)P */ 0xf0, 0xbc, 0x97, 0x8f, 0x4b, 0x2f, 0xd1, 0x1f, 0x8c, 0x57, 0xed, 0x3c, 0xf4, 0x26, 0x19, 0xbb, 0x60, 0xca, 0x24, 0xc5, 0xd9, 0x97, 0xe2, 0x5f, 0x76, 0x49, 0x39, 0x7e, 0x2d, 0x12, 0x21, 0x98, 0xda, 0xe6, 0xdb, 0xd2, 0xd8, 0x9f, 0x18, 0xd8, 0x83, 0x6c, 0xba, 0x89, 0x8d, 0x29, 0xfa, 0x46, 0x33, 0x8c, 0x28, 0xdf, 0x6a, 0xb3, 0x69, 0x28,
- /* (2^320)P */ 0x86, 0x17, 0xbc, 0xd6, 0x7c, 0xba, 0x1e, 0x83, 0xbb, 0x84, 0xb5, 0x8c, 0xad, 0xdf, 0xa1, 0x24, 0x81, 0x70, 0x40, 0x0f, 0xad, 0xad, 0x3b, 0x23, 0xd0, 0x93, 0xa0, 0x49, 0x5c, 0x4b, 0x51, 0xbe, 0x20, 0x49, 0x4e, 0xda, 0x2d, 0xd3, 0xad, 0x1b, 0x74, 0x08, 0x41, 0xf0, 0xef, 0x19, 0xe9, 0x45, 0x5d, 0x02, 0xae, 0x26, 0x25, 0xd9, 0xd1, 0xc2,
- /* (2^321)P */ 0x48, 0x81, 0x3e, 0xb2, 0x83, 0xf8, 0x4d, 0xb3, 0xd0, 0x4c, 0x75, 0xb3, 0xa0, 0x52, 0x26, 0xf2, 0xaf, 0x5d, 0x36, 0x70, 0x72, 0xd6, 0xb7, 0x88, 0x08, 0x69, 0xbd, 0x15, 0x25, 0xb1, 0x45, 0x1b, 0xb7, 0x0b, 0x5f, 0x71, 0x5d, 0x83, 0x49, 0xb9, 0x84, 0x3b, 0x7c, 0xc1, 0x50, 0x93, 0x05, 0x53, 0xe0, 0x61, 0xea, 0xc1, 0xef, 0xdb, 0x82, 0x97,
- /* (2^322)P */ 0x00, 0xd5, 0xc3, 0x3a, 0x4d, 0x8a, 0x23, 0x7a, 0xef, 0xff, 0x37, 0xef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, 0xe5, 0x91, 0x8f, 0xb2, 0xfb, 0xda, 0x97, 0xe8, 0x83, 0x6f, 0x04, 0xb9, 0x5d, 0xaf, 0xe1, 0x9b,
- /* (2^332)P */ 0x8b, 0xe4, 0xe1, 0x48, 0x9c, 0xc4, 0x83, 0x89, 0xdf, 0x65, 0xd3, 0x35, 0x55, 0x13, 0xf4, 0x1f, 0x36, 0x92, 0x33, 0x38, 0xcb, 0xed, 0x15, 0xe6, 0x60, 0x2d, 0x25, 0xf5, 0x36, 0x60, 0x3a, 0x37, 0x9b, 0x71, 0x9d, 0x42, 0xb0, 0x14, 0xc8, 0xba, 0x62, 0xa3, 0x49, 0xb0, 0x88, 0xc1, 0x72, 0x73, 0xdd, 0x62, 0x40, 0xa9, 0x62, 0x88, 0x99, 0xca,
- /* (2^333)P */ 0x47, 0x7b, 0xea, 0xda, 0x46, 0x2f, 0x45, 0xc6, 0xe3, 0xb4, 0x4d, 0x8d, 0xac, 0x0b, 0x54, 0x22, 0x06, 0x31, 0x16, 0x66, 0x3e, 0xe4, 0x38, 0x12, 0xcd, 0xf3, 0xe7, 0x99, 0x37, 0xd9, 0x62, 0x24, 0x4b, 0x05, 0xf2, 0x58, 0xe6, 0x29, 0x4b, 0x0d, 0xf6, 0xc1, 0xba, 0xa0, 0x1e, 0x0f, 0xcb, 0x1f, 0xc6, 0x2b, 0x19, 0xfc, 0x82, 0x01, 0xd0, 0x86,
- /* (2^334)P */ 0xa2, 0xae, 0x77, 0x20, 0xfb, 0xa8, 0x18, 0xb4, 0x61, 0xef, 0xe8, 0x52, 0x79, 0xbb, 0x86, 0x90, 0x5d, 0x2e, 0x76, 0xed, 0x66, 0x60, 0x5d, 0x00, 0xb5, 0xa4, 0x00, 0x40, 0x89, 0xec, 0xd1, 0xd2, 0x0d, 0x26, 0xb9, 0x30, 0xb2, 0xd2, 0xb8, 0xe8, 0x0e, 0x56, 0xf9, 0x67, 0x94, 0x2e, 0x62, 0xe1, 0x79, 0x48, 0x2b, 0xa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, 0x1c, 0xb2, 0x08, 0x90, 0xa1, 0x2d, 0x50, 0xa0, 0xad, 0x7f, 0x8d, 0xa6, 0x97, 0xc1, 0xbd, 0xdc, 0xc3, 0xa7, 0xad, 0x31, 0xdf, 0xb8, 0x03, 0x84, 0xc3, 0xb9, 0x29, 0x3d, 0x92, 0x2e, 0xc3, 0x90, 0x07, 0xe8, 0xa7, 0xc7, 0xbc, 0x61, 0xe9, 0x3e, 0xa0, 0x35, 0xda, 0x1d, 0xab, 0x48, 0xfe, 0x50, 0xc9, 0x25, 0x59, 0x23, 0x69, 0x3f,
- /* (2^339)P */ 0x8e, 0x91, 0xab, 0x6b, 0x91, 0x4f, 0x89, 0x76, 0x67, 0xad, 0xb2, 0x65, 0x9d, 0xad, 0x02, 0x36, 0xdc, 0xac, 0x96, 0x93, 0x97, 0x21, 0x14, 0xd0, 0xe8, 0x11, 0x60, 0x1e, 0xeb, 0x96, 0x06, 0xf2, 0x53, 0xf2, 0x6d, 0xb7, 0x93, 0x6f, 0x26, 0x91, 0x23, 0xe3, 0x34, 0x04, 0x92, 0x91, 0x37, 0x08, 0x50, 0xd6, 0x28, 0x09, 0x27, 0xa1, 0x0c, 0x00,
- /* (2^340)P */ 0x1f, 0xbb, 0x21, 0x26, 0x33, 0xcb, 0xa4, 0xd1, 0xee, 0x85, 0xf9, 0xd9, 0x3c, 0x90, 0xc3, 0xd1, 0x26, 0xa2, 0x25, 0x93, 0x43, 0x61, 0xed, 0x91, 0x6e, 0x54, 0x03, 0x2e, 0x42, 0x9d, 0xf7, 0xa6, 0x02, 0x0f, 0x2f, 0x9c, 0x7a, 0x8d, 0x12, 0xc2, 0x18, 0xfc, 0x41, 0xff, 0x85, 0x26, 0x1a, 0x44, 0x55, 0x0b, 0x89, 0xab, 0x6f, 0x62, 0x33, 0x8c,
- /* (2^341)P */ 0xe0, 0x3c, 0x5d, 0x70, 0x64, 0x87, 0x81, 0x35, 0xf2, 0x37, 0xa6, 0x24, 0x3e, 0xe0, 0x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/* (2^354)P */ 0x8b, 0xc7, 0x43, 0xce, 0xf0, 0x5e, 0xf1, 0x0d, 0x02, 0x38, 0xe8, 0x82, 0xc9, 0x25, 0xad, 0x2d, 0x27, 0xa4, 0x54, 0x18, 0xb2, 0x30, 0x73, 0xa4, 0x41, 0x08, 0xe4, 0x86, 0xe6, 0x8c, 0xe9, 0x2a, 0x34, 0xb3, 0xd6, 0x61, 0x8f, 0x66, 0x26, 0x08, 0xb6, 0x06, 0x33, 0xaa, 0x12, 0xac, 0x72, 0xec, 0x2e, 0x52, 0xa3, 0x25, 0x3e, 0xd7, 0x62, 0xe8,
- /* (2^355)P */ 0xc4, 0xbb, 0x89, 0xc8, 0x40, 0xcc, 0x84, 0xec, 0x4a, 0xd9, 0xc4, 0x55, 0x78, 0x00, 0xcf, 0xd8, 0xe9, 0x24, 0x59, 0xdc, 0x5e, 0xf0, 0x66, 0xa1, 0x83, 0xae, 0x97, 0x18, 0xc5, 0x54, 0x27, 0xa2, 0x21, 0x52, 0x03, 0x31, 0x5b, 0x11, 0x67, 0xf6, 0x12, 0x00, 0x87, 0x2f, 0xff, 0x59, 0x70, 0x8f, 0x6d, 0x71, 0xab, 0xab, 0x24, 0xb8, 0xba, 0x35,
- /* (2^356)P */ 0x69, 0x43, 0xa7, 0x14, 0x06, 0x96, 0xe9, 0xc2, 0xe3, 0x2b, 0x45, 0x22, 0xc0, 0xd0, 0x2f, 0x34, 0xd1, 0x01, 0x99, 0xfc, 0x99, 0x38, 0xa1, 0x25, 0x2e, 0x59, 0x6c, 0x27, 0xc9, 0xeb, 0x7b, 0xdc, 0x4e, 0x26, 0x68, 0xba, 0xfa, 0xec, 0x02, 0x05, 0x64, 0x80, 0x30, 0x20, 0x5c, 0x26, 0x7f, 0xaf, 0x95, 0x17, 0x3d, 0x5c, 0x9e, 0x96, 0x96, 0xaf,
- /* (2^357)P */ 0xa6, 0xba, 0x21, 0x29, 0x32, 0xe2, 0x98, 0xde, 0x9b, 0x6d, 0x0b, 0x44, 0x91, 0xa8, 0x3e, 0xd4, 0xb8, 0x04, 0x6c, 0xf6, 0x04, 0x39, 0xbd, 0x52, 0x05, 0x15, 0x27, 0x78, 0x8e, 0x55, 0xac, 0x79, 0xc5, 0xe6, 0x00, 0x7f, 0x90, 0xa2, 0xdd, 0x07, 0x13, 0xe0, 0x24, 0x70, 0x5c, 0x0f, 0x4d, 0xa9, 0xf9, 0xae, 0xcb, 0x34, 0x10, 0x9d, 0x89, 0x9d,
- /* (2^358)P */ 0x12, 0xe0, 0xb3, 0x9f, 0xc4, 0x96, 0x1d, 0xcf, 0xed, 0x99, 0x64, 0x28, 0x8d, 0xc7, 0x31, 0x82, 0xee, 0x5e, 0x75, 0x48, 0xff, 0x3a, 0xf2, 0x09, 0x34, 0x03, 0x93, 0x52, 0x19, 0xb2, 0xc5, 0x81, 0x93, 0x45, 0x5e, 0x59, 0x21, 0x2b, 0xec, 0x89, 0xba, 0x36, 0x6e, 0xf9, 0x82, 0x75, 0x7e, 0x82, 0x3f, 0xaa, 0xe2, 0xe3, 0x3b, 0x94, 0xfd, 0x98,
- /* (2^359)P */ 0x7c, 0xdb, 0x75, 0x31, 0x61, 0xfb, 0x15, 0x28, 0x94, 0xd7, 0xc3, 0x5a, 0xa9, 0xa1, 0x0a, 0x66, 0x0f, 0x2b, 0x13, 0x3e, 0x42, 0xb5, 0x28, 0x3a, 0xca, 0x83, 0xf3, 0x61, 0x22, 0xf4, 0x40, 0xc5, 0xdf, 0xe7, 0x31, 0x9f, 0x7e, 0x51, 0x75, 0x06, 0x9d, 0x51, 0xc8, 0xe7, 0x9f, 0xc3, 0x71, 0x4f, 0x3d, 0x5b, 0xfb, 0xe9, 0x8e, 0x08, 0x40, 0x8e,
- /* (2^360)P */ 0xf7, 0x31, 0xad, 0x50, 0x5d, 0x25, 0x93, 0x73, 0x68, 0xf6, 0x7c, 0x89, 0x5a, 0x3d, 0x9f, 0x9b, 0x05, 0x82, 0xe7, 0x70, 0x4b, 0x19, 0xaa, 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 0x6d, 0xdb, 0x87, 0x9e, 0xa6, 0xff, 0x6d, 0xab, 0xbd, 0xfb, 0x54, 0x84, 0x68, 0xcf, 0x89, 0xf1, 0xd0, 0xe2, 0x85, 0x61, 0xdc, 0x22, 0xd1,
- /* (2^364)P */ 0xa8, 0x48, 0xfb, 0x8c, 0x6a, 0x63, 0x01, 0x72, 0x43, 0x43, 0xeb, 0x21, 0xa3, 0x00, 0x8a, 0xc0, 0x87, 0x51, 0x9e, 0x86, 0x75, 0x16, 0x79, 0xf9, 0x6b, 0x11, 0x80, 0x62, 0xc2, 0x9d, 0xb8, 0x8c, 0x30, 0x8e, 0x8d, 0x03, 0x52, 0x7e, 0x31, 0x59, 0x38, 0xf9, 0x25, 0xc7, 0x0f, 0xc7, 0xa8, 0x2b, 0x5c, 0x80, 0xfa, 0x90, 0xa2, 0x63, 0xca, 0xe7,
- /* (2^365)P */ 0xf1, 0x5d, 0xb5, 0xd9, 0x20, 0x10, 0x7d, 0x0f, 0xc5, 0x50, 0x46, 0x07, 0xff, 0x02, 0x75, 0x2b, 0x4a, 0xf3, 0x39, 0x91, 0x72, 0xb7, 0xd5, 0xcc, 0x38, 0xb8, 0xe7, 0x36, 0x26, 0x5e, 0x11, 0x97, 0x25, 0xfb, 0x49, 0x68, 0xdc, 0xb4, 0x46, 0x87, 0x5c, 0xc2, 0x7f, 0xaa, 0x7d, 0x36, 0x23, 0xa6, 0xc6, 0x53, 0xec, 0xbc, 0x57, 0x47, 0xc1, 0x2b,
- /* (2^366)P */ 0x25, 0x5d, 0x7d, 0x95, 0xda, 0x0b, 0x8f, 0x78, 0x1e, 0x19, 0x09, 0xfa, 0x67, 0xe0, 0xa0, 0x17, 0x24, 0x76, 0x6c, 0x30, 0x1f, 0x62, 0x3d, 0xbe, 0x45, 0x70, 0xcc, 0xb6, 0x1e, 0x68, 0x06, 0x25, 0x68, 0x16, 0x1a, 0x33, 0x3f, 0x90, 0xc7, 0x78, 0x2d, 0x98, 0x3c, 0x2f, 0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x4a, 0x36, 0x42, 0x68, 0x68, 0x61, 0xc7, 0x3c, 0xdb, 0x81, 0x49, 0xf7, 0x91, 0x4d, 0xea, 0x4c, 0x4f, 0x98, 0xc6, 0x7e, 0x60, 0x84, 0x4b, 0x6a, 0x37, 0xbb, 0x52, 0xf7, 0xce, 0x02, 0xe4, 0xad, 0xd1, 0x3c, 0xa7,
- /* (2^380)P */ 0x51, 0x06, 0x2d, 0xf8, 0x08, 0xe8, 0xf1, 0x0c, 0xe5, 0xa9, 0xac, 0x29, 0x73, 0x3b, 0xed, 0x98, 0x5f, 0x55, 0x08, 0x38, 0x51, 0x44, 0x36, 0x5d, 0xea, 0xc3, 0xb8, 0x0e, 0xa0, 0x4f, 0xd2, 0x79, 0xe9, 0x98, 0xc3, 0xf5, 0x00, 0xb9, 0x26, 0x27, 0x42, 0xa8, 0x07, 0xc1, 0x12, 0x31, 0xc1, 0xc3, 0x3c, 0x3b, 0x7a, 0x72, 0x97, 0xc2, 0x70, 0x3a,
- /* (2^381)P */ 0xf4, 0xb2, 0xba, 0x32, 0xbc, 0xa9, 0x2f, 0x87, 0xc7, 0x3c, 0x45, 0xcd, 0xae, 0xe2, 0x13, 0x6d, 0x3a, 0xf2, 0xf5, 0x66, 0x97, 0x29, 0xaf, 0x53, 0x9f, 0xda, 0xea, 0x14, 0xdf, 0x04, 0x98, 0x19, 0x95, 0x9e, 0x2a, 0x00, 0x5c, 0x9d, 0x1d, 0xf0, 0x39, 0x23, 0xff, 0xfc, 0xca, 0x36, 0xb7, 0xde, 0xdf, 0x37, 0x78, 0x52, 0x21, 0xfa, 0x19, 0x10,
- /* (2^382)P */ 0x50, 0x20, 0x73, 0x74, 0x62, 0x21, 0xf2, 0xf7, 0x9b, 0x66, 0x85, 0x34, 0x74, 0xd4, 0x9d, 0x60, 0xd7, 0xbc, 0xc8, 0x46, 0x3b, 0xb8, 0x80, 0x42, 0x15, 0x0a, 0x6c, 0x35, 0x1a, 0x69, 0xf0, 0x1d, 0x4b, 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 0x72, 0xbf, 0xd2, 0xee, 0xc7, 0xac, 0x94, 0xff, 0x29, 0x57, 0x02, 0x49, 0x09, 0xad,
- /* (2^405)P */ 0x27, 0xa5, 0x78, 0x1b, 0xbf, 0x6b, 0xaf, 0x0b, 0x8c, 0xd9, 0xa8, 0x37, 0xb0, 0x67, 0x18, 0xb6, 0xc7, 0x05, 0x8a, 0x67, 0x03, 0x30, 0x62, 0x6e, 0x56, 0x82, 0xa9, 0x54, 0x3e, 0x0c, 0x4e, 0x07, 0xe1, 0x5a, 0x38, 0xed, 0xfa, 0xc8, 0x55, 0x6b, 0x08, 0xa3, 0x6b, 0x64, 0x2a, 0x15, 0xd6, 0x39, 0x6f, 0x47, 0x99, 0x42, 0x3f, 0x33, 0x84, 0x8f,
- /* (2^406)P */ 0xbc, 0x45, 0x29, 0x81, 0x0e, 0xa4, 0xc5, 0x72, 0x3a, 0x10, 0xe1, 0xc4, 0x1e, 0xda, 0xc3, 0xfe, 0xb0, 0xce, 0xd2, 0x13, 0x34, 0x67, 0x21, 0xc6, 0x7e, 0xf9, 0x8c, 0xff, 0x39, 0x50, 0xae, 0x92, 0x60, 0x35, 0x2f, 0x8b, 0x6e, 0xc9, 0xc1, 0x27, 0x3a, 0x94, 0x66, 0x3e, 0x26, 0x84, 0x93, 0xc8, 0x6c, 0xcf, 0xd2, 0x03, 0xa1, 0x10, 0xcf, 0xb7,
- /* (2^407)P */ 0x64, 0xda, 0x19, 0xf6, 0xc5, 0x73, 0x17, 0x44, 0x88, 0x81, 0x07, 0x0d, 0x34, 0xb2, 0x75, 0xf9, 0xd9, 0xe2, 0xe0, 0x8b, 0x71, 0xcf, 0x72, 0x34, 0x83, 0xb4, 0xce, 0xfc, 0xd7, 0x29, 0x09, 0x5a, 0x98, 0xbf, 0x14, 0xac, 0x77, 0x55, 0x38, 0x47, 0x5b, 0x0f, 0x40, 0x24, 0xe5, 0xa5, 0xa6, 0xac, 0x2d, 0xa6, 0xff, 0x9c, 0x73, 0xfe, 0x5c, 0x7e,
- /* (2^408)P */ 0x1e, 0x33, 0xcc, 0x68, 0xb2, 0xbc, 0x8c, 0x93, 0xaf, 0xcc, 0x38, 0xf8, 0xd9, 0x16, 0x72, 0x50, 0xac, 0xd9, 0xb5, 0x0b, 0x9a, 0xbe, 0x46, 0x7a, 0xf1, 0xee, 0xf1, 0xad, 0xec, 0x5b, 0x59, 0x27, 0x9c, 0x05, 0xa3, 0x87, 0xe0, 0x37, 0x2c, 0x83, 0xce, 0xb3, 0x65, 0x09, 0x8e, 0xc3, 0x9c, 0xbf, 0x6a, 0xa2, 0x00, 0xcc, 0x12, 0x36, 0xc5, 0x95,
- /* (2^409)P */ 0x36, 0x11, 0x02, 0x14, 0x9c, 0x3c, 0xeb, 0x2f, 0x23, 0x5b, 0x6b, 0x2b, 0x08, 0x54, 0x53, 0xac, 0xb2, 0xa3, 0xe0, 0x26, 0x62, 0x3c, 0xe4, 0xe1, 0x81, 0xee, 0x13, 0x3e, 0xa4, 0x97, 0xef, 0xf9, 0x92, 0x27, 0x01, 0xce, 0x54, 0x8b, 0x3e, 0x31, 0xbe, 0xa7, 0x88, 0xcf, 0x47, 0x99, 0x3c, 0x10, 0x6f, 0x60, 0xb3, 0x06, 0x4e, 0xee, 0x1b, 0xf0,
- /* (2^410)P */ 0x59, 0x49, 0x66, 0xcf, 0x22, 0xe6, 0xf6, 0x73, 0xfe, 0xa3, 0x1c, 0x09, 0xfa, 0x5f, 0x65, 0xa8, 0xf0, 0x82, 0xc2, 0xef, 0x16, 0x63, 0x6e, 0x79, 0x69, 0x51, 0x39, 0x07, 0x65, 0xc4, 0x81, 0xec, 0x73, 0x0f, 0x15, 0x93, 0xe1, 0x30, 0x33, 0xe9, 0x37, 0x86, 0x42, 0x4c, 0x1f, 0x9b, 0xad, 0xee, 0x3f, 0xf1, 0x2a, 0x8e, 0x6a, 0xa3, 0xc8, 0x35,
- /* (2^411)P */ 0x1e, 0x49, 0xf1, 0xdd, 0xd2, 0x9c, 0x8e,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, 0x41, 0x09, 0x68, 0x13, 0xc4,
- /* (2^427)P */ 0xbe, 0x38, 0x78, 0xcf, 0xc9, 0x4f, 0x36, 0xca, 0x09, 0x61, 0x31, 0x3c, 0x57, 0x2e, 0xec, 0x17, 0xa4, 0x7d, 0x19, 0x2b, 0x9b, 0x5b, 0xbe, 0x8f, 0xd6, 0xc5, 0x2f, 0x86, 0xf2, 0x64, 0x76, 0x17, 0x00, 0x6e, 0x1a, 0x8c, 0x67, 0x1b, 0x68, 0xeb, 0x15, 0xa2, 0xd6, 0x09, 0x91, 0xdd, 0x23, 0x0d, 0x98, 0xb2, 0x10, 0x19, 0x55, 0x9b, 0x63, 0xf2,
- /* (2^428)P */ 0x51, 0x1f, 0x93, 0xea, 0x2a, 0x3a, 0xfa, 0x41, 0xc0, 0x57, 0xfb, 0x74, 0xa6, 0x65, 0x09, 0x56, 0x14, 0xb6, 0x12, 0xaa, 0xb3, 0x1a, 0x8d, 0x3b, 0x76, 0x91, 0x7a, 0x23, 0x56, 0x9c, 0x6a, 0xc0, 0xe0, 0x3c, 0x3f, 0xb5, 0x1a, 0xf4, 0x57, 0x71, 0x93, 0x2b, 0xb1, 0xa7, 0x70, 0x57, 0x22, 0x80, 0xf5, 0xb8, 0x07, 0x77, 0x87, 0x0c, 0xbe, 0x83,
- /* (2^429)P */ 0x07, 0x9b, 0x0e, 0x52, 0x38, 0x63, 0x13, 0x86, 0x6a, 0xa6, 0xb4, 0xd2, 0x60, 0x68, 0x9a, 0x99, 0x82, 0x0a, 0x04, 0x5f, 0x89, 0x7a, 0x1a, 0x2a, 0xae, 0x2d, 0x35, 0x0c, 0x1e, 0xad, 0xef, 0x4f, 0x9a, 0xfc, 0xc8, 0xd9, 0xcf, 0x9d, 0x48, 0x71, 0xa5, 0x55, 0x79, 0x73, 0x39, 0x1b, 0xd8, 0x73, 0xec, 0x9b, 0x03, 0x16, 0xd8, 0x82, 0xf7, 0x67,
- /* (2^430)P */ 0x52, 0x67, 0x42, 0x21, 0xc9, 0x40, 0x78, 0x82, 0x2b, 0x95, 0x2d, 0x20, 0x92, 0xd1, 0xe2, 0x61, 0x25, 0xb0, 0xc6, 0x9c, 0x20, 0x59, 0x8e, 0x28, 0x6f, 0xf3, 0xfd, 0xd3, 0xc1, 0x32, 0x43, 0xc9, 0xa6, 0x08, 0x7a, 0x77, 0x9c, 0x4c, 0x8c, 0x33, 0x71, 0x13, 0x69, 0xe3, 0x52, 0x30, 0xa7, 0xf5, 0x07, 0x67, 0xac, 0xad, 0x46, 0x8a, 0x26, 0x25,
- /* (2^431)P */ 0xda, 0x86, 0xc4, 0xa2, 0x71, 0x56, 0xdd, 0xd2, 0x48, 0xd3, 0xde, 0x42, 0x63, 0x01, 0xa7, 0x2c, 0x92, 0x83, 0x6f, 0x2e, 0xd8, 0x1e, 0x3f, 0xc1, 0xc5, 0x42, 0x4e, 0x34, 0x19, 0x54, 0x6e, 0x35, 0x2c, 0x51, 0x2e, 0xfd, 0x0f, 0x9a, 0x45, 0x66, 0x5e, 0x4a, 0x83, 0xda, 0x0a, 0x53, 0x68, 0x63, 0xfa, 0xce, 0x47, 0x20, 0xd3, 0x34, 0xba, 0x0d,
- /* (2^432)P */ 0xd0, 0xe9, 0x64, 0xa4, 0x61, 0x4b, 0x86, 0xe5, 0x93, 0x6f, 0xda, 0x0e, 0x31, 0x7e, 0x6e, 0xe3, 0xc6, 0x73, 0xd8, 0xa3, 0x08, 0x57, 0x52, 0xcd, 0x51, 0x63, 0x1d, 0x9f, 0x93, 0x00, 0x62, 0x91, 0x26, 0x21, 0xa7, 0xdd, 0x25, 0x0f, 0x09, 0x0d, 0x35, 0xad, 0xcf, 0x11, 0x8e, 0x6e, 0xe8, 0xae, 0x1d, 0x95, 0xcb, 0x88, 0xf8, 0x70, 0x7b, 0x91,
- /* (2^433)P */ 0x0c, 0x19, 0x5c, 0xd9, 0x8d, 0xda, 0x9d, 0x2c, 0x90, 0x54, 0x65, 0xe8, 0xb6, 0x35, 0x50, 0xae, 0x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, 0x80, 0xdc, 0xd9, 0x30, 0xd9, 0x07, 0x50, 0x5a, 0x54, 0x7d, 0xda, 0x39, 0x6f, 0x78, 0x94, 0xbf, 0x25, 0x98, 0xdc,
- /* (2^440)P */ 0x01, 0x26, 0x62, 0x44, 0xfb, 0x0f, 0x11, 0x72, 0x73, 0x0a, 0x16, 0xc7, 0x16, 0x9c, 0x9b, 0x37, 0xd8, 0xff, 0x4f, 0xfe, 0x57, 0xdb, 0xae, 0xef, 0x7d, 0x94, 0x30, 0x04, 0x70, 0x83, 0xde, 0x3c, 0xd4, 0xb5, 0x70, 0xda, 0xa7, 0x55, 0xc8, 0x19, 0xe1, 0x36, 0x15, 0x61, 0xe7, 0x3b, 0x7d, 0x85, 0xbb, 0xf3, 0x42, 0x5a, 0x94, 0xf4, 0x53, 0x2a,
- /* (2^441)P */ 0x14, 0x60, 0xa6, 0x0b, 0x83, 0xe1, 0x23, 0x77, 0xc0, 0xce, 0x50, 0xed, 0x35, 0x8d, 0x98, 0x99, 0x7d, 0xf5, 0x8d, 0xce, 0x94, 0x25, 0xc8, 0x0f, 0x6d, 0xfa, 0x4a, 0xa4, 0x3a, 0x1f, 0x66, 0xfb, 0x5a, 0x64, 0xaf, 0x8b, 0x54, 0x54, 0x44, 0x3f, 0x5b, 0x88, 0x61, 0xe4, 0x48, 0x45, 0x26, 0x20, 0xbe, 0x0d, 0x06, 0xbb, 0x65, 0x59, 0xe1, 0x36,
- /* (2^442)P */ 0xb7, 0x98, 0xce, 0xa3, 0xe3, 0xee, 0x11, 0x1b, 0x9e, 0x24, 0x59, 0x75, 0x31, 0x37, 0x44, 0x6f, 0x6b, 0x9e, 0xec, 0xb7, 0x44, 0x01, 0x7e, 0xab, 0xbb, 0x69, 0x5d, 0x11, 0xb0, 0x30, 0x64, 0xea, 0x91, 0xb4, 0x7a, 0x8c, 0x02, 0x4c, 0xb9, 0x10, 0xa7, 0xc7, 0x79, 0xe6, 0xdc, 0x77, 0xe3, 0xc8, 0xef, 0x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xe5, 0x86, 0xd4, 0x43, 0xa8, 0xd1, 0x98, 0x9d, 0x9d, 0xdb, 0x04, 0xcf, 0x6e, 0x35, 0x05, 0x30, 0x53, 0x3b, 0xbc, 0x90, 0x00, 0x4a, 0xc5, 0x40, 0x2a, 0x0f, 0xde, 0x1a, 0xd7, 0x36, 0x27, 0x44, 0x62, 0xa6, 0xac, 0x9d, 0xd2, 0x70, 0x69, 0x14, 0x39, 0x9b, 0xd1, 0xc3, 0x0a, 0x3a, 0x82, 0x0e, 0xf1, 0x94, 0xd7, 0x42, 0x94, 0xd5, 0x7d,
- /* (2^447)P */ 0x04, 0xc0, 0x6e, 0x12, 0x90, 0x70, 0xf9, 0xdf, 0xf7, 0xc9, 0x86, 0xc0, 0xe6, 0x92, 0x8b, 0x0a, 0xa1, 0xc1, 0x3b, 0xcc, 0x33, 0xb7, 0xf0, 0xeb, 0x51, 0x50, 0x80, 0x20, 0x69, 0x1c, 0x4f, 0x89, 0x05, 0x1e, 0xe4, 0x7a, 0x0a, 0xc2, 0xf0, 0xf5, 0x78, 0x91, 0x76, 0x34, 0x45, 0xdc, 0x24, 0x53, 0x24, 0x98, 0xe2, 0x73, 0x6f, 0xe6, 0x46, 0x67,
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/constants.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/constants.go
deleted file mode 100644
index b6b236e5d3..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/constants.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package goldilocks
-
-import fp "github.com/cloudflare/circl/math/fp448"
-
-var (
- // genX is the x-coordinate of the generator of Goldilocks curve.
- genX = fp.Elt{
- 0x5e, 0xc0, 0x0c, 0xc7, 0x2b, 0xa8, 0x26, 0x26,
- 0x8e, 0x93, 0x00, 0x8b, 0xe1, 0x80, 0x3b, 0x43,
- 0x11, 0x65, 0xb6, 0x2a, 0xf7, 0x1a, 0xae, 0x12,
- 0x64, 0xa4, 0xd3, 0xa3, 0x24, 0xe3, 0x6d, 0xea,
- 0x67, 0x17, 0x0f, 0x47, 0x70, 0x65, 0x14, 0x9e,
- 0xda, 0x36, 0xbf, 0x22, 0xa6, 0x15, 0x1d, 0x22,
- 0xed, 0x0d, 0xed, 0x6b, 0xc6, 0x70, 0x19, 0x4f,
- }
- // genY is the y-coordinate of the generator of Goldilocks curve.
- genY = fp.Elt{
- 0x14, 0xfa, 0x30, 0xf2, 0x5b, 0x79, 0x08, 0x98,
- 0xad, 0xc8, 0xd7, 0x4e, 0x2c, 0x13, 0xbd, 0xfd,
- 0xc4, 0x39, 0x7c, 0xe6, 0x1c, 0xff, 0xd3, 0x3a,
- 0xd7, 0xc2, 0xa0, 0x05, 0x1e, 0x9c, 0x78, 0x87,
- 0x40, 0x98, 0xa3, 0x6c, 0x73, 0x73, 0xea, 0x4b,
- 0x62, 0xc7, 0xc9, 0x56, 0x37, 0x20, 0x76, 0x88,
- 0x24, 0xbc, 0xb6, 0x6e, 0x71, 0x46, 0x3f, 0x69,
- }
- // paramD is -39081 in Fp.
- paramD = fp.Elt{
- 0x56, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- }
- // order is 2^446-0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d,
- // which is the number of points in the prime subgroup.
- order = Scalar{
- 0xf3, 0x44, 0x58, 0xab, 0x92, 0xc2, 0x78, 0x23,
- 0x55, 0x8f, 0xc5, 0x8d, 0x72, 0xc2, 0x6c, 0x21,
- 0x90, 0x36, 0xd6, 0xae, 0x49, 0xdb, 0x4e, 0xc4,
- 0xe9, 0x23, 0xca, 0x7c, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
- }
- // residue448 is 2^448 mod order.
- residue448 = [4]uint64{
- 0x721cf5b5529eec34, 0x7a4cf635c8e9c2ab, 0xeec492d944a725bf, 0x20cd77058,
- }
- // invFour is 1/4 mod order.
- invFour = Scalar{
- 0x3d, 0x11, 0xd6, 0xaa, 0xa4, 0x30, 0xde, 0x48,
- 0xd5, 0x63, 0x71, 0xa3, 0x9c, 0x30, 0x5b, 0x08,
- 0xa4, 0x8d, 0xb5, 0x6b, 0xd2, 0xb6, 0x13, 0x71,
- 0xfa, 0x88, 0x32, 0xdf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
- }
- // paramDTwist is -39082 in Fp. The D parameter of the twist curve.
- paramDTwist = fp.Elt{
- 0x55, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- }
-)
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
deleted file mode 100644
index 1f165141a9..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Package goldilocks provides elliptic curve operations over the goldilocks curve.
-package goldilocks
-
-import fp "github.com/cloudflare/circl/math/fp448"
-
-// Curve is the Goldilocks curve x^2+y^2=z^2-39081x^2y^2.
-type Curve struct{}
-
-// Identity returns the identity point.
-func (Curve) Identity() *Point {
- return &Point{
- y: fp.One(),
- z: fp.One(),
- }
-}
-
-// IsOnCurve returns true if the point lies on the curve.
-func (Curve) IsOnCurve(P *Point) bool {
- x2, y2, t, t2, z2 := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
- rhs, lhs := &fp.Elt{}, &fp.Elt{}
- // Check z != 0
- eq0 := !fp.IsZero(&P.z)
-
- fp.Mul(t, &P.ta, &P.tb) // t = ta*tb
- fp.Sqr(x2, &P.x) // x^2
- fp.Sqr(y2, &P.y) // y^2
- fp.Sqr(z2, &P.z) // z^2
- fp.Sqr(t2, t) // t^2
- fp.Add(lhs, x2, y2) // x^2 + y^2
- fp.Mul(rhs, t2, ¶mD) // dt^2
- fp.Add(rhs, rhs, z2) // z^2 + dt^2
- fp.Sub(lhs, lhs, rhs) // x^2 + y^2 - (z^2 + dt^2)
- eq1 := fp.IsZero(lhs)
-
- fp.Mul(lhs, &P.x, &P.y) // xy
- fp.Mul(rhs, t, &P.z) // tz
- fp.Sub(lhs, lhs, rhs) // xy - tz
- eq2 := fp.IsZero(lhs)
-
- return eq0 && eq1 && eq2
-}
-
-// Generator returns the generator point.
-func (Curve) Generator() *Point {
- return &Point{
- x: genX,
- y: genY,
- z: fp.One(),
- ta: genX,
- tb: genY,
- }
-}
-
-// Order returns the number of points in the prime subgroup.
-func (Curve) Order() Scalar { return order }
-
-// Double returns 2P.
-func (Curve) Double(P *Point) *Point { R := *P; R.Double(); return &R }
-
-// Add returns P+Q.
-func (Curve) Add(P, Q *Point) *Point { R := *P; R.Add(Q); return &R }
-
-// ScalarMult returns kP. This function runs in constant time.
-func (e Curve) ScalarMult(k *Scalar, P *Point) *Point {
- k4 := &Scalar{}
- k4.divBy4(k)
- return e.pull(twistCurve{}.ScalarMult(k4, e.push(P)))
-}
-
-// ScalarBaseMult returns kG where G is the generator point. This function runs in constant time.
-func (e Curve) ScalarBaseMult(k *Scalar) *Point {
- k4 := &Scalar{}
- k4.divBy4(k)
- return e.pull(twistCurve{}.ScalarBaseMult(k4))
-}
-
-// CombinedMult returns mG+nP, where G is the generator point. This function is non-constant time.
-func (e Curve) CombinedMult(m, n *Scalar, P *Point) *Point {
- m4 := &Scalar{}
- n4 := &Scalar{}
- m4.divBy4(m)
- n4.divBy4(n)
- return e.pull(twistCurve{}.CombinedMult(m4, n4, twistCurve{}.pull(P)))
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/isogeny.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/isogeny.go
deleted file mode 100644
index b1daab851c..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/isogeny.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package goldilocks
-
-import fp "github.com/cloudflare/circl/math/fp448"
-
-func (Curve) pull(P *twistPoint) *Point { return twistCurve{}.push(P) }
-func (twistCurve) pull(P *Point) *twistPoint { return Curve{}.push(P) }
-
-// push sends a point on the Goldilocks curve to a point on the twist curve.
-func (Curve) push(P *Point) *twistPoint {
- Q := &twistPoint{}
- Px, Py, Pz := &P.x, &P.y, &P.z
- a, b, c, d, e, f, g, h := &Q.x, &Q.y, &Q.z, &fp.Elt{}, &Q.ta, &Q.x, &Q.y, &Q.tb
- fp.Add(e, Px, Py) // x+y
- fp.Sqr(a, Px) // A = x^2
- fp.Sqr(b, Py) // B = y^2
- fp.Sqr(c, Pz) // z^2
- fp.Add(c, c, c) // C = 2*z^2
- *d = *a // D = A
- fp.Sqr(e, e) // (x+y)^2
- fp.Sub(e, e, a) // (x+y)^2-A
- fp.Sub(e, e, b) // E = (x+y)^2-A-B
- fp.Add(h, b, d) // H = B+D
- fp.Sub(g, b, d) // G = B-D
- fp.Sub(f, c, h) // F = C-H
- fp.Mul(&Q.z, f, g) // Z = F * G
- fp.Mul(&Q.x, e, f) // X = E * F
- fp.Mul(&Q.y, g, h) // Y = G * H, // T = E * H
- return Q
-}
-
-// push sends a point on the twist curve to a point on the Goldilocks curve.
-func (twistCurve) push(P *twistPoint) *Point {
- Q := &Point{}
- Px, Py, Pz := &P.x, &P.y, &P.z
- a, b, c, d, e, f, g, h := &Q.x, &Q.y, &Q.z, &fp.Elt{}, &Q.ta, &Q.x, &Q.y, &Q.tb
- fp.Add(e, Px, Py) // x+y
- fp.Sqr(a, Px) // A = x^2
- fp.Sqr(b, Py) // B = y^2
- fp.Sqr(c, Pz) // z^2
- fp.Add(c, c, c) // C = 2*z^2
- fp.Neg(d, a) // D = -A
- fp.Sqr(e, e) // (x+y)^2
- fp.Sub(e, e, a) // (x+y)^2-A
- fp.Sub(e, e, b) // E = (x+y)^2-A-B
- fp.Add(h, b, d) // H = B+D
- fp.Sub(g, b, d) // G = B-D
- fp.Sub(f, c, h) // F = C-H
- fp.Mul(&Q.z, f, g) // Z = F * G
- fp.Mul(&Q.x, e, f) // X = E * F
- fp.Mul(&Q.y, g, h) // Y = G * H, // T = E * H
- return Q
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/point.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/point.go
deleted file mode 100644
index 11f73de054..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/point.go
+++ /dev/null
@@ -1,171 +0,0 @@
-package goldilocks
-
-import (
- "errors"
- "fmt"
-
- fp "github.com/cloudflare/circl/math/fp448"
-)
-
-// Point is a point on the Goldilocks Curve.
-type Point struct{ x, y, z, ta, tb fp.Elt }
-
-func (P Point) String() string {
- return fmt.Sprintf("x: %v\ny: %v\nz: %v\nta: %v\ntb: %v", P.x, P.y, P.z, P.ta, P.tb)
-}
-
-// FromAffine creates a point from affine coordinates.
-func FromAffine(x, y *fp.Elt) (*Point, error) {
- P := &Point{
- x: *x,
- y: *y,
- z: fp.One(),
- ta: *x,
- tb: *y,
- }
- if !(Curve{}).IsOnCurve(P) {
- return P, errors.New("point not on curve")
- }
- return P, nil
-}
-
-// isLessThan returns true if 0 <= x < y, and assumes that slices are of the
-// same length and are interpreted in little-endian order.
-func isLessThan(x, y []byte) bool {
- i := len(x) - 1
- for i > 0 && x[i] == y[i] {
- i--
- }
- return x[i] < y[i]
-}
-
-// FromBytes returns a point from the input buffer.
-func FromBytes(in []byte) (*Point, error) {
- if len(in) < fp.Size+1 {
- return nil, errors.New("wrong input length")
- }
- err := errors.New("invalid decoding")
- P := &Point{}
- signX := in[fp.Size] >> 7
- copy(P.y[:], in[:fp.Size])
- p := fp.P()
- if !isLessThan(P.y[:], p[:]) {
- return nil, err
- }
-
- u, v := &fp.Elt{}, &fp.Elt{}
- one := fp.One()
- fp.Sqr(u, &P.y) // u = y^2
- fp.Mul(v, u, ¶mD) // v = dy^2
- fp.Sub(u, u, &one) // u = y^2-1
- fp.Sub(v, v, &one) // v = dy^2-1
- isQR := fp.InvSqrt(&P.x, u, v) // x = sqrt(u/v)
- if !isQR {
- return nil, err
- }
- fp.Modp(&P.x) // x = x mod p
- if fp.IsZero(&P.x) && signX == 1 {
- return nil, err
- }
- if signX != (P.x[0] & 1) {
- fp.Neg(&P.x, &P.x)
- }
- P.ta = P.x
- P.tb = P.y
- P.z = fp.One()
- return P, nil
-}
-
-// IsIdentity returns true is P is the identity Point.
-func (P *Point) IsIdentity() bool {
- return fp.IsZero(&P.x) && !fp.IsZero(&P.y) && !fp.IsZero(&P.z) && P.y == P.z
-}
-
-// IsEqual returns true if P is equivalent to Q.
-func (P *Point) IsEqual(Q *Point) bool {
- l, r := &fp.Elt{}, &fp.Elt{}
- fp.Mul(l, &P.x, &Q.z)
- fp.Mul(r, &Q.x, &P.z)
- fp.Sub(l, l, r)
- b := fp.IsZero(l)
- fp.Mul(l, &P.y, &Q.z)
- fp.Mul(r, &Q.y, &P.z)
- fp.Sub(l, l, r)
- b = b && fp.IsZero(l)
- fp.Mul(l, &P.ta, &P.tb)
- fp.Mul(l, l, &Q.z)
- fp.Mul(r, &Q.ta, &Q.tb)
- fp.Mul(r, r, &P.z)
- fp.Sub(l, l, r)
- b = b && fp.IsZero(l)
- return b
-}
-
-// Neg obtains the inverse of the Point.
-func (P *Point) Neg() { fp.Neg(&P.x, &P.x); fp.Neg(&P.ta, &P.ta) }
-
-// ToAffine returns the x,y affine coordinates of P.
-func (P *Point) ToAffine() (x, y fp.Elt) {
- fp.Inv(&P.z, &P.z) // 1/z
- fp.Mul(&P.x, &P.x, &P.z) // x/z
- fp.Mul(&P.y, &P.y, &P.z) // y/z
- fp.Modp(&P.x)
- fp.Modp(&P.y)
- fp.SetOne(&P.z)
- P.ta = P.x
- P.tb = P.y
- return P.x, P.y
-}
-
-// ToBytes stores P into a slice of bytes.
-func (P *Point) ToBytes(out []byte) error {
- if len(out) < fp.Size+1 {
- return errors.New("invalid decoding")
- }
- x, y := P.ToAffine()
- out[fp.Size] = (x[0] & 1) << 7
- return fp.ToBytes(out[:fp.Size], &y)
-}
-
-// MarshalBinary encodes the receiver into a binary form and returns the result.
-func (P *Point) MarshalBinary() (data []byte, err error) {
- data = make([]byte, fp.Size+1)
- err = P.ToBytes(data[:fp.Size+1])
- return data, err
-}
-
-// UnmarshalBinary must be able to decode the form generated by MarshalBinary.
-func (P *Point) UnmarshalBinary(data []byte) error { Q, err := FromBytes(data); *P = *Q; return err }
-
-// Double sets P = 2Q.
-func (P *Point) Double() { P.Add(P) }
-
-// Add sets P =P+Q..
-func (P *Point) Add(Q *Point) {
- // This is formula (5) from "Twisted Edwards Curves Revisited" by
- // Hisil H., Wong K.KH., Carter G., Dawson E. (2008)
- // https://doi.org/10.1007/978-3-540-89255-7_20
- x1, y1, z1, ta1, tb1 := &P.x, &P.y, &P.z, &P.ta, &P.tb
- x2, y2, z2, ta2, tb2 := &Q.x, &Q.y, &Q.z, &Q.ta, &Q.tb
- x3, y3, z3, E, H := &P.x, &P.y, &P.z, &P.ta, &P.tb
- A, B, C, D := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
- t1, t2, F, G := C, D, &fp.Elt{}, &fp.Elt{}
- fp.Mul(t1, ta1, tb1) // t1 = ta1*tb1
- fp.Mul(t2, ta2, tb2) // t2 = ta2*tb2
- fp.Mul(A, x1, x2) // A = x1*x2
- fp.Mul(B, y1, y2) // B = y1*y2
- fp.Mul(C, t1, t2) // t1*t2
- fp.Mul(C, C, ¶mD) // C = d*t1*t2
- fp.Mul(D, z1, z2) // D = z1*z2
- fp.Add(F, x1, y1) // x1+y1
- fp.Add(E, x2, y2) // x2+y2
- fp.Mul(E, E, F) // (x1+y1)*(x2+y2)
- fp.Sub(E, E, A) // (x1+y1)*(x2+y2)-A
- fp.Sub(E, E, B) // E = (x1+y1)*(x2+y2)-A-B
- fp.Sub(F, D, C) // F = D-C
- fp.Add(G, D, C) // G = D+C
- fp.Sub(H, B, A) // H = B-A
- fp.Mul(z3, F, G) // Z = F * G
- fp.Mul(x3, E, F) // X = E * F
- fp.Mul(y3, G, H) // Y = G * H, T = E * H
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/scalar.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/scalar.go
deleted file mode 100644
index f98117b252..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/scalar.go
+++ /dev/null
@@ -1,203 +0,0 @@
-package goldilocks
-
-import (
- "encoding/binary"
- "math/bits"
-)
-
-// ScalarSize is the size (in bytes) of scalars.
-const ScalarSize = 56 // 448 / 8
-
-// _N is the number of 64-bit words to store scalars.
-const _N = 7 // 448 / 64
-
-// Scalar represents a positive integer stored in little-endian order.
-type Scalar [ScalarSize]byte
-
-type scalar64 [_N]uint64
-
-func (z *scalar64) fromScalar(x *Scalar) {
- z[0] = binary.LittleEndian.Uint64(x[0*8 : 1*8])
- z[1] = binary.LittleEndian.Uint64(x[1*8 : 2*8])
- z[2] = binary.LittleEndian.Uint64(x[2*8 : 3*8])
- z[3] = binary.LittleEndian.Uint64(x[3*8 : 4*8])
- z[4] = binary.LittleEndian.Uint64(x[4*8 : 5*8])
- z[5] = binary.LittleEndian.Uint64(x[5*8 : 6*8])
- z[6] = binary.LittleEndian.Uint64(x[6*8 : 7*8])
-}
-
-func (z *scalar64) toScalar(x *Scalar) {
- binary.LittleEndian.PutUint64(x[0*8:1*8], z[0])
- binary.LittleEndian.PutUint64(x[1*8:2*8], z[1])
- binary.LittleEndian.PutUint64(x[2*8:3*8], z[2])
- binary.LittleEndian.PutUint64(x[3*8:4*8], z[3])
- binary.LittleEndian.PutUint64(x[4*8:5*8], z[4])
- binary.LittleEndian.PutUint64(x[5*8:6*8], z[5])
- binary.LittleEndian.PutUint64(x[6*8:7*8], z[6])
-}
-
-// add calculates z = x + y. Assumes len(z) > max(len(x),len(y)).
-func add(z, x, y []uint64) uint64 {
- l, L, zz := len(x), len(y), y
- if l > L {
- l, L, zz = L, l, x
- }
- c := uint64(0)
- for i := 0; i < l; i++ {
- z[i], c = bits.Add64(x[i], y[i], c)
- }
- for i := l; i < L; i++ {
- z[i], c = bits.Add64(zz[i], 0, c)
- }
- return c
-}
-
-// sub calculates z = x - y. Assumes len(z) > max(len(x),len(y)).
-func sub(z, x, y []uint64) uint64 {
- l, L, zz := len(x), len(y), y
- if l > L {
- l, L, zz = L, l, x
- }
- c := uint64(0)
- for i := 0; i < l; i++ {
- z[i], c = bits.Sub64(x[i], y[i], c)
- }
- for i := l; i < L; i++ {
- z[i], c = bits.Sub64(zz[i], 0, c)
- }
- return c
-}
-
-// mulWord calculates z = x * y. Assumes len(z) >= len(x)+1.
-func mulWord(z, x []uint64, y uint64) {
- for i := range z {
- z[i] = 0
- }
- carry := uint64(0)
- for i := range x {
- hi, lo := bits.Mul64(x[i], y)
- lo, cc := bits.Add64(lo, z[i], 0)
- hi, _ = bits.Add64(hi, 0, cc)
- z[i], cc = bits.Add64(lo, carry, 0)
- carry, _ = bits.Add64(hi, 0, cc)
- }
- z[len(x)] = carry
-}
-
-// Cmov moves x into z if b=1.
-func (z *scalar64) Cmov(b uint64, x *scalar64) {
- m := uint64(0) - b
- for i := range z {
- z[i] = (z[i] &^ m) | (x[i] & m)
- }
-}
-
-// leftShift shifts to the left the words of z returning the more significant word.
-func (z *scalar64) leftShift(low uint64) uint64 {
- high := z[_N-1]
- for i := _N - 1; i > 0; i-- {
- z[i] = z[i-1]
- }
- z[0] = low
- return high
-}
-
-// reduceOneWord calculates z = z + 2^448*x such that the result fits in a Scalar.
-func (z *scalar64) reduceOneWord(x uint64) {
- prod := (&scalar64{})[:]
- mulWord(prod, residue448[:], x)
- cc := add(z[:], z[:], prod)
- mulWord(prod, residue448[:], cc)
- add(z[:], z[:], prod)
-}
-
-// modOrder reduces z mod order.
-func (z *scalar64) modOrder() {
- var o64, x scalar64
- o64.fromScalar(&order)
- // Performs: while (z >= order) { z = z-order }
- // At most 8 (eight) iterations reduce 3 bits by subtracting.
- for i := 0; i < 8; i++ {
- c := sub(x[:], z[:], o64[:]) // (c || x) = z-order
- z.Cmov(1-c, &x) // if c != 0 { z = x }
- }
-}
-
-// FromBytes stores z = x mod order, where x is a number stored in little-endian order.
-func (z *Scalar) FromBytes(x []byte) {
- n := len(x)
- nCeil := (n + 7) >> 3
- for i := range z {
- z[i] = 0
- }
- if nCeil < _N {
- copy(z[:], x)
- return
- }
- copy(z[:], x[8*(nCeil-_N):])
- var z64 scalar64
- z64.fromScalar(z)
- for i := nCeil - _N - 1; i >= 0; i-- {
- low := binary.LittleEndian.Uint64(x[8*i:])
- high := z64.leftShift(low)
- z64.reduceOneWord(high)
- }
- z64.modOrder()
- z64.toScalar(z)
-}
-
-// divBy4 calculates z = x/4 mod order.
-func (z *Scalar) divBy4(x *Scalar) { z.Mul(x, &invFour) }
-
-// Red reduces z mod order.
-func (z *Scalar) Red() { var t scalar64; t.fromScalar(z); t.modOrder(); t.toScalar(z) }
-
-// Neg calculates z = -z mod order.
-func (z *Scalar) Neg() { z.Sub(&order, z) }
-
-// Add calculates z = x+y mod order.
-func (z *Scalar) Add(x, y *Scalar) {
- var z64, x64, y64, t scalar64
- x64.fromScalar(x)
- y64.fromScalar(y)
- c := add(z64[:], x64[:], y64[:])
- add(t[:], z64[:], residue448[:])
- z64.Cmov(c, &t)
- z64.modOrder()
- z64.toScalar(z)
-}
-
-// Sub calculates z = x-y mod order.
-func (z *Scalar) Sub(x, y *Scalar) {
- var z64, x64, y64, t scalar64
- x64.fromScalar(x)
- y64.fromScalar(y)
- c := sub(z64[:], x64[:], y64[:])
- sub(t[:], z64[:], residue448[:])
- z64.Cmov(c, &t)
- z64.modOrder()
- z64.toScalar(z)
-}
-
-// Mul calculates z = x*y mod order.
-func (z *Scalar) Mul(x, y *Scalar) {
- var z64, x64, y64 scalar64
- prod := (&[_N + 1]uint64{})[:]
- x64.fromScalar(x)
- y64.fromScalar(y)
- mulWord(prod, x64[:], y64[_N-1])
- copy(z64[:], prod[:_N])
- z64.reduceOneWord(prod[_N])
- for i := _N - 2; i >= 0; i-- {
- h := z64.leftShift(0)
- z64.reduceOneWord(h)
- mulWord(prod, x64[:], y64[i])
- c := add(z64[:], z64[:], prod[:_N])
- z64.reduceOneWord(prod[_N] + c)
- }
- z64.modOrder()
- z64.toScalar(z)
-}
-
-// IsZero returns true if z=0.
-func (z *Scalar) IsZero() bool { z.Red(); return *z == Scalar{} }
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist.go
deleted file mode 100644
index 83d7cdadd3..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist.go
+++ /dev/null
@@ -1,138 +0,0 @@
-package goldilocks
-
-import (
- "crypto/subtle"
- "math/bits"
-
- "github.com/cloudflare/circl/internal/conv"
- "github.com/cloudflare/circl/math"
- fp "github.com/cloudflare/circl/math/fp448"
-)
-
-// twistCurve is -x^2+y^2=1-39082x^2y^2 and is 4-isogenous to Goldilocks.
-type twistCurve struct{}
-
-// Identity returns the identity point.
-func (twistCurve) Identity() *twistPoint {
- return &twistPoint{
- y: fp.One(),
- z: fp.One(),
- }
-}
-
-// subYDiv16 update x = (x - y) / 16.
-func subYDiv16(x *scalar64, y int64) {
- s := uint64(y >> 63)
- x0, b0 := bits.Sub64((*x)[0], uint64(y), 0)
- x1, b1 := bits.Sub64((*x)[1], s, b0)
- x2, b2 := bits.Sub64((*x)[2], s, b1)
- x3, b3 := bits.Sub64((*x)[3], s, b2)
- x4, b4 := bits.Sub64((*x)[4], s, b3)
- x5, b5 := bits.Sub64((*x)[5], s, b4)
- x6, _ := bits.Sub64((*x)[6], s, b5)
- x[0] = (x0 >> 4) | (x1 << 60)
- x[1] = (x1 >> 4) | (x2 << 60)
- x[2] = (x2 >> 4) | (x3 << 60)
- x[3] = (x3 >> 4) | (x4 << 60)
- x[4] = (x4 >> 4) | (x5 << 60)
- x[5] = (x5 >> 4) | (x6 << 60)
- x[6] = (x6 >> 4)
-}
-
-func recodeScalar(d *[113]int8, k *Scalar) {
- var k64 scalar64
- k64.fromScalar(k)
- for i := 0; i < 112; i++ {
- d[i] = int8((k64[0] & 0x1f) - 16)
- subYDiv16(&k64, int64(d[i]))
- }
- d[112] = int8(k64[0])
-}
-
-// ScalarMult returns kP.
-func (e twistCurve) ScalarMult(k *Scalar, P *twistPoint) *twistPoint {
- var TabP [8]preTwistPointProy
- var S preTwistPointProy
- var d [113]int8
-
- var isZero int
- if k.IsZero() {
- isZero = 1
- }
- subtle.ConstantTimeCopy(isZero, k[:], order[:])
-
- minusK := *k
- isEven := 1 - int(k[0]&0x1)
- minusK.Neg()
- subtle.ConstantTimeCopy(isEven, k[:], minusK[:])
- recodeScalar(&d, k)
-
- P.oddMultiples(TabP[:])
- Q := e.Identity()
- for i := 112; i >= 0; i-- {
- Q.Double()
- Q.Double()
- Q.Double()
- Q.Double()
- mask := d[i] >> 7
- absDi := (d[i] + mask) ^ mask
- inx := int32((absDi - 1) >> 1)
- sig := int((d[i] >> 7) & 0x1)
- for j := range TabP {
- S.cmov(&TabP[j], uint(subtle.ConstantTimeEq(inx, int32(j))))
- }
- S.cneg(sig)
- Q.mixAdd(&S)
- }
- Q.cneg(uint(isEven))
- return Q
-}
-
-const (
- omegaFix = 7
- omegaVar = 5
-)
-
-// CombinedMult returns mG+nP.
-func (e twistCurve) CombinedMult(m, n *Scalar, P *twistPoint) *twistPoint {
- nafFix := math.OmegaNAF(conv.BytesLe2BigInt(m[:]), omegaFix)
- nafVar := math.OmegaNAF(conv.BytesLe2BigInt(n[:]), omegaVar)
-
- if len(nafFix) > len(nafVar) {
- nafVar = append(nafVar, make([]int32, len(nafFix)-len(nafVar))...)
- } else if len(nafFix) < len(nafVar) {
- nafFix = append(nafFix, make([]int32, len(nafVar)-len(nafFix))...)
- }
-
- var TabQ [1 << (omegaVar - 2)]preTwistPointProy
- P.oddMultiples(TabQ[:])
- Q := e.Identity()
- for i := len(nafFix) - 1; i >= 0; i-- {
- Q.Double()
- // Generator point
- if nafFix[i] != 0 {
- idxM := absolute(nafFix[i]) >> 1
- R := tabVerif[idxM]
- if nafFix[i] < 0 {
- R.neg()
- }
- Q.mixAddZ1(&R)
- }
- // Variable input point
- if nafVar[i] != 0 {
- idxN := absolute(nafVar[i]) >> 1
- S := TabQ[idxN]
- if nafVar[i] < 0 {
- S.neg()
- }
- Q.mixAdd(&S)
- }
- }
- return Q
-}
-
-// absolute returns always a positive value.
-func absolute(x int32) int32 {
- mask := x >> 31
- return (x + mask) ^ mask
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistPoint.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistPoint.go
deleted file mode 100644
index c55db77b06..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistPoint.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package goldilocks
-
-import (
- "fmt"
-
- fp "github.com/cloudflare/circl/math/fp448"
-)
-
-type twistPoint struct{ x, y, z, ta, tb fp.Elt }
-
-type preTwistPointAffine struct{ addYX, subYX, dt2 fp.Elt }
-
-type preTwistPointProy struct {
- preTwistPointAffine
- z2 fp.Elt
-}
-
-func (P *twistPoint) String() string {
- return fmt.Sprintf("x: %v\ny: %v\nz: %v\nta: %v\ntb: %v", P.x, P.y, P.z, P.ta, P.tb)
-}
-
-// cneg conditionally negates the point if b=1.
-func (P *twistPoint) cneg(b uint) {
- t := &fp.Elt{}
- fp.Neg(t, &P.x)
- fp.Cmov(&P.x, t, b)
- fp.Neg(t, &P.ta)
- fp.Cmov(&P.ta, t, b)
-}
-
-// Double updates P with 2P.
-func (P *twistPoint) Double() {
- // This is formula (7) from "Twisted Edwards Curves Revisited" by
- // Hisil H., Wong K.KH., Carter G., Dawson E. (2008)
- // https://doi.org/10.1007/978-3-540-89255-7_20
- Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
- a, b, c, e, f, g, h := Px, Py, Pz, Pta, Px, Py, Ptb
- fp.Add(e, Px, Py) // x+y
- fp.Sqr(a, Px) // A = x^2
- fp.Sqr(b, Py) // B = y^2
- fp.Sqr(c, Pz) // z^2
- fp.Add(c, c, c) // C = 2*z^2
- fp.Add(h, a, b) // H = A+B
- fp.Sqr(e, e) // (x+y)^2
- fp.Sub(e, e, h) // E = (x+y)^2-A-B
- fp.Sub(g, b, a) // G = B-A
- fp.Sub(f, c, g) // F = C-G
- fp.Mul(Pz, f, g) // Z = F * G
- fp.Mul(Px, e, f) // X = E * F
- fp.Mul(Py, g, h) // Y = G * H, T = E * H
-}
-
-// mixAdd calculates P= P+Q, where Q is a precomputed point with Z_Q = 1.
-func (P *twistPoint) mixAddZ1(Q *preTwistPointAffine) {
- fp.Add(&P.z, &P.z, &P.z) // D = 2*z1 (z2=1)
- P.coreAddition(Q)
-}
-
-// coreAddition calculates P=P+Q for curves with A=-1.
-func (P *twistPoint) coreAddition(Q *preTwistPointAffine) {
- // This is the formula following (5) from "Twisted Edwards Curves Revisited" by
- // Hisil H., Wong K.KH., Carter G., Dawson E. (2008)
- // https://doi.org/10.1007/978-3-540-89255-7_20
- Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
- addYX2, subYX2, dt2 := &Q.addYX, &Q.subYX, &Q.dt2
- a, b, c, d, e, f, g, h := Px, Py, &fp.Elt{}, Pz, Pta, Px, Py, Ptb
- fp.Mul(c, Pta, Ptb) // t1 = ta*tb
- fp.Sub(h, Py, Px) // y1-x1
- fp.Add(b, Py, Px) // y1+x1
- fp.Mul(a, h, subYX2) // A = (y1-x1)*(y2-x2)
- fp.Mul(b, b, addYX2) // B = (y1+x1)*(y2+x2)
- fp.Mul(c, c, dt2) // C = 2*D*t1*t2
- fp.Sub(e, b, a) // E = B-A
- fp.Add(h, b, a) // H = B+A
- fp.Sub(f, d, c) // F = D-C
- fp.Add(g, d, c) // G = D+C
- fp.Mul(Pz, f, g) // Z = F * G
- fp.Mul(Px, e, f) // X = E * F
- fp.Mul(Py, g, h) // Y = G * H, T = E * H
-}
-
-func (P *preTwistPointAffine) neg() {
- P.addYX, P.subYX = P.subYX, P.addYX
- fp.Neg(&P.dt2, &P.dt2)
-}
-
-func (P *preTwistPointAffine) cneg(b int) {
- t := &fp.Elt{}
- fp.Cswap(&P.addYX, &P.subYX, uint(b))
- fp.Neg(t, &P.dt2)
- fp.Cmov(&P.dt2, t, uint(b))
-}
-
-func (P *preTwistPointAffine) cmov(Q *preTwistPointAffine, b uint) {
- fp.Cmov(&P.addYX, &Q.addYX, b)
- fp.Cmov(&P.subYX, &Q.subYX, b)
- fp.Cmov(&P.dt2, &Q.dt2, b)
-}
-
-// mixAdd calculates P= P+Q, where Q is a precomputed point with Z_Q != 1.
-func (P *twistPoint) mixAdd(Q *preTwistPointProy) {
- fp.Mul(&P.z, &P.z, &Q.z2) // D = 2*z1*z2
- P.coreAddition(&Q.preTwistPointAffine)
-}
-
-// oddMultiples calculates T[i] = (2*i-1)P for 0 < i < len(T).
-func (P *twistPoint) oddMultiples(T []preTwistPointProy) {
- if n := len(T); n > 0 {
- T[0].FromTwistPoint(P)
- _2P := *P
- _2P.Double()
- R := &preTwistPointProy{}
- R.FromTwistPoint(&_2P)
- for i := 1; i < n; i++ {
- P.mixAdd(R)
- T[i].FromTwistPoint(P)
- }
- }
-}
-
-// cmov conditionally moves Q into P if b=1.
-func (P *preTwistPointProy) cmov(Q *preTwistPointProy, b uint) {
- P.preTwistPointAffine.cmov(&Q.preTwistPointAffine, b)
- fp.Cmov(&P.z2, &Q.z2, b)
-}
-
-// FromTwistPoint precomputes some coordinates of Q for missed addition.
-func (P *preTwistPointProy) FromTwistPoint(Q *twistPoint) {
- fp.Add(&P.addYX, &Q.y, &Q.x) // addYX = X + Y
- fp.Sub(&P.subYX, &Q.y, &Q.x) // subYX = Y - X
- fp.Mul(&P.dt2, &Q.ta, &Q.tb) // T = ta*tb
- fp.Mul(&P.dt2, &P.dt2, ¶mDTwist) // D*T
- fp.Add(&P.dt2, &P.dt2, &P.dt2) // dt2 = 2*D*T
- fp.Add(&P.z2, &Q.z, &Q.z) // z2 = 2*Z
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistTables.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistTables.go
deleted file mode 100644
index ed432e02c7..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistTables.go
+++ /dev/null
@@ -1,216 +0,0 @@
-package goldilocks
-
-import fp "github.com/cloudflare/circl/math/fp448"
-
-var tabFixMult = [fxV][fx2w1]preTwistPointAffine{
- {
- {
- addYX: fp.Elt{0x65, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2b, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
- subYX: fp.Elt{0x64, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2d, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
- dt2: fp.Elt{0x1a, 0x33, 0xea, 0x64, 0x45, 0x1c, 0xdf, 0x17, 0x1d, 0x16, 0x34, 0x28, 0xd6, 0x61, 0x19, 0x67, 0x79, 0xb4, 0x13, 0xcf, 0x3e, 0x7c, 0x0e, 0x72, 0xda, 0xf1, 0x5f, 0xda, 0xe6, 0xcf, 0x42, 0xd3, 0xb6, 0x17, 0xc2, 0x68, 0x13, 0x2d, 0xd9, 0x60, 0x3e, 0xae, 0xf0, 0x5b, 0x96, 0xf0, 0xcd, 0xaf, 0xea, 0xb7, 0x0d, 0x59, 0x16, 0xa7, 0xff, 0x55},
- },
- {
- addYX: fp.Elt{0xca, 0xd8, 0x7d, 0x86, 0x1a, 0xef, 0xad, 0x11, 0xe3, 0x27, 0x41, 0x7e, 0x7f, 0x3e, 0xa9, 0xd2, 0xb5, 0x4e, 0x50, 0xe0, 0x77, 0x91, 0xc2, 0x13, 0x52, 0x73, 0x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0xd3, 0xab, 0xa3, 0x72, 0x0d},
- subYX: fp.Elt{0x84, 0x68, 0x25, 0xe8, 0xe9, 0x8f, 0x91, 0xbf, 0xf7, 0xa4, 0x30, 0xae, 0xea, 0x9f, 0xdd, 0x56, 0x64, 0x09, 0xc9, 0x54, 0x68, 0x4e, 0x33, 0xc5, 0x6f, 0x7b, 0x2d, 0x52, 0x2e, 0x42, 0xbe, 0xbe, 0xf5, 0x64, 0xbf, 0x77, 0x54, 0xdf, 0xb0, 0x10, 0xd2, 0x16, 0x5d, 0xce, 0xaf, 0x9f, 0xfb, 0xa3, 0x63, 0x50, 0xcb, 0xc0, 0xd0, 0x88, 0x44, 0xa3},
- dt2: fp.Elt{0xc3, 0x8b, 0xa5, 0xf1, 0x44, 0xe4, 0x41, 0xcd, 0x75, 0xe3, 0x17, 0x69, 0x5b, 0xb9, 0xbb, 0xee, 0x82, 0xbb, 0xce, 0x57, 0xdf, 0x2a, 0x9c, 0x12, 0xab, 0x66, 0x08, 0x68, 0x05, 0x1b, 0x87, 0xee, 0x5d, 0x1e, 0x18, 0x14, 0x22, 0x4b, 0x99, 0x61, 0x75, 0x28, 0xe7, 0x65, 0x1c, 0x36, 0xb6, 0x18, 0x09, 0xa8, 0xdf, 0xef, 0x30, 0x35, 0xbc, 0x58},
- },
- {
- addYX: fp.Elt{0xc5, 0xd3, 0x0e, 0x6f, 0xaf, 0x06, 0x69, 0xc4, 0x07, 0x9e, 0x58, 0x6e, 0x3f, 0x49, 0xd9, 0x0a, 0x3c, 0x2c, 0x37, 0xcd, 0x27, 0x4d, 0x87, 0x91, 0x7a, 0xb0, 0x28, 0xad, 0x2f, 0x68, 0x92, 0x05, 0x97, 0xf1, 0x30, 0x5f, 0x4c, 0x10, 0x20, 0x30, 0xd3, 0x08, 0x3f, 0xc1, 0xc6, 0xb7, 0xb5, 0xd1, 0x71, 0x7b, 0xa8, 0x0a, 0xd8, 0xf5, 0x17, 0xcf},
- subYX: fp.Elt{0x64, 0xd4, 0x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7, 0x4d, 0x1d, 0x1f, 0xda, 0x51, 0x56, 0xe7, 0x0a, 0x5a, 0x65, 0xb6, 0x2a, 0x87, 0x49, 0x86, 0xc2, 0x2b, 0xcd, 0xfe, 0x07, 0xf6, 0x4c, 0xe2, 0x1d, 0x9b, 0xd8, 0x82, 0x09, 0x5b, 0x11, 0x10, 0x62, 0x56, 0x89, 0xbd},
- dt2: fp.Elt{0xd9, 0x15, 0x73, 0xf2, 0x96, 0x35, 0x53, 0xb0, 0xe7, 0xa8, 0x0b, 0x93, 0x35, 0x0b, 0x3a, 0x00, 0xf5, 0x18, 0xb1, 0xc3, 0x12, 0x3f, 0x91, 0x17, 0xc1, 0x4c, 0x15, 0x5a, 0x86, 0x92, 0x11, 0xbd, 0x44, 0x40, 0x5a, 0x7b, 0x15, 0x89, 0xba, 0xc1, 0xc1, 0xbc, 0x43, 0x45, 0xe6, 0x52, 0x02, 0x73, 0x0a, 0xd0, 0x2a, 0x19, 0xda, 0x47, 0xa8, 0xff},
- },
- },
-}
-
-// tabVerif contains the odd multiples of P. The entry T[i] = (2i+1)P, where
-// P = phi(G) and G is the generator of the Goldilocks curve, and phi is a
-// 4-degree isogeny.
-var tabVerif = [1 << (omegaFix - 2)]preTwistPointAffine{
- { /* 1P*/
- addYX: fp.Elt{0x65, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2b, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
- subYX: fp.Elt{0x64, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2d, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
- dt2: fp.Elt{0x1a, 0x33, 0xea, 0x64, 0x45, 0x1c, 0xdf, 0x17, 0x1d, 0x16, 0x34, 0x28, 0xd6, 0x61, 0x19, 0x67, 0x79, 0xb4, 0x13, 0xcf, 0x3e, 0x7c, 0x0e, 0x72, 0xda, 0xf1, 0x5f, 0xda, 0xe6, 0xcf, 0x42, 0xd3, 0xb6, 0x17, 0xc2, 0x68, 0x13, 0x2d, 0xd9, 0x60, 0x3e, 0xae, 0xf0, 0x5b, 0x96, 0xf0, 0xcd, 0xaf, 0xea, 0xb7, 0x0d, 0x59, 0x16, 0xa7, 0xff, 0x55},
- },
- { /* 3P*/
- addYX: fp.Elt{0xd1, 0xe9, 0xa8, 0x33, 0x20, 0x76, 0x18, 0x08, 0x45, 0x2a, 0xc9, 0x67, 0x2a, 0xc3, 0x15, 0x24, 0xf9, 0x74, 0x21, 0x30, 0x99, 0x59, 0x8b, 0xb2, 0xf0, 0xa4, 0x07, 0xe2, 0x6a, 0x36, 0x8d, 0xd9, 0xd2, 0x4a, 0x7f, 0x73, 0x50, 0x39, 0x3d, 0xaa, 0xa7, 0x51, 0x73, 0x0d, 0x2b, 0x8b, 0x96, 0x47, 0xac, 0x3c, 0x5d, 0xaa, 0x39, 0x9c, 0xcf, 0xd5},
- subYX: fp.Elt{0x6b, 0x11, 0x5d, 0x1a, 0xf9, 0x41, 0x9d, 0xc5, 0x30, 0x3e, 0xad, 0x25, 0x2c, 0x04, 0x45, 0xea, 0xcc, 0x67,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 0x24, 0xb4, 0x2f, 0x97, 0xad, 0xac, 0x8f, 0x19, 0xab, 0xfa, 0x12, 0xe5, 0xf9, 0x50, 0x4e, 0x50, 0x6f, 0x32, 0x30, 0x88, 0xa6, 0xe5, 0x48, 0x28, 0xa2, 0x1b, 0x9f, 0xcd, 0xe2, 0x43, 0x38},
- dt2: fp.Elt{0xa9, 0xcc, 0x53, 0x39, 0x86, 0x02, 0x60, 0x75, 0x34, 0x99, 0x57, 0xbd, 0xfc, 0x5a, 0x8e, 0xce, 0x5e, 0x98, 0x22, 0xd0, 0xa5, 0x24, 0xff, 0x90, 0x28, 0x9f, 0x58, 0xf3, 0x39, 0xe9, 0xba, 0x36, 0x23, 0xfb, 0x7f, 0x41, 0xcc, 0x2b, 0x5a, 0x25, 0x3f, 0x4c, 0x2a, 0xf1, 0x52, 0x6f, 0x2f, 0x07, 0xe3, 0x88, 0x81, 0x77, 0xdd, 0x7c, 0x88, 0x82},
- },
- { /* 7P*/
- addYX: fp.Elt{0xf7, 0xee, 0x88, 0xfd, 0x3a, 0xbf, 0x7e, 0x28, 0x39, 0x23, 0x79, 0xe6, 0x5c, 0x56, 0xcb, 0xb5, 0x48, 0x6a, 0x80, 0x6d, 0x37, 0x60, 0x6c, 0x10, 0x35, 0x49, 0x4b, 0x46, 0x60, 0xd4, 0x79, 0xd4, 0x53, 0xd3, 0x67, 0x88, 0xd0, 0x41, 0xd5, 0x43, 0x85, 0xc8, 0x71, 0xe3, 0x1c, 0xb6, 0xda, 0x22, 0x64, 0x8f, 0x80, 0xac, 0xad, 0x7d, 0xd5, 0x82},
- subYX: fp.Elt{0x92, 0x40, 0xc1, 0x83, 0x21, 0x9b, 0xd5, 0x7d, 0x3f, 0x29, 0xb6, 0x26, 0xef, 0x12, 0xb9, 0x27, 0x39, 0x42, 0x37, 0x97, 0x09, 0x9a, 0x08, 0xe1, 0x68, 0xb6, 0x7a, 0x3f, 0x9f, 0x45, 0xf8, 0x37, 0x19, 0x83, 0x97, 0xe6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elt{0x91, 0x0a, 0x43, 0x34, 0x20, 0xc2, 0x64, 0xf7, 0x4e, 0x48, 0xc8, 0xd2, 0x95, 0x83, 0xd1, 0xa4, 0xfb, 0x4e, 0x41, 0x3b, 0x0d, 0xd5, 0x07, 0xd9, 0xf1, 0x13, 0x16, 0x78, 0x54, 0x57, 0xd0, 0xf1, 0x4f, 0x20, 0xac, 0xcf, 0x9c, 0x3b, 0x33, 0x0b, 0x99, 0x54, 0xc3, 0x7f, 0x3e, 0x57, 0x26, 0x86, 0xd5, 0xa5, 0x2b, 0x8d, 0xe3, 0x19, 0x36, 0xf7},
- },
- { /* 15P*/
- addYX: fp.Elt{0x23, 0x69, 0x47, 0x14, 0xf9, 0x9a, 0x50, 0xff, 0x64, 0xd1, 0x50, 0x35, 0xc3, 0x11, 0xd3, 0x19, 0xcf, 0x87, 0xda, 0x30, 0x0b, 0x50, 0xda, 0xc0, 0xe0, 0x25, 0x00, 0xe5, 0x68, 0x93, 0x04, 0xc2, 0xaf, 0xbd, 0x2f, 0x36, 0x5f, 0x47, 0x96, 0x10, 0xa8, 0xbd, 0xe4, 0x88, 0xac, 0x80, 0x52, 0x61, 0x73, 0xe9, 0x63, 0xdd, 0x99, 0xad, 0x20, 0x5b},
- subYX: fp.Elt{0x1b, 0x5e, 0xa2, 0x2a, 0x25, 0x0f, 0x86, 0xc0, 0xb1, 0x2e, 0x0c, 0x13, 0x40, 0x8d, 0xf0, 0xe6, 0x00, 0x55, 0x08, 0xc5, 0x7d, 0xf4, 0xc9, 0x31, 0x25, 0x3a, 0x99, 0x69, 0xdd, 0x67, 0x63, 0x9a, 0xd6, 0x89, 0x2e, 0xa1, 0x19, 0xca, 0x2c, 0xd9, 0x59, 0x5f, 0x5d, 0xc3, 0x6e, 0x62, 0x36, 0x12, 0x59, 0x15, 0xe1, 0xdc, 0xa4, 0xad, 0xc9, 0xd0},
- dt2: fp.Elt{0xbc, 0xea, 0xfc, 0xaf, 0x66, 0x23, 0xb7, 0x39, 0x6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0x6b, 0xca, 0x14, 0xe4, 0x9f, 0x0f, 0xb5, 0x3c, 0xa6, 0xa5, 0xa2, 0x63, 0x94, 0xd1, 0x1c, 0x39, 0x58, 0x57, 0x02, 0x27, 0x98, 0xb6, 0x47, 0xc6, 0x61, 0x4b, 0x5c, 0xab, 0x6f, 0x2d, 0xab, 0xe3, 0xc1, 0x69, 0xf9, 0x12, 0xb0, 0xc8, 0xd5},
- },
- { /* 19P*/
- addYX: fp.Elt{0x19, 0x7d, 0xd5, 0xac, 0x79, 0xa2, 0x82, 0x9b, 0x28, 0x31, 0x22, 0xc0, 0x73, 0x02, 0x76, 0x17, 0x10, 0x70, 0x79, 0x57, 0xc9, 0x84, 0x62, 0x8e, 0x04, 0x04, 0x61, 0x67, 0x08, 0x48, 0xb4, 0x4b, 0xde, 0x53, 0x8c, 0xff, 0x36, 0x1b, 0x62, 0x86, 0x5d, 0xe1, 0x9b, 0xb1, 0xe5, 0xe8, 0x44, 0x64, 0xa1, 0x68, 0x3f, 0xa8, 0x45, 0x52, 0x91, 0xed},
- subYX: fp.Elt{0x42, 0x1a, 0x36, 0x1f, 0x90, 0x15, 0x24, 0x8d, 0x24, 0x80, 0xe6, 0xfe, 0x1e, 0xf0, 0xad, 0xaf, 0x6a, 0x93, 0xf0, 0xa6, 0x0d, 0x5d, 0xea, 0xf6, 0x62, 0x96, 0x7a, 0x05, 0x76, 0x85, 0x74, 0x32, 0xc7, 0xc8, 0x64, 0x53, 0x62, 0xe7, 0x54, 0x84, 0xe0, 0x40, 0x66, 0x19, 0x70, 0x40, 0x95, 0x35, 0x68, 0x64, 0x43, 0xcd, 0xba, 0x29, 0x32, 0xa8},
- dt2: fp.Elt{0x3e, 0xf6, 0xd6, 0xe4, 0x99, 0xeb, 0x20, 0x66, 0x08, 0x2e, 0x26, 0x64, 0xd7, 0x76, 0xf3, 0xb4, 0xc5, 0xa4, 0x35, 0x92, 0xd2, 0x99, 0x70, 0x5a, 0x1a, 0xe9, 0xe9, 0x3d, 0x3b, 0xe1, 0xcd, 0x0e, 0xee, 0x24, 0x13, 0x03, 0x22, 0xd6, 0xd6, 0x72, 0x08, 0x2b, 0xde, 0xfd, 0x93, 0xed, 0x0c, 0x7f, 0x5e, 0x31, 0x22, 0x4d, 0x80, 0x78, 0xc0, 0x48},
- },
- { /* 21P*/
- addYX: fp.Elt{0x8f, 0x72, 0xd2, 0x9e, 0xc4, 0xcd, 0x2c, 0xbf, 0xa8, 0xd3, 0x24, 0x62, 0x28, 0xee, 0x39, 0x0a, 0x19, 0x3a, 0x58, 0xff, 0x21, 0x2e, 0x69, 0x6c, 0x6e, 0x18, 0xd0, 0xcd, 0x61, 0xc1, 0x18, 0x02, 0x5a, 0xe9, 0xe3, 0xef, 0x1f, 0x8e, 0x10, 0xe8, 0x90, 0x2b, 0x48, 0xcd, 0xee, 0x38, 0xbd, 0x3a, 0xca, 0xbc, 0x2d, 0xe2, 0x3a, 0x03, 0x71, 0x02},
- subYX: fp.Elt{0xf8, 0xa4, 0x32, 0x26, 0x66, 0xaf, 0x3b, 0x53, 0xe7, 0xb0, 0x91, 0x92, 0xf5, 0x3c, 0x74, 0xce, 0xf2, 0xdd, 0x68, 0xa9, 0xf4, 0xcd, 0x5f, 0x60, 0xab, 0x71, 0xdf, 0xcd, 0x5c, 0x5d, 0x51, 0x72, 0x3a, 0x96, 0xea, 0xd6, 0xde, 0x54, 0x8e, 0x55, 0x4c, 0x08, 0x4c, 0x60, 0xdd, 0x34, 0xa9, 0x6f, 0xf3, 0x04, 0x02, 0xa8, 0xa6, 0x4e, 0x4d, 0x62},
- dt2: fp.Elt{0x76, 0x4a, 0xae, 0x38, 0x62, 0x69, 0x72, 0xdc, 0xe8, 0x43, 0xbe, 0x1d, 0x61, 0xde, 0x31, 0xc3, 0x42, 0x8f, 0x33, 0x9d, 0xca, 0xc7, 0x9c, 0xec, 0x6a, 0xe2, 0xaa, 0x01, 0x49, 0x78, 0x8d, 0x72, 0x4f, 0x38, 0xea, 0x52, 0xc2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
- addYX: fp.Elt{0x1c, 0xb2, 0xb2, 0x67, 0x3b, 0x8b, 0x3d, 0x5a, 0x30, 0x7e, 0x38, 0x7e, 0x3c, 0x3d, 0x28, 0x56, 0x59, 0xd8, 0x87, 0x53, 0x8b, 0xe6, 0x6c, 0x5d, 0xe5, 0x0a, 0x33, 0x10, 0xce, 0xa2, 0x17, 0x0d, 0xe8, 0x76, 0xee, 0x68, 0xa8, 0x72, 0x54, 0xbd, 0xa6, 0x24, 0x94, 0x6e, 0x77, 0xc7, 0x53, 0xb7, 0x89, 0x1c, 0x7a, 0xe9, 0x78, 0x9a, 0x74, 0x5f},
- subYX: fp.Elt{0x76, 0x96, 0x1c, 0xcf, 0x08, 0x55, 0xd8, 0x1e, 0x0d, 0xa3, 0x59, 0x95, 0x32, 0xf4, 0xc2, 0x8e, 0x84, 0x5e, 0x4b, 0x04, 0xda, 0x71, 0xc9, 0x78, 0x52, 0xde, 0x14, 0xb4, 0x31, 0xf4, 0xd4, 0xb8, 0x58, 0xc5, 0x20, 0xe8, 0xdd, 0x15, 0xb5, 0xee, 0xea, 0x61, 0xe0, 0xf5, 0xd6, 0xae, 0x55, 0x59, 0x05, 0x3e, 0xaf, 0x74, 0xac, 0x1f, 0x17, 0x82},
- dt2: fp.Elt{0x59, 0x24, 0xcd, 0xfc, 0x11, 0x7e, 0x85, 0x18, 0x3d, 0x69, 0xf7, 0x71, 0x31, 0x66, 0x98, 0x42, 0x95, 0x00, 0x8c, 0xb2, 0xae, 0x39, 0x7e, 0x85, 0xd6, 0xb0, 0x02, 0xec, 0xce, 0xfc, 0x25, 0xb2, 0xe3, 0x99, 0x8e, 0x5b, 0x61, 0x96, 0x2e, 0x6d, 0x96, 0x57, 0x71, 0xa5, 0x93, 0x41, 0x0e, 0x6f, 0xfd, 0x0a, 0xbf, 0xa9, 0xf7, 0x56, 0xa9, 0x3e},
- },
- { /* 31P*/
- addYX: fp.Elt{0xa2, 0x2e, 0x0c, 0x17, 0x4d, 0xcc, 0x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9, 0x64, 0x66, 0x61, 0xde, 0xf3, 0x6d, 0xd4, 0xae, 0x8e, 0xb1, 0x72, 0xe0, 0xcd, 0x37, 0x01, 0x28, 0x52, 0xd7, 0x39, 0x46, 0x0c, 0x55, 0xcf, 0x47, 0x70, 0xef, 0xa1, 0x17},
- subYX: fp.Elt{0x8d, 0x58, 0xde, 0x83, 0x88, 0x16, 0x0e, 0x12, 0x42, 0x03, 0x50, 0x60, 0x4b, 0xdf, 0xbf, 0x95, 0xcc, 0x7d, 0x18, 0x17, 0x7e, 0x31, 0x5d, 0x8a, 0x66, 0xc1, 0xcf, 0x14, 0xea, 0xf4, 0xf4, 0xe5, 0x63, 0x2d, 0x32, 0x86, 0x9b, 0xed, 0x1f, 0x4f, 0x03, 0xaf, 0x33, 0x92, 0xcb, 0xaf, 0x9c, 0x05, 0x0d, 0x47, 0x1b, 0x42, 0xba, 0x13, 0x22, 0x98},
- dt2: fp.Elt{0xb5, 0x48, 0xeb, 0x7d, 0x3d, 0x10, 0x9f, 0x59, 0xde, 0xf8, 0x1c, 0x4f, 0x7d, 0x9d, 0x40, 0x4d, 0x9e, 0x13, 0x24, 0xb5, 0x21, 0x09, 0xb7, 0xee, 0x98, 0x5c, 0x56, 0xbc, 0x5e, 0x2b, 0x78, 0x38, 0x06, 0xac, 0xe3, 0xe0, 0xfa, 0x2e, 0xde, 0x4f, 0xd2, 0xb3, 0xfb, 0x2d, 0x71, 0x84, 0xd1, 0x9d, 0x12, 0x5b, 0x35, 0xc8, 0x03, 0x68, 0x67, 0xc7},
- },
- { /* 39P*/
- addYX: fp.Elt{0xb6, 0x65, 0xfb, 0xa7, 0x06, 0x35, 0xbb, 0xe0, 0x31, 0x8d, 0x91, 0x40, 0x98, 0xab, 0x30, 0xe4, 0xca, 0x12, 0x59, 0x89, 0xed, 0x65, 0x5d, 0x7f, 0xae, 0x69, 0xa0, 0xa4, 0xfa, 0x78, 0xb4, 0xf7, 0xed, 0xae, 0x86, 0x78, 0x79, 0x64, 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0x72, 0x15, 0x2f, 0x9e, 0xa8, 0xaa},
- subYX: fp.Elt{0xf4, 0x3e, 0x85, 0x1c, 0x1a, 0xef, 0x50, 0xd1, 0xb4, 0x20, 0xb2, 0x60, 0x05, 0x98, 0xfe, 0x47, 0x3b, 0xc1, 0x76, 0xca, 0x2c, 0x4e, 0x5a, 0x42, 0xa3, 0xf7, 0x20, 0xaa, 0x57, 0x39, 0xee, 0x34, 0x1f, 0xe1, 0x68, 0xd3, 0x7e, 0x06, 0xc4, 0x6c, 0xc7, 0x76, 0x2b, 0xe4, 0x1c, 0x48, 0x44, 0xe6, 0xe5, 0x44, 0x24, 0x8d, 0xb3, 0xb6, 0x88, 0x32},
- dt2: fp.Elt{0x18, 0xa7, 0xba, 0xd0, 0x44, 0x6f, 0x33, 0x31, 0x00, 0xf8, 0xf6, 0x12, 0xe3, 0xc5, 0xc7, 0xb5, 0x91, 0x9c, 0x91, 0xb5, 0x75, 0x18, 0x18, 0x8a, 0xab, 0xed, 0x24, 0x11, 0x2e, 0xce, 0x5a, 0x0f, 0x94, 0x5f, 0x2e, 0xca, 0xd3, 0x80, 0xea, 0xe5, 0x34, 0x96, 0x67, 0x8b, 0x6a, 0x26, 0x5e, 0xc8, 0x9d, 0x2c, 0x5e, 0x6c, 0xa2, 0x0c, 0xbf, 0xf0},
- },
- { /* 45P*/
- addYX: fp.Elt{0xb3, 0xbf, 0xa3, 0x85, 0xee, 0xf6, 0x58, 0x02, 0x78, 0xc4, 0x30, 0xd6, 0x57, 0x59, 0x8c, 0x88, 0x08, 0x7c, 0xbc, 0xbe, 0x0a, 0x74, 0xa9, 0xde, 0x69, 0xe7, 0x41, 0xd8, 0xbf, 0x66, 0x8d, 0x3d, 0x28, 0x00, 0x8c, 0x47, 0x65, 0x34, 0xfe, 0x86, 0x9e, 0x6a, 0xf2, 0x41, 0x6a, 0x94, 0xc4, 0x88, 0x75, 0x23, 0x0d, 0x52, 0x69, 0xee, 0x07, 0x89},
- subYX: fp.Elt{0x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, 0x60, 0x63, 0x24, 0xac, 0x15, 0xfb, 0xeb, 0xd3, 0xea, 0x57, 0x13, 0x86, 0x38, 0x1e, 0x22, 0xf4, 0x8c, 0x5d, 0xaf, 0x1b, 0x27, 0x21, 0x4f, 0xa3, 0x63},
- dt2: fp.Elt{0x07, 0x15, 0x87, 0xc4, 0xfd, 0xa1, 0x97, 0x7a, 0x07, 0x1f, 0x56, 0xcc, 0xe3, 0x6a, 0x01, 0x90, 0xce, 0xf9, 0xfa, 0x50, 0xb2, 0xe0, 0x87, 0x8b, 0x6c, 0x63, 0x6c, 0xf6, 0x2a, 0x09, 0xef, 0xef, 0xd2, 0x31, 0x40, 0x25, 0xf6, 0x84, 0xcb, 0xe0, 0xc4, 0x23, 0xc1, 0xcb, 0xe2, 0x02, 0x83, 0x2d, 0xed, 0x74, 0x74, 0x8b, 0xf8, 0x7c, 0x81, 0x18},
- },
- { /* 55P*/
- addYX: fp.Elt{0x9e, 0xe5, 0x59, 0x95, 0x63, 0x2e, 0xac, 0x8b, 0x03, 0x3c, 0xc1, 0x8e, 0xe1, 0x5b, 0x56, 0x3c, 0x16, 0x41, 0xe4, 0xc2, 0x60, 0x0c, 0x6d, 0x65, 0x9f, 0xfc, 0x27, 0x68, 0x43, 0x44, 0x05, 0x12, 0x6c, 0xda, 0x04, 0xef, 0xcf, 0xcf, 0xdc, 0x0a, 0x1a, 0x7f, 0x12, 0xd3, 0xeb, 0x02, 0xb6, 0x04, 0xca, 0xd6, 0xcb, 0xf0, 0x22, 0xba, 0x35, 0x6d},
- subYX: fp.Elt{0x09, 0x6d, 0xf9, 0x64, 0x4c, 0xe6, 0x41, 0xff, 0x01, 0x4d, 0xce, 0x1e, 0xfa, 0x38, 0xa2, 0x25, 0x62, 0xff, 0x03, 0x39, 0x18, 0x91, 0xbb, 0x9d, 0xce, 0x02, 0xf0, 0xf1, 0x3c, 0x55, 0x18, 0xa9, 0xab, 0x4d, 0xd2, 0x35, 0xfd, 0x8d, 0xa9, 0xb2, 0xad, 0xb7, 0x06, 0x6e, 0xc6, 0x69, 0x49, 0xd6, 0x98, 0x98, 0x0b, 0x22, 0x81, 0x6b, 0xbd, 0xa0},
- dt2: fp.Elt{0x22, 0xf4, 0x85, 0x5d, 0x2b, 0xf1, 0x55, 0xa5, 0xd6, 0x27, 0x86, 0x57, 0x12, 0x1f, 0x16, 0x0a, 0x5a, 0x9b, 0xf2, 0x38, 0xb6, 0x28, 0xd8, 0x99, 0x0c, 0x89, 0x1d, 0x7f, 0xca, 0x21, 0x17, 0x1a, 0x0b, 0x02, 0x5f, 0x77, 0x2f, 0x73, 0x30, 0x7c, 0xc8, 0xd7, 0x2b, 0xcc, 0xe7, 0xf3, 0x21, 0xac, 0x53, 0xa7, 0x11, 0x5d, 0xd8, 0x1d, 0x9b, 0xf5},
- },
- { /* 57P*/
- addYX: fp.Elt{0x94, 0x63, 0x5d, 0xef, 0xfd, 0x6d, 0x25, 0x4e, 0x6d, 0x29, 0x03, 0xed, 0x24, 0x28, 0x27, 0x57, 0x47, 0x3e, 0x6a, 0x1a, 0xfe, 0x37, 0xee, 0x5f, 0x83, 0x29, 0x14, 0xfd, 0x78, 0x25, 0x8a, 0xe1, 0x02, 0x38, 0xd8, 0xca, 0x65, 0x55, 0x40, 0x7d, 0x48, 0x2c, 0x7c, 0x7e, 0x60, 0xb6, 0x0c, 0x6d, 0xf7, 0xe8, 0xb3, 0x62, 0x53, 0xd6, 0x9c, 0x2b},
- subYX: fp.Elt{0x47, 0x25, 0x70, 0x62, 0xf5, 0x65, 0x93, 0x62, 0x08, 0xac, 0x59, 0x66, 0xdb, 0x08, 0xd9, 0x1a, 0x19, 0xaf, 0xf4, 0xef, 0x02, 0xa2, 0x78, 0xa9, 0x55, 0x1c, 0xfa, 0x08, 0x11, 0xcb, 0xa3, 0x71, 0x74, 0xb1, 0x62, 0xe7, 0xc7, 0xf3, 0x5a, 0xb5, 0x8b, 0xd4, 0xf6, 0x10, 0x57, 0x79, 0x72, 0x2f, 0x13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 0xf3, 0x90, 0x09, 0x75, 0x69, 0x62, 0x9f, 0x61, 0x35, 0x83, 0x92, 0x04, 0xef, 0x96, 0x38, 0x80, 0x9e, 0x88, 0xb3, 0x67, 0x95, 0xbe, 0x79, 0x3c, 0x35, 0xd8, 0xdc, 0xb2, 0x3e, 0x2d, 0xe6, 0x46, 0xbe, 0x81, 0xf3, 0x32, 0x0e, 0x37, 0x23, 0x75, 0x2a, 0x3d, 0xa0},
- },
-}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist_basemult.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist_basemult.go
deleted file mode 100644
index f6ac5edbbb..0000000000
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist_basemult.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package goldilocks
-
-import (
- "crypto/subtle"
-
- mlsb "github.com/cloudflare/circl/math/mlsbset"
-)
-
-const (
- // MLSBRecoding parameters
- fxT = 448
- fxV = 2
- fxW = 3
- fx2w1 = 1 << (uint(fxW) - 1)
-)
-
-// ScalarBaseMult returns kG where G is the generator point.
-func (e twistCurve) ScalarBaseMult(k *Scalar) *twistPoint {
- m, err := mlsb.New(fxT, fxV, fxW)
- if err != nil {
- panic(err)
- }
- if m.IsExtended() {
- panic("not extended")
- }
-
- var isZero int
- if k.IsZero() {
- isZero = 1
- }
- subtle.ConstantTimeCopy(isZero, k[:], order[:])
-
- minusK := *k
- isEven := 1 - int(k[0]&0x1)
- minusK.Neg()
- subtle.ConstantTimeCopy(isEven, k[:], minusK[:])
- c, err := m.Encode(k[:])
- if err != nil {
- panic(err)
- }
-
- gP := c.Exp(groupMLSB{})
- P := gP.(*twistPoint)
- P.cneg(uint(isEven))
- return P
-}
-
-type groupMLSB struct{}
-
-func (e groupMLSB) ExtendedEltP() mlsb.EltP { return nil }
-func (e groupMLSB) Sqr(x mlsb.EltG) { x.(*twistPoint).Double() }
-func (e groupMLSB) Mul(x mlsb.EltG, y mlsb.EltP) { x.(*twistPoint).mixAddZ1(y.(*preTwistPointAffine)) }
-func (e groupMLSB) Identity() mlsb.EltG { return twistCurve{}.Identity() }
-func (e groupMLSB) NewEltP() mlsb.EltP { return &preTwistPointAffine{} }
-func (e groupMLSB) Lookup(a mlsb.EltP, v uint, s, u int32) {
- Tabj := &tabFixMult[v]
- P := a.(*preTwistPointAffine)
- for k := range Tabj {
- P.cmov(&Tabj[k], uint(subtle.ConstantTimeEq(int32(k), u)))
- }
- P.cneg(int(s >> 31))
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/conv/conv.go b/vendor/github.com/cloudflare/circl/internal/conv/conv.go
deleted file mode 100644
index 3fd0df496f..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/conv/conv.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package conv
-
-import (
- "encoding/binary"
- "fmt"
- "math/big"
- "strings"
-
- "golang.org/x/crypto/cryptobyte"
-)
-
-// BytesLe2Hex returns an hexadecimal string of a number stored in a
-// little-endian order slice x.
-func BytesLe2Hex(x []byte) string {
- b := &strings.Builder{}
- b.Grow(2*len(x) + 2)
- fmt.Fprint(b, "0x")
- if len(x) == 0 {
- fmt.Fprint(b, "00")
- }
- for i := len(x) - 1; i >= 0; i-- {
- fmt.Fprintf(b, "%02x", x[i])
- }
- return b.String()
-}
-
-// BytesLe2BigInt converts a little-endian slice x into a big-endian
-// math/big.Int.
-func BytesLe2BigInt(x []byte) *big.Int {
- n := len(x)
- b := new(big.Int)
- if len(x) > 0 {
- y := make([]byte, n)
- for i := 0; i < n; i++ {
- y[n-1-i] = x[i]
- }
- b.SetBytes(y)
- }
- return b
-}
-
-// BytesBe2Uint64Le converts a big-endian slice x to a little-endian slice of uint64.
-func BytesBe2Uint64Le(x []byte) []uint64 {
- l := len(x)
- z := make([]uint64, (l+7)/8)
- blocks := l / 8
- for i := 0; i < blocks; i++ {
- z[i] = binary.BigEndian.Uint64(x[l-8*(i+1):])
- }
- remBytes := l % 8
- for i := 0; i < remBytes; i++ {
- z[blocks] |= uint64(x[l-1-8*blocks-i]) << uint(8*i)
- }
- return z
-}
-
-// BigInt2BytesLe stores a positive big.Int number x into a little-endian slice z.
-// The slice is modified if the bitlength of x <= 8*len(z) (padding with zeros).
-// If x does not fit in the slice or is negative, z is not modified.
-func BigInt2BytesLe(z []byte, x *big.Int) {
- xLen := (x.BitLen() + 7) >> 3
- zLen := len(z)
- if zLen >= xLen && x.Sign() >= 0 {
- y := x.Bytes()
- for i := 0; i < xLen; i++ {
- z[i] = y[xLen-1-i]
- }
- for i := xLen; i < zLen; i++ {
- z[i] = 0
- }
- }
-}
-
-// Uint64Le2BigInt converts a little-endian slice x into a big number.
-func Uint64Le2BigInt(x []uint64) *big.Int {
- n := len(x)
- b := new(big.Int)
- var bi big.Int
- for i := n - 1; i >= 0; i-- {
- bi.SetUint64(x[i])
- b.Lsh(b, 64)
- b.Add(b, &bi)
- }
- return b
-}
-
-// Uint64Le2BytesLe converts a little-endian slice x to a little-endian slice of bytes.
-func Uint64Le2BytesLe(x []uint64) []byte {
- b := make([]byte, 8*len(x))
- n := len(x)
- for i := 0; i < n; i++ {
- binary.LittleEndian.PutUint64(b[i*8:], x[i])
- }
- return b
-}
-
-// Uint64Le2BytesBe converts a little-endian slice x to a big-endian slice of bytes.
-func Uint64Le2BytesBe(x []uint64) []byte {
- b := make([]byte, 8*len(x))
- n := len(x)
- for i := 0; i < n; i++ {
- binary.BigEndian.PutUint64(b[i*8:], x[n-1-i])
- }
- return b
-}
-
-// Uint64Le2Hex returns an hexadecimal string of a number stored in a
-// little-endian order slice x.
-func Uint64Le2Hex(x []uint64) string {
- b := new(strings.Builder)
- b.Grow(16*len(x) + 2)
- fmt.Fprint(b, "0x")
- if len(x) == 0 {
- fmt.Fprint(b, "00")
- }
- for i := len(x) - 1; i >= 0; i-- {
- fmt.Fprintf(b, "%016x", x[i])
- }
- return b.String()
-}
-
-// BigInt2Uint64Le stores a positive big.Int number x into a little-endian slice z.
-// The slice is modified if the bitlength of x <= 8*len(z) (padding with zeros).
-// If x does not fit in the slice or is negative, z is not modified.
-func BigInt2Uint64Le(z []uint64, x *big.Int) {
- xLen := (x.BitLen() + 63) >> 6 // number of 64-bit words
- zLen := len(z)
- if zLen >= xLen && x.Sign() > 0 {
- var y, yi big.Int
- y.Set(x)
- two64 := big.NewInt(1)
- two64.Lsh(two64, 64).Sub(two64, big.NewInt(1))
- for i := 0; i < xLen; i++ {
- yi.And(&y, two64)
- z[i] = yi.Uint64()
- y.Rsh(&y, 64)
- }
- }
- for i := xLen; i < zLen; i++ {
- z[i] = 0
- }
-}
-
-// MarshalBinary encodes a value into a byte array in a format readable by UnmarshalBinary.
-func MarshalBinary(v cryptobyte.MarshalingValue) ([]byte, error) {
- const DefaultSize = 32
- b := cryptobyte.NewBuilder(make([]byte, 0, DefaultSize))
- b.AddValue(v)
- return b.Bytes()
-}
-
-// MarshalBinaryLen encodes a value into an array of n bytes in a format readable by UnmarshalBinary.
-func MarshalBinaryLen(v cryptobyte.MarshalingValue, length uint) ([]byte, error) {
- b := cryptobyte.NewFixedBuilder(make([]byte, 0, length))
- b.AddValue(v)
- return b.Bytes()
-}
-
-// A UnmarshalingValue decodes itself from a cryptobyte.String and advances the pointer.
-// It reports whether the read was successful.
-type UnmarshalingValue interface {
- Unmarshal(*cryptobyte.String) bool
-}
-
-// UnmarshalBinary recovers a value from a byte array.
-// It returns an error if the read was unsuccessful.
-func UnmarshalBinary(v UnmarshalingValue, data []byte) (err error) {
- s := cryptobyte.String(data)
- if data == nil || !v.Unmarshal(&s) || !s.Empty() {
- err = fmt.Errorf("cannot read %T from input string", v)
- }
- return
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/doc.go b/vendor/github.com/cloudflare/circl/internal/sha3/doc.go
deleted file mode 100644
index 7e02309070..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/doc.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package sha3 implements the SHA-3 fixed-output-length hash functions and
-// the SHAKE variable-output-length hash functions defined by FIPS-202.
-//
-// Both types of hash function use the "sponge" construction and the Keccak
-// permutation. For a detailed specification see http://keccak.noekeon.org/
-//
-// # Guidance
-//
-// If you aren't sure what function you need, use SHAKE256 with at least 64
-// bytes of output. The SHAKE instances are faster than the SHA3 instances;
-// the latter have to allocate memory to conform to the hash.Hash interface.
-//
-// If you need a secret-key MAC (message authentication code), prepend the
-// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
-// output.
-//
-// # Security strengths
-//
-// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
-// strength against preimage attacks of x bits. Since they only produce "x"
-// bits of output, their collision-resistance is only "x/2" bits.
-//
-// The SHAKE-256 and -128 functions have a generic security strength of 256 and
-// 128 bits against all attacks, provided that at least 2x bits of their output
-// is used. Requesting more than 64 or 32 bytes of output, respectively, does
-// not increase the collision-resistance of the SHAKE functions.
-//
-// # The sponge construction
-//
-// A sponge builds a pseudo-random function from a public pseudo-random
-// permutation, by applying the permutation to a state of "rate + capacity"
-// bytes, but hiding "capacity" of the bytes.
-//
-// A sponge starts out with a zero state. To hash an input using a sponge, up
-// to "rate" bytes of the input are XORed into the sponge's state. The sponge
-// is then "full" and the permutation is applied to "empty" it. This process is
-// repeated until all the input has been "absorbed". The input is then padded.
-// The digest is "squeezed" from the sponge in the same way, except that output
-// is copied out instead of input being XORed in.
-//
-// A sponge is parameterized by its generic security strength, which is equal
-// to half its capacity; capacity + rate is equal to the permutation's width.
-// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
-// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
-//
-// # Recommendations
-//
-// The SHAKE functions are recommended for most new uses. They can produce
-// output of arbitrary length. SHAKE256, with an output length of at least
-// 64 bytes, provides 256-bit security against all attacks. The Keccak team
-// recommends it for most applications upgrading from SHA2-512. (NIST chose a
-// much stronger, but much slower, sponge instance for SHA3-512.)
-//
-// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions.
-// They produce output of the same length, with the same security strengths
-// against all attacks. This means, in particular, that SHA3-256 only has
-// 128-bit collision resistance, because its output length is 32 bytes.
-package sha3
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/hashes.go b/vendor/github.com/cloudflare/circl/internal/sha3/hashes.go
deleted file mode 100644
index 7d2365a76e..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/hashes.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sha3
-
-// This file provides functions for creating instances of the SHA-3
-// and SHAKE hash functions, as well as utility functions for hashing
-// bytes.
-
-// New224 creates a new SHA3-224 hash.
-// Its generic security strength is 224 bits against preimage attacks,
-// and 112 bits against collision attacks.
-func New224() State {
- return State{rate: 144, outputLen: 28, dsbyte: 0x06}
-}
-
-// New256 creates a new SHA3-256 hash.
-// Its generic security strength is 256 bits against preimage attacks,
-// and 128 bits against collision attacks.
-func New256() State {
- return State{rate: 136, outputLen: 32, dsbyte: 0x06}
-}
-
-// New384 creates a new SHA3-384 hash.
-// Its generic security strength is 384 bits against preimage attacks,
-// and 192 bits against collision attacks.
-func New384() State {
- return State{rate: 104, outputLen: 48, dsbyte: 0x06}
-}
-
-// New512 creates a new SHA3-512 hash.
-// Its generic security strength is 512 bits against preimage attacks,
-// and 256 bits against collision attacks.
-func New512() State {
- return State{rate: 72, outputLen: 64, dsbyte: 0x06}
-}
-
-// Sum224 returns the SHA3-224 digest of the data.
-func Sum224(data []byte) (digest [28]byte) {
- h := New224()
- _, _ = h.Write(data)
- h.Sum(digest[:0])
- return
-}
-
-// Sum256 returns the SHA3-256 digest of the data.
-func Sum256(data []byte) (digest [32]byte) {
- h := New256()
- _, _ = h.Write(data)
- h.Sum(digest[:0])
- return
-}
-
-// Sum384 returns the SHA3-384 digest of the data.
-func Sum384(data []byte) (digest [48]byte) {
- h := New384()
- _, _ = h.Write(data)
- h.Sum(digest[:0])
- return
-}
-
-// Sum512 returns the SHA3-512 digest of the data.
-func Sum512(data []byte) (digest [64]byte) {
- h := New512()
- _, _ = h.Write(data)
- h.Sum(digest[:0])
- return
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/keccakf.go b/vendor/github.com/cloudflare/circl/internal/sha3/keccakf.go
deleted file mode 100644
index 1755fd1e6d..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/keccakf.go
+++ /dev/null
@@ -1,391 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sha3
-
-// KeccakF1600 applies the Keccak permutation to a 1600b-wide
-// state represented as a slice of 25 uint64s.
-// If turbo is true, applies the 12-round variant instead of the
-// regular 24-round variant.
-// nolint:funlen
-func KeccakF1600(a *[25]uint64, turbo bool) {
- // Implementation translated from Keccak-inplace.c
- // in the keccak reference code.
- var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64
-
- i := 0
-
- if turbo {
- i = 12
- }
-
- for ; i < 24; i += 4 {
- // Combines the 5 steps in each round into 2 steps.
- // Unrolls 4 rounds per loop and spreads some steps across rounds.
-
- // Round 1
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[6] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[12] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[18] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[24] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i]
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[16] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[22] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[3] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[1] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[7] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[19] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[11] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[23] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[4] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[2] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[8] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[14] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- // Round 2
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[16] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[7] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[23] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[14] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i+1]
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[11] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[2] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[18] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[6] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[22] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[4] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[1] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[8] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[24] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[12] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[3] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[19] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- // Round 3
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[11] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[22] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[8] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[19] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i+2]
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[1] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[12] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[23] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[16] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[2] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[24] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[6] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[3] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[14] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[7] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[18] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[4] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- // Round 4
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[1] ^ d1
- bc1 = t<<44 | t>>(64-44)
- t = a[2] ^ d2
- bc2 = t<<43 | t>>(64-43)
- t = a[3] ^ d3
- bc3 = t<<21 | t>>(64-21)
- t = a[4] ^ d4
- bc4 = t<<14 | t>>(64-14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i+3]
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc2 = t<<3 | t>>(64-3)
- t = a[6] ^ d1
- bc3 = t<<45 | t>>(64-45)
- t = a[7] ^ d2
- bc4 = t<<61 | t>>(64-61)
- t = a[8] ^ d3
- bc0 = t<<28 | t>>(64-28)
- t = a[9] ^ d4
- bc1 = t<<20 | t>>(64-20)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc4 = t<<18 | t>>(64-18)
- t = a[11] ^ d1
- bc0 = t<<1 | t>>(64-1)
- t = a[12] ^ d2
- bc1 = t<<6 | t>>(64-6)
- t = a[13] ^ d3
- bc2 = t<<25 | t>>(64-25)
- t = a[14] ^ d4
- bc3 = t<<8 | t>>(64-8)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc1 = t<<36 | t>>(64-36)
- t = a[16] ^ d1
- bc2 = t<<10 | t>>(64-10)
- t = a[17] ^ d2
- bc3 = t<<15 | t>>(64-15)
- t = a[18] ^ d3
- bc4 = t<<56 | t>>(64-56)
- t = a[19] ^ d4
- bc0 = t<<27 | t>>(64-27)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc3 = t<<41 | t>>(64-41)
- t = a[21] ^ d1
- bc4 = t<<2 | t>>(64-2)
- t = a[22] ^ d2
- bc0 = t<<62 | t>>(64-62)
- t = a[23] ^ d3
- bc1 = t<<55 | t>>(64-55)
- t = a[24] ^ d4
- bc2 = t<<39 | t>>(64-39)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/rc.go b/vendor/github.com/cloudflare/circl/internal/sha3/rc.go
deleted file mode 100644
index 6a3df42f30..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/rc.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package sha3
-
-// RC stores the round constants for use in the ι step.
-var RC = [24]uint64{
- 0x0000000000000001,
- 0x0000000000008082,
- 0x800000000000808A,
- 0x8000000080008000,
- 0x000000000000808B,
- 0x0000000080000001,
- 0x8000000080008081,
- 0x8000000000008009,
- 0x000000000000008A,
- 0x0000000000000088,
- 0x0000000080008009,
- 0x000000008000000A,
- 0x000000008000808B,
- 0x800000000000008B,
- 0x8000000000008089,
- 0x8000000000008003,
- 0x8000000000008002,
- 0x8000000000000080,
- 0x000000000000800A,
- 0x800000008000000A,
- 0x8000000080008081,
- 0x8000000000008080,
- 0x0000000080000001,
- 0x8000000080008008,
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/sha3.go b/vendor/github.com/cloudflare/circl/internal/sha3/sha3.go
deleted file mode 100644
index a0df5aa6c5..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/sha3.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sha3
-
-// spongeDirection indicates the direction bytes are flowing through the sponge.
-type spongeDirection int
-
-const (
- // spongeAbsorbing indicates that the sponge is absorbing input.
- spongeAbsorbing spongeDirection = iota
- // spongeSqueezing indicates that the sponge is being squeezed.
- spongeSqueezing
-)
-
-const (
- // maxRate is the maximum size of the internal buffer. SHAKE-256
- // currently needs the largest buffer.
- maxRate = 168
-)
-
-func (d *State) buf() []byte {
- return d.storage.asBytes()[d.bufo:d.bufe]
-}
-
-type State struct {
- // Generic sponge components.
- a [25]uint64 // main state of the hash
- rate int // the number of bytes of state to use
-
- bufo int // offset of buffer in storage
- bufe int // end of buffer in storage
-
- // dsbyte contains the "domain separation" bits and the first bit of
- // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the
- // SHA-3 and SHAKE functions by appending bitstrings to the message.
- // Using a little-endian bit-ordering convention, these are "01" for SHA-3
- // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the
- // padding rule from section 5.1 is applied to pad the message to a multiple
- // of the rate, which involves adding a "1" bit, zero or more "0" bits, and
- // a final "1" bit. We merge the first "1" bit from the padding into dsbyte,
- // giving 00000110b (0x06) and 00011111b (0x1f).
- // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf
- // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and
- // Extendable-Output Functions (May 2014)"
- dsbyte byte
-
- storage storageBuf
-
- // Specific to SHA-3 and SHAKE.
- outputLen int // the default output size in bytes
- state spongeDirection // whether the sponge is absorbing or squeezing
- turbo bool // Whether we're using 12 rounds instead of 24
-}
-
-// BlockSize returns the rate of sponge underlying this hash function.
-func (d *State) BlockSize() int { return d.rate }
-
-// Size returns the output size of the hash function in bytes.
-func (d *State) Size() int { return d.outputLen }
-
-// Reset clears the internal state by zeroing the sponge state and
-// the byte buffer, and setting Sponge.state to absorbing.
-func (d *State) Reset() {
- // Zero the permutation's state.
- for i := range d.a {
- d.a[i] = 0
- }
- d.state = spongeAbsorbing
- d.bufo = 0
- d.bufe = 0
-}
-
-func (d *State) clone() *State {
- ret := *d
- return &ret
-}
-
-// permute applies the KeccakF-1600 permutation. It handles
-// any input-output buffering.
-func (d *State) permute() {
- switch d.state {
- case spongeAbsorbing:
- // If we're absorbing, we need to xor the input into the state
- // before applying the permutation.
- xorIn(d, d.buf())
- d.bufe = 0
- d.bufo = 0
- KeccakF1600(&d.a, d.turbo)
- case spongeSqueezing:
- // If we're squeezing, we need to apply the permutation before
- // copying more output.
- KeccakF1600(&d.a, d.turbo)
- d.bufe = d.rate
- d.bufo = 0
- copyOut(d, d.buf())
- }
-}
-
-// pads appends the domain separation bits in dsbyte, applies
-// the multi-bitrate 10..1 padding rule, and permutes the state.
-func (d *State) padAndPermute(dsbyte byte) {
- // Pad with this instance's domain-separator bits. We know that there's
- // at least one byte of space in d.buf() because, if it were full,
- // permute would have been called to empty it. dsbyte also contains the
- // first one bit for the padding. See the comment in the state struct.
- zerosStart := d.bufe + 1
- d.bufe = d.rate
- buf := d.buf()
- buf[zerosStart-1] = dsbyte
- for i := zerosStart; i < d.rate; i++ {
- buf[i] = 0
- }
- // This adds the final one bit for the padding. Because of the way that
- // bits are numbered from the LSB upwards, the final bit is the MSB of
- // the last byte.
- buf[d.rate-1] ^= 0x80
- // Apply the permutation
- d.permute()
- d.state = spongeSqueezing
- d.bufe = d.rate
- copyOut(d, buf)
-}
-
-// Write absorbs more data into the hash's state. It produces an error
-// if more data is written to the ShakeHash after writing
-func (d *State) Write(p []byte) (written int, err error) {
- if d.state != spongeAbsorbing {
- panic("sha3: write to sponge after read")
- }
- written = len(p)
-
- for len(p) > 0 {
- bufl := d.bufe - d.bufo
- if bufl == 0 && len(p) >= d.rate {
- // The fast path; absorb a full "rate" bytes of input and apply the permutation.
- xorIn(d, p[:d.rate])
- p = p[d.rate:]
- KeccakF1600(&d.a, d.turbo)
- } else {
- // The slow path; buffer the input until we can fill the sponge, and then xor it in.
- todo := d.rate - bufl
- if todo > len(p) {
- todo = len(p)
- }
- d.bufe += todo
- buf := d.buf()
- copy(buf[bufl:], p[:todo])
- p = p[todo:]
-
- // If the sponge is full, apply the permutation.
- if d.bufe == d.rate {
- d.permute()
- }
- }
- }
-
- return written, nil
-}
-
-// Read squeezes an arbitrary number of bytes from the sponge.
-func (d *State) Read(out []byte) (n int, err error) {
- // If we're still absorbing, pad and apply the permutation.
- if d.state == spongeAbsorbing {
- d.padAndPermute(d.dsbyte)
- }
-
- n = len(out)
-
- // Now, do the squeezing.
- for len(out) > 0 {
- buf := d.buf()
- n := copy(out, buf)
- d.bufo += n
- out = out[n:]
-
- // Apply the permutation if we've squeezed the sponge dry.
- if d.bufo == d.bufe {
- d.permute()
- }
- }
-
- return
-}
-
-// Sum applies padding to the hash state and then squeezes out the desired
-// number of output bytes.
-func (d *State) Sum(in []byte) []byte {
- // Make a copy of the original hash so that caller can keep writing
- // and summing.
- dup := d.clone()
- hash := make([]byte, dup.outputLen)
- _, _ = dup.Read(hash)
- return append(in, hash...)
-}
-
-func (d *State) IsAbsorbing() bool {
- return d.state == spongeAbsorbing
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/sha3_s390x.s b/vendor/github.com/cloudflare/circl/internal/sha3/sha3_s390x.s
deleted file mode 100644
index 8a4458f63f..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/sha3_s390x.s
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo,!appengine
-
-#include "textflag.h"
-
-// func kimd(function code, chain *[200]byte, src []byte)
-TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
- MOVD function+0(FP), R0
- MOVD chain+8(FP), R1
- LMG src+16(FP), R2, R3 // R2=base, R3=len
-
-continue:
- WORD $0xB93E0002 // KIMD --, R2
- BVS continue // continue if interrupted
- MOVD $0, R0 // reset R0 for pre-go1.8 compilers
- RET
-
-// func klmd(function code, chain *[200]byte, dst, src []byte)
-TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
- // TODO: SHAKE support
- MOVD function+0(FP), R0
- MOVD chain+8(FP), R1
- LMG dst+16(FP), R2, R3 // R2=base, R3=len
- LMG src+40(FP), R4, R5 // R4=base, R5=len
-
-continue:
- WORD $0xB93F0024 // KLMD R2, R4
- BVS continue // continue if interrupted
- MOVD $0, R0 // reset R0 for pre-go1.8 compilers
- RET
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/shake.go b/vendor/github.com/cloudflare/circl/internal/sha3/shake.go
deleted file mode 100644
index 77817f758c..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/shake.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sha3
-
-// This file defines the ShakeHash interface, and provides
-// functions for creating SHAKE and cSHAKE instances, as well as utility
-// functions for hashing bytes to arbitrary-length output.
-//
-//
-// SHAKE implementation is based on FIPS PUB 202 [1]
-// cSHAKE implementations is based on NIST SP 800-185 [2]
-//
-// [1] https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
-// [2] https://doi.org/10.6028/NIST.SP.800-185
-
-import (
- "io"
-)
-
-// ShakeHash defines the interface to hash functions that
-// support arbitrary-length output.
-type ShakeHash interface {
- // Write absorbs more data into the hash's state. It panics if input is
- // written to it after output has been read from it.
- io.Writer
-
- // Read reads more output from the hash; reading affects the hash's
- // state. (ShakeHash.Read is thus very different from Hash.Sum)
- // It never returns an error.
- io.Reader
-
- // Clone returns a copy of the ShakeHash in its current state.
- Clone() ShakeHash
-
- // Reset resets the ShakeHash to its initial state.
- Reset()
-}
-
-// Consts for configuring initial SHA-3 state
-const (
- dsbyteShake = 0x1f
- rate128 = 168
- rate256 = 136
-)
-
-// Clone returns copy of SHAKE context within its current state.
-func (d *State) Clone() ShakeHash {
- return d.clone()
-}
-
-// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
-// Its generic security strength is 128 bits against all attacks if at
-// least 32 bytes of its output are used.
-func NewShake128() State {
- return State{rate: rate128, dsbyte: dsbyteShake}
-}
-
-// NewTurboShake128 creates a new TurboSHAKE128 variable-output-length ShakeHash.
-// Its generic security strength is 128 bits against all attacks if at
-// least 32 bytes of its output are used.
-// D is the domain separation byte and must be between 0x01 and 0x7f inclusive.
-func NewTurboShake128(D byte) State {
- if D == 0 || D > 0x7f {
- panic("turboshake: D out of range")
- }
- return State{rate: rate128, dsbyte: D, turbo: true}
-}
-
-// NewShake256 creates a new SHAKE256 variable-output-length ShakeHash.
-// Its generic security strength is 256 bits against all attacks if
-// at least 64 bytes of its output are used.
-func NewShake256() State {
- return State{rate: rate256, dsbyte: dsbyteShake}
-}
-
-// NewTurboShake256 creates a new TurboSHAKE256 variable-output-length ShakeHash.
-// Its generic security strength is 256 bits against all attacks if
-// at least 64 bytes of its output are used.
-// D is the domain separation byte and must be between 0x01 and 0x7f inclusive.
-func NewTurboShake256(D byte) State {
- if D == 0 || D > 0x7f {
- panic("turboshake: D out of range")
- }
- return State{rate: rate256, dsbyte: D, turbo: true}
-}
-
-// ShakeSum128 writes an arbitrary-length digest of data into hash.
-func ShakeSum128(hash, data []byte) {
- h := NewShake128()
- _, _ = h.Write(data)
- _, _ = h.Read(hash)
-}
-
-// ShakeSum256 writes an arbitrary-length digest of data into hash.
-func ShakeSum256(hash, data []byte) {
- h := NewShake256()
- _, _ = h.Write(data)
- _, _ = h.Read(hash)
-}
-
-// TurboShakeSum128 writes an arbitrary-length digest of data into hash.
-func TurboShakeSum128(hash, data []byte, D byte) {
- h := NewTurboShake128(D)
- _, _ = h.Write(data)
- _, _ = h.Read(hash)
-}
-
-// TurboShakeSum256 writes an arbitrary-length digest of data into hash.
-func TurboShakeSum256(hash, data []byte, D byte) {
- h := NewTurboShake256(D)
- _, _ = h.Write(data)
- _, _ = h.Read(hash)
-}
-
-func (d *State) SwitchDS(D byte) {
- d.dsbyte = D
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/xor.go b/vendor/github.com/cloudflare/circl/internal/sha3/xor.go
deleted file mode 100644
index 1e21337454..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/xor.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build (!amd64 && !386 && !ppc64le) || appengine
-// +build !amd64,!386,!ppc64le appengine
-
-package sha3
-
-// A storageBuf is an aligned array of maxRate bytes.
-type storageBuf [maxRate]byte
-
-func (b *storageBuf) asBytes() *[maxRate]byte {
- return (*[maxRate]byte)(b)
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/xor_generic.go b/vendor/github.com/cloudflare/circl/internal/sha3/xor_generic.go
deleted file mode 100644
index 2b0c661790..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/xor_generic.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build (!amd64 || appengine) && (!386 || appengine) && (!ppc64le || appengine)
-// +build !amd64 appengine
-// +build !386 appengine
-// +build !ppc64le appengine
-
-package sha3
-
-import "encoding/binary"
-
-// xorIn xors the bytes in buf into the state; it
-// makes no non-portable assumptions about memory layout
-// or alignment.
-func xorIn(d *State, buf []byte) {
- n := len(buf) / 8
-
- for i := 0; i < n; i++ {
- a := binary.LittleEndian.Uint64(buf)
- d.a[i] ^= a
- buf = buf[8:]
- }
-}
-
-// copyOut copies ulint64s to a byte buffer.
-func copyOut(d *State, b []byte) {
- for i := 0; len(b) >= 8; i++ {
- binary.LittleEndian.PutUint64(b, d.a[i])
- b = b[8:]
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/xor_unaligned.go b/vendor/github.com/cloudflare/circl/internal/sha3/xor_unaligned.go
deleted file mode 100644
index 052fc8d32d..0000000000
--- a/vendor/github.com/cloudflare/circl/internal/sha3/xor_unaligned.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build (amd64 || 386 || ppc64le) && !appengine
-// +build amd64 386 ppc64le
-// +build !appengine
-
-package sha3
-
-import "unsafe"
-
-// A storageBuf is an aligned array of maxRate bytes.
-type storageBuf [maxRate / 8]uint64
-
-func (b *storageBuf) asBytes() *[maxRate]byte {
- return (*[maxRate]byte)(unsafe.Pointer(b))
-}
-
-// xorInuses unaligned reads and writes to update d.a to contain d.a
-// XOR buf.
-func xorIn(d *State, buf []byte) {
- n := len(buf)
- bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8]
- if n >= 72 {
- d.a[0] ^= bw[0]
- d.a[1] ^= bw[1]
- d.a[2] ^= bw[2]
- d.a[3] ^= bw[3]
- d.a[4] ^= bw[4]
- d.a[5] ^= bw[5]
- d.a[6] ^= bw[6]
- d.a[7] ^= bw[7]
- d.a[8] ^= bw[8]
- }
- if n >= 104 {
- d.a[9] ^= bw[9]
- d.a[10] ^= bw[10]
- d.a[11] ^= bw[11]
- d.a[12] ^= bw[12]
- }
- if n >= 136 {
- d.a[13] ^= bw[13]
- d.a[14] ^= bw[14]
- d.a[15] ^= bw[15]
- d.a[16] ^= bw[16]
- }
- if n >= 144 {
- d.a[17] ^= bw[17]
- }
- if n >= 168 {
- d.a[18] ^= bw[18]
- d.a[19] ^= bw[19]
- d.a[20] ^= bw[20]
- }
-}
-
-func copyOut(d *State, buf []byte) {
- ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0]))
- copy(buf, ab[:])
-}
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp.go b/vendor/github.com/cloudflare/circl/math/fp25519/fp.go
deleted file mode 100644
index 57a50ff5e9..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp25519/fp.go
+++ /dev/null
@@ -1,205 +0,0 @@
-// Package fp25519 provides prime field arithmetic over GF(2^255-19).
-package fp25519
-
-import (
- "errors"
-
- "github.com/cloudflare/circl/internal/conv"
-)
-
-// Size in bytes of an element.
-const Size = 32
-
-// Elt is a prime field element.
-type Elt [Size]byte
-
-func (e Elt) String() string { return conv.BytesLe2Hex(e[:]) }
-
-// p is the prime modulus 2^255-19.
-var p = Elt{
- 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
-}
-
-// P returns the prime modulus 2^255-19.
-func P() Elt { return p }
-
-// ToBytes stores in b the little-endian byte representation of x.
-func ToBytes(b []byte, x *Elt) error {
- if len(b) != Size {
- return errors.New("wrong size")
- }
- Modp(x)
- copy(b, x[:])
- return nil
-}
-
-// IsZero returns true if x is equal to 0.
-func IsZero(x *Elt) bool { Modp(x); return *x == Elt{} }
-
-// SetOne assigns x=1.
-func SetOne(x *Elt) { *x = Elt{}; x[0] = 1 }
-
-// Neg calculates z = -x.
-func Neg(z, x *Elt) { Sub(z, &p, x) }
-
-// InvSqrt calculates z = sqrt(x/y) iff x/y is a quadratic-residue, which is
-// indicated by returning isQR = true. Otherwise, when x/y is a quadratic
-// non-residue, z will have an undetermined value and isQR = false.
-func InvSqrt(z, x, y *Elt) (isQR bool) {
- sqrtMinusOne := &Elt{
- 0xb0, 0xa0, 0x0e, 0x4a, 0x27, 0x1b, 0xee, 0xc4,
- 0x78, 0xe4, 0x2f, 0xad, 0x06, 0x18, 0x43, 0x2f,
- 0xa7, 0xd7, 0xfb, 0x3d, 0x99, 0x00, 0x4d, 0x2b,
- 0x0b, 0xdf, 0xc1, 0x4f, 0x80, 0x24, 0x83, 0x2b,
- }
- t0, t1, t2, t3 := &Elt{}, &Elt{}, &Elt{}, &Elt{}
-
- Mul(t0, x, y) // t0 = u*v
- Sqr(t1, y) // t1 = v^2
- Mul(t2, t0, t1) // t2 = u*v^3
- Sqr(t0, t1) // t0 = v^4
- Mul(t1, t0, t2) // t1 = u*v^7
-
- var Tab [4]*Elt
- Tab[0] = &Elt{}
- Tab[1] = &Elt{}
- Tab[2] = t3
- Tab[3] = t1
-
- *Tab[0] = *t1
- Sqr(Tab[0], Tab[0])
- Sqr(Tab[1], Tab[0])
- Sqr(Tab[1], Tab[1])
- Mul(Tab[1], Tab[1], Tab[3])
- Mul(Tab[0], Tab[0], Tab[1])
- Sqr(Tab[0], Tab[0])
- Mul(Tab[0], Tab[0], Tab[1])
- Sqr(Tab[1], Tab[0])
- for i := 0; i < 4; i++ {
- Sqr(Tab[1], Tab[1])
- }
- Mul(Tab[1], Tab[1], Tab[0])
- Sqr(Tab[2], Tab[1])
- for i := 0; i < 4; i++ {
- Sqr(Tab[2], Tab[2])
- }
- Mul(Tab[2], Tab[2], Tab[0])
- Sqr(Tab[1], Tab[2])
- for i := 0; i < 14; i++ {
- Sqr(Tab[1], Tab[1])
- }
- Mul(Tab[1], Tab[1], Tab[2])
- Sqr(Tab[2], Tab[1])
- for i := 0; i < 29; i++ {
- Sqr(Tab[2], Tab[2])
- }
- Mul(Tab[2], Tab[2], Tab[1])
- Sqr(Tab[1], Tab[2])
- for i := 0; i < 59; i++ {
- Sqr(Tab[1], Tab[1])
- }
- Mul(Tab[1], Tab[1], Tab[2])
- for i := 0; i < 5; i++ {
- Sqr(Tab[1], Tab[1])
- }
- Mul(Tab[1], Tab[1], Tab[0])
- Sqr(Tab[2], Tab[1])
- for i := 0; i < 124; i++ {
- Sqr(Tab[2], Tab[2])
- }
- Mul(Tab[2], Tab[2], Tab[1])
- Sqr(Tab[2], Tab[2])
- Sqr(Tab[2], Tab[2])
- Mul(Tab[2], Tab[2], Tab[3])
-
- Mul(z, t3, t2) // z = xy^(p+3)/8 = xy^3*(xy^7)^(p-5)/8
- // Checking whether y z^2 == x
- Sqr(t0, z) // t0 = z^2
- Mul(t0, t0, y) // t0 = yz^2
- Sub(t1, t0, x) // t1 = t0-u
- Add(t2, t0, x) // t2 = t0+u
- if IsZero(t1) {
- return true
- } else if IsZero(t2) {
- Mul(z, z, sqrtMinusOne) // z = z*sqrt(-1)
- return true
- } else {
- return false
- }
-}
-
-// Inv calculates z = 1/x mod p.
-func Inv(z, x *Elt) {
- x0, x1, x2 := &Elt{}, &Elt{}, &Elt{}
- Sqr(x1, x)
- Sqr(x0, x1)
- Sqr(x0, x0)
- Mul(x0, x0, x)
- Mul(z, x0, x1)
- Sqr(x1, z)
- Mul(x0, x0, x1)
- Sqr(x1, x0)
- for i := 0; i < 4; i++ {
- Sqr(x1, x1)
- }
- Mul(x0, x0, x1)
- Sqr(x1, x0)
- for i := 0; i < 9; i++ {
- Sqr(x1, x1)
- }
- Mul(x1, x1, x0)
- Sqr(x2, x1)
- for i := 0; i < 19; i++ {
- Sqr(x2, x2)
- }
- Mul(x2, x2, x1)
- for i := 0; i < 10; i++ {
- Sqr(x2, x2)
- }
- Mul(x2, x2, x0)
- Sqr(x0, x2)
- for i := 0; i < 49; i++ {
- Sqr(x0, x0)
- }
- Mul(x0, x0, x2)
- Sqr(x1, x0)
- for i := 0; i < 99; i++ {
- Sqr(x1, x1)
- }
- Mul(x1, x1, x0)
- for i := 0; i < 50; i++ {
- Sqr(x1, x1)
- }
- Mul(x1, x1, x2)
- for i := 0; i < 5; i++ {
- Sqr(x1, x1)
- }
- Mul(z, z, x1)
-}
-
-// Cmov assigns y to x if n is 1.
-func Cmov(x, y *Elt, n uint) { cmov(x, y, n) }
-
-// Cswap interchanges x and y if n is 1.
-func Cswap(x, y *Elt, n uint) { cswap(x, y, n) }
-
-// Add calculates z = x+y mod p.
-func Add(z, x, y *Elt) { add(z, x, y) }
-
-// Sub calculates z = x-y mod p.
-func Sub(z, x, y *Elt) { sub(z, x, y) }
-
-// AddSub calculates (x,y) = (x+y mod p, x-y mod p).
-func AddSub(x, y *Elt) { addsub(x, y) }
-
-// Mul calculates z = x*y mod p.
-func Mul(z, x, y *Elt) { mul(z, x, y) }
-
-// Sqr calculates z = x^2 mod p.
-func Sqr(z, x *Elt) { sqr(z, x) }
-
-// Modp ensures that z is between [0,p-1].
-func Modp(z *Elt) { modp(z) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.go b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.go
deleted file mode 100644
index 057f0d2803..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.go
+++ /dev/null
@@ -1,45 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-package fp25519
-
-import (
- "golang.org/x/sys/cpu"
-)
-
-var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
-
-var _ = hasBmi2Adx
-
-func cmov(x, y *Elt, n uint) { cmovAmd64(x, y, n) }
-func cswap(x, y *Elt, n uint) { cswapAmd64(x, y, n) }
-func add(z, x, y *Elt) { addAmd64(z, x, y) }
-func sub(z, x, y *Elt) { subAmd64(z, x, y) }
-func addsub(x, y *Elt) { addsubAmd64(x, y) }
-func mul(z, x, y *Elt) { mulAmd64(z, x, y) }
-func sqr(z, x *Elt) { sqrAmd64(z, x) }
-func modp(z *Elt) { modpAmd64(z) }
-
-//go:noescape
-func cmovAmd64(x, y *Elt, n uint)
-
-//go:noescape
-func cswapAmd64(x, y *Elt, n uint)
-
-//go:noescape
-func addAmd64(z, x, y *Elt)
-
-//go:noescape
-func subAmd64(z, x, y *Elt)
-
-//go:noescape
-func addsubAmd64(x, y *Elt)
-
-//go:noescape
-func mulAmd64(z, x, y *Elt)
-
-//go:noescape
-func sqrAmd64(z, x *Elt)
-
-//go:noescape
-func modpAmd64(z *Elt)
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.h b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.h
deleted file mode 100644
index b884b584ab..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.h
+++ /dev/null
@@ -1,351 +0,0 @@
-// This code was imported from https://github.com/armfazh/rfc7748_precomputed
-
-// CHECK_BMI2ADX triggers bmi2adx if supported,
-// otherwise it fallbacks to legacy code.
-#define CHECK_BMI2ADX(label, legacy, bmi2adx) \
- CMPB ·hasBmi2Adx(SB), $0 \
- JE label \
- bmi2adx \
- RET \
- label: \
- legacy \
- RET
-
-// cselect is a conditional move
-// if b=1: it copies y into x;
-// if b=0: x remains with the same value;
-// if b<> 0,1: undefined.
-// Uses: AX, DX, FLAGS
-// Instr: x86_64, cmov
-#define cselect(x,y,b) \
- TESTQ b, b \
- MOVQ 0+x, AX; MOVQ 0+y, DX; CMOVQNE DX, AX; MOVQ AX, 0+x; \
- MOVQ 8+x, AX; MOVQ 8+y, DX; CMOVQNE DX, AX; MOVQ AX, 8+x; \
- MOVQ 16+x, AX; MOVQ 16+y, DX; CMOVQNE DX, AX; MOVQ AX, 16+x; \
- MOVQ 24+x, AX; MOVQ 24+y, DX; CMOVQNE DX, AX; MOVQ AX, 24+x;
-
-// cswap is a conditional swap
-// if b=1: x,y <- y,x;
-// if b=0: x,y remain with the same values;
-// if b<> 0,1: undefined.
-// Uses: AX, DX, R8, FLAGS
-// Instr: x86_64, cmov
-#define cswap(x,y,b) \
- TESTQ b, b \
- MOVQ 0+x, AX; MOVQ AX, R8; MOVQ 0+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 0+x; MOVQ DX, 0+y; \
- MOVQ 8+x, AX; MOVQ AX, R8; MOVQ 8+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 8+x; MOVQ DX, 8+y; \
- MOVQ 16+x, AX; MOVQ AX, R8; MOVQ 16+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 16+x; MOVQ DX, 16+y; \
- MOVQ 24+x, AX; MOVQ AX, R8; MOVQ 24+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 24+x; MOVQ DX, 24+y;
-
-// additionLeg adds x and y and stores in z
-// Uses: AX, DX, R8-R11, FLAGS
-// Instr: x86_64, cmov
-#define additionLeg(z,x,y) \
- MOVL $38, AX; \
- MOVL $0, DX; \
- MOVQ 0+x, R8; ADDQ 0+y, R8; \
- MOVQ 8+x, R9; ADCQ 8+y, R9; \
- MOVQ 16+x, R10; ADCQ 16+y, R10; \
- MOVQ 24+x, R11; ADCQ 24+y, R11; \
- CMOVQCS AX, DX; \
- ADDQ DX, R8; \
- ADCQ $0, R9; MOVQ R9, 8+z; \
- ADCQ $0, R10; MOVQ R10, 16+z; \
- ADCQ $0, R11; MOVQ R11, 24+z; \
- MOVL $0, DX; \
- CMOVQCS AX, DX; \
- ADDQ DX, R8; MOVQ R8, 0+z;
-
-// additionAdx adds x and y and stores in z
-// Uses: AX, DX, R8-R11, FLAGS
-// Instr: x86_64, cmov, adx
-#define additionAdx(z,x,y) \
- MOVL $38, AX; \
- XORL DX, DX; \
- MOVQ 0+x, R8; ADCXQ 0+y, R8; \
- MOVQ 8+x, R9; ADCXQ 8+y, R9; \
- MOVQ 16+x, R10; ADCXQ 16+y, R10; \
- MOVQ 24+x, R11; ADCXQ 24+y, R11; \
- CMOVQCS AX, DX ; \
- XORL AX, AX; \
- ADCXQ DX, R8; \
- ADCXQ AX, R9; MOVQ R9, 8+z; \
- ADCXQ AX, R10; MOVQ R10, 16+z; \
- ADCXQ AX, R11; MOVQ R11, 24+z; \
- MOVL $38, DX; \
- CMOVQCS DX, AX; \
- ADDQ AX, R8; MOVQ R8, 0+z;
-
-// subtraction subtracts y from x and stores in z
-// Uses: AX, DX, R8-R11, FLAGS
-// Instr: x86_64, cmov
-#define subtraction(z,x,y) \
- MOVL $38, AX; \
- MOVQ 0+x, R8; SUBQ 0+y, R8; \
- MOVQ 8+x, R9; SBBQ 8+y, R9; \
- MOVQ 16+x, R10; SBBQ 16+y, R10; \
- MOVQ 24+x, R11; SBBQ 24+y, R11; \
- MOVL $0, DX; \
- CMOVQCS AX, DX; \
- SUBQ DX, R8; \
- SBBQ $0, R9; MOVQ R9, 8+z; \
- SBBQ $0, R10; MOVQ R10, 16+z; \
- SBBQ $0, R11; MOVQ R11, 24+z; \
- MOVL $0, DX; \
- CMOVQCS AX, DX; \
- SUBQ DX, R8; MOVQ R8, 0+z;
-
-// integerMulAdx multiplies x and y and stores in z
-// Uses: AX, DX, R8-R15, FLAGS
-// Instr: x86_64, bmi2, adx
-#define integerMulAdx(z,x,y) \
- MOVL $0,R15; \
- MOVQ 0+y, DX; XORL AX, AX; \
- MULXQ 0+x, AX, R8; MOVQ AX, 0+z; \
- MULXQ 8+x, AX, R9; ADCXQ AX, R8; \
- MULXQ 16+x, AX, R10; ADCXQ AX, R9; \
- MULXQ 24+x, AX, R11; ADCXQ AX, R10; \
- MOVL $0, AX;;;;;;;;; ADCXQ AX, R11; \
- MOVQ 8+y, DX; XORL AX, AX; \
- MULXQ 0+x, AX, R12; ADCXQ R8, AX; MOVQ AX, 8+z; \
- MULXQ 8+x, AX, R13; ADCXQ R9, R12; ADOXQ AX, R12; \
- MULXQ 16+x, AX, R14; ADCXQ R10, R13; ADOXQ AX, R13; \
- MULXQ 24+x, AX, R15; ADCXQ R11, R14; ADOXQ AX, R14; \
- MOVL $0, AX;;;;;;;;; ADCXQ AX, R15; ADOXQ AX, R15; \
- MOVQ 16+y, DX; XORL AX, AX; \
- MULXQ 0+x, AX, R8; ADCXQ R12, AX; MOVQ AX, 16+z; \
- MULXQ 8+x, AX, R9; ADCXQ R13, R8; ADOXQ AX, R8; \
- MULXQ 16+x, AX, R10; ADCXQ R14, R9; ADOXQ AX, R9; \
- MULXQ 24+x, AX, R11; ADCXQ R15, R10; ADOXQ AX, R10; \
- MOVL $0, AX;;;;;;;;; ADCXQ AX, R11; ADOXQ AX, R11; \
- MOVQ 24+y, DX; XORL AX, AX; \
- MULXQ 0+x, AX, R12; ADCXQ R8, AX; MOVQ AX, 24+z; \
- MULXQ 8+x, AX, R13; ADCXQ R9, R12; ADOXQ AX, R12; MOVQ R12, 32+z; \
- MULXQ 16+x, AX, R14; ADCXQ R10, R13; ADOXQ AX, R13; MOVQ R13, 40+z; \
- MULXQ 24+x, AX, R15; ADCXQ R11, R14; ADOXQ AX, R14; MOVQ R14, 48+z; \
- MOVL $0, AX;;;;;;;;; ADCXQ AX, R15; ADOXQ AX, R15; MOVQ R15, 56+z;
-
-// integerMulLeg multiplies x and y and stores in z
-// Uses: AX, DX, R8-R15, FLAGS
-// Instr: x86_64
-#define integerMulLeg(z,x,y) \
- MOVQ 0+y, R8; \
- MOVQ 0+x, AX; MULQ R8; MOVQ AX, 0+z; MOVQ DX, R15; \
- MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
- MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
- MOVQ 24+x, AX; MULQ R8; \
- ADDQ R13, R15; \
- ADCQ R14, R10; MOVQ R10, 16+z; \
- ADCQ AX, R11; MOVQ R11, 24+z; \
- ADCQ $0, DX; MOVQ DX, 32+z; \
- MOVQ 8+y, R8; \
- MOVQ 0+x, AX; MULQ R8; MOVQ AX, R12; MOVQ DX, R9; \
- MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
- MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
- MOVQ 24+x, AX; MULQ R8; \
- ADDQ R12, R15; MOVQ R15, 8+z; \
- ADCQ R13, R9; \
- ADCQ R14, R10; \
- ADCQ AX, R11; \
- ADCQ $0, DX; \
- ADCQ 16+z, R9; MOVQ R9, R15; \
- ADCQ 24+z, R10; MOVQ R10, 24+z; \
- ADCQ 32+z, R11; MOVQ R11, 32+z; \
- ADCQ $0, DX; MOVQ DX, 40+z; \
- MOVQ 16+y, R8; \
- MOVQ 0+x, AX; MULQ R8; MOVQ AX, R12; MOVQ DX, R9; \
- MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
- MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
- MOVQ 24+x, AX; MULQ R8; \
- ADDQ R12, R15; MOVQ R15, 16+z; \
- ADCQ R13, R9; \
- ADCQ R14, R10; \
- ADCQ AX, R11; \
- ADCQ $0, DX; \
- ADCQ 24+z, R9; MOVQ R9, R15; \
- ADCQ 32+z, R10; MOVQ R10, 32+z; \
- ADCQ 40+z, R11; MOVQ R11, 40+z; \
- ADCQ $0, DX; MOVQ DX, 48+z; \
- MOVQ 24+y, R8; \
- MOVQ 0+x, AX; MULQ R8; MOVQ AX, R12; MOVQ DX, R9; \
- MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
- MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
- MOVQ 24+x, AX; MULQ R8; \
- ADDQ R12, R15; MOVQ R15, 24+z; \
- ADCQ R13, R9; \
- ADCQ R14, R10; \
- ADCQ AX, R11; \
- ADCQ $0, DX; \
- ADCQ 32+z, R9; MOVQ R9, 32+z; \
- ADCQ 40+z, R10; MOVQ R10, 40+z; \
- ADCQ 48+z, R11; MOVQ R11, 48+z; \
- ADCQ $0, DX; MOVQ DX, 56+z;
-
-// integerSqrLeg squares x and stores in z
-// Uses: AX, CX, DX, R8-R15, FLAGS
-// Instr: x86_64
-#define integerSqrLeg(z,x) \
- MOVQ 0+x, R8; \
- MOVQ 8+x, AX; MULQ R8; MOVQ AX, R9; MOVQ DX, R10; /* A[0]*A[1] */ \
- MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; /* A[0]*A[2] */ \
- MOVQ 24+x, AX; MULQ R8; MOVQ AX, R15; MOVQ DX, R12; /* A[0]*A[3] */ \
- MOVQ 24+x, R8; \
- MOVQ 8+x, AX; MULQ R8; MOVQ AX, CX; MOVQ DX, R13; /* A[3]*A[1] */ \
- MOVQ 16+x, AX; MULQ R8; /* A[3]*A[2] */ \
- \
- ADDQ R14, R10;\
- ADCQ R15, R11; MOVL $0, R15;\
- ADCQ CX, R12;\
- ADCQ AX, R13;\
- ADCQ $0, DX; MOVQ DX, R14;\
- MOVQ 8+x, AX; MULQ 16+x;\
- \
- ADDQ AX, R11;\
- ADCQ DX, R12;\
- ADCQ $0, R13;\
- ADCQ $0, R14;\
- ADCQ $0, R15;\
- \
- SHLQ $1, R14, R15; MOVQ R15, 56+z;\
- SHLQ $1, R13, R14; MOVQ R14, 48+z;\
- SHLQ $1, R12, R13; MOVQ R13, 40+z;\
- SHLQ $1, R11, R12; MOVQ R12, 32+z;\
- SHLQ $1, R10, R11; MOVQ R11, 24+z;\
- SHLQ $1, R9, R10; MOVQ R10, 16+z;\
- SHLQ $1, R9; MOVQ R9, 8+z;\
- \
- MOVQ 0+x,AX; MULQ AX; MOVQ AX, 0+z; MOVQ DX, R9;\
- MOVQ 8+x,AX; MULQ AX; MOVQ AX, R10; MOVQ DX, R11;\
- MOVQ 16+x,AX; MULQ AX; MOVQ AX, R12; MOVQ DX, R13;\
- MOVQ 24+x,AX; MULQ AX; MOVQ AX, R14; MOVQ DX, R15;\
- \
- ADDQ 8+z, R9; MOVQ R9, 8+z;\
- ADCQ 16+z, R10; MOVQ R10, 16+z;\
- ADCQ 24+z, R11; MOVQ R11, 24+z;\
- ADCQ 32+z, R12; MOVQ R12, 32+z;\
- ADCQ 40+z, R13; MOVQ R13, 40+z;\
- ADCQ 48+z, R14; MOVQ R14, 48+z;\
- ADCQ 56+z, R15; MOVQ R15, 56+z;
-
-// integerSqrAdx squares x and stores in z
-// Uses: AX, CX, DX, R8-R15, FLAGS
-// Instr: x86_64, bmi2, adx
-#define integerSqrAdx(z,x) \
- MOVQ 0+x, DX; /* A[0] */ \
- MULXQ 8+x, R8, R14; /* A[1]*A[0] */ XORL R15, R15; \
- MULXQ 16+x, R9, R10; /* A[2]*A[0] */ ADCXQ R14, R9; \
- MULXQ 24+x, AX, CX; /* A[3]*A[0] */ ADCXQ AX, R10; \
- MOVQ 24+x, DX; /* A[3] */ \
- MULXQ 8+x, R11, R12; /* A[1]*A[3] */ ADCXQ CX, R11; \
- MULXQ 16+x, AX, R13; /* A[2]*A[3] */ ADCXQ AX, R12; \
- MOVQ 8+x, DX; /* A[1] */ ADCXQ R15, R13; \
- MULXQ 16+x, AX, CX; /* A[2]*A[1] */ MOVL $0, R14; \
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADCXQ R15, R14; \
- XORL R15, R15; \
- ADOXQ AX, R10; ADCXQ R8, R8; \
- ADOXQ CX, R11; ADCXQ R9, R9; \
- ADOXQ R15, R12; ADCXQ R10, R10; \
- ADOXQ R15, R13; ADCXQ R11, R11; \
- ADOXQ R15, R14; ADCXQ R12, R12; \
- ;;;;;;;;;;;;;;; ADCXQ R13, R13; \
- ;;;;;;;;;;;;;;; ADCXQ R14, R14; \
- MOVQ 0+x, DX; MULXQ DX, AX, CX; /* A[0]^2 */ \
- ;;;;;;;;;;;;;;; MOVQ AX, 0+z; \
- ADDQ CX, R8; MOVQ R8, 8+z; \
- MOVQ 8+x, DX; MULXQ DX, AX, CX; /* A[1]^2 */ \
- ADCQ AX, R9; MOVQ R9, 16+z; \
- ADCQ CX, R10; MOVQ R10, 24+z; \
- MOVQ 16+x, DX; MULXQ DX, AX, CX; /* A[2]^2 */ \
- ADCQ AX, R11; MOVQ R11, 32+z; \
- ADCQ CX, R12; MOVQ R12, 40+z; \
- MOVQ 24+x, DX; MULXQ DX, AX, CX; /* A[3]^2 */ \
- ADCQ AX, R13; MOVQ R13, 48+z; \
- ADCQ CX, R14; MOVQ R14, 56+z;
-
-// reduceFromDouble finds z congruent to x modulo p such that 0> 63)
- // PUT BIT 255 IN CARRY FLAG AND CLEAR
- x3 &^= 1 << 63
-
- x0, c0 := bits.Add64(x0, cx, 0)
- x1, c1 := bits.Add64(x1, 0, c0)
- x2, c2 := bits.Add64(x2, 0, c1)
- x3, _ = bits.Add64(x3, 0, c2)
-
- // TEST FOR BIT 255 AGAIN; ONLY TRIGGERED ON OVERFLOW MODULO 2^255-19
- // cx = C[255] ? 0 : 19
- cx = uint64(19) &^ (-(x3 >> 63))
- // CLEAR BIT 255
- x3 &^= 1 << 63
-
- x0, c0 = bits.Sub64(x0, cx, 0)
- x1, c1 = bits.Sub64(x1, 0, c0)
- x2, c2 = bits.Sub64(x2, 0, c1)
- x3, _ = bits.Sub64(x3, 0, c2)
-
- binary.LittleEndian.PutUint64(x[0*8:1*8], x0)
- binary.LittleEndian.PutUint64(x[1*8:2*8], x1)
- binary.LittleEndian.PutUint64(x[2*8:3*8], x2)
- binary.LittleEndian.PutUint64(x[3*8:4*8], x3)
-}
-
-func red64(z *Elt, x0, x1, x2, x3, x4, x5, x6, x7 uint64) {
- h0, l0 := bits.Mul64(x4, 38)
- h1, l1 := bits.Mul64(x5, 38)
- h2, l2 := bits.Mul64(x6, 38)
- h3, l3 := bits.Mul64(x7, 38)
-
- l1, c0 := bits.Add64(h0, l1, 0)
- l2, c1 := bits.Add64(h1, l2, c0)
- l3, c2 := bits.Add64(h2, l3, c1)
- l4, _ := bits.Add64(h3, 0, c2)
-
- l0, c0 = bits.Add64(l0, x0, 0)
- l1, c1 = bits.Add64(l1, x1, c0)
- l2, c2 = bits.Add64(l2, x2, c1)
- l3, c3 := bits.Add64(l3, x3, c2)
- l4, _ = bits.Add64(l4, 0, c3)
-
- _, l4 = bits.Mul64(l4, 38)
- l0, c0 = bits.Add64(l0, l4, 0)
- z1, c1 := bits.Add64(l1, 0, c0)
- z2, c2 := bits.Add64(l2, 0, c1)
- z3, c3 := bits.Add64(l3, 0, c2)
- z0, _ := bits.Add64(l0, (-c3)&38, 0)
-
- binary.LittleEndian.PutUint64(z[0*8:1*8], z0)
- binary.LittleEndian.PutUint64(z[1*8:2*8], z1)
- binary.LittleEndian.PutUint64(z[2*8:3*8], z2)
- binary.LittleEndian.PutUint64(z[3*8:4*8], z3)
-}
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go b/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go
deleted file mode 100644
index 26ca4d01b7..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build !amd64 || purego
-// +build !amd64 purego
-
-package fp25519
-
-func cmov(x, y *Elt, n uint) { cmovGeneric(x, y, n) }
-func cswap(x, y *Elt, n uint) { cswapGeneric(x, y, n) }
-func add(z, x, y *Elt) { addGeneric(z, x, y) }
-func sub(z, x, y *Elt) { subGeneric(z, x, y) }
-func addsub(x, y *Elt) { addsubGeneric(x, y) }
-func mul(z, x, y *Elt) { mulGeneric(z, x, y) }
-func sqr(z, x *Elt) { sqrGeneric(z, x) }
-func modp(z *Elt) { modpGeneric(z) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp.go b/vendor/github.com/cloudflare/circl/math/fp448/fp.go
deleted file mode 100644
index a5e36600bb..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Package fp448 provides prime field arithmetic over GF(2^448-2^224-1).
-package fp448
-
-import (
- "errors"
-
- "github.com/cloudflare/circl/internal/conv"
-)
-
-// Size in bytes of an element.
-const Size = 56
-
-// Elt is a prime field element.
-type Elt [Size]byte
-
-func (e Elt) String() string { return conv.BytesLe2Hex(e[:]) }
-
-// p is the prime modulus 2^448-2^224-1.
-var p = Elt{
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-}
-
-// P returns the prime modulus 2^448-2^224-1.
-func P() Elt { return p }
-
-// ToBytes stores in b the little-endian byte representation of x.
-func ToBytes(b []byte, x *Elt) error {
- if len(b) != Size {
- return errors.New("wrong size")
- }
- Modp(x)
- copy(b, x[:])
- return nil
-}
-
-// IsZero returns true if x is equal to 0.
-func IsZero(x *Elt) bool { Modp(x); return *x == Elt{} }
-
-// IsOne returns true if x is equal to 1.
-func IsOne(x *Elt) bool { Modp(x); return *x == Elt{1} }
-
-// SetOne assigns x=1.
-func SetOne(x *Elt) { *x = Elt{1} }
-
-// One returns the 1 element.
-func One() (x Elt) { x = Elt{1}; return }
-
-// Neg calculates z = -x.
-func Neg(z, x *Elt) { Sub(z, &p, x) }
-
-// Modp ensures that z is between [0,p-1].
-func Modp(z *Elt) { Sub(z, z, &p) }
-
-// InvSqrt calculates z = sqrt(x/y) iff x/y is a quadratic-residue. If so,
-// isQR = true; otherwise, isQR = false, since x/y is a quadratic non-residue,
-// and z = sqrt(-x/y).
-func InvSqrt(z, x, y *Elt) (isQR bool) {
- // First note that x^(2(k+1)) = x^(p-1)/2 * x = legendre(x) * x
- // so that's x if x is a quadratic residue and -x otherwise.
- // Next, y^(6k+3) = y^(4k+2) * y^(2k+1) = y^(p-1) * y^((p-1)/2) = legendre(y).
- // So the z we compute satisfies z^2 y = x^(2(k+1)) y^(6k+3) = legendre(x)*legendre(y).
- // Thus if x and y are quadratic residues, then z is indeed sqrt(x/y).
- t0, t1 := &Elt{}, &Elt{}
- Mul(t0, x, y) // x*y
- Sqr(t1, y) // y^2
- Mul(t1, t0, t1) // x*y^3
- powPminus3div4(z, t1) // (x*y^3)^k
- Mul(z, z, t0) // z = x*y*(x*y^3)^k = x^(k+1) * y^(3k+1)
-
- // Check if x/y is a quadratic residue
- Sqr(t0, z) // z^2
- Mul(t0, t0, y) // y*z^2
- Sub(t0, t0, x) // y*z^2-x
- return IsZero(t0)
-}
-
-// Inv calculates z = 1/x mod p.
-func Inv(z, x *Elt) {
- // Calculates z = x^(4k+1) = x^(p-3+1) = x^(p-2) = x^-1, where k = (p-3)/4.
- t := &Elt{}
- powPminus3div4(t, x) // t = x^k
- Sqr(t, t) // t = x^2k
- Sqr(t, t) // t = x^4k
- Mul(z, t, x) // z = x^(4k+1)
-}
-
-// powPminus3div4 calculates z = x^k mod p, where k = (p-3)/4.
-func powPminus3div4(z, x *Elt) {
- x0, x1 := &Elt{}, &Elt{}
- Sqr(z, x)
- Mul(z, z, x)
- Sqr(x0, z)
- Mul(x0, x0, x)
- Sqr(z, x0)
- Sqr(z, z)
- Sqr(z, z)
- Mul(z, z, x0)
- Sqr(x1, z)
- for i := 0; i < 5; i++ {
- Sqr(x1, x1)
- }
- Mul(x1, x1, z)
- Sqr(z, x1)
- for i := 0; i < 11; i++ {
- Sqr(z, z)
- }
- Mul(z, z, x1)
- Sqr(z, z)
- Sqr(z, z)
- Sqr(z, z)
- Mul(z, z, x0)
- Sqr(x1, z)
- for i := 0; i < 26; i++ {
- Sqr(x1, x1)
- }
- Mul(x1, x1, z)
- Sqr(z, x1)
- for i := 0; i < 53; i++ {
- Sqr(z, z)
- }
- Mul(z, z, x1)
- Sqr(z, z)
- Sqr(z, z)
- Sqr(z, z)
- Mul(z, z, x0)
- Sqr(x1, z)
- for i := 0; i < 110; i++ {
- Sqr(x1, x1)
- }
- Mul(x1, x1, z)
- Sqr(z, x1)
- Mul(z, z, x)
- for i := 0; i < 223; i++ {
- Sqr(z, z)
- }
- Mul(z, z, x1)
-}
-
-// Cmov assigns y to x if n is 1.
-func Cmov(x, y *Elt, n uint) { cmov(x, y, n) }
-
-// Cswap interchanges x and y if n is 1.
-func Cswap(x, y *Elt, n uint) { cswap(x, y, n) }
-
-// Add calculates z = x+y mod p.
-func Add(z, x, y *Elt) { add(z, x, y) }
-
-// Sub calculates z = x-y mod p.
-func Sub(z, x, y *Elt) { sub(z, x, y) }
-
-// AddSub calculates (x,y) = (x+y mod p, x-y mod p).
-func AddSub(x, y *Elt) { addsub(x, y) }
-
-// Mul calculates z = x*y mod p.
-func Mul(z, x, y *Elt) { mul(z, x, y) }
-
-// Sqr calculates z = x^2 mod p.
-func Sqr(z, x *Elt) { sqr(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go
deleted file mode 100644
index 6a12209a70..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go
+++ /dev/null
@@ -1,43 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-package fp448
-
-import (
- "golang.org/x/sys/cpu"
-)
-
-var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
-
-var _ = hasBmi2Adx
-
-func cmov(x, y *Elt, n uint) { cmovAmd64(x, y, n) }
-func cswap(x, y *Elt, n uint) { cswapAmd64(x, y, n) }
-func add(z, x, y *Elt) { addAmd64(z, x, y) }
-func sub(z, x, y *Elt) { subAmd64(z, x, y) }
-func addsub(x, y *Elt) { addsubAmd64(x, y) }
-func mul(z, x, y *Elt) { mulAmd64(z, x, y) }
-func sqr(z, x *Elt) { sqrAmd64(z, x) }
-
-/* Functions defined in fp_amd64.s */
-
-//go:noescape
-func cmovAmd64(x, y *Elt, n uint)
-
-//go:noescape
-func cswapAmd64(x, y *Elt, n uint)
-
-//go:noescape
-func addAmd64(z, x, y *Elt)
-
-//go:noescape
-func subAmd64(z, x, y *Elt)
-
-//go:noescape
-func addsubAmd64(x, y *Elt)
-
-//go:noescape
-func mulAmd64(z, x, y *Elt)
-
-//go:noescape
-func sqrAmd64(z, x *Elt)
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.h b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.h
deleted file mode 100644
index 536fe5bdfe..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.h
+++ /dev/null
@@ -1,591 +0,0 @@
-// This code was imported from https://github.com/armfazh/rfc7748_precomputed
-
-// CHECK_BMI2ADX triggers bmi2adx if supported,
-// otherwise it fallbacks to legacy code.
-#define CHECK_BMI2ADX(label, legacy, bmi2adx) \
- CMPB ·hasBmi2Adx(SB), $0 \
- JE label \
- bmi2adx \
- RET \
- label: \
- legacy \
- RET
-
-// cselect is a conditional move
-// if b=1: it copies y into x;
-// if b=0: x remains with the same value;
-// if b<> 0,1: undefined.
-// Uses: AX, DX, FLAGS
-// Instr: x86_64, cmov
-#define cselect(x,y,b) \
- TESTQ b, b \
- MOVQ 0+x, AX; MOVQ 0+y, DX; CMOVQNE DX, AX; MOVQ AX, 0+x; \
- MOVQ 8+x, AX; MOVQ 8+y, DX; CMOVQNE DX, AX; MOVQ AX, 8+x; \
- MOVQ 16+x, AX; MOVQ 16+y, DX; CMOVQNE DX, AX; MOVQ AX, 16+x; \
- MOVQ 24+x, AX; MOVQ 24+y, DX; CMOVQNE DX, AX; MOVQ AX, 24+x; \
- MOVQ 32+x, AX; MOVQ 32+y, DX; CMOVQNE DX, AX; MOVQ AX, 32+x; \
- MOVQ 40+x, AX; MOVQ 40+y, DX; CMOVQNE DX, AX; MOVQ AX, 40+x; \
- MOVQ 48+x, AX; MOVQ 48+y, DX; CMOVQNE DX, AX; MOVQ AX, 48+x;
-
-// cswap is a conditional swap
-// if b=1: x,y <- y,x;
-// if b=0: x,y remain with the same values;
-// if b<> 0,1: undefined.
-// Uses: AX, DX, R8, FLAGS
-// Instr: x86_64, cmov
-#define cswap(x,y,b) \
- TESTQ b, b \
- MOVQ 0+x, AX; MOVQ AX, R8; MOVQ 0+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 0+x; MOVQ DX, 0+y; \
- MOVQ 8+x, AX; MOVQ AX, R8; MOVQ 8+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 8+x; MOVQ DX, 8+y; \
- MOVQ 16+x, AX; MOVQ AX, R8; MOVQ 16+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 16+x; MOVQ DX, 16+y; \
- MOVQ 24+x, AX; MOVQ AX, R8; MOVQ 24+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 24+x; MOVQ DX, 24+y; \
- MOVQ 32+x, AX; MOVQ AX, R8; MOVQ 32+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 32+x; MOVQ DX, 32+y; \
- MOVQ 40+x, AX; MOVQ AX, R8; MOVQ 40+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 40+x; MOVQ DX, 40+y; \
- MOVQ 48+x, AX; MOVQ AX, R8; MOVQ 48+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 48+x; MOVQ DX, 48+y;
-
-// additionLeg adds x and y and stores in z
-// Uses: AX, DX, R8-R14, FLAGS
-// Instr: x86_64
-#define additionLeg(z,x,y) \
- MOVQ 0+x, R8; ADDQ 0+y, R8; \
- MOVQ 8+x, R9; ADCQ 8+y, R9; \
- MOVQ 16+x, R10; ADCQ 16+y, R10; \
- MOVQ 24+x, R11; ADCQ 24+y, R11; \
- MOVQ 32+x, R12; ADCQ 32+y, R12; \
- MOVQ 40+x, R13; ADCQ 40+y, R13; \
- MOVQ 48+x, R14; ADCQ 48+y, R14; \
- MOVQ $0, AX; ADCQ $0, AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- ADDQ AX, R8; MOVQ $0, AX; \
- ADCQ $0, R9; \
- ADCQ $0, R10; \
- ADCQ DX, R11; \
- ADCQ $0, R12; \
- ADCQ $0, R13; \
- ADCQ $0, R14; \
- ADCQ $0, AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- ADDQ AX, R8; MOVQ R8, 0+z; \
- ADCQ $0, R9; MOVQ R9, 8+z; \
- ADCQ $0, R10; MOVQ R10, 16+z; \
- ADCQ DX, R11; MOVQ R11, 24+z; \
- ADCQ $0, R12; MOVQ R12, 32+z; \
- ADCQ $0, R13; MOVQ R13, 40+z; \
- ADCQ $0, R14; MOVQ R14, 48+z;
-
-
-// additionAdx adds x and y and stores in z
-// Uses: AX, DX, R8-R15, FLAGS
-// Instr: x86_64, adx
-#define additionAdx(z,x,y) \
- MOVL $32, R15; \
- XORL DX, DX; \
- MOVQ 0+x, R8; ADCXQ 0+y, R8; \
- MOVQ 8+x, R9; ADCXQ 8+y, R9; \
- MOVQ 16+x, R10; ADCXQ 16+y, R10; \
- MOVQ 24+x, R11; ADCXQ 24+y, R11; \
- MOVQ 32+x, R12; ADCXQ 32+y, R12; \
- MOVQ 40+x, R13; ADCXQ 40+y, R13; \
- MOVQ 48+x, R14; ADCXQ 48+y, R14; \
- ;;;;;;;;;;;;;;; ADCXQ DX, DX; \
- XORL AX, AX; \
- ADCXQ DX, R8; SHLXQ R15, DX, DX; \
- ADCXQ AX, R9; \
- ADCXQ AX, R10; \
- ADCXQ DX, R11; \
- ADCXQ AX, R12; \
- ADCXQ AX, R13; \
- ADCXQ AX, R14; \
- ADCXQ AX, AX; \
- XORL DX, DX; \
- ADCXQ AX, R8; MOVQ R8, 0+z; SHLXQ R15, AX, AX; \
- ADCXQ DX, R9; MOVQ R9, 8+z; \
- ADCXQ DX, R10; MOVQ R10, 16+z; \
- ADCXQ AX, R11; MOVQ R11, 24+z; \
- ADCXQ DX, R12; MOVQ R12, 32+z; \
- ADCXQ DX, R13; MOVQ R13, 40+z; \
- ADCXQ DX, R14; MOVQ R14, 48+z;
-
-// subtraction subtracts y from x and stores in z
-// Uses: AX, DX, R8-R14, FLAGS
-// Instr: x86_64
-#define subtraction(z,x,y) \
- MOVQ 0+x, R8; SUBQ 0+y, R8; \
- MOVQ 8+x, R9; SBBQ 8+y, R9; \
- MOVQ 16+x, R10; SBBQ 16+y, R10; \
- MOVQ 24+x, R11; SBBQ 24+y, R11; \
- MOVQ 32+x, R12; SBBQ 32+y, R12; \
- MOVQ 40+x, R13; SBBQ 40+y, R13; \
- MOVQ 48+x, R14; SBBQ 48+y, R14; \
- MOVQ $0, AX; SETCS AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- SUBQ AX, R8; MOVQ $0, AX; \
- SBBQ $0, R9; \
- SBBQ $0, R10; \
- SBBQ DX, R11; \
- SBBQ $0, R12; \
- SBBQ $0, R13; \
- SBBQ $0, R14; \
- SETCS AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- SUBQ AX, R8; MOVQ R8, 0+z; \
- SBBQ $0, R9; MOVQ R9, 8+z; \
- SBBQ $0, R10; MOVQ R10, 16+z; \
- SBBQ DX, R11; MOVQ R11, 24+z; \
- SBBQ $0, R12; MOVQ R12, 32+z; \
- SBBQ $0, R13; MOVQ R13, 40+z; \
- SBBQ $0, R14; MOVQ R14, 48+z;
-
-// maddBmi2Adx multiplies x and y and accumulates in z
-// Uses: AX, DX, R15, FLAGS
-// Instr: x86_64, bmi2, adx
-#define maddBmi2Adx(z,x,y,i,r0,r1,r2,r3,r4,r5,r6) \
- MOVQ i+y, DX; XORL AX, AX; \
- MULXQ 0+x, AX, R8; ADOXQ AX, r0; ADCXQ R8, r1; MOVQ r0,i+z; \
- MULXQ 8+x, AX, r0; ADOXQ AX, r1; ADCXQ r0, r2; MOVQ $0, R8; \
- MULXQ 16+x, AX, r0; ADOXQ AX, r2; ADCXQ r0, r3; \
- MULXQ 24+x, AX, r0; ADOXQ AX, r3; ADCXQ r0, r4; \
- MULXQ 32+x, AX, r0; ADOXQ AX, r4; ADCXQ r0, r5; \
- MULXQ 40+x, AX, r0; ADOXQ AX, r5; ADCXQ r0, r6; \
- MULXQ 48+x, AX, r0; ADOXQ AX, r6; ADCXQ R8, r0; \
- ;;;;;;;;;;;;;;;;;;; ADOXQ R8, r0;
-
-// integerMulAdx multiplies x and y and stores in z
-// Uses: AX, DX, R8-R15, FLAGS
-// Instr: x86_64, bmi2, adx
-#define integerMulAdx(z,x,y) \
- MOVL $0,R15; \
- MOVQ 0+y, DX; XORL AX, AX; MOVQ $0, R8; \
- MULXQ 0+x, AX, R9; MOVQ AX, 0+z; \
- MULXQ 8+x, AX, R10; ADCXQ AX, R9; \
- MULXQ 16+x, AX, R11; ADCXQ AX, R10; \
- MULXQ 24+x, AX, R12; ADCXQ AX, R11; \
- MULXQ 32+x, AX, R13; ADCXQ AX, R12; \
- MULXQ 40+x, AX, R14; ADCXQ AX, R13; \
- MULXQ 48+x, AX, R15; ADCXQ AX, R14; \
- ;;;;;;;;;;;;;;;;;;;; ADCXQ R8, R15; \
- maddBmi2Adx(z,x,y, 8, R9,R10,R11,R12,R13,R14,R15) \
- maddBmi2Adx(z,x,y,16,R10,R11,R12,R13,R14,R15, R9) \
- maddBmi2Adx(z,x,y,24,R11,R12,R13,R14,R15, R9,R10) \
- maddBmi2Adx(z,x,y,32,R12,R13,R14,R15, R9,R10,R11) \
- maddBmi2Adx(z,x,y,40,R13,R14,R15, R9,R10,R11,R12) \
- maddBmi2Adx(z,x,y,48,R14,R15, R9,R10,R11,R12,R13) \
- MOVQ R15, 56+z; \
- MOVQ R9, 64+z; \
- MOVQ R10, 72+z; \
- MOVQ R11, 80+z; \
- MOVQ R12, 88+z; \
- MOVQ R13, 96+z; \
- MOVQ R14, 104+z;
-
-// maddLegacy multiplies x and y and accumulates in z
-// Uses: AX, DX, R15, FLAGS
-// Instr: x86_64
-#define maddLegacy(z,x,y,i) \
- MOVQ i+y, R15; \
- MOVQ 0+x, AX; MULQ R15; MOVQ AX, R8; ;;;;;;;;;;;; MOVQ DX, R9; \
- MOVQ 8+x, AX; MULQ R15; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; \
- MOVQ 16+x, AX; MULQ R15; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; \
- MOVQ 24+x, AX; MULQ R15; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; \
- MOVQ 32+x, AX; MULQ R15; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; \
- MOVQ 40+x, AX; MULQ R15; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX, R14; \
- MOVQ 48+x, AX; MULQ R15; ADDQ AX, R14; ADCQ $0, DX; \
- ADDQ 0+i+z, R8; MOVQ R8, 0+i+z; \
- ADCQ 8+i+z, R9; MOVQ R9, 8+i+z; \
- ADCQ 16+i+z, R10; MOVQ R10, 16+i+z; \
- ADCQ 24+i+z, R11; MOVQ R11, 24+i+z; \
- ADCQ 32+i+z, R12; MOVQ R12, 32+i+z; \
- ADCQ 40+i+z, R13; MOVQ R13, 40+i+z; \
- ADCQ 48+i+z, R14; MOVQ R14, 48+i+z; \
- ADCQ $0, DX; MOVQ DX, 56+i+z;
-
-// integerMulLeg multiplies x and y and stores in z
-// Uses: AX, DX, R8-R15, FLAGS
-// Instr: x86_64
-#define integerMulLeg(z,x,y) \
- MOVQ 0+y, R15; \
- MOVQ 0+x, AX; MULQ R15; MOVQ AX, 0+z; ;;;;;;;;;;;; MOVQ DX, R8; \
- MOVQ 8+x, AX; MULQ R15; ADDQ AX, R8; ADCQ $0, DX; MOVQ DX, R9; MOVQ R8, 8+z; \
- MOVQ 16+x, AX; MULQ R15; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; MOVQ R9, 16+z; \
- MOVQ 24+x, AX; MULQ R15; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; MOVQ R10, 24+z; \
- MOVQ 32+x, AX; MULQ R15; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; MOVQ R11, 32+z; \
- MOVQ 40+x, AX; MULQ R15; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; MOVQ R12, 40+z; \
- MOVQ 48+x, AX; MULQ R15; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX,56+z; MOVQ R13, 48+z; \
- maddLegacy(z,x,y, 8) \
- maddLegacy(z,x,y,16) \
- maddLegacy(z,x,y,24) \
- maddLegacy(z,x,y,32) \
- maddLegacy(z,x,y,40) \
- maddLegacy(z,x,y,48)
-
-// integerSqrLeg squares x and stores in z
-// Uses: AX, CX, DX, R8-R15, FLAGS
-// Instr: x86_64
-#define integerSqrLeg(z,x) \
- XORL R15, R15; \
- MOVQ 0+x, CX; \
- MOVQ CX, AX; MULQ CX; MOVQ AX, 0+z; MOVQ DX, R8; \
- ADDQ CX, CX; ADCQ $0, R15; \
- MOVQ 8+x, AX; MULQ CX; ADDQ AX, R8; ADCQ $0, DX; MOVQ DX, R9; MOVQ R8, 8+z; \
- MOVQ 16+x, AX; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; \
- MOVQ 24+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; \
- MOVQ 32+x, AX; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; \
- MOVQ 40+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; \
- MOVQ 48+x, AX; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX, R14; \
- \
- MOVQ 8+x, CX; \
- MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
- ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; MOVQ R9,16+z; \
- MOVQ R15, AX; NEGQ AX; ANDQ 8+x, AX; ADDQ AX, DX; ADCQ $0, R11; MOVQ DX, R8; \
- ADDQ 8+x, CX; ADCQ $0, R15; \
- MOVQ 16+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; ADDQ R8, R10; ADCQ $0, DX; MOVQ DX, R8; MOVQ R10, 24+z; \
- MOVQ 24+x, AX; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; ADDQ R8, R11; ADCQ $0, DX; MOVQ DX, R8; \
- MOVQ 32+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; ADDQ R8, R12; ADCQ $0, DX; MOVQ DX, R8; \
- MOVQ 40+x, AX; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; ADDQ R8, R13; ADCQ $0, DX; MOVQ DX, R8; \
- MOVQ 48+x, AX; MULQ CX; ADDQ AX, R14; ADCQ $0, DX; ADDQ R8, R14; ADCQ $0, DX; MOVQ DX, R9; \
- \
- MOVQ 16+x, CX; \
- MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
- ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; MOVQ R11, 32+z; \
- MOVQ R15, AX; NEGQ AX; ANDQ 16+x,AX; ADDQ AX, DX; ADCQ $0, R13; MOVQ DX, R8; \
- ADDQ 16+x, CX; ADCQ $0, R15; \
- MOVQ 24+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; ADDQ R8, R12; ADCQ $0, DX; MOVQ DX, R8; MOVQ R12, 40+z; \
- MOVQ 32+x, AX; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; ADDQ R8, R13; ADCQ $0, DX; MOVQ DX, R8; \
- MOVQ 40+x, AX; MULQ CX; ADDQ AX, R14; ADCQ $0, DX; ADDQ R8, R14; ADCQ $0, DX; MOVQ DX, R8; \
- MOVQ 48+x, AX; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; ADDQ R8, R9; ADCQ $0, DX; MOVQ DX,R10; \
- \
- MOVQ 24+x, CX; \
- MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
- ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; MOVQ R13, 48+z; \
- MOVQ R15, AX; NEGQ AX; ANDQ 24+x,AX; ADDQ AX, DX; ADCQ $0, R9; MOVQ DX, R8; \
- ADDQ 24+x, CX; ADCQ $0, R15; \
- MOVQ 32+x, AX; MULQ CX; ADDQ AX, R14; ADCQ $0, DX; ADDQ R8, R14; ADCQ $0, DX; MOVQ DX, R8; MOVQ R14, 56+z; \
- MOVQ 40+x, AX; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; ADDQ R8, R9; ADCQ $0, DX; MOVQ DX, R8; \
- MOVQ 48+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; ADDQ R8, R10; ADCQ $0, DX; MOVQ DX,R11; \
- \
- MOVQ 32+x, CX; \
- MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
- ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; MOVQ R9, 64+z; \
- MOVQ R15, AX; NEGQ AX; ANDQ 32+x,AX; ADDQ AX, DX; ADCQ $0, R11; MOVQ DX, R8; \
- ADDQ 32+x, CX; ADCQ $0, R15; \
- MOVQ 40+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; ADDQ R8, R10; ADCQ $0, DX; MOVQ DX, R8; MOVQ R10, 72+z; \
- MOVQ 48+x, AX; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; ADDQ R8, R11; ADCQ $0, DX; MOVQ DX,R12; \
- \
- XORL R13, R13; \
- XORL R14, R14; \
- MOVQ 40+x, CX; \
- MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
- ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; MOVQ R11, 80+z; \
- MOVQ R15, AX; NEGQ AX; ANDQ 40+x,AX; ADDQ AX, DX; ADCQ $0, R13; MOVQ DX, R8; \
- ADDQ 40+x, CX; ADCQ $0, R15; \
- MOVQ 48+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; ADDQ R8, R12; ADCQ $0, DX; MOVQ DX, R8; MOVQ R12, 88+z; \
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDQ R8, R13; ADCQ $0,R14; \
- \
- XORL R9, R9; \
- MOVQ 48+x, CX; \
- MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
- ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; MOVQ R13, 96+z; \
- MOVQ R15, AX; NEGQ AX; ANDQ 48+x,AX; ADDQ AX, DX; ADCQ $0, R9; MOVQ DX, R8; \
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDQ R8,R14; ADCQ $0, R9; MOVQ R14, 104+z;
-
-
-// integerSqrAdx squares x and stores in z
-// Uses: AX, CX, DX, R8-R15, FLAGS
-// Instr: x86_64, bmi2, adx
-#define integerSqrAdx(z,x) \
- XORL R15, R15; \
- MOVQ 0+x, DX; \
- ;;;;;;;;;;;;;; MULXQ DX, AX, R8; MOVQ AX, 0+z; \
- ADDQ DX, DX; ADCQ $0, R15; CLC; \
- MULXQ 8+x, AX, R9; ADCXQ AX, R8; MOVQ R8, 8+z; \
- MULXQ 16+x, AX, R10; ADCXQ AX, R9; MOVQ $0, R8;\
- MULXQ 24+x, AX, R11; ADCXQ AX, R10; \
- MULXQ 32+x, AX, R12; ADCXQ AX, R11; \
- MULXQ 40+x, AX, R13; ADCXQ AX, R12; \
- MULXQ 48+x, AX, R14; ADCXQ AX, R13; \
- ;;;;;;;;;;;;;;;;;;;; ADCXQ R8, R14; \
- \
- MOVQ 8+x, DX; \
- MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
- MULXQ AX, AX, CX; \
- MOVQ R15, R8; NEGQ R8; ANDQ 8+x, R8; \
- ADDQ AX, R9; MOVQ R9, 16+z; \
- ADCQ CX, R8; \
- ADCQ $0, R11; \
- ADDQ 8+x, DX; \
- ADCQ $0, R15; \
- XORL R9, R9; ;;;;;;;;;;;;;;;;;;;;; ADOXQ R8, R10; \
- MULXQ 16+x, AX, CX; ADCXQ AX, R10; ADOXQ CX, R11; MOVQ R10, 24+z; \
- MULXQ 24+x, AX, CX; ADCXQ AX, R11; ADOXQ CX, R12; MOVQ $0, R10; \
- MULXQ 32+x, AX, CX; ADCXQ AX, R12; ADOXQ CX, R13; \
- MULXQ 40+x, AX, CX; ADCXQ AX, R13; ADOXQ CX, R14; \
- MULXQ 48+x, AX, CX; ADCXQ AX, R14; ADOXQ CX, R9; \
- ;;;;;;;;;;;;;;;;;;; ADCXQ R10, R9; \
- \
- MOVQ 16+x, DX; \
- MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
- MULXQ AX, AX, CX; \
- MOVQ R15, R8; NEGQ R8; ANDQ 16+x, R8; \
- ADDQ AX, R11; MOVQ R11, 32+z; \
- ADCQ CX, R8; \
- ADCQ $0, R13; \
- ADDQ 16+x, DX; \
- ADCQ $0, R15; \
- XORL R11, R11; ;;;;;;;;;;;;;;;;;;; ADOXQ R8, R12; \
- MULXQ 24+x, AX, CX; ADCXQ AX, R12; ADOXQ CX, R13; MOVQ R12, 40+z; \
- MULXQ 32+x, AX, CX; ADCXQ AX, R13; ADOXQ CX, R14; MOVQ $0, R12; \
- MULXQ 40+x, AX, CX; ADCXQ AX, R14; ADOXQ CX, R9; \
- MULXQ 48+x, AX, CX; ADCXQ AX, R9; ADOXQ CX, R10; \
- ;;;;;;;;;;;;;;;;;;; ADCXQ R11,R10; \
- \
- MOVQ 24+x, DX; \
- MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
- MULXQ AX, AX, CX; \
- MOVQ R15, R8; NEGQ R8; ANDQ 24+x, R8; \
- ADDQ AX, R13; MOVQ R13, 48+z; \
- ADCQ CX, R8; \
- ADCQ $0, R9; \
- ADDQ 24+x, DX; \
- ADCQ $0, R15; \
- XORL R13, R13; ;;;;;;;;;;;;;;;;;;; ADOXQ R8, R14; \
- MULXQ 32+x, AX, CX; ADCXQ AX, R14; ADOXQ CX, R9; MOVQ R14, 56+z; \
- MULXQ 40+x, AX, CX; ADCXQ AX, R9; ADOXQ CX, R10; MOVQ $0, R14; \
- MULXQ 48+x, AX, CX; ADCXQ AX, R10; ADOXQ CX, R11; \
- ;;;;;;;;;;;;;;;;;;; ADCXQ R12,R11; \
- \
- MOVQ 32+x, DX; \
- MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
- MULXQ AX, AX, CX; \
- MOVQ R15, R8; NEGQ R8; ANDQ 32+x, R8; \
- ADDQ AX, R9; MOVQ R9, 64+z; \
- ADCQ CX, R8; \
- ADCQ $0, R11; \
- ADDQ 32+x, DX; \
- ADCQ $0, R15; \
- XORL R9, R9; ;;;;;;;;;;;;;;;;;;;;; ADOXQ R8, R10; \
- MULXQ 40+x, AX, CX; ADCXQ AX, R10; ADOXQ CX, R11; MOVQ R10, 72+z; \
- MULXQ 48+x, AX, CX; ADCXQ AX, R11; ADOXQ CX, R12; \
- ;;;;;;;;;;;;;;;;;;; ADCXQ R13,R12; \
- \
- MOVQ 40+x, DX; \
- MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
- MULXQ AX, AX, CX; \
- MOVQ R15, R8; NEGQ R8; ANDQ 40+x, R8; \
- ADDQ AX, R11; MOVQ R11, 80+z; \
- ADCQ CX, R8; \
- ADCQ $0, R13; \
- ADDQ 40+x, DX; \
- ADCQ $0, R15; \
- XORL R11, R11; ;;;;;;;;;;;;;;;;;;; ADOXQ R8, R12; \
- MULXQ 48+x, AX, CX; ADCXQ AX, R12; ADOXQ CX, R13; MOVQ R12, 88+z; \
- ;;;;;;;;;;;;;;;;;;; ADCXQ R14,R13; \
- \
- MOVQ 48+x, DX; \
- MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
- MULXQ AX, AX, CX; \
- MOVQ R15, R8; NEGQ R8; ANDQ 48+x, R8; \
- XORL R10, R10; ;;;;;;;;;;;;;; ADOXQ CX, R14; \
- ;;;;;;;;;;;;;; ADCXQ AX, R13; ;;;;;;;;;;;;;; MOVQ R13, 96+z; \
- ;;;;;;;;;;;;;; ADCXQ R8, R14; MOVQ R14, 104+z;
-
-// reduceFromDoubleLeg finds a z=x modulo p such that z<2^448 and stores in z
-// Uses: AX, R8-R15, FLAGS
-// Instr: x86_64
-#define reduceFromDoubleLeg(z,x) \
- /* ( ,2C13,2C12,2C11,2C10|C10,C9,C8, C7) + (C6,...,C0) */ \
- /* (r14, r13, r12, r11, r10,r9,r8,r15) */ \
- MOVQ 80+x,AX; MOVQ AX,R10; \
- MOVQ $0xFFFFFFFF00000000, R8; \
- ANDQ R8,R10; \
- \
- MOVQ $0,R14; \
- MOVQ 104+x,R13; SHLQ $1,R13,R14; \
- MOVQ 96+x,R12; SHLQ $1,R12,R13; \
- MOVQ 88+x,R11; SHLQ $1,R11,R12; \
- MOVQ 72+x, R9; SHLQ $1,R10,R11; \
- MOVQ 64+x, R8; SHLQ $1,R10; \
- MOVQ $0xFFFFFFFF,R15; ANDQ R15,AX; ORQ AX,R10; \
- MOVQ 56+x,R15; \
- \
- ADDQ 0+x,R15; MOVQ R15, 0+z; MOVQ 56+x,R15; \
- ADCQ 8+x, R8; MOVQ R8, 8+z; MOVQ 64+x, R8; \
- ADCQ 16+x, R9; MOVQ R9,16+z; MOVQ 72+x, R9; \
- ADCQ 24+x,R10; MOVQ R10,24+z; MOVQ 80+x,R10; \
- ADCQ 32+x,R11; MOVQ R11,32+z; MOVQ 88+x,R11; \
- ADCQ 40+x,R12; MOVQ R12,40+z; MOVQ 96+x,R12; \
- ADCQ 48+x,R13; MOVQ R13,48+z; MOVQ 104+x,R13; \
- ADCQ $0,R14; \
- /* (c10c9,c9c8,c8c7,c7c13,c13c12,c12c11,c11c10) + (c6,...,c0) */ \
- /* ( r9, r8, r15, r13, r12, r11, r10) */ \
- MOVQ R10, AX; \
- SHRQ $32,R11,R10; \
- SHRQ $32,R12,R11; \
- SHRQ $32,R13,R12; \
- SHRQ $32,R15,R13; \
- SHRQ $32, R8,R15; \
- SHRQ $32, R9, R8; \
- SHRQ $32, AX, R9; \
- \
- ADDQ 0+z,R10; \
- ADCQ 8+z,R11; \
- ADCQ 16+z,R12; \
- ADCQ 24+z,R13; \
- ADCQ 32+z,R15; \
- ADCQ 40+z, R8; \
- ADCQ 48+z, R9; \
- ADCQ $0,R14; \
- /* ( c7) + (c6,...,c0) */ \
- /* (r14) */ \
- MOVQ R14, AX; SHLQ $32, AX; \
- ADDQ R14,R10; MOVQ $0,R14; \
- ADCQ $0,R11; \
- ADCQ $0,R12; \
- ADCQ AX,R13; \
- ADCQ $0,R15; \
- ADCQ $0, R8; \
- ADCQ $0, R9; \
- ADCQ $0,R14; \
- /* ( c7) + (c6,...,c0) */ \
- /* (r14) */ \
- MOVQ R14, AX; SHLQ $32,AX; \
- ADDQ R14,R10; MOVQ R10, 0+z; \
- ADCQ $0,R11; MOVQ R11, 8+z; \
- ADCQ $0,R12; MOVQ R12,16+z; \
- ADCQ AX,R13; MOVQ R13,24+z; \
- ADCQ $0,R15; MOVQ R15,32+z; \
- ADCQ $0, R8; MOVQ R8,40+z; \
- ADCQ $0, R9; MOVQ R9,48+z;
-
-// reduceFromDoubleAdx finds a z=x modulo p such that z<2^448 and stores in z
-// Uses: AX, R8-R15, FLAGS
-// Instr: x86_64, adx
-#define reduceFromDoubleAdx(z,x) \
- /* ( ,2C13,2C12,2C11,2C10|C10,C9,C8, C7) + (C6,...,C0) */ \
- /* (r14, r13, r12, r11, r10,r9,r8,r15) */ \
- MOVQ 80+x,AX; MOVQ AX,R10; \
- MOVQ $0xFFFFFFFF00000000, R8; \
- ANDQ R8,R10; \
- \
- MOVQ $0,R14; \
- MOVQ 104+x,R13; SHLQ $1,R13,R14; \
- MOVQ 96+x,R12; SHLQ $1,R12,R13; \
- MOVQ 88+x,R11; SHLQ $1,R11,R12; \
- MOVQ 72+x, R9; SHLQ $1,R10,R11; \
- MOVQ 64+x, R8; SHLQ $1,R10; \
- MOVQ $0xFFFFFFFF,R15; ANDQ R15,AX; ORQ AX,R10; \
- MOVQ 56+x,R15; \
- \
- XORL AX,AX; \
- ADCXQ 0+x,R15; MOVQ R15, 0+z; MOVQ 56+x,R15; \
- ADCXQ 8+x, R8; MOVQ R8, 8+z; MOVQ 64+x, R8; \
- ADCXQ 16+x, R9; MOVQ R9,16+z; MOVQ 72+x, R9; \
- ADCXQ 24+x,R10; MOVQ R10,24+z; MOVQ 80+x,R10; \
- ADCXQ 32+x,R11; MOVQ R11,32+z; MOVQ 88+x,R11; \
- ADCXQ 40+x,R12; MOVQ R12,40+z; MOVQ 96+x,R12; \
- ADCXQ 48+x,R13; MOVQ R13,48+z; MOVQ 104+x,R13; \
- ADCXQ AX,R14; \
- /* (c10c9,c9c8,c8c7,c7c13,c13c12,c12c11,c11c10) + (c6,...,c0) */ \
- /* ( r9, r8, r15, r13, r12, r11, r10) */ \
- MOVQ R10, AX; \
- SHRQ $32,R11,R10; \
- SHRQ $32,R12,R11; \
- SHRQ $32,R13,R12; \
- SHRQ $32,R15,R13; \
- SHRQ $32, R8,R15; \
- SHRQ $32, R9, R8; \
- SHRQ $32, AX, R9; \
- \
- XORL AX,AX; \
- ADCXQ 0+z,R10; \
- ADCXQ 8+z,R11; \
- ADCXQ 16+z,R12; \
- ADCXQ 24+z,R13; \
- ADCXQ 32+z,R15; \
- ADCXQ 40+z, R8; \
- ADCXQ 48+z, R9; \
- ADCXQ AX,R14; \
- /* ( c7) + (c6,...,c0) */ \
- /* (r14) */ \
- MOVQ R14, AX; SHLQ $32, AX; \
- CLC; \
- ADCXQ R14,R10; MOVQ $0,R14; \
- ADCXQ R14,R11; \
- ADCXQ R14,R12; \
- ADCXQ AX,R13; \
- ADCXQ R14,R15; \
- ADCXQ R14, R8; \
- ADCXQ R14, R9; \
- ADCXQ R14,R14; \
- /* ( c7) + (c6,...,c0) */ \
- /* (r14) */ \
- MOVQ R14, AX; SHLQ $32, AX; \
- CLC; \
- ADCXQ R14,R10; MOVQ R10, 0+z; MOVQ $0,R14; \
- ADCXQ R14,R11; MOVQ R11, 8+z; \
- ADCXQ R14,R12; MOVQ R12,16+z; \
- ADCXQ AX,R13; MOVQ R13,24+z; \
- ADCXQ R14,R15; MOVQ R15,32+z; \
- ADCXQ R14, R8; MOVQ R8,40+z; \
- ADCXQ R14, R9; MOVQ R9,48+z;
-
-// addSub calculates two operations: x,y = x+y,x-y
-// Uses: AX, DX, R8-R15, FLAGS
-#define addSub(x,y) \
- MOVQ 0+x, R8; ADDQ 0+y, R8; \
- MOVQ 8+x, R9; ADCQ 8+y, R9; \
- MOVQ 16+x, R10; ADCQ 16+y, R10; \
- MOVQ 24+x, R11; ADCQ 24+y, R11; \
- MOVQ 32+x, R12; ADCQ 32+y, R12; \
- MOVQ 40+x, R13; ADCQ 40+y, R13; \
- MOVQ 48+x, R14; ADCQ 48+y, R14; \
- MOVQ $0, AX; ADCQ $0, AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- ADDQ AX, R8; MOVQ $0, AX; \
- ADCQ $0, R9; \
- ADCQ $0, R10; \
- ADCQ DX, R11; \
- ADCQ $0, R12; \
- ADCQ $0, R13; \
- ADCQ $0, R14; \
- ADCQ $0, AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- ADDQ AX, R8; MOVQ 0+x,AX; MOVQ R8, 0+x; MOVQ AX, R8; \
- ADCQ $0, R9; MOVQ 8+x,AX; MOVQ R9, 8+x; MOVQ AX, R9; \
- ADCQ $0, R10; MOVQ 16+x,AX; MOVQ R10, 16+x; MOVQ AX, R10; \
- ADCQ DX, R11; MOVQ 24+x,AX; MOVQ R11, 24+x; MOVQ AX, R11; \
- ADCQ $0, R12; MOVQ 32+x,AX; MOVQ R12, 32+x; MOVQ AX, R12; \
- ADCQ $0, R13; MOVQ 40+x,AX; MOVQ R13, 40+x; MOVQ AX, R13; \
- ADCQ $0, R14; MOVQ 48+x,AX; MOVQ R14, 48+x; MOVQ AX, R14; \
- SUBQ 0+y, R8; \
- SBBQ 8+y, R9; \
- SBBQ 16+y, R10; \
- SBBQ 24+y, R11; \
- SBBQ 32+y, R12; \
- SBBQ 40+y, R13; \
- SBBQ 48+y, R14; \
- MOVQ $0, AX; SETCS AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- SUBQ AX, R8; MOVQ $0, AX; \
- SBBQ $0, R9; \
- SBBQ $0, R10; \
- SBBQ DX, R11; \
- SBBQ $0, R12; \
- SBBQ $0, R13; \
- SBBQ $0, R14; \
- SETCS AX; \
- MOVQ AX, DX; \
- SHLQ $32, DX; \
- SUBQ AX, R8; MOVQ R8, 0+y; \
- SBBQ $0, R9; MOVQ R9, 8+y; \
- SBBQ $0, R10; MOVQ R10, 16+y; \
- SBBQ DX, R11; MOVQ R11, 24+y; \
- SBBQ $0, R12; MOVQ R12, 32+y; \
- SBBQ $0, R13; MOVQ R13, 40+y; \
- SBBQ $0, R14; MOVQ R14, 48+y;
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
deleted file mode 100644
index 3f1f07c986..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
+++ /dev/null
@@ -1,75 +0,0 @@
-//go:build amd64 && !purego
-// +build amd64,!purego
-
-#include "textflag.h"
-#include "fp_amd64.h"
-
-// func cmovAmd64(x, y *Elt, n uint)
-TEXT ·cmovAmd64(SB),NOSPLIT,$0-24
- MOVQ x+0(FP), DI
- MOVQ y+8(FP), SI
- MOVQ n+16(FP), BX
- cselect(0(DI),0(SI),BX)
- RET
-
-// func cswapAmd64(x, y *Elt, n uint)
-TEXT ·cswapAmd64(SB),NOSPLIT,$0-24
- MOVQ x+0(FP), DI
- MOVQ y+8(FP), SI
- MOVQ n+16(FP), BX
- cswap(0(DI),0(SI),BX)
- RET
-
-// func subAmd64(z, x, y *Elt)
-TEXT ·subAmd64(SB),NOSPLIT,$0-24
- MOVQ z+0(FP), DI
- MOVQ x+8(FP), SI
- MOVQ y+16(FP), BX
- subtraction(0(DI),0(SI),0(BX))
- RET
-
-// func addsubAmd64(x, y *Elt)
-TEXT ·addsubAmd64(SB),NOSPLIT,$0-16
- MOVQ x+0(FP), DI
- MOVQ y+8(FP), SI
- addSub(0(DI),0(SI))
- RET
-
-#define addLegacy \
- additionLeg(0(DI),0(SI),0(BX))
-#define addBmi2Adx \
- additionAdx(0(DI),0(SI),0(BX))
-
-#define mulLegacy \
- integerMulLeg(0(SP),0(SI),0(BX)) \
- reduceFromDoubleLeg(0(DI),0(SP))
-#define mulBmi2Adx \
- integerMulAdx(0(SP),0(SI),0(BX)) \
- reduceFromDoubleAdx(0(DI),0(SP))
-
-#define sqrLegacy \
- integerSqrLeg(0(SP),0(SI)) \
- reduceFromDoubleLeg(0(DI),0(SP))
-#define sqrBmi2Adx \
- integerSqrAdx(0(SP),0(SI)) \
- reduceFromDoubleAdx(0(DI),0(SP))
-
-// func addAmd64(z, x, y *Elt)
-TEXT ·addAmd64(SB),NOSPLIT,$0-24
- MOVQ z+0(FP), DI
- MOVQ x+8(FP), SI
- MOVQ y+16(FP), BX
- CHECK_BMI2ADX(LADD, addLegacy, addBmi2Adx)
-
-// func mulAmd64(z, x, y *Elt)
-TEXT ·mulAmd64(SB),NOSPLIT,$112-24
- MOVQ z+0(FP), DI
- MOVQ x+8(FP), SI
- MOVQ y+16(FP), BX
- CHECK_BMI2ADX(LMUL, mulLegacy, mulBmi2Adx)
-
-// func sqrAmd64(z, x *Elt)
-TEXT ·sqrAmd64(SB),NOSPLIT,$112-16
- MOVQ z+0(FP), DI
- MOVQ x+8(FP), SI
- CHECK_BMI2ADX(LSQR, sqrLegacy, sqrBmi2Adx)
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_generic.go b/vendor/github.com/cloudflare/circl/math/fp448/fp_generic.go
deleted file mode 100644
index 47a0b63205..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp_generic.go
+++ /dev/null
@@ -1,339 +0,0 @@
-package fp448
-
-import (
- "encoding/binary"
- "math/bits"
-)
-
-func cmovGeneric(x, y *Elt, n uint) {
- m := -uint64(n & 0x1)
- x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
- x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
- x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
- x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
- x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
- x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
- x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
-
- y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
- y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
- y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
- y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
- y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
- y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
- y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
-
- x0 = (x0 &^ m) | (y0 & m)
- x1 = (x1 &^ m) | (y1 & m)
- x2 = (x2 &^ m) | (y2 & m)
- x3 = (x3 &^ m) | (y3 & m)
- x4 = (x4 &^ m) | (y4 & m)
- x5 = (x5 &^ m) | (y5 & m)
- x6 = (x6 &^ m) | (y6 & m)
-
- binary.LittleEndian.PutUint64(x[0*8:1*8], x0)
- binary.LittleEndian.PutUint64(x[1*8:2*8], x1)
- binary.LittleEndian.PutUint64(x[2*8:3*8], x2)
- binary.LittleEndian.PutUint64(x[3*8:4*8], x3)
- binary.LittleEndian.PutUint64(x[4*8:5*8], x4)
- binary.LittleEndian.PutUint64(x[5*8:6*8], x5)
- binary.LittleEndian.PutUint64(x[6*8:7*8], x6)
-}
-
-func cswapGeneric(x, y *Elt, n uint) {
- m := -uint64(n & 0x1)
- x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
- x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
- x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
- x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
- x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
- x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
- x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
-
- y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
- y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
- y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
- y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
- y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
- y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
- y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
-
- t0 := m & (x0 ^ y0)
- t1 := m & (x1 ^ y1)
- t2 := m & (x2 ^ y2)
- t3 := m & (x3 ^ y3)
- t4 := m & (x4 ^ y4)
- t5 := m & (x5 ^ y5)
- t6 := m & (x6 ^ y6)
- x0 ^= t0
- x1 ^= t1
- x2 ^= t2
- x3 ^= t3
- x4 ^= t4
- x5 ^= t5
- x6 ^= t6
- y0 ^= t0
- y1 ^= t1
- y2 ^= t2
- y3 ^= t3
- y4 ^= t4
- y5 ^= t5
- y6 ^= t6
-
- binary.LittleEndian.PutUint64(x[0*8:1*8], x0)
- binary.LittleEndian.PutUint64(x[1*8:2*8], x1)
- binary.LittleEndian.PutUint64(x[2*8:3*8], x2)
- binary.LittleEndian.PutUint64(x[3*8:4*8], x3)
- binary.LittleEndian.PutUint64(x[4*8:5*8], x4)
- binary.LittleEndian.PutUint64(x[5*8:6*8], x5)
- binary.LittleEndian.PutUint64(x[6*8:7*8], x6)
-
- binary.LittleEndian.PutUint64(y[0*8:1*8], y0)
- binary.LittleEndian.PutUint64(y[1*8:2*8], y1)
- binary.LittleEndian.PutUint64(y[2*8:3*8], y2)
- binary.LittleEndian.PutUint64(y[3*8:4*8], y3)
- binary.LittleEndian.PutUint64(y[4*8:5*8], y4)
- binary.LittleEndian.PutUint64(y[5*8:6*8], y5)
- binary.LittleEndian.PutUint64(y[6*8:7*8], y6)
-}
-
-func addGeneric(z, x, y *Elt) {
- x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
- x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
- x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
- x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
- x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
- x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
- x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
-
- y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
- y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
- y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
- y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
- y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
- y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
- y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
-
- z0, c0 := bits.Add64(x0, y0, 0)
- z1, c1 := bits.Add64(x1, y1, c0)
- z2, c2 := bits.Add64(x2, y2, c1)
- z3, c3 := bits.Add64(x3, y3, c2)
- z4, c4 := bits.Add64(x4, y4, c3)
- z5, c5 := bits.Add64(x5, y5, c4)
- z6, z7 := bits.Add64(x6, y6, c5)
-
- z0, c0 = bits.Add64(z0, z7, 0)
- z1, c1 = bits.Add64(z1, 0, c0)
- z2, c2 = bits.Add64(z2, 0, c1)
- z3, c3 = bits.Add64(z3, z7<<32, c2)
- z4, c4 = bits.Add64(z4, 0, c3)
- z5, c5 = bits.Add64(z5, 0, c4)
- z6, z7 = bits.Add64(z6, 0, c5)
-
- z0, c0 = bits.Add64(z0, z7, 0)
- z1, c1 = bits.Add64(z1, 0, c0)
- z2, c2 = bits.Add64(z2, 0, c1)
- z3, c3 = bits.Add64(z3, z7<<32, c2)
- z4, c4 = bits.Add64(z4, 0, c3)
- z5, c5 = bits.Add64(z5, 0, c4)
- z6, _ = bits.Add64(z6, 0, c5)
-
- binary.LittleEndian.PutUint64(z[0*8:1*8], z0)
- binary.LittleEndian.PutUint64(z[1*8:2*8], z1)
- binary.LittleEndian.PutUint64(z[2*8:3*8], z2)
- binary.LittleEndian.PutUint64(z[3*8:4*8], z3)
- binary.LittleEndian.PutUint64(z[4*8:5*8], z4)
- binary.LittleEndian.PutUint64(z[5*8:6*8], z5)
- binary.LittleEndian.PutUint64(z[6*8:7*8], z6)
-}
-
-func subGeneric(z, x, y *Elt) {
- x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
- x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
- x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
- x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
- x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
- x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
- x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
-
- y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
- y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
- y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
- y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
- y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
- y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
- y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
-
- z0, c0 := bits.Sub64(x0, y0, 0)
- z1, c1 := bits.Sub64(x1, y1, c0)
- z2, c2 := bits.Sub64(x2, y2, c1)
- z3, c3 := bits.Sub64(x3, y3, c2)
- z4, c4 := bits.Sub64(x4, y4, c3)
- z5, c5 := bits.Sub64(x5, y5, c4)
- z6, z7 := bits.Sub64(x6, y6, c5)
-
- z0, c0 = bits.Sub64(z0, z7, 0)
- z1, c1 = bits.Sub64(z1, 0, c0)
- z2, c2 = bits.Sub64(z2, 0, c1)
- z3, c3 = bits.Sub64(z3, z7<<32, c2)
- z4, c4 = bits.Sub64(z4, 0, c3)
- z5, c5 = bits.Sub64(z5, 0, c4)
- z6, z7 = bits.Sub64(z6, 0, c5)
-
- z0, c0 = bits.Sub64(z0, z7, 0)
- z1, c1 = bits.Sub64(z1, 0, c0)
- z2, c2 = bits.Sub64(z2, 0, c1)
- z3, c3 = bits.Sub64(z3, z7<<32, c2)
- z4, c4 = bits.Sub64(z4, 0, c3)
- z5, c5 = bits.Sub64(z5, 0, c4)
- z6, _ = bits.Sub64(z6, 0, c5)
-
- binary.LittleEndian.PutUint64(z[0*8:1*8], z0)
- binary.LittleEndian.PutUint64(z[1*8:2*8], z1)
- binary.LittleEndian.PutUint64(z[2*8:3*8], z2)
- binary.LittleEndian.PutUint64(z[3*8:4*8], z3)
- binary.LittleEndian.PutUint64(z[4*8:5*8], z4)
- binary.LittleEndian.PutUint64(z[5*8:6*8], z5)
- binary.LittleEndian.PutUint64(z[6*8:7*8], z6)
-}
-
-func addsubGeneric(x, y *Elt) {
- z := &Elt{}
- addGeneric(z, x, y)
- subGeneric(y, x, y)
- *x = *z
-}
-
-func mulGeneric(z, x, y *Elt) {
- x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
- x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
- x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
- x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
- x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
- x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
- x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
-
- y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
- y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
- y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
- y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
- y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
- y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
- y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
-
- yy := [7]uint64{y0, y1, y2, y3, y4, y5, y6}
- zz := [7]uint64{}
-
- yi := yy[0]
- h0, l0 := bits.Mul64(x0, yi)
- h1, l1 := bits.Mul64(x1, yi)
- h2, l2 := bits.Mul64(x2, yi)
- h3, l3 := bits.Mul64(x3, yi)
- h4, l4 := bits.Mul64(x4, yi)
- h5, l5 := bits.Mul64(x5, yi)
- h6, l6 := bits.Mul64(x6, yi)
-
- zz[0] = l0
- a0, c0 := bits.Add64(h0, l1, 0)
- a1, c1 := bits.Add64(h1, l2, c0)
- a2, c2 := bits.Add64(h2, l3, c1)
- a3, c3 := bits.Add64(h3, l4, c2)
- a4, c4 := bits.Add64(h4, l5, c3)
- a5, c5 := bits.Add64(h5, l6, c4)
- a6, _ := bits.Add64(h6, 0, c5)
-
- for i := 1; i < 7; i++ {
- yi = yy[i]
- h0, l0 = bits.Mul64(x0, yi)
- h1, l1 = bits.Mul64(x1, yi)
- h2, l2 = bits.Mul64(x2, yi)
- h3, l3 = bits.Mul64(x3, yi)
- h4, l4 = bits.Mul64(x4, yi)
- h5, l5 = bits.Mul64(x5, yi)
- h6, l6 = bits.Mul64(x6, yi)
-
- zz[i], c0 = bits.Add64(a0, l0, 0)
- a0, c1 = bits.Add64(a1, l1, c0)
- a1, c2 = bits.Add64(a2, l2, c1)
- a2, c3 = bits.Add64(a3, l3, c2)
- a3, c4 = bits.Add64(a4, l4, c3)
- a4, c5 = bits.Add64(a5, l5, c4)
- a5, a6 = bits.Add64(a6, l6, c5)
-
- a0, c0 = bits.Add64(a0, h0, 0)
- a1, c1 = bits.Add64(a1, h1, c0)
- a2, c2 = bits.Add64(a2, h2, c1)
- a3, c3 = bits.Add64(a3, h3, c2)
- a4, c4 = bits.Add64(a4, h4, c3)
- a5, c5 = bits.Add64(a5, h5, c4)
- a6, _ = bits.Add64(a6, h6, c5)
- }
- red64(z, &zz, &[7]uint64{a0, a1, a2, a3, a4, a5, a6})
-}
-
-func sqrGeneric(z, x *Elt) { mulGeneric(z, x, x) }
-
-func red64(z *Elt, l, h *[7]uint64) {
- /* (2C13, 2C12, 2C11, 2C10|C10, C9, C8, C7) + (C6,...,C0) */
- h0 := h[0]
- h1 := h[1]
- h2 := h[2]
- h3 := ((h[3] & (0xFFFFFFFF << 32)) << 1) | (h[3] & 0xFFFFFFFF)
- h4 := (h[3] >> 63) | (h[4] << 1)
- h5 := (h[4] >> 63) | (h[5] << 1)
- h6 := (h[5] >> 63) | (h[6] << 1)
- h7 := (h[6] >> 63)
-
- l0, c0 := bits.Add64(h0, l[0], 0)
- l1, c1 := bits.Add64(h1, l[1], c0)
- l2, c2 := bits.Add64(h2, l[2], c1)
- l3, c3 := bits.Add64(h3, l[3], c2)
- l4, c4 := bits.Add64(h4, l[4], c3)
- l5, c5 := bits.Add64(h5, l[5], c4)
- l6, c6 := bits.Add64(h6, l[6], c5)
- l7, _ := bits.Add64(h7, 0, c6)
-
- /* (C10C9, C9C8,C8C7,C7C13,C13C12,C12C11,C11C10) + (C6,...,C0) */
- h0 = (h[3] >> 32) | (h[4] << 32)
- h1 = (h[4] >> 32) | (h[5] << 32)
- h2 = (h[5] >> 32) | (h[6] << 32)
- h3 = (h[6] >> 32) | (h[0] << 32)
- h4 = (h[0] >> 32) | (h[1] << 32)
- h5 = (h[1] >> 32) | (h[2] << 32)
- h6 = (h[2] >> 32) | (h[3] << 32)
-
- l0, c0 = bits.Add64(l0, h0, 0)
- l1, c1 = bits.Add64(l1, h1, c0)
- l2, c2 = bits.Add64(l2, h2, c1)
- l3, c3 = bits.Add64(l3, h3, c2)
- l4, c4 = bits.Add64(l4, h4, c3)
- l5, c5 = bits.Add64(l5, h5, c4)
- l6, c6 = bits.Add64(l6, h6, c5)
- l7, _ = bits.Add64(l7, 0, c6)
-
- /* (C7) + (C6,...,C0) */
- l0, c0 = bits.Add64(l0, l7, 0)
- l1, c1 = bits.Add64(l1, 0, c0)
- l2, c2 = bits.Add64(l2, 0, c1)
- l3, c3 = bits.Add64(l3, l7<<32, c2)
- l4, c4 = bits.Add64(l4, 0, c3)
- l5, c5 = bits.Add64(l5, 0, c4)
- l6, l7 = bits.Add64(l6, 0, c5)
-
- /* (C7) + (C6,...,C0) */
- l0, c0 = bits.Add64(l0, l7, 0)
- l1, c1 = bits.Add64(l1, 0, c0)
- l2, c2 = bits.Add64(l2, 0, c1)
- l3, c3 = bits.Add64(l3, l7<<32, c2)
- l4, c4 = bits.Add64(l4, 0, c3)
- l5, c5 = bits.Add64(l5, 0, c4)
- l6, _ = bits.Add64(l6, 0, c5)
-
- binary.LittleEndian.PutUint64(z[0*8:1*8], l0)
- binary.LittleEndian.PutUint64(z[1*8:2*8], l1)
- binary.LittleEndian.PutUint64(z[2*8:3*8], l2)
- binary.LittleEndian.PutUint64(z[3*8:4*8], l3)
- binary.LittleEndian.PutUint64(z[4*8:5*8], l4)
- binary.LittleEndian.PutUint64(z[5*8:6*8], l5)
- binary.LittleEndian.PutUint64(z[6*8:7*8], l6)
-}
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go b/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go
deleted file mode 100644
index a62225d296..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build !amd64 || purego
-// +build !amd64 purego
-
-package fp448
-
-func cmov(x, y *Elt, n uint) { cmovGeneric(x, y, n) }
-func cswap(x, y *Elt, n uint) { cswapGeneric(x, y, n) }
-func add(z, x, y *Elt) { addGeneric(z, x, y) }
-func sub(z, x, y *Elt) { subGeneric(z, x, y) }
-func addsub(x, y *Elt) { addsubGeneric(x, y) }
-func mul(z, x, y *Elt) { mulGeneric(z, x, y) }
-func sqr(z, x *Elt) { sqrGeneric(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fuzzer.go b/vendor/github.com/cloudflare/circl/math/fp448/fuzzer.go
deleted file mode 100644
index 2d7afc8059..0000000000
--- a/vendor/github.com/cloudflare/circl/math/fp448/fuzzer.go
+++ /dev/null
@@ -1,75 +0,0 @@
-//go:build gofuzz
-// +build gofuzz
-
-// How to run the fuzzer:
-//
-// $ go get -u github.com/dvyukov/go-fuzz/go-fuzz
-// $ go get -u github.com/dvyukov/go-fuzz/go-fuzz-build
-// $ go-fuzz-build -libfuzzer -func FuzzReduction -o lib.a
-// $ clang -fsanitize=fuzzer lib.a -o fu.exe
-// $ ./fu.exe
-package fp448
-
-import (
- "encoding/binary"
- "fmt"
- "math/big"
-
- "github.com/cloudflare/circl/internal/conv"
-)
-
-// FuzzReduction is a fuzzer target for red64 function, which reduces t
-// (112 bits) to a number t' (56 bits) congruent modulo p448.
-func FuzzReduction(data []byte) int {
- if len(data) != 2*Size {
- return -1
- }
- var got, want Elt
- var lo, hi [7]uint64
- a := data[:Size]
- b := data[Size:]
- lo[0] = binary.LittleEndian.Uint64(a[0*8 : 1*8])
- lo[1] = binary.LittleEndian.Uint64(a[1*8 : 2*8])
- lo[2] = binary.LittleEndian.Uint64(a[2*8 : 3*8])
- lo[3] = binary.LittleEndian.Uint64(a[3*8 : 4*8])
- lo[4] = binary.LittleEndian.Uint64(a[4*8 : 5*8])
- lo[5] = binary.LittleEndian.Uint64(a[5*8 : 6*8])
- lo[6] = binary.LittleEndian.Uint64(a[6*8 : 7*8])
-
- hi[0] = binary.LittleEndian.Uint64(b[0*8 : 1*8])
- hi[1] = binary.LittleEndian.Uint64(b[1*8 : 2*8])
- hi[2] = binary.LittleEndian.Uint64(b[2*8 : 3*8])
- hi[3] = binary.LittleEndian.Uint64(b[3*8 : 4*8])
- hi[4] = binary.LittleEndian.Uint64(b[4*8 : 5*8])
- hi[5] = binary.LittleEndian.Uint64(b[5*8 : 6*8])
- hi[6] = binary.LittleEndian.Uint64(b[6*8 : 7*8])
-
- red64(&got, &lo, &hi)
-
- t := conv.BytesLe2BigInt(data[:2*Size])
-
- two448 := big.NewInt(1)
- two448.Lsh(two448, 448) // 2^448
- mask448 := big.NewInt(1)
- mask448.Sub(two448, mask448) // 2^448-1
- two224plus1 := big.NewInt(1)
- two224plus1.Lsh(two224plus1, 224)
- two224plus1.Add(two224plus1, big.NewInt(1)) // 2^224+1
-
- var loBig, hiBig big.Int
- for t.Cmp(two448) >= 0 {
- loBig.And(t, mask448)
- hiBig.Rsh(t, 448)
- t.Mul(&hiBig, two224plus1)
- t.Add(t, &loBig)
- }
- conv.BigInt2BytesLe(want[:], t)
-
- if got != want {
- fmt.Printf("in: %v\n", conv.BytesLe2BigInt(data[:2*Size]))
- fmt.Printf("got: %v\n", got)
- fmt.Printf("want: %v\n", want)
- panic("error found")
- }
- return 1
-}
diff --git a/vendor/github.com/cloudflare/circl/math/integer.go b/vendor/github.com/cloudflare/circl/math/integer.go
deleted file mode 100644
index 9c80c23b59..0000000000
--- a/vendor/github.com/cloudflare/circl/math/integer.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package math
-
-import "math/bits"
-
-// NextPow2 finds the next power of two (N=2^k, k>=0) greater than n.
-// If n is already a power of two, then this function returns n, and log2(n).
-func NextPow2(n uint) (N uint, k uint) {
- if bits.OnesCount(n) == 1 {
- k = uint(bits.TrailingZeros(n))
- N = n
- } else {
- k = uint(bits.Len(n))
- N = uint(1) << k
- }
- return
-}
diff --git a/vendor/github.com/cloudflare/circl/math/mlsbset/mlsbset.go b/vendor/github.com/cloudflare/circl/math/mlsbset/mlsbset.go
deleted file mode 100644
index a43851b8bb..0000000000
--- a/vendor/github.com/cloudflare/circl/math/mlsbset/mlsbset.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Package mlsbset provides a constant-time exponentiation method with precomputation.
-//
-// References: "Efficient and secure algorithms for GLV-based scalar
-// multiplication and their implementation on GLV–GLS curves" by (Faz-Hernandez et al.)
-// - https://doi.org/10.1007/s13389-014-0085-7
-// - https://eprint.iacr.org/2013/158
-package mlsbset
-
-import (
- "errors"
- "fmt"
- "math/big"
-
- "github.com/cloudflare/circl/internal/conv"
-)
-
-// EltG is a group element.
-type EltG interface{}
-
-// EltP is a precomputed group element.
-type EltP interface{}
-
-// Group defines the operations required by MLSBSet exponentiation method.
-type Group interface {
- Identity() EltG // Returns the identity of the group.
- Sqr(x EltG) // Calculates x = x^2.
- Mul(x EltG, y EltP) // Calculates x = x*y.
- NewEltP() EltP // Returns an arbitrary precomputed element.
- ExtendedEltP() EltP // Returns the precomputed element x^(2^(w*d)).
- Lookup(a EltP, v uint, s, u int32) // Sets a = s*T[v][u].
-}
-
-// Params contains the parameters of the encoding.
-type Params struct {
- T uint // T is the maximum size (in bits) of exponents.
- V uint // V is the number of tables.
- W uint // W is the window size.
- E uint // E is the number of digits per table.
- D uint // D is the number of digits in total.
- L uint // L is the length of the code.
-}
-
-// Encoder allows to convert integers into valid powers.
-type Encoder struct{ p Params }
-
-// New produces an encoder of the MLSBSet algorithm.
-func New(t, v, w uint) (Encoder, error) {
- if !(t > 1 && v >= 1 && w >= 2) {
- return Encoder{}, errors.New("t>1, v>=1, w>=2")
- }
- e := (t + w*v - 1) / (w * v)
- d := e * v
- l := d * w
- return Encoder{Params{t, v, w, e, d, l}}, nil
-}
-
-// Encode converts an odd integer k into a valid power for exponentiation.
-func (m Encoder) Encode(k []byte) (*Power, error) {
- if len(k) == 0 {
- return nil, errors.New("empty slice")
- }
- if !(len(k) <= int(m.p.L+7)>>3) {
- return nil, errors.New("k too big")
- }
- if k[0]%2 == 0 {
- return nil, errors.New("k must be odd")
- }
- ap := int((m.p.L+7)/8) - len(k)
- k = append(k, make([]byte, ap)...)
- s := m.signs(k)
- b := make([]int32, m.p.L-m.p.D)
- c := conv.BytesLe2BigInt(k)
- c.Rsh(c, m.p.D)
- var bi big.Int
- for i := m.p.D; i < m.p.L; i++ {
- c0 := int32(c.Bit(0))
- b[i-m.p.D] = s[i%m.p.D] * c0
- bi.SetInt64(int64(b[i-m.p.D] >> 1))
- c.Rsh(c, 1)
- c.Sub(c, &bi)
- }
- carry := int(c.Int64())
- return &Power{m, s, b, carry}, nil
-}
-
-// signs calculates the set of signs.
-func (m Encoder) signs(k []byte) []int32 {
- s := make([]int32, m.p.D)
- s[m.p.D-1] = 1
- for i := uint(1); i < m.p.D; i++ {
- ki := int32((k[i>>3] >> (i & 0x7)) & 0x1)
- s[i-1] = 2*ki - 1
- }
- return s
-}
-
-// GetParams returns the complementary parameters of the encoding.
-func (m Encoder) GetParams() Params { return m.p }
-
-// tableSize returns the size of each table.
-func (m Encoder) tableSize() uint { return 1 << (m.p.W - 1) }
-
-// Elts returns the total number of elements that must be precomputed.
-func (m Encoder) Elts() uint { return m.p.V * m.tableSize() }
-
-// IsExtended returns true if the element x^(2^(wd)) must be calculated.
-func (m Encoder) IsExtended() bool { q := m.p.T / (m.p.V * m.p.W); return m.p.T == q*m.p.V*m.p.W }
-
-// Ops returns the number of squares and multiplications executed during an exponentiation.
-func (m Encoder) Ops() (S uint, M uint) {
- S = m.p.E
- M = m.p.E * m.p.V
- if m.IsExtended() {
- M++
- }
- return
-}
-
-func (m Encoder) String() string {
- return fmt.Sprintf("T: %v W: %v V: %v e: %v d: %v l: %v wv|t: %v",
- m.p.T, m.p.W, m.p.V, m.p.E, m.p.D, m.p.L, m.IsExtended())
-}
diff --git a/vendor/github.com/cloudflare/circl/math/mlsbset/power.go b/vendor/github.com/cloudflare/circl/math/mlsbset/power.go
deleted file mode 100644
index 3f214c3046..0000000000
--- a/vendor/github.com/cloudflare/circl/math/mlsbset/power.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package mlsbset
-
-import "fmt"
-
-// Power is a valid exponent produced by the MLSBSet encoding algorithm.
-type Power struct {
- set Encoder // parameters of code.
- s []int32 // set of signs.
- b []int32 // set of digits.
- c int // carry is {0,1}.
-}
-
-// Exp is calculates x^k, where x is a predetermined element of a group G.
-func (p *Power) Exp(G Group) EltG {
- a, b := G.Identity(), G.NewEltP()
- for e := int(p.set.p.E - 1); e >= 0; e-- {
- G.Sqr(a)
- for v := uint(0); v < p.set.p.V; v++ {
- sgnElt, idElt := p.Digit(v, uint(e))
- G.Lookup(b, v, sgnElt, idElt)
- G.Mul(a, b)
- }
- }
- if p.set.IsExtended() && p.c == 1 {
- G.Mul(a, G.ExtendedEltP())
- }
- return a
-}
-
-// Digit returns the (v,e)-th digit and its sign.
-func (p *Power) Digit(v, e uint) (sgn, dig int32) {
- sgn = p.bit(0, v, e)
- dig = 0
- for i := p.set.p.W - 1; i > 0; i-- {
- dig = 2*dig + p.bit(i, v, e)
- }
- mask := dig >> 31
- dig = (dig + mask) ^ mask
- return sgn, dig
-}
-
-// bit returns the (w,v,e)-th bit of the code.
-func (p *Power) bit(w, v, e uint) int32 {
- if !(w < p.set.p.W &&
- v < p.set.p.V &&
- e < p.set.p.E) {
- panic(fmt.Errorf("indexes outside (%v,%v,%v)", w, v, e))
- }
- if w == 0 {
- return p.s[p.set.p.E*v+e]
- }
- return p.b[p.set.p.D*(w-1)+p.set.p.E*v+e]
-}
-
-func (p *Power) String() string {
- dig := ""
- for j := uint(0); j < p.set.p.V; j++ {
- for i := uint(0); i < p.set.p.E; i++ {
- s, d := p.Digit(j, i)
- dig += fmt.Sprintf("(%2v,%2v) = %+2v %+2v\n", j, i, s, d)
- }
- }
- return fmt.Sprintf("len: %v\ncarry: %v\ndigits:\n%v", len(p.b)+len(p.s), p.c, dig)
-}
diff --git a/vendor/github.com/cloudflare/circl/math/primes.go b/vendor/github.com/cloudflare/circl/math/primes.go
deleted file mode 100644
index 158fd83a7a..0000000000
--- a/vendor/github.com/cloudflare/circl/math/primes.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package math
-
-import (
- "crypto/rand"
- "io"
- "math/big"
-)
-
-// IsSafePrime reports whether p is (probably) a safe prime.
-// The prime p=2*q+1 is safe prime if both p and q are primes.
-// Note that ProbablyPrime is not suitable for judging primes
-// that an adversary may have crafted to fool the test.
-func IsSafePrime(p *big.Int) bool {
- pdiv2 := new(big.Int).Rsh(p, 1)
- return p.ProbablyPrime(20) && pdiv2.ProbablyPrime(20)
-}
-
-// SafePrime returns a number of the given bit length that is a safe prime with high probability.
-// The number returned p=2*q+1 is a safe prime if both p and q are primes.
-// SafePrime will return error for any error returned by rand.Read or if bits < 2.
-func SafePrime(random io.Reader, bits int) (*big.Int, error) {
- one := big.NewInt(1)
- p := new(big.Int)
- for {
- q, err := rand.Prime(random, bits-1)
- if err != nil {
- return nil, err
- }
- p.Lsh(q, 1).Add(p, one)
- if p.ProbablyPrime(20) {
- return p, nil
- }
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/math/wnaf.go b/vendor/github.com/cloudflare/circl/math/wnaf.go
deleted file mode 100644
index 94a1ec5042..0000000000
--- a/vendor/github.com/cloudflare/circl/math/wnaf.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Package math provides some utility functions for big integers.
-package math
-
-import "math/big"
-
-// SignedDigit obtains the signed-digit recoding of n and returns a list L of
-// digits such that n = sum( L[i]*2^(i*(w-1)) ), and each L[i] is an odd number
-// in the set {±1, ±3, ..., ±2^(w-1)-1}. The third parameter ensures that the
-// output has ceil(l/(w-1)) digits.
-//
-// Restrictions:
-// - n is odd and n > 0.
-// - 1 < w < 32.
-// - l >= bit length of n.
-//
-// References:
-// - Alg.6 in "Exponent Recoding and Regular Exponentiation Algorithms"
-// by Joye-Tunstall. http://doi.org/10.1007/978-3-642-02384-2_21
-// - Alg.6 in "Selecting Elliptic Curves for Cryptography: An Efficiency and
-// Security Analysis" by Bos et al. http://doi.org/10.1007/s13389-015-0097-y
-func SignedDigit(n *big.Int, w, l uint) []int32 {
- if n.Sign() <= 0 || n.Bit(0) == 0 {
- panic("n must be non-zero, odd, and positive")
- }
- if w <= 1 || w >= 32 {
- panic("Verify that 1 < w < 32")
- }
- if uint(n.BitLen()) > l {
- panic("n is too big to fit in l digits")
- }
- lenN := (l + (w - 1) - 1) / (w - 1) // ceil(l/(w-1))
- L := make([]int32, lenN+1)
- var k, v big.Int
- k.Set(n)
-
- var i uint
- for i = 0; i < lenN; i++ {
- words := k.Bits()
- value := int32(words[0] & ((1 << w) - 1))
- value -= int32(1) << (w - 1)
- L[i] = value
- v.SetInt64(int64(value))
- k.Sub(&k, &v)
- k.Rsh(&k, w-1)
- }
- L[i] = int32(k.Int64())
- return L
-}
-
-// OmegaNAF obtains the window-w Non-Adjacent Form of a positive number n and
-// 1 < w < 32. The returned slice L holds n = sum( L[i]*2^i ).
-//
-// Reference:
-// - Alg.9 "Efficient arithmetic on Koblitz curves" by Solinas.
-// http://doi.org/10.1023/A:1008306223194
-func OmegaNAF(n *big.Int, w uint) (L []int32) {
- if n.Sign() < 0 {
- panic("n must be positive")
- }
- if w <= 1 || w >= 32 {
- panic("Verify that 1 < w < 32")
- }
-
- L = make([]int32, n.BitLen()+1)
- var k, v big.Int
- k.Set(n)
-
- i := 0
- for ; k.Sign() > 0; i++ {
- value := int32(0)
- if k.Bit(0) == 1 {
- words := k.Bits()
- value = int32(words[0] & ((1 << w) - 1))
- if value >= (int32(1) << (w - 1)) {
- value -= int32(1) << w
- }
- v.SetInt64(int64(value))
- k.Sub(&k, &v)
- }
- L[i] = value
- k.Rsh(&k, 1)
- }
- return L[:i]
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go b/vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go
deleted file mode 100644
index 2c73c26fb1..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go
+++ /dev/null
@@ -1,453 +0,0 @@
-// Package ed25519 implements Ed25519 signature scheme as described in RFC-8032.
-//
-// This package provides optimized implementations of the three signature
-// variants and maintaining closer compatibility with crypto/ed25519.
-//
-// | Scheme Name | Sign Function | Verification | Context |
-// |-------------|-------------------|---------------|-------------------|
-// | Ed25519 | Sign | Verify | None |
-// | Ed25519Ph | SignPh | VerifyPh | Yes, can be empty |
-// | Ed25519Ctx | SignWithCtx | VerifyWithCtx | Yes, non-empty |
-// | All above | (PrivateKey).Sign | VerifyAny | As above |
-//
-// Specific functions for sign and verify are defined. A generic signing
-// function for all schemes is available through the crypto.Signer interface,
-// which is implemented by the PrivateKey type. A correspond all-in-one
-// verification method is provided by the VerifyAny function.
-//
-// Signing with Ed25519Ph or Ed25519Ctx requires a context string for domain
-// separation. This parameter is passed using a SignerOptions struct defined
-// in this package. While Ed25519Ph accepts an empty context, Ed25519Ctx
-// enforces non-empty context strings.
-//
-// # Compatibility with crypto.ed25519
-//
-// These functions are compatible with the “Ed25519” function defined in
-// RFC-8032. However, unlike RFC 8032's formulation, this package's private
-// key representation includes a public key suffix to make multiple signing
-// operations with the same key more efficient. This package refers to the
-// RFC-8032 private key as the “seed”.
-//
-// References
-//
-// - RFC-8032: https://rfc-editor.org/rfc/rfc8032.txt
-// - Ed25519: https://ed25519.cr.yp.to/
-// - EdDSA: High-speed high-security signatures. https://doi.org/10.1007/s13389-012-0027-1
-package ed25519
-
-import (
- "bytes"
- "crypto"
- cryptoRand "crypto/rand"
- "crypto/sha512"
- "crypto/subtle"
- "errors"
- "fmt"
- "io"
- "strconv"
-
- "github.com/cloudflare/circl/sign"
-)
-
-const (
- // ContextMaxSize is the maximum length (in bytes) allowed for context.
- ContextMaxSize = 255
- // PublicKeySize is the size, in bytes, of public keys as used in this package.
- PublicKeySize = 32
- // PrivateKeySize is the size, in bytes, of private keys as used in this package.
- PrivateKeySize = 64
- // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
- SignatureSize = 64
- // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
- SeedSize = 32
-)
-
-const (
- paramB = 256 / 8 // Size of keys in bytes.
-)
-
-// SignerOptions implements crypto.SignerOpts and augments with parameters
-// that are specific to the Ed25519 signature schemes.
-type SignerOptions struct {
- // Hash must be crypto.Hash(0) for Ed25519/Ed25519ctx, or crypto.SHA512
- // for Ed25519ph.
- crypto.Hash
-
- // Context is an optional domain separation string for Ed25519ph and a
- // must for Ed25519ctx. Its length must be less or equal than 255 bytes.
- Context string
-
- // Scheme is an identifier for choosing a signature scheme. The zero value
- // is ED25519.
- Scheme SchemeID
-}
-
-// SchemeID is an identifier for each signature scheme.
-type SchemeID uint
-
-const (
- ED25519 SchemeID = iota
- ED25519Ph
- ED25519Ctx
-)
-
-// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
-type PrivateKey []byte
-
-// Equal reports whether priv and x have the same value.
-func (priv PrivateKey) Equal(x crypto.PrivateKey) bool {
- xx, ok := x.(PrivateKey)
- return ok && subtle.ConstantTimeCompare(priv, xx) == 1
-}
-
-// Public returns the PublicKey corresponding to priv.
-func (priv PrivateKey) Public() crypto.PublicKey {
- publicKey := make(PublicKey, PublicKeySize)
- copy(publicKey, priv[SeedSize:])
- return publicKey
-}
-
-// Seed returns the private key seed corresponding to priv. It is provided for
-// interoperability with RFC 8032. RFC 8032's private keys correspond to seeds
-// in this package.
-func (priv PrivateKey) Seed() []byte {
- seed := make([]byte, SeedSize)
- copy(seed, priv[:SeedSize])
- return seed
-}
-
-func (priv PrivateKey) Scheme() sign.Scheme { return sch }
-
-func (pub PublicKey) Scheme() sign.Scheme { return sch }
-
-func (priv PrivateKey) MarshalBinary() (data []byte, err error) {
- privateKey := make(PrivateKey, PrivateKeySize)
- copy(privateKey, priv)
- return privateKey, nil
-}
-
-func (pub PublicKey) MarshalBinary() (data []byte, err error) {
- publicKey := make(PublicKey, PublicKeySize)
- copy(publicKey, pub)
- return publicKey, nil
-}
-
-// Equal reports whether pub and x have the same value.
-func (pub PublicKey) Equal(x crypto.PublicKey) bool {
- xx, ok := x.(PublicKey)
- return ok && bytes.Equal(pub, xx)
-}
-
-// Sign creates a signature of a message with priv key.
-// This function is compatible with crypto.ed25519 and also supports the
-// three signature variants defined in RFC-8032, namely Ed25519 (or pure
-// EdDSA), Ed25519Ph, and Ed25519Ctx.
-// The opts.HashFunc() must return zero to specify either Ed25519 or Ed25519Ctx
-// variant. This can be achieved by passing crypto.Hash(0) as the value for
-// opts.
-// The opts.HashFunc() must return SHA512 to specify the Ed25519Ph variant.
-// This can be achieved by passing crypto.SHA512 as the value for opts.
-// Use a SignerOptions struct (defined in this package) to pass a context
-// string for signing.
-func (priv PrivateKey) Sign(
- rand io.Reader,
- message []byte,
- opts crypto.SignerOpts,
-) (signature []byte, err error) {
- var ctx string
- var scheme SchemeID
- if o, ok := opts.(SignerOptions); ok {
- ctx = o.Context
- scheme = o.Scheme
- }
-
- switch true {
- case scheme == ED25519 && opts.HashFunc() == crypto.Hash(0):
- return Sign(priv, message), nil
- case scheme == ED25519Ph && opts.HashFunc() == crypto.SHA512:
- return SignPh(priv, message, ctx), nil
- case scheme == ED25519Ctx && opts.HashFunc() == crypto.Hash(0) && len(ctx) > 0:
- return SignWithCtx(priv, message, ctx), nil
- default:
- return nil, errors.New("ed25519: bad hash algorithm")
- }
-}
-
-// GenerateKey generates a public/private key pair using entropy from rand.
-// If rand is nil, crypto/rand.Reader will be used.
-func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
- if rand == nil {
- rand = cryptoRand.Reader
- }
-
- seed := make([]byte, SeedSize)
- if _, err := io.ReadFull(rand, seed); err != nil {
- return nil, nil, err
- }
-
- privateKey := NewKeyFromSeed(seed)
- publicKey := make(PublicKey, PublicKeySize)
- copy(publicKey, privateKey[SeedSize:])
-
- return publicKey, privateKey, nil
-}
-
-// NewKeyFromSeed calculates a private key from a seed. It will panic if
-// len(seed) is not SeedSize. This function is provided for interoperability
-// with RFC 8032. RFC 8032's private keys correspond to seeds in this
-// package.
-func NewKeyFromSeed(seed []byte) PrivateKey {
- privateKey := make(PrivateKey, PrivateKeySize)
- newKeyFromSeed(privateKey, seed)
- return privateKey
-}
-
-func newKeyFromSeed(privateKey, seed []byte) {
- if l := len(seed); l != SeedSize {
- panic("ed25519: bad seed length: " + strconv.Itoa(l))
- }
- var P pointR1
- k := sha512.Sum512(seed)
- clamp(k[:])
- reduceModOrder(k[:paramB], false)
- P.fixedMult(k[:paramB])
- copy(privateKey[:SeedSize], seed)
- _ = P.ToBytes(privateKey[SeedSize:])
-}
-
-func signAll(signature []byte, privateKey PrivateKey, message, ctx []byte, preHash bool) {
- if l := len(privateKey); l != PrivateKeySize {
- panic("ed25519: bad private key length: " + strconv.Itoa(l))
- }
-
- H := sha512.New()
- var PHM []byte
-
- if preHash {
- _, _ = H.Write(message)
- PHM = H.Sum(nil)
- H.Reset()
- } else {
- PHM = message
- }
-
- // 1. Hash the 32-byte private key using SHA-512.
- _, _ = H.Write(privateKey[:SeedSize])
- h := H.Sum(nil)
- clamp(h[:])
- prefix, s := h[paramB:], h[:paramB]
-
- // 2. Compute SHA-512(dom2(F, C) || prefix || PH(M))
- H.Reset()
-
- writeDom(H, ctx, preHash)
-
- _, _ = H.Write(prefix)
- _, _ = H.Write(PHM)
- r := H.Sum(nil)
- reduceModOrder(r[:], true)
-
- // 3. Compute the point [r]B.
- var P pointR1
- P.fixedMult(r[:paramB])
- R := (&[paramB]byte{})[:]
- if err := P.ToBytes(R); err != nil {
- panic(err)
- }
-
- // 4. Compute SHA512(dom2(F, C) || R || A || PH(M)).
- H.Reset()
-
- writeDom(H, ctx, preHash)
-
- _, _ = H.Write(R)
- _, _ = H.Write(privateKey[SeedSize:])
- _, _ = H.Write(PHM)
- hRAM := H.Sum(nil)
-
- reduceModOrder(hRAM[:], true)
-
- // 5. Compute S = (r + k * s) mod order.
- S := (&[paramB]byte{})[:]
- calculateS(S, r[:paramB], hRAM[:paramB], s)
-
- // 6. The signature is the concatenation of R and S.
- copy(signature[:paramB], R[:])
- copy(signature[paramB:], S[:])
-}
-
-// Sign signs the message with privateKey and returns a signature.
-// This function supports the signature variant defined in RFC-8032: Ed25519,
-// also known as the pure version of EdDSA.
-// It will panic if len(privateKey) is not PrivateKeySize.
-func Sign(privateKey PrivateKey, message []byte) []byte {
- signature := make([]byte, SignatureSize)
- signAll(signature, privateKey, message, []byte(""), false)
- return signature
-}
-
-// SignPh creates a signature of a message with private key and context.
-// This function supports the signature variant defined in RFC-8032: Ed25519ph,
-// meaning it internally hashes the message using SHA-512, and optionally
-// accepts a context string.
-// It will panic if len(privateKey) is not PrivateKeySize.
-// Context could be passed to this function, which length should be no more than
-// ContextMaxSize=255. It can be empty.
-func SignPh(privateKey PrivateKey, message []byte, ctx string) []byte {
- if len(ctx) > ContextMaxSize {
- panic(fmt.Errorf("ed25519: bad context length: %v", len(ctx)))
- }
-
- signature := make([]byte, SignatureSize)
- signAll(signature, privateKey, message, []byte(ctx), true)
- return signature
-}
-
-// SignWithCtx creates a signature of a message with private key and context.
-// This function supports the signature variant defined in RFC-8032: Ed25519ctx,
-// meaning it accepts a non-empty context string.
-// It will panic if len(privateKey) is not PrivateKeySize.
-// Context must be passed to this function, which length should be no more than
-// ContextMaxSize=255 and cannot be empty.
-func SignWithCtx(privateKey PrivateKey, message []byte, ctx string) []byte {
- if len(ctx) == 0 || len(ctx) > ContextMaxSize {
- panic(fmt.Errorf("ed25519: bad context length: %v > %v", len(ctx), ContextMaxSize))
- }
-
- signature := make([]byte, SignatureSize)
- signAll(signature, privateKey, message, []byte(ctx), false)
- return signature
-}
-
-func verify(public PublicKey, message, signature, ctx []byte, preHash bool) bool {
- if len(public) != PublicKeySize ||
- len(signature) != SignatureSize ||
- !isLessThanOrder(signature[paramB:]) {
- return false
- }
-
- var P pointR1
- if ok := P.FromBytes(public); !ok {
- return false
- }
-
- H := sha512.New()
- var PHM []byte
-
- if preHash {
- _, _ = H.Write(message)
- PHM = H.Sum(nil)
- H.Reset()
- } else {
- PHM = message
- }
-
- R := signature[:paramB]
-
- writeDom(H, ctx, preHash)
-
- _, _ = H.Write(R)
- _, _ = H.Write(public)
- _, _ = H.Write(PHM)
- hRAM := H.Sum(nil)
- reduceModOrder(hRAM[:], true)
-
- var Q pointR1
- encR := (&[paramB]byte{})[:]
- P.neg()
- Q.doubleMult(&P, signature[paramB:], hRAM[:paramB])
- _ = Q.ToBytes(encR)
- return bytes.Equal(R, encR)
-}
-
-// VerifyAny returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded.
-// This function supports all the three signature variants defined in RFC-8032,
-// namely Ed25519 (or pure EdDSA), Ed25519Ph, and Ed25519Ctx.
-// The opts.HashFunc() must return zero to specify either Ed25519 or Ed25519Ctx
-// variant. This can be achieved by passing crypto.Hash(0) as the value for opts.
-// The opts.HashFunc() must return SHA512 to specify the Ed25519Ph variant.
-// This can be achieved by passing crypto.SHA512 as the value for opts.
-// Use a SignerOptions struct to pass a context string for signing.
-func VerifyAny(public PublicKey, message, signature []byte, opts crypto.SignerOpts) bool {
- var ctx string
- var scheme SchemeID
- if o, ok := opts.(SignerOptions); ok {
- ctx = o.Context
- scheme = o.Scheme
- }
-
- switch true {
- case scheme == ED25519 && opts.HashFunc() == crypto.Hash(0):
- return Verify(public, message, signature)
- case scheme == ED25519Ph && opts.HashFunc() == crypto.SHA512:
- return VerifyPh(public, message, signature, ctx)
- case scheme == ED25519Ctx && opts.HashFunc() == crypto.Hash(0) && len(ctx) > 0:
- return VerifyWithCtx(public, message, signature, ctx)
- default:
- return false
- }
-}
-
-// Verify returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded.
-// This function supports the signature variant defined in RFC-8032: Ed25519,
-// also known as the pure version of EdDSA.
-func Verify(public PublicKey, message, signature []byte) bool {
- return verify(public, message, signature, []byte(""), false)
-}
-
-// VerifyPh returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded.
-// This function supports the signature variant defined in RFC-8032: Ed25519ph,
-// meaning it internally hashes the message using SHA-512.
-// Context could be passed to this function, which length should be no more than
-// 255. It can be empty.
-func VerifyPh(public PublicKey, message, signature []byte, ctx string) bool {
- return verify(public, message, signature, []byte(ctx), true)
-}
-
-// VerifyWithCtx returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded, or when context is
-// not provided.
-// This function supports the signature variant defined in RFC-8032: Ed25519ctx,
-// meaning it does not handle prehashed messages. Non-empty context string must be
-// provided, and must not be more than 255 of length.
-func VerifyWithCtx(public PublicKey, message, signature []byte, ctx string) bool {
- if len(ctx) == 0 || len(ctx) > ContextMaxSize {
- return false
- }
-
- return verify(public, message, signature, []byte(ctx), false)
-}
-
-func clamp(k []byte) {
- k[0] &= 248
- k[paramB-1] = (k[paramB-1] & 127) | 64
-}
-
-// isLessThanOrder returns true if 0 <= x < order.
-func isLessThanOrder(x []byte) bool {
- i := len(order) - 1
- for i > 0 && x[i] == order[i] {
- i--
- }
- return x[i] < order[i]
-}
-
-func writeDom(h io.Writer, ctx []byte, preHash bool) {
- dom2 := "SigEd25519 no Ed25519 collisions"
-
- if len(ctx) > 0 {
- _, _ = h.Write([]byte(dom2))
- if preHash {
- _, _ = h.Write([]byte{byte(0x01), byte(len(ctx))})
- } else {
- _, _ = h.Write([]byte{byte(0x00), byte(len(ctx))})
- }
- _, _ = h.Write(ctx)
- } else if preHash {
- _, _ = h.Write([]byte(dom2))
- _, _ = h.Write([]byte{0x01, 0x00})
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/modular.go b/vendor/github.com/cloudflare/circl/sign/ed25519/modular.go
deleted file mode 100644
index 10efafdcaf..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/modular.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package ed25519
-
-import (
- "encoding/binary"
- "math/bits"
-)
-
-var order = [paramB]byte{
- 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
- 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-}
-
-// isLessThan returns true if 0 <= x < y, and assumes that slices have the same length.
-func isLessThan(x, y []byte) bool {
- i := len(x) - 1
- for i > 0 && x[i] == y[i] {
- i--
- }
- return x[i] < y[i]
-}
-
-// reduceModOrder calculates k = k mod order of the curve.
-func reduceModOrder(k []byte, is512Bit bool) {
- var X [((2 * paramB) * 8) / 64]uint64
- numWords := len(k) >> 3
- for i := 0; i < numWords; i++ {
- X[i] = binary.LittleEndian.Uint64(k[i*8 : (i+1)*8])
- }
- red512(&X, is512Bit)
- for i := 0; i < numWords; i++ {
- binary.LittleEndian.PutUint64(k[i*8:(i+1)*8], X[i])
- }
-}
-
-// red512 calculates x = x mod Order of the curve.
-func red512(x *[8]uint64, full bool) {
- // Implementation of Algs.(14.47)+(14.52) of Handbook of Applied
- // Cryptography, by A. Menezes, P. van Oorschot, and S. Vanstone.
- const (
- ell0 = uint64(0x5812631a5cf5d3ed)
- ell1 = uint64(0x14def9dea2f79cd6)
- ell160 = uint64(0x812631a5cf5d3ed0)
- ell161 = uint64(0x4def9dea2f79cd65)
- ell162 = uint64(0x0000000000000001)
- )
-
- var c0, c1, c2, c3 uint64
- r0, r1, r2, r3, r4 := x[0], x[1], x[2], x[3], uint64(0)
-
- if full {
- q0, q1, q2, q3 := x[4], x[5], x[6], x[7]
-
- for i := 0; i < 3; i++ {
- h0, s0 := bits.Mul64(q0, ell160)
- h1, s1 := bits.Mul64(q1, ell160)
- h2, s2 := bits.Mul64(q2, ell160)
- h3, s3 := bits.Mul64(q3, ell160)
-
- s1, c0 = bits.Add64(h0, s1, 0)
- s2, c1 = bits.Add64(h1, s2, c0)
- s3, c2 = bits.Add64(h2, s3, c1)
- s4, _ := bits.Add64(h3, 0, c2)
-
- h0, l0 := bits.Mul64(q0, ell161)
- h1, l1 := bits.Mul64(q1, ell161)
- h2, l2 := bits.Mul64(q2, ell161)
- h3, l3 := bits.Mul64(q3, ell161)
-
- l1, c0 = bits.Add64(h0, l1, 0)
- l2, c1 = bits.Add64(h1, l2, c0)
- l3, c2 = bits.Add64(h2, l3, c1)
- l4, _ := bits.Add64(h3, 0, c2)
-
- s1, c0 = bits.Add64(s1, l0, 0)
- s2, c1 = bits.Add64(s2, l1, c0)
- s3, c2 = bits.Add64(s3, l2, c1)
- s4, c3 = bits.Add64(s4, l3, c2)
- s5, s6 := bits.Add64(l4, 0, c3)
-
- s2, c0 = bits.Add64(s2, q0, 0)
- s3, c1 = bits.Add64(s3, q1, c0)
- s4, c2 = bits.Add64(s4, q2, c1)
- s5, c3 = bits.Add64(s5, q3, c2)
- s6, s7 := bits.Add64(s6, 0, c3)
-
- q := q0 | q1 | q2 | q3
- m := -((q | -q) >> 63) // if q=0 then m=0...0 else m=1..1
- s0 &= m
- s1 &= m
- s2 &= m
- s3 &= m
- q0, q1, q2, q3 = s4, s5, s6, s7
-
- if (i+1)%2 == 0 {
- r0, c0 = bits.Add64(r0, s0, 0)
- r1, c1 = bits.Add64(r1, s1, c0)
- r2, c2 = bits.Add64(r2, s2, c1)
- r3, c3 = bits.Add64(r3, s3, c2)
- r4, _ = bits.Add64(r4, 0, c3)
- } else {
- r0, c0 = bits.Sub64(r0, s0, 0)
- r1, c1 = bits.Sub64(r1, s1, c0)
- r2, c2 = bits.Sub64(r2, s2, c1)
- r3, c3 = bits.Sub64(r3, s3, c2)
- r4, _ = bits.Sub64(r4, 0, c3)
- }
- }
-
- m := -(r4 >> 63)
- r0, c0 = bits.Add64(r0, m&ell160, 0)
- r1, c1 = bits.Add64(r1, m&ell161, c0)
- r2, c2 = bits.Add64(r2, m&ell162, c1)
- r3, c3 = bits.Add64(r3, 0, c2)
- r4, _ = bits.Add64(r4, m&1, c3)
- x[4], x[5], x[6], x[7] = 0, 0, 0, 0
- }
-
- q0 := (r4 << 4) | (r3 >> 60)
- r3 &= (uint64(1) << 60) - 1
-
- h0, s0 := bits.Mul64(ell0, q0)
- h1, s1 := bits.Mul64(ell1, q0)
- s1, c0 = bits.Add64(h0, s1, 0)
- s2, _ := bits.Add64(h1, 0, c0)
-
- r0, c0 = bits.Sub64(r0, s0, 0)
- r1, c1 = bits.Sub64(r1, s1, c0)
- r2, c2 = bits.Sub64(r2, s2, c1)
- r3, _ = bits.Sub64(r3, 0, c2)
-
- x[0], x[1], x[2], x[3] = r0, r1, r2, r3
-}
-
-// calculateS performs s = r+k*a mod Order of the curve.
-func calculateS(s, r, k, a []byte) {
- K := [4]uint64{
- binary.LittleEndian.Uint64(k[0*8 : 1*8]),
- binary.LittleEndian.Uint64(k[1*8 : 2*8]),
- binary.LittleEndian.Uint64(k[2*8 : 3*8]),
- binary.LittleEndian.Uint64(k[3*8 : 4*8]),
- }
- S := [8]uint64{
- binary.LittleEndian.Uint64(r[0*8 : 1*8]),
- binary.LittleEndian.Uint64(r[1*8 : 2*8]),
- binary.LittleEndian.Uint64(r[2*8 : 3*8]),
- binary.LittleEndian.Uint64(r[3*8 : 4*8]),
- }
- var c3 uint64
- for i := range K {
- ai := binary.LittleEndian.Uint64(a[i*8 : (i+1)*8])
-
- h0, l0 := bits.Mul64(K[0], ai)
- h1, l1 := bits.Mul64(K[1], ai)
- h2, l2 := bits.Mul64(K[2], ai)
- h3, l3 := bits.Mul64(K[3], ai)
-
- l1, c0 := bits.Add64(h0, l1, 0)
- l2, c1 := bits.Add64(h1, l2, c0)
- l3, c2 := bits.Add64(h2, l3, c1)
- l4, _ := bits.Add64(h3, 0, c2)
-
- S[i+0], c0 = bits.Add64(S[i+0], l0, 0)
- S[i+1], c1 = bits.Add64(S[i+1], l1, c0)
- S[i+2], c2 = bits.Add64(S[i+2], l2, c1)
- S[i+3], c3 = bits.Add64(S[i+3], l3, c2)
- S[i+4], _ = bits.Add64(S[i+4], l4, c3)
- }
- red512(&S, true)
- binary.LittleEndian.PutUint64(s[0*8:1*8], S[0])
- binary.LittleEndian.PutUint64(s[1*8:2*8], S[1])
- binary.LittleEndian.PutUint64(s[2*8:3*8], S[2])
- binary.LittleEndian.PutUint64(s[3*8:4*8], S[3])
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/mult.go b/vendor/github.com/cloudflare/circl/sign/ed25519/mult.go
deleted file mode 100644
index 3216aae303..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/mult.go
+++ /dev/null
@@ -1,180 +0,0 @@
-package ed25519
-
-import (
- "crypto/subtle"
- "encoding/binary"
- "math/bits"
-
- "github.com/cloudflare/circl/internal/conv"
- "github.com/cloudflare/circl/math"
- fp "github.com/cloudflare/circl/math/fp25519"
-)
-
-var paramD = fp.Elt{
- 0xa3, 0x78, 0x59, 0x13, 0xca, 0x4d, 0xeb, 0x75,
- 0xab, 0xd8, 0x41, 0x41, 0x4d, 0x0a, 0x70, 0x00,
- 0x98, 0xe8, 0x79, 0x77, 0x79, 0x40, 0xc7, 0x8c,
- 0x73, 0xfe, 0x6f, 0x2b, 0xee, 0x6c, 0x03, 0x52,
-}
-
-// mLSBRecoding parameters.
-const (
- fxT = 257
- fxV = 2
- fxW = 3
- fx2w1 = 1 << (uint(fxW) - 1)
- numWords64 = (paramB * 8 / 64)
-)
-
-// mLSBRecoding is the odd-only modified LSB-set.
-//
-// Reference:
-//
-// "Efficient and secure algorithms for GLV-based scalar multiplication and
-// their implementation on GLV–GLS curves" by (Faz-Hernandez et al.)
-// http://doi.org/10.1007/s13389-014-0085-7.
-func mLSBRecoding(L []int8, k []byte) {
- const ee = (fxT + fxW*fxV - 1) / (fxW * fxV)
- const dd = ee * fxV
- const ll = dd * fxW
- if len(L) == (ll + 1) {
- var m [numWords64 + 1]uint64
- for i := 0; i < numWords64; i++ {
- m[i] = binary.LittleEndian.Uint64(k[8*i : 8*i+8])
- }
- condAddOrderN(&m)
- L[dd-1] = 1
- for i := 0; i < dd-1; i++ {
- kip1 := (m[(i+1)/64] >> (uint(i+1) % 64)) & 0x1
- L[i] = int8(kip1<<1) - 1
- }
- { // right-shift by d
- right := uint(dd % 64)
- left := uint(64) - right
- lim := ((numWords64+1)*64 - dd) / 64
- j := dd / 64
- for i := 0; i < lim; i++ {
- m[i] = (m[i+j] >> right) | (m[i+j+1] << left)
- }
- m[lim] = m[lim+j] >> right
- }
- for i := dd; i < ll; i++ {
- L[i] = L[i%dd] * int8(m[0]&0x1)
- div2subY(m[:], int64(L[i]>>1), numWords64)
- }
- L[ll] = int8(m[0])
- }
-}
-
-// absolute returns always a positive value.
-func absolute(x int32) int32 {
- mask := x >> 31
- return (x + mask) ^ mask
-}
-
-// condAddOrderN updates x = x+order if x is even, otherwise x remains unchanged.
-func condAddOrderN(x *[numWords64 + 1]uint64) {
- isOdd := (x[0] & 0x1) - 1
- c := uint64(0)
- for i := 0; i < numWords64; i++ {
- orderWord := binary.LittleEndian.Uint64(order[8*i : 8*i+8])
- o := isOdd & orderWord
- x0, c0 := bits.Add64(x[i], o, c)
- x[i] = x0
- c = c0
- }
- x[numWords64], _ = bits.Add64(x[numWords64], 0, c)
-}
-
-// div2subY update x = (x/2) - y.
-func div2subY(x []uint64, y int64, l int) {
- s := uint64(y >> 63)
- for i := 0; i < l-1; i++ {
- x[i] = (x[i] >> 1) | (x[i+1] << 63)
- }
- x[l-1] = (x[l-1] >> 1)
-
- b := uint64(0)
- x0, b0 := bits.Sub64(x[0], uint64(y), b)
- x[0] = x0
- b = b0
- for i := 1; i < l-1; i++ {
- x0, b0 := bits.Sub64(x[i], s, b)
- x[i] = x0
- b = b0
- }
- x[l-1], _ = bits.Sub64(x[l-1], s, b)
-}
-
-func (P *pointR1) fixedMult(scalar []byte) {
- if len(scalar) != paramB {
- panic("wrong scalar size")
- }
- const ee = (fxT + fxW*fxV - 1) / (fxW * fxV)
- const dd = ee * fxV
- const ll = dd * fxW
-
- L := make([]int8, ll+1)
- mLSBRecoding(L[:], scalar)
- S := &pointR3{}
- P.SetIdentity()
- for ii := ee - 1; ii >= 0; ii-- {
- P.double()
- for j := 0; j < fxV; j++ {
- dig := L[fxW*dd-j*ee+ii-ee]
- for i := (fxW-1)*dd - j*ee + ii - ee; i >= (2*dd - j*ee + ii - ee); i = i - dd {
- dig = 2*dig + L[i]
- }
- idx := absolute(int32(dig))
- sig := L[dd-j*ee+ii-ee]
- Tabj := &tabSign[fxV-j-1]
- for k := 0; k < fx2w1; k++ {
- S.cmov(&Tabj[k], subtle.ConstantTimeEq(int32(k), idx))
- }
- S.cneg(subtle.ConstantTimeEq(int32(sig), -1))
- P.mixAdd(S)
- }
- }
-}
-
-const (
- omegaFix = 7
- omegaVar = 5
-)
-
-// doubleMult returns P=mG+nQ.
-func (P *pointR1) doubleMult(Q *pointR1, m, n []byte) {
- nafFix := math.OmegaNAF(conv.BytesLe2BigInt(m), omegaFix)
- nafVar := math.OmegaNAF(conv.BytesLe2BigInt(n), omegaVar)
-
- if len(nafFix) > len(nafVar) {
- nafVar = append(nafVar, make([]int32, len(nafFix)-len(nafVar))...)
- } else if len(nafFix) < len(nafVar) {
- nafFix = append(nafFix, make([]int32, len(nafVar)-len(nafFix))...)
- }
-
- var TabQ [1 << (omegaVar - 2)]pointR2
- Q.oddMultiples(TabQ[:])
- P.SetIdentity()
- for i := len(nafFix) - 1; i >= 0; i-- {
- P.double()
- // Generator point
- if nafFix[i] != 0 {
- idxM := absolute(nafFix[i]) >> 1
- R := tabVerif[idxM]
- if nafFix[i] < 0 {
- R.neg()
- }
- P.mixAdd(&R)
- }
- // Variable input point
- if nafVar[i] != 0 {
- idxN := absolute(nafVar[i]) >> 1
- S := TabQ[idxN]
- if nafVar[i] < 0 {
- S.neg()
- }
- P.add(&S)
- }
- }
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/point.go b/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
deleted file mode 100644
index d1c3b146b7..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
+++ /dev/null
@@ -1,195 +0,0 @@
-package ed25519
-
-import fp "github.com/cloudflare/circl/math/fp25519"
-
-type (
- pointR1 struct{ x, y, z, ta, tb fp.Elt }
- pointR2 struct {
- pointR3
- z2 fp.Elt
- }
-)
-type pointR3 struct{ addYX, subYX, dt2 fp.Elt }
-
-func (P *pointR1) neg() {
- fp.Neg(&P.x, &P.x)
- fp.Neg(&P.ta, &P.ta)
-}
-
-func (P *pointR1) SetIdentity() {
- P.x = fp.Elt{}
- fp.SetOne(&P.y)
- fp.SetOne(&P.z)
- P.ta = fp.Elt{}
- P.tb = fp.Elt{}
-}
-
-func (P *pointR1) toAffine() {
- fp.Inv(&P.z, &P.z)
- fp.Mul(&P.x, &P.x, &P.z)
- fp.Mul(&P.y, &P.y, &P.z)
- fp.Modp(&P.x)
- fp.Modp(&P.y)
- fp.SetOne(&P.z)
- P.ta = P.x
- P.tb = P.y
-}
-
-func (P *pointR1) ToBytes(k []byte) error {
- P.toAffine()
- var x [fp.Size]byte
- err := fp.ToBytes(k[:fp.Size], &P.y)
- if err != nil {
- return err
- }
- err = fp.ToBytes(x[:], &P.x)
- if err != nil {
- return err
- }
- b := x[0] & 1
- k[paramB-1] = k[paramB-1] | (b << 7)
- return nil
-}
-
-func (P *pointR1) FromBytes(k []byte) bool {
- if len(k) != paramB {
- panic("wrong size")
- }
- signX := k[paramB-1] >> 7
- copy(P.y[:], k[:fp.Size])
- P.y[fp.Size-1] &= 0x7F
- p := fp.P()
- if !isLessThan(P.y[:], p[:]) {
- return false
- }
-
- one, u, v := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
- fp.SetOne(one)
- fp.Sqr(u, &P.y) // u = y^2
- fp.Mul(v, u, ¶mD) // v = dy^2
- fp.Sub(u, u, one) // u = y^2-1
- fp.Add(v, v, one) // v = dy^2+1
- isQR := fp.InvSqrt(&P.x, u, v) // x = sqrt(u/v)
- if !isQR {
- return false
- }
- fp.Modp(&P.x) // x = x mod p
- if fp.IsZero(&P.x) && signX == 1 {
- return false
- }
- if signX != (P.x[0] & 1) {
- fp.Neg(&P.x, &P.x)
- }
- P.ta = P.x
- P.tb = P.y
- fp.SetOne(&P.z)
- return true
-}
-
-// double calculates 2P for curves with A=-1.
-func (P *pointR1) double() {
- Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
- a, b, c, e, f, g, h := Px, Py, Pz, Pta, Px, Py, Ptb
- fp.Add(e, Px, Py) // x+y
- fp.Sqr(a, Px) // A = x^2
- fp.Sqr(b, Py) // B = y^2
- fp.Sqr(c, Pz) // z^2
- fp.Add(c, c, c) // C = 2*z^2
- fp.Add(h, a, b) // H = A+B
- fp.Sqr(e, e) // (x+y)^2
- fp.Sub(e, e, h) // E = (x+y)^2-A-B
- fp.Sub(g, b, a) // G = B-A
- fp.Sub(f, c, g) // F = C-G
- fp.Mul(Pz, f, g) // Z = F * G
- fp.Mul(Px, e, f) // X = E * F
- fp.Mul(Py, g, h) // Y = G * H, T = E * H
-}
-
-func (P *pointR1) mixAdd(Q *pointR3) {
- fp.Add(&P.z, &P.z, &P.z) // D = 2*z1
- P.coreAddition(Q)
-}
-
-func (P *pointR1) add(Q *pointR2) {
- fp.Mul(&P.z, &P.z, &Q.z2) // D = 2*z1*z2
- P.coreAddition(&Q.pointR3)
-}
-
-// coreAddition calculates P=P+Q for curves with A=-1.
-func (P *pointR1) coreAddition(Q *pointR3) {
- Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
- addYX2, subYX2, dt2 := &Q.addYX, &Q.subYX, &Q.dt2
- a, b, c, d, e, f, g, h := Px, Py, &fp.Elt{}, Pz, Pta, Px, Py, Ptb
- fp.Mul(c, Pta, Ptb) // t1 = ta*tb
- fp.Sub(h, Py, Px) // y1-x1
- fp.Add(b, Py, Px) // y1+x1
- fp.Mul(a, h, subYX2) // A = (y1-x1)*(y2-x2)
- fp.Mul(b, b, addYX2) // B = (y1+x1)*(y2+x2)
- fp.Mul(c, c, dt2) // C = 2*D*t1*t2
- fp.Sub(e, b, a) // E = B-A
- fp.Add(h, b, a) // H = B+A
- fp.Sub(f, d, c) // F = D-C
- fp.Add(g, d, c) // G = D+C
- fp.Mul(Pz, f, g) // Z = F * G
- fp.Mul(Px, e, f) // X = E * F
- fp.Mul(Py, g, h) // Y = G * H, T = E * H
-}
-
-func (P *pointR1) oddMultiples(T []pointR2) {
- var R pointR2
- n := len(T)
- T[0].fromR1(P)
- _2P := *P
- _2P.double()
- R.fromR1(&_2P)
- for i := 1; i < n; i++ {
- P.add(&R)
- T[i].fromR1(P)
- }
-}
-
-func (P *pointR1) isEqual(Q *pointR1) bool {
- l, r := &fp.Elt{}, &fp.Elt{}
- fp.Mul(l, &P.x, &Q.z)
- fp.Mul(r, &Q.x, &P.z)
- fp.Sub(l, l, r)
- b := fp.IsZero(l)
- fp.Mul(l, &P.y, &Q.z)
- fp.Mul(r, &Q.y, &P.z)
- fp.Sub(l, l, r)
- b = b && fp.IsZero(l)
- fp.Mul(l, &P.ta, &P.tb)
- fp.Mul(l, l, &Q.z)
- fp.Mul(r, &Q.ta, &Q.tb)
- fp.Mul(r, r, &P.z)
- fp.Sub(l, l, r)
- b = b && fp.IsZero(l)
- return b && !fp.IsZero(&P.z) && !fp.IsZero(&Q.z)
-}
-
-func (P *pointR3) neg() {
- P.addYX, P.subYX = P.subYX, P.addYX
- fp.Neg(&P.dt2, &P.dt2)
-}
-
-func (P *pointR2) fromR1(Q *pointR1) {
- fp.Add(&P.addYX, &Q.y, &Q.x)
- fp.Sub(&P.subYX, &Q.y, &Q.x)
- fp.Mul(&P.dt2, &Q.ta, &Q.tb)
- fp.Mul(&P.dt2, &P.dt2, ¶mD)
- fp.Add(&P.dt2, &P.dt2, &P.dt2)
- fp.Add(&P.z2, &Q.z, &Q.z)
-}
-
-func (P *pointR3) cneg(b int) {
- t := &fp.Elt{}
- fp.Cswap(&P.addYX, &P.subYX, uint(b))
- fp.Neg(t, &P.dt2)
- fp.Cmov(&P.dt2, t, uint(b))
-}
-
-func (P *pointR3) cmov(Q *pointR3, b int) {
- fp.Cmov(&P.addYX, &Q.addYX, uint(b))
- fp.Cmov(&P.subYX, &Q.subYX, uint(b))
- fp.Cmov(&P.dt2, &Q.dt2, uint(b))
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go b/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go
deleted file mode 100644
index c3505b67ac..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go
+++ /dev/null
@@ -1,9 +0,0 @@
-//go:build go1.13
-// +build go1.13
-
-package ed25519
-
-import cryptoEd25519 "crypto/ed25519"
-
-// PublicKey is the type of Ed25519 public keys.
-type PublicKey cryptoEd25519.PublicKey
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go b/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go
deleted file mode 100644
index d57d86eff0..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go
+++ /dev/null
@@ -1,7 +0,0 @@
-//go:build !go1.13
-// +build !go1.13
-
-package ed25519
-
-// PublicKey is the type of Ed25519 public keys.
-type PublicKey []byte
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/signapi.go b/vendor/github.com/cloudflare/circl/sign/ed25519/signapi.go
deleted file mode 100644
index e4520f5203..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/signapi.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package ed25519
-
-import (
- "crypto/rand"
- "encoding/asn1"
-
- "github.com/cloudflare/circl/sign"
-)
-
-var sch sign.Scheme = &scheme{}
-
-// Scheme returns a signature interface.
-func Scheme() sign.Scheme { return sch }
-
-type scheme struct{}
-
-func (*scheme) Name() string { return "Ed25519" }
-func (*scheme) PublicKeySize() int { return PublicKeySize }
-func (*scheme) PrivateKeySize() int { return PrivateKeySize }
-func (*scheme) SignatureSize() int { return SignatureSize }
-func (*scheme) SeedSize() int { return SeedSize }
-func (*scheme) TLSIdentifier() uint { return 0x0807 }
-func (*scheme) SupportsContext() bool { return false }
-func (*scheme) Oid() asn1.ObjectIdentifier {
- return asn1.ObjectIdentifier{1, 3, 101, 112}
-}
-
-func (*scheme) GenerateKey() (sign.PublicKey, sign.PrivateKey, error) {
- return GenerateKey(rand.Reader)
-}
-
-func (*scheme) Sign(
- sk sign.PrivateKey,
- message []byte,
- opts *sign.SignatureOpts,
-) []byte {
- priv, ok := sk.(PrivateKey)
- if !ok {
- panic(sign.ErrTypeMismatch)
- }
- if opts != nil && opts.Context != "" {
- panic(sign.ErrContextNotSupported)
- }
- return Sign(priv, message)
-}
-
-func (*scheme) Verify(
- pk sign.PublicKey,
- message, signature []byte,
- opts *sign.SignatureOpts,
-) bool {
- pub, ok := pk.(PublicKey)
- if !ok {
- panic(sign.ErrTypeMismatch)
- }
- if opts != nil {
- if opts.Context != "" {
- panic(sign.ErrContextNotSupported)
- }
- }
- return Verify(pub, message, signature)
-}
-
-func (*scheme) DeriveKey(seed []byte) (sign.PublicKey, sign.PrivateKey) {
- privateKey := NewKeyFromSeed(seed)
- publicKey := make(PublicKey, PublicKeySize)
- copy(publicKey, privateKey[SeedSize:])
- return publicKey, privateKey
-}
-
-func (*scheme) UnmarshalBinaryPublicKey(buf []byte) (sign.PublicKey, error) {
- if len(buf) < PublicKeySize {
- return nil, sign.ErrPubKeySize
- }
- pub := make(PublicKey, PublicKeySize)
- copy(pub, buf[:PublicKeySize])
- return pub, nil
-}
-
-func (*scheme) UnmarshalBinaryPrivateKey(buf []byte) (sign.PrivateKey, error) {
- if len(buf) < PrivateKeySize {
- return nil, sign.ErrPrivKeySize
- }
- priv := make(PrivateKey, PrivateKeySize)
- copy(priv, buf[:PrivateKeySize])
- return priv, nil
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/tables.go b/vendor/github.com/cloudflare/circl/sign/ed25519/tables.go
deleted file mode 100644
index 8763b426fc..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/tables.go
+++ /dev/null
@@ -1,213 +0,0 @@
-package ed25519
-
-import fp "github.com/cloudflare/circl/math/fp25519"
-
-var tabSign = [fxV][fx2w1]pointR3{
- {
- pointR3{
- addYX: fp.Elt{0x85, 0x3b, 0x8c, 0xf5, 0xc6, 0x93, 0xbc, 0x2f, 0x19, 0x0e, 0x8c, 0xfb, 0xc6, 0x2d, 0x93, 0xcf, 0xc2, 0x42, 0x3d, 0x64, 0x98, 0x48, 0x0b, 0x27, 0x65, 0xba, 0xd4, 0x33, 0x3a, 0x9d, 0xcf, 0x07},
- subYX: fp.Elt{0x3e, 0x91, 0x40, 0xd7, 0x05, 0x39, 0x10, 0x9d, 0xb3, 0xbe, 0x40, 0xd1, 0x05, 0x9f, 0x39, 0xfd, 0x09, 0x8a, 0x8f, 0x68, 0x34, 0x84, 0xc1, 0xa5, 0x67, 0x12, 0xf8, 0x98, 0x92, 0x2f, 0xfd, 0x44},
- dt2: fp.Elt{0x68, 0xaa, 0x7a, 0x87, 0x05, 0x12, 0xc9, 0xab, 0x9e, 0xc4, 0xaa, 0xcc, 0x23, 0xe8, 0xd9, 0x26, 0x8c, 0x59, 0x43, 0xdd, 0xcb, 0x7d, 0x1b, 0x5a, 0xa8, 0x65, 0x0c, 0x9f, 0x68, 0x7b, 0x11, 0x6f},
- },
- {
- addYX: fp.Elt{0x7c, 0xb0, 0x9e, 0xe6, 0xc5, 0xbf, 0xfa, 0x13, 0x8e, 0x0d, 0x22, 0xde, 0xc8, 0xd1, 0xce, 0x52, 0x02, 0xd5, 0x62, 0x31, 0x71, 0x0e, 0x8e, 0x9d, 0xb0, 0xd6, 0x00, 0xa5, 0x5a, 0x0e, 0xce, 0x72},
- subYX: fp.Elt{0x1a, 0x8e, 0x5c, 0xdc, 0xa4, 0xb3, 0x6c, 0x51, 0x18, 0xa0, 0x09, 0x80, 0x9a, 0x46, 0x33, 0xd5, 0xe0, 0x3c, 0x4d, 0x3b, 0xfc, 0x49, 0xa2, 0x43, 0x29, 0xe1, 0x29, 0xa9, 0x93, 0xea, 0x7c, 0x35},
- dt2: fp.Elt{0x08, 0x46, 0x6f, 0x68, 0x7f, 0x0b, 0x7c, 0x9e, 0xad, 0xba, 0x07, 0x61, 0x74, 0x83, 0x2f, 0xfc, 0x26, 0xd6, 0x09, 0xb9, 0x00, 0x34, 0x36, 0x4f, 0x01, 0xf3, 0x48, 0xdb, 0x43, 0xba, 0x04, 0x44},
- },
- {
- addYX: fp.Elt{0x4c, 0xda, 0x0d, 0x13, 0x66, 0xfd, 0x82, 0x84, 0x9f, 0x75, 0x5b, 0xa2, 0x17, 0xfe, 0x34, 0xbf, 0x1f, 0xcb, 0xba, 0x90, 0x55, 0x80, 0x83, 0xfd, 0x63, 0xb9, 0x18, 0xf8, 0x5b, 0x5d, 0x94, 0x1e},
- subYX: fp.Elt{0xb9, 0xdb, 0x6c, 0x04, 0x88, 0x22, 0xd8, 0x79, 0x83, 0x2f, 0x8d, 0x65, 0x6b, 0xd2, 0xab, 0x1b, 0xdd, 0x65, 0xe5, 0x93, 0x63, 0xf8, 0xa2, 0xd8, 0x3c, 0xf1, 0x4b, 0xc5, 0x99, 0xd1, 0xf2, 0x12},
- dt2: fp.Elt{0x05, 0x4c, 0xb8, 0x3b, 0xfe, 0xf5, 0x9f, 0x2e, 0xd1, 0xb2, 0xb8, 0xff, 0xfe, 0x6d, 0xd9, 0x37, 0xe0, 0xae, 0xb4, 0x5a, 0x51, 0x80, 0x7e, 0x9b, 0x1d, 0xd1, 0x8d, 0x8c, 0x56, 0xb1, 0x84, 0x35},
- },
- {
- addYX: fp.Elt{0x39, 0x71,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0x66, 0x1f, 0x6b, 0xf9, 0x87, 0xbc, 0x4f, 0x37, 0x3e, 0x3c},
- dt2: fp.Elt{0xd2, 0x2f, 0x06, 0x6b, 0x08, 0x07, 0x69, 0x77, 0xc0, 0x94, 0xcc, 0xae, 0x43, 0x00, 0x59, 0x6e, 0xa3, 0x63, 0xa8, 0xdd, 0xfa, 0x24, 0x18, 0xd0, 0x35, 0xc7, 0x78, 0xf7, 0x0d, 0xd4, 0x5a, 0x1e},
- },
- {
- addYX: fp.Elt{0x45, 0xc1, 0x17, 0x51, 0xf8, 0xed, 0x7e, 0xc7, 0xa9, 0x1a, 0x11, 0x6e, 0x2d, 0xef, 0x0b, 0xd5, 0x3f, 0x98, 0xb0, 0xa3, 0x9d, 0x65, 0xf1, 0xcd, 0x53, 0x4a, 0x8a, 0x18, 0x70, 0x0a, 0x7f, 0x23},
- subYX: fp.Elt{0xdd, 0xef, 0xbe, 0x3a, 0x31, 0xe0, 0xbc, 0xbe, 0x6d, 0x5d, 0x79, 0x87, 0xd6, 0xbe, 0x68, 0xe3, 0x59, 0x76, 0x8c, 0x86, 0x0e, 0x7a, 0x92, 0x13, 0x14, 0x8f, 0x67, 0xb3, 0xcb, 0x1a, 0x76, 0x76},
- dt2: fp.Elt{0x56, 0x7a, 0x1c, 0x9d, 0xca, 0x96, 0xf9, 0xf9, 0x03, 0x21, 0xd4, 0xe8, 0xb3, 0xd5, 0xe9, 0x52, 0xc8, 0x54, 0x1e, 0x1b, 0x13, 0xb6, 0xfd, 0x47, 0x7d, 0x02, 0x32, 0x33, 0x27, 0xe2, 0x1f, 0x19},
- },
- },
-}
-
-var tabVerif = [1 << (omegaFix - 2)]pointR3{
- { /* 1P */
- addYX: fp.Elt{0x85, 0x3b, 0x8c, 0xf5, 0xc6, 0x93, 0xbc, 0x2f, 0x19, 0x0e, 0x8c, 0xfb, 0xc6, 0x2d, 0x93, 0xcf, 0xc2, 0x42, 0x3d, 0x64, 0x98, 0x48, 0x0b, 0x27, 0x65, 0xba, 0xd4, 0x33, 0x3a, 0x9d, 0xcf, 0x07},
- subYX: fp.Elt{0x3e, 0x91, 0x40, 0xd7, 0x05, 0x39, 0x10, 0x9d, 0xb3, 0xbe, 0x40, 0xd1, 0x05, 0x9f, 0x39, 0xfd, 0x09, 0x8a, 0x8f, 0x68, 0x34, 0x84, 0xc1, 0xa5, 0x67, 0x12, 0xf8, 0x98, 0x92, 0x2f, 0xfd, 0x44},
- dt2: fp.Elt{0x68, 0xaa, 0x7a, 0x87, 0x05, 0x12, 0xc9, 0xab, 0x9e, 0xc4, 0xaa, 0xcc, 0x23, 0xe8, 0xd9, 0x26, 0x8c, 0x59, 0x43, 0xdd, 0xcb, 0x7d, 0x1b, 0x5a, 0xa8, 0x65, 0x0c, 0x9f, 0x68, 0x7b, 0x11, 0x6f},
- },
- { /* 3P */
- addYX: fp.Elt{0x30, 0x97, 0xee, 0x4c, 0xa8, 0xb0, 0x25, 0xaf, 0x8a, 0x4b, 0x86, 0xe8, 0x30, 0x84, 0x5a, 0x02, 0x32, 0x67, 0x01, 0x9f, 0x02, 0x50, 0x1b, 0xc1, 0xf4, 0xf8, 0x80, 0x9a, 0x1b, 0x4e, 0x16, 0x7a},
- subYX: fp.Elt{0x65, 0xd2, 0xfc, 0xa4, 0xe8, 0x1f, 0x61, 0x56, 0x7d, 0xba, 0xc1, 0xe5, 0xfd, 0x53, 0xd3, 0x3b, 0xbd, 0xd6, 0x4b, 0x21, 0x1a, 0xf3, 0x31, 0x81, 0x62, 0xda, 0x5b, 0x55, 0x87, 0x15, 0xb9, 0x2a},
- dt2: fp.Elt{0x89, 0xd8, 0xd0, 0x0d, 0x3f, 0x93, 0xae, 0x14, 0x62, 0xda, 0x35, 0x1c, 0x22, 0x23, 0x94, 0x58, 0x4c, 0xdb, 0xf2, 0x8c, 0x45, 0xe5, 0x70, 0xd1, 0xc6, 0xb4, 0xb9, 0x12, 0xaf, 0x26, 0x28, 0x5a},
- },
- { /* 5P */
- addYX: fp.Elt{0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 0x3e, 0x05, 0x47, 0x5f, 0x03, 0xb3, 0xf3, 0xad, 0x77, 0x58, 0xba, 0x41, 0x9c, 0x52, 0xa7, 0x90, 0x0f, 0x6a, 0x1c, 0xbb, 0x9f, 0x7a},
- },
- { /* 9P */
- addYX: fp.Elt{0x2f, 0x63, 0xa8, 0xa6, 0x8a, 0x67, 0x2e, 0x9b, 0xc5, 0x46, 0xbc, 0x51, 0x6f, 0x9e, 0x50, 0xa6, 0xb5, 0xf5, 0x86, 0xc6, 0xc9, 0x33, 0xb2, 0xce, 0x59, 0x7f, 0xdd, 0x8a, 0x33, 0xed, 0xb9, 0x34},
- subYX: fp.Elt{0x64, 0x80, 0x9d, 0x03, 0x7e, 0x21, 0x6e, 0xf3, 0x9b, 0x41, 0x20, 0xf5, 0xb6, 0x81, 0xa0, 0x98, 0x44, 0xb0, 0x5e, 0xe7, 0x08, 0xc6, 0xcb, 0x96, 0x8f, 0x9c, 0xdc, 0xfa, 0x51, 0x5a, 0xc0, 0x49},
- dt2: fp.Elt{0x1b, 0xaf, 0x45, 0x90, 0xbf, 0xe8, 0xb4, 0x06, 0x2f, 0xd2, 0x19, 0xa7, 0xe8, 0x83, 0xff, 0xe2, 0x16, 0xcf, 0xd4, 0x93, 0x29, 0xfc, 0xf6, 0xaa, 0x06, 0x8b, 0x00, 0x1b, 0x02, 0x72, 0xc1, 0x73},
- },
- { /* 11P */
- addYX: fp.Elt{0xde, 0x2a, 0x80, 0x8a, 0x84, 0x00, 0xbf, 0x2f, 0x27, 0x2e, 0x30, 0x02, 0xcf, 0xfe, 0xd9, 0xe5, 0x06, 0x34, 0x70, 0x17, 0x71, 0x84, 0x3e, 0x11, 0xaf, 0x8f, 0x6d, 0x54, 0xe2, 0xaa, 0x75, 0x42},
- subYX: fp.Elt{0x48, 0x43, 0x86, 0x49, 0x02, 0x5b, 0x5f, 0x31, 0x81, 0x83, 0x08, 0x77, 0x69, 0xb3, 0xd6, 0x3e, 0x95, 0xeb, 0x8d, 0x6a, 0x55, 0x75, 0xa0, 0xa3, 0x7f, 0xc7, 0xd5, 0x29, 0x80, 0x59, 0xab, 0x18},
- dt2: fp.Elt{0xe9, 0x89, 0x60, 0xfd, 0xc5, 0x2c, 0x2b, 0xd8, 0xa4, 0xe4, 0x82, 0x32, 0xa1, 0xb4, 0x1e, 0x03, 0x22, 0x86, 0x1a, 0xb5, 0x99, 0x11, 0x31, 0x44, 0x48, 0xf9, 0x3d, 0xb5, 0x22, 0x55, 0xc6, 0x3d},
- },
- { /* 13P */
- addYX: fp.Elt{0x6d, 0x7f, 0x00, 0xa2, 0x22, 0xc2, 0x70, 0xbf, 0xdb, 0xde, 0xbc, 0xb5, 0x9a, 0xb3, 0x84, 0xbf, 0x07, 0xba, 0x07, 0xfb, 0x12, 0x0e, 0x7a, 0x53, 0x41, 0xf2, 0x46, 0xc3, 0xee, 0xd7, 0x4f, 0x23},
- subYX: fp.Elt{0x93, 0xbf, 0x7f, 0x32, 0x3b, 0x01, 0x6f, 0x50, 0x6b, 0x6f, 0x77, 0x9b, 0xc9, 0xeb, 0xfc, 0xae, 0x68, 0x59, 0xad, 0xaa, 0x32, 0xb2, 0x12, 0x9d, 0xa7, 0x24, 0x60, 0x17, 0x2d, 0x88, 0x67, 0x02},
- dt2: fp.Elt{0x78, 0xa3, 0x2e, 0x73, 0x19, 0xa1, 0x60, 0x53, 0x71, 0xd4, 0x8d, 0xdf, 0xb1, 0xe6, 0x37, 0x24, 0x33, 0xe5, 0xa7, 0x91, 0xf8, 0x37, 0xef, 0xa2, 0x63, 0x78, 0x09, 0xaa, 0xfd, 0xa6, 0x7b, 0x49},
- },
- { /* 15P */
- addYX: fp.Elt{0xa0, 0xea, 0xcf, 0x13, 0x03, 0xcc, 0xce, 0x24, 0x6d, 0x24, 0x9c, 0x18, 0x8d, 0xc2, 0x48, 0x86, 0xd0, 0xd4, 0xf2, 0xc1, 0xfa, 0xbd, 0xbd, 0x2d, 0x2b, 0xe7, 0x2d, 0xf1, 0x17, 0x29, 0xe2, 0x61},
- subYX: fp.Elt{0x0b, 0xcf, 0x8c, 0x46, 0x86, 0xcd, 0x0b, 0x04, 0xd6, 0x10, 0x99, 0x2a, 0xa4, 0x9b, 0x82, 0xd3, 0x92, 0x51, 0xb2, 0x07, 0x08, 0x30, 0x08, 0x75, 0xbf, 0x5e, 0xd0, 0x18, 0x42, 0xcd, 0xb5, 0x43},
- dt2: fp.Elt{0x16, 0xb5, 0xd0, 0x9b, 0x2f, 0x76, 0x9a, 0x5d, 0xee, 0xde, 0x3f, 0x37, 0x4e, 0xaf, 0x38, 0xeb, 0x70, 0x42, 0xd6, 0x93, 0x7d, 0x5a, 0x2e, 0x03, 0x42, 0xd8, 0xe4, 0x0a, 0x21, 0x61, 0x1d, 0x51},
- },
- { /* 17P */
- addYX: fp.Elt{0x81, 0x9d, 0x0e, 0x95, 0xef, 0x76, 0xc6, 0x92, 0x4f, 0x04, 0xd7, 0xc0, 0xcd, 0x20, 0x46, 0xa5, 0x48, 0x12, 0x8f, 0x6f, 0x64, 0x36, 0x9b, 0xaa, 0xe3, 0x55, 0xb8, 0xdd, 0x24, 0x59, 0x32, 0x6d},
- subYX: fp.Elt{0x87, 0xde, 0x20, 0x44, 0x48, 0x86, 0x13, 0x08, 0xb4, 0xed, 0x92, 0xb5, 0x16, 0xf0, 0x1c, 0x8a, 0x25, 0x2d, 0x94, 0x29, 0x27, 0x4e, 0xfa, 0x39, 0x10, 0x28, 0x48, 0xe2, 0x6f, 0xfe, 0xa7, 0x71},
- dt2: fp.Elt{0x54, 0xc8, 0xc8, 0xa5, 0xb8, 0x82, 0x71, 0x6c, 0x03, 0x2a, 0x5f, 0xfe, 0x79, 0x14, 0xfd, 0x33, 0x0c, 0x8d, 0x77, 0x83, 0x18, 0x59, 0xcf, 0x72, 0xa9, 0xea, 0x9e, 0x55, 0xb6, 0xc4, 0x46, 0x47},
- },
- { /* 19P */
- addYX: fp.Elt{0x2b, 0x9a, 0xc6, 0x6d, 0x3c, 0x7b, 0x77, 0xd3, 0x17, 0xf6, 0x89, 0x6f, 0x27, 0xb2, 0xfa, 0xde, 0xb5, 0x16, 0x3a, 0xb5, 0xf7, 0x1c, 0x65, 0x45, 0xb7, 0x9f, 0xfe, 0x34, 0xde, 0x51, 0x9a, 0x5c},
- subYX: fp.Elt{0x47, 0x11, 0x74, 0x64, 0xc8, 0x46, 0x85, 0x34, 0x49, 0xc8, 0xfc, 0x0e, 0xdd, 0xae, 0x35, 0x7d, 0x32, 0xa3, 0x72, 0x06, 0x76, 0x9a, 0x93, 0xff, 0xd6, 0xe6, 0xb5, 0x7d, 0x49, 0x63, 0x96, 0x21},
- dt2: fp.Elt{0x67, 0x0e, 0xf1, 0x79, 0xcf, 0xf1, 0x10, 0xf5, 0x5b, 0x51, 0x58, 0xe6, 0xa1, 0xda, 0xdd, 0xff, 0x77, 0x22, 0x14, 0x10, 0x17, 0xa7, 0xc3, 0x09, 0xbb, 0x23, 0x82, 0x60, 0x3c, 0x50, 0x04, 0x48},
- },
- { /* 21P */
- addYX: fp.Elt{0xc7, 0x7f, 0xa3, 0x2c, 0xd0, 0x9e, 0x24, 0xc4, 0xab, 0xac, 0x15, 0xa6, 0xe3, 0xa0, 0x59, 0xa0, 0x23, 0x0e, 0x6e, 0xc9, 0xd7, 0x6e, 0xa9, 0x88, 0x6d, 0x69, 0x50, 0x16, 0xa5, 0x98, 0x33, 0x55},
- subYX: fp.Elt{0x75, 0xd1, 0x36, 0x3a, 0xd2, 0x21, 0x68, 0x3b, 0x32, 0x9e, 0x9b, 0xe9, 0xa7, 0x0a, 0xb4, 0xbb, 0x47, 0x8a, 0x83, 0x20, 0xe4, 0x5c, 0x9e, 0x5d, 0x5e, 0x4c, 0xde, 0x58, 0x88, 0x09, 0x1e, 0x77},
- dt2: fp.Elt{0xdf, 0x1e, 0x45, 0x78, 0xd2, 0xf5, 0x12, 0x9a, 0xcb, 0x9c, 0x89, 0x85, 0x79, 0x5d, 0xda, 0x3a, 0x08, 0x95, 0xa5, 0x9f, 0x2d, 0x4a, 0x7f, 0x47, 0x11, 0xa6, 0xf5, 0x8f, 0xd6, 0xd1, 0x5e, 0x5a},
- },
- { /* 23P */
- addYX: fp.Elt{0x83, 0x0e, 0x15, 0xfe, 0x2a, 0x12, 0x95, 0x11, 0xd8, 0x35, 0x4b, 0x7e, 0x25, 0x9a, 0x20, 0xcf, 0x20, 0x1e, 0x71, 0x1e, 0x29, 0xf8, 0x87, 0x73, 0xf0, 0x92, 0xbf, 0xd8, 0x97, 0xb8, 0xac, 0x44},
- subYX: fp.Elt{0x59, 0x73, 0x52, 0x58, 0xc5, 0xe0, 0xe5, 0xba, 0x7e, 0x9d, 0xdb, 0xca, 0x19, 0x5c, 0x2e, 0x39, 0xe9, 0xab, 0x1c, 0xda, 0x1e, 0x3c, 0x65, 0x28, 0x44, 0xdc, 0xef, 0x5f, 0x13, 0x60, 0x9b, 0x01},
- dt2: fp.Elt{0x83, 0x4b, 0x13, 0x5e, 0x14, 0x68, 0x60, 0x1e, 0x16, 0x4c, 0x30, 0x24, 0x4f, 0xe6, 0xf5, 0xc4, 0xd7, 0x3e, 0x1a, 0xfc, 0xa8, 0x88, 0x6e, 0x50, 0x92, 0x2f, 0xad, 0xe6, 0xfd, 0x49, 0x0c, 0x15},
- },
- { /* 25P */
- addYX: fp.Elt{0x38, 0x11, 0x47, 0x09, 0x95, 0xf2, 0x7b, 0x8e, 0x51, 0xa6, 0x75, 0x4f, 0x39, 0xef, 0x6f, 0x5d, 0xad, 0x08, 0xa7, 0x25, 0xc4, 0x79, 0xaf, 0x10, 0x22, 0x99, 0xb9, 0x5b, 0x07, 0x5a, 0x2b, 0x6b},
- subYX: fp.Elt{0x68, 0xa8, 0xdc, 0x9c, 0x3c, 0x86, 0x49, 0xb8, 0xd0, 0x4a, 0x71, 0xb8, 0xdb, 0x44, 0x3f, 0xc8, 0x8d, 0x16, 0x36, 0x0c, 0x56, 0xe3, 0x3e, 0xfe, 0xc1, 0xfb, 0x05, 0x1e, 0x79, 0xd7, 0xa6, 0x78},
- dt2: fp.Elt{0x76, 0xb9, 0xa0, 0x47, 0x4b, 0x70, 0xbf, 0x58, 0xd5, 0x48, 0x17, 0x74, 0x55, 0xb3, 0x01, 0xa6, 0x90, 0xf5, 0x42, 0xd5, 0xb1, 0x1f, 0x2b, 0xaa, 0x00, 0x5d, 0xd5, 0x4a, 0xfc, 0x7f, 0x5c, 0x72},
- },
- { /* 27P */
- addYX: fp.Elt{0xb2, 0x99, 0xcf, 0xd1, 0x15, 0x67, 0x42, 0xe4, 0x34, 0x0d, 0xa2, 0x02, 0x11, 0xd5, 0x52, 0x73, 0x9f, 0x10, 0x12, 0x8b, 0x7b, 0x15, 0xd1, 0x23, 0xa3, 0xf3, 0xb1, 0x7c, 0x27, 0xc9, 0x4c, 0x79},
- subYX: fp.Elt{0xc0, 0x98, 0xd0, 0x1c, 0xf7, 0x2b, 0x80, 0x91, 0x66, 0x63, 0x5e, 0xed, 0xa4, 0x6c, 0x41, 0xfe, 0x4c, 0x99, 0x02, 0x49, 0x71, 0x5d, 0x58, 0xdf, 0xe7, 0xfa, 0x55, 0xf8, 0x25, 0x46, 0xd5, 0x4c},
- dt2: fp.Elt{0x53, 0x50, 0xac, 0xc2, 0x26, 0xc4, 0xf6, 0x4a, 0x58, 0x72, 0xf6, 0x32, 0xad, 0xed, 0x9a, 0xbc, 0x21, 0x10, 0x31, 0x0a, 0xf1, 0x32, 0xd0, 0x2a, 0x85, 0x8e, 0xcc, 0x6f, 0x7b, 0x35, 0x08, 0x70},
- },
- { /* 29P */
- addYX: fp.Elt{0x01, 0x3f, 0x77, 0x38, 0x27, 0x67, 0x88, 0x0b, 0xfb, 0xcc, 0xfb, 0x95, 0xfa, 0xc8, 0xcc, 0xb8, 0xb6, 0x29, 0xad, 0xb9, 0xa3, 0xd5, 0x2d, 0x8d, 0x6a, 0x0f, 0xad, 0x51, 0x98, 0x7e, 0xef, 0x06},
- subYX: fp.Elt{0x34, 0x4a, 0x58, 0x82, 0xbb, 0x9f, 0x1b, 0xd0, 0x2b, 0x79, 0xb4, 0xd2, 0x63, 0x64, 0xab, 0x47, 0x02, 0x62, 0x53, 0x48, 0x9c, 0x63, 0x31, 0xb6, 0x28, 0xd4, 0xd6, 0x69, 0x36, 0x2a, 0xa9, 0x13},
- dt2: fp.Elt{0xe5, 0x7d, 0x57, 0xc0, 0x1c, 0x77, 0x93, 0xca, 0x5c, 0xdc, 0x35, 0x50, 0x1e, 0xe4, 0x40, 0x75, 0x71, 0xe0, 0x02, 0xd8, 0x01, 0x0f, 0x68, 0x24, 0x6a, 0xf8, 0x2a, 0x8a, 0xdf, 0x6d, 0x29, 0x3c},
- },
- { /* 31P */
- addYX: fp.Elt{0x13, 0xa7, 0x14, 0xd9, 0xf9, 0x15, 0xad, 0xae, 0x12, 0xf9, 0x8f, 0x8c, 0xf9, 0x7b, 0x2f, 0xa9, 0x30, 0xd7, 0x53, 0x9f, 0x17, 0x23, 0xf8, 0xaf, 0xba, 0x77, 0x0c, 0x49, 0x93, 0xd3, 0x99, 0x7a},
- subYX: fp.Elt{0x41, 0x25, 0x1f, 0xbb, 0x2e, 0x4d, 0xeb, 0xfc, 0x1f, 0xb9, 0xad, 0x40, 0xc7, 0x10, 0x95, 0xb8, 0x05, 0xad, 0xa1, 0xd0, 0x7d, 0xa3, 0x71, 0xfc, 0x7b, 0x71, 0x47, 0x07, 0x70, 0x2c, 0x89, 0x0a},
- dt2: fp.Elt{0xe8, 0xa3, 0xbd, 0x36, 0x24, 0xed, 0x52, 0x8f, 0x94, 0x07, 0xe8, 0x57, 0x41, 0xc8, 0xa8, 0x77, 0xe0, 0x9c, 0x2f, 0x26, 0x63, 0x65, 0xa9, 0xa5, 0xd2, 0xf7, 0x02, 0x83, 0xd2, 0x62, 0x67, 0x28},
- },
- { /* 33P */
- addYX: fp.Elt{0x25, 0x5b, 0xe3, 0x3c, 0x09, 0x36, 0x78, 0x4e, 0x97, 0xaa, 0x6b, 0xb2, 0x1d, 0x18, 0xe1, 0x82, 0x3f, 0xb8, 0xc7, 0xcb, 0xd3, 0x92, 0xc1, 0x0c, 0x3a, 0x9d, 0x9d, 0x6a, 0x04, 0xda, 0xf1, 0x32},
- subYX: fp.Elt{0xbd, 0xf5, 0x2e, 0xce, 0x2b, 0x8e, 0x55, 0x7c, 0x63, 0xbc, 0x47, 0x67, 0xb4, 0x6c, 0x98, 0xe4, 0xb8, 0x89, 0xbb, 0x3b, 0x9f, 0x17, 0x4a, 0x15, 0x7a, 0x76, 0xf1, 0xd6, 0xa3, 0xf2, 0x86, 0x76},
- dt2: fp.Elt{0x6a, 0x7c, 0x59, 0x6d, 0xa6, 0x12, 0x8d, 0xaa, 0x2b, 0x85, 0xd3, 0x04, 0x03, 0x93, 0x11, 0x8f, 0x22, 0xb0, 0x09, 0xc2, 0x73, 0xdc, 0x91, 0x3f, 0xa6, 0x28, 0xad, 0xa9, 0xf8, 0x05, 0x13, 0x56},
- },
- { /* 35P */
- addYX: fp.Elt{0xd1, 0xae, 0x92, 0xec, 0x8d, 0x97, 0x0c, 0x10, 0xe5, 0x73, 0x6d, 0x4d, 0x43, 0xd5, 0x43, 0xca, 0x48, 0xba, 0x47, 0xd8, 0x22, 0x1b, 0x13, 0x83, 0x2c, 0x4d, 0x5d, 0xe3, 0x53, 0xec, 0xaa},
- subYX: fp.Elt{0xd5, 0xc0, 0xb0, 0xe7, 0x28, 0xcc, 0x22, 0x67, 0x53, 0x5c, 0x07, 0xdb, 0xbb, 0xe9, 0x9d, 0x70, 0x61, 0x0a, 0x01, 0xd7, 0xa7, 0x8d, 0xf6, 0xca, 0x6c, 0xcc, 0x57, 0x2c, 0xef, 0x1a, 0x0a, 0x03},
- dt2: fp.Elt{0xaa, 0xd2, 0x3a, 0x00, 0x73, 0xf7, 0xb1, 0x7b, 0x08, 0x66, 0x21, 0x2b, 0x80, 0x29, 0x3f, 0x0b, 0x3e, 0xd2, 0x0e, 0x52, 0x86, 0xdc, 0x21, 0x78, 0x80, 0x54, 0x06, 0x24, 0x1c, 0x9c, 0xbe, 0x20},
- },
- { /* 37P */
- addYX: fp.Elt{0xa6, 0x73, 0x96, 0x24, 0xd8, 0x87, 0x53, 0xe1, 0x93, 0xe4, 0x46, 0xf5, 0x2d, 0xbc, 0x43, 0x59, 0xb5, 0x63, 0x6f, 0xc3, 0x81, 0x9a, 0x7f, 0x1c, 0xde, 0xc1, 0x0a, 0x1f, 0x36, 0xb3, 0x0a, 0x75},
- subYX: fp.Elt{0x60, 0x5e, 0x02, 0xe2, 0x4a, 0xe4, 0xe0, 0x20, 0x38, 0xb9, 0xdc, 0xcb, 0x2f, 0x3b, 0x3b, 0xb0, 0x1c, 0x0d, 0x5a, 0xf9, 0x9c, 0x63, 0x5d, 0x10, 0x11, 0xe3, 0x67, 0x50, 0x54, 0x4c, 0x76, 0x69},
- dt2: fp.Elt{0x37, 0x10, 0xf8, 0xa2, 0x83, 0x32, 0x8a, 0x1e, 0xf1, 0xcb, 0x7f, 0xbd, 0x23, 0xda, 0x2e, 0x6f, 0x63, 0x25, 0x2e, 0xac, 0x5b, 0xd1, 0x2f, 0xb7, 0x40, 0x50, 0x07, 0xb7, 0x3f, 0x6b, 0xf9, 0x54},
- },
- { /* 39P */
- addYX: fp.Elt{0x79, 0x92, 0x66, 0x29, 0x04, 0xf2, 0xad, 0x0f, 0x4a, 0x72, 0x7d, 0x7d, 0x04, 0xa2, 0xdd, 0x3a, 0xf1, 0x60, 0x57, 0x8c, 0x82, 0x94, 0x3d, 0x6f, 0x9e, 0x53, 0xb7, 0x2b, 0xc5, 0xe9, 0x7f, 0x3d},
- subYX: fp.Elt{0xcd, 0x1e, 0xb1, 0x16, 0xc6, 0xaf, 0x7d, 0x17, 0x79, 0x64, 0x57, 0xfa, 0x9c, 0x4b, 0x76, 0x89, 0x85, 0xe7, 0xec, 0xe6, 0x10, 0xa1, 0xa8, 0xb7, 0xf0, 0xdb, 0x85, 0xbe, 0x9f, 0x83, 0xe6, 0x78},
- dt2: fp.Elt{0x6b, 0x85, 0xb8, 0x37, 0xf7, 0x2d, 0x33, 0x70, 0x8a, 0x17, 0x1a, 0x04, 0x43, 0x5d, 0xd0, 0x75, 0x22, 0x9e, 0xe5, 0xa0, 0x4a, 0xf7, 0x0f, 0x32, 0x42, 0x82, 0x08, 0x50, 0xf3, 0x68, 0xf2, 0x70},
- },
- { /* 41P */
- addYX: fp.Elt{0x47, 0x5f, 0x80, 0xb1, 0x83, 0x45, 0x86, 0x66, 0x19, 0x7c, 0xdd, 0x60, 0xd1, 0xc5, 0x35, 0xf5, 0x06, 0xb0, 0x4c, 0x1e, 0xb7, 0x4e, 0x87, 0xe9, 0xd9, 0x89, 0xd8, 0xfa, 0x5c, 0x34, 0x0d, 0x7c},
- subYX: fp.Elt{0x55, 0xf3, 0xdc, 0x70, 0x20, 0x11, 0x24, 0x23, 0x17, 0xe1, 0xfc, 0xe7, 0x7e, 0xc9, 0x0c, 0x38, 0x98, 0xb6, 0x52, 0x35, 0xed, 0xde, 0x1d, 0xb3, 0xb9, 0xc4, 0xb8, 0x39, 0xc0, 0x56, 0x4e, 0x40},
- dt2: fp.Elt{0x8a, 0x33, 0x78, 0x8c, 0x4b, 0x1f, 0x1f, 0x59, 0xe1, 0xb5, 0xe0, 0x67, 0xb1, 0x6a, 0x36, 0xa0, 0x44, 0x3d, 0x5f, 0xb4, 0x52, 0x41, 0xbc, 0x5c, 0x77, 0xc7, 0xae, 0x2a, 0x76, 0x54, 0xd7, 0x20},
- },
- { /* 43P */
- addYX: fp.Elt{0x58, 0xb7, 0x3b, 0xc7, 0x6f, 0xc3, 0x8f, 0x5e, 0x9a, 0xbb, 0x3c, 0x36, 0xa5, 0x43, 0xe5, 0xac, 0x22, 0xc9, 0x3b, 0x90, 0x7d, 0x4a, 0x93, 0xa9, 0x62, 0xec, 0xce, 0xf3, 0x46, 0x1e, 0x8f, 0x2b},
- subYX: fp.Elt{0x43, 0xf5, 0xb9, 0x35, 0xb1, 0xfe, 0x74, 0x9d, 0x6c, 0x95, 0x8c, 0xde, 0xf1, 0x7d, 0xb3, 0x84, 0xa9, 0x8b, 0x13, 0x57, 0x07, 0x2b, 0x32, 0xe9, 0xe1, 0x4c, 0x0b, 0x79, 0xa8, 0xad, 0xb8, 0x38},
- dt2: fp.Elt{0x5d, 0xf9, 0x51, 0xdf, 0x9c, 0x4a, 0xc0, 0xb5, 0xac, 0xde, 0x1f, 0xcb, 0xae, 0x52, 0x39, 0x2b, 0xda, 0x66, 0x8b, 0x32, 0x8b, 0x6d, 0x10, 0x1d, 0x53, 0x19, 0xba, 0xce, 0x32, 0xeb, 0x9a, 0x04},
- },
- { /* 45P */
- addYX: fp.Elt{0x31, 0x79, 0xfc, 0x75, 0x0b, 0x7d, 0x50, 0xaa, 0xd3, 0x25, 0x67, 0x7a, 0x4b, 0x92, 0xef, 0x0f, 0x30, 0x39, 0x6b, 0x39, 0x2b, 0x54, 0x82, 0x1d, 0xfc, 0x74, 0xf6, 0x30, 0x75, 0xe1, 0x5e, 0x79},
- subYX: fp.Elt{0x7e, 0xfe, 0xdc, 0x63, 0x3c, 0x7d, 0x76, 0xd7, 0x40, 0x6e, 0x85, 0x97, 0x48, 0x59, 0x9c, 0x20, 0x13, 0x7c, 0x4f, 0xe1, 0x61, 0x68, 0x67, 0xb6, 0xfc, 0x25, 0xd6, 0xc8, 0xe0, 0x65, 0xc6, 0x51},
- dt2: fp.Elt{0x81, 0xbd, 0xec, 0x52, 0x0a, 0x5b, 0x4a, 0x25, 0xe7, 0xaf, 0x34, 0xe0, 0x6e, 0x1f, 0x41, 0x5d, 0x31, 0x4a, 0xee, 0xca, 0x0d, 0x4d, 0xa2, 0xe6, 0x77, 0x44, 0xc5, 0x9d, 0xf4, 0x9b, 0xd1, 0x6c},
- },
- { /* 47P */
- addYX: fp.Elt{0x86, 0xc3, 0xaf, 0x65, 0x21, 0x61, 0xfe, 0x1f, 0x10, 0x1b, 0xd5, 0xb8, 0x88, 0x2a, 0x2a, 0x08, 0xaa, 0x0b, 0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x65, 0xc5, 0x5f},
- },
- { /* 51P */
- addYX: fp.Elt{0x8e, 0x98, 0x90, 0x77, 0xe6, 0xe1, 0x92, 0x48, 0x22, 0xd7, 0x5c, 0x1c, 0x0f, 0x95, 0xd5, 0x01, 0xed, 0x3e, 0x92, 0xe5, 0x9a, 0x81, 0xb0, 0xe3, 0x1b, 0x65, 0x46, 0x9d, 0x40, 0xc7, 0x14, 0x32},
- subYX: fp.Elt{0xe5, 0x7a, 0x6d, 0xc4, 0x0d, 0x57, 0x6e, 0x13, 0x8f, 0xdc, 0xf8, 0x54, 0xcc, 0xaa, 0xd0, 0x0f, 0x86, 0xad, 0x0d, 0x31, 0x03, 0x9f, 0x54, 0x59, 0xa1, 0x4a, 0x45, 0x4c, 0x41, 0x1c, 0x71, 0x62},
- dt2: fp.Elt{0x70, 0x17, 0x65, 0x06, 0x74, 0x82, 0x29, 0x13, 0x36, 0x94, 0x27, 0x8a, 0x66, 0xa0, 0xa4, 0x3b, 0x3c, 0x22, 0x5d, 0x18, 0xec, 0xb8, 0xb6, 0xd9, 0x3c, 0x83, 0xcb, 0x3e, 0x07, 0x94, 0xea, 0x5b},
- },
- { /* 53P */
- addYX: fp.Elt{0xf8, 0xd2, 0x43, 0xf3, 0x63, 0xce, 0x70, 0xb4, 0xf1, 0xe8, 0x43, 0x05, 0x8f, 0xba, 0x67, 0x00, 0x6f, 0x7b, 0x11, 0xa2, 0xa1, 0x51, 0xda, 0x35, 0x2f, 0xbd, 0xf1, 0x44, 0x59, 0x78, 0xd0, 0x4a},
- subYX: fp.Elt{0xe4, 0x9b, 0xc8, 0x12, 0x09, 0xbf, 0x1d, 0x64, 0x9c, 0x57, 0x6e, 0x7d, 0x31, 0x8b, 0xf3, 0xac, 0x65, 0xb0, 0x97, 0xf6, 0x02, 0x9e, 0xfe, 0xab, 0xec, 0x1e, 0xf6, 0x48, 0xc1, 0xd5, 0xac, 0x3a},
- dt2: fp.Elt{0x01, 0x83, 0x31, 0xc3, 0x34, 0x3b, 0x8e, 0x85, 0x26, 0x68, 0x31, 0x07, 0x47, 0xc0, 0x99, 0xdc, 0x8c, 0xa8, 0x9d, 0xd3, 0x2e, 0x5b, 0x08, 0x34, 0x3d, 0x85, 0x02, 0xd9, 0xb1, 0x0c, 0xff, 0x3a},
- },
- { /* 55P */
- addYX: fp.Elt{0x05, 0x35, 0xc5, 0xf4, 0x0b, 0x43, 0x26, 0x92, 0x83, 0x22, 0x1f, 0x26, 0x13, 0x9c, 0xe4, 0x68, 0xc6, 0x27, 0xd3, 0x8f, 0x78, 0x33, 0xef, 0x09, 0x7f, 0x9e, 0xd9, 0x2b, 0x73, 0x9f, 0xcf, 0x2c},
- subYX: fp.Elt{0x5e, 0x40, 0x20, 0x3a, 0xeb, 0xc7, 0xc5, 0x87, 0xc9, 0x56, 0xad, 0xed, 0xef, 0x11, 0xe3, 0x8e, 0xf9, 0xd5, 0x29, 0xad, 0x48, 0x2e, 0x25, 0x29, 0x1d, 0x25, 0xcd, 0xf4, 0x86, 0x7e, 0x0e, 0x11},
- dt2: fp.Elt{0xe4, 0xf5, 0x03, 0xd6, 0x9e, 0xd8, 0xc0, 0x57, 0x0c, 0x20, 0xb0, 0xf0, 0x28, 0x86, 0x88, 0x12, 0xb7, 0x3b, 0x2e, 0xa0, 0x09, 0x27, 0x17, 0x53, 0x37, 0x3a, 0x69, 0xb9, 0xe0, 0x57, 0xc5, 0x05},
- },
- { /* 57P */
- addYX: fp.Elt{0xb0, 0x0e, 0xc2, 0x89, 0xb0, 0xbb, 0x76, 0xf7, 0x5c, 0xd8, 0x0f, 0xfa, 0xf6, 0x5b, 0xf8, 0x61, 0xfb, 0x21, 0x44, 0x63, 0x4e, 0x3f, 0xb9, 0xb6, 0x05, 0x12, 0x86, 0x41, 0x08, 0xef, 0x9f, 0x28},
- subYX: fp.Elt{0x6f, 0x7e, 0xc9, 0x1f, 0x31, 0xce, 0xf9, 0xd8, 0xae, 0xfd, 0xf9, 0x11, 0x30, 0x26, 0x3f, 0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diff --git a/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go b/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
deleted file mode 100644
index c368b181b4..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
+++ /dev/null
@@ -1,411 +0,0 @@
-// Package ed448 implements Ed448 signature scheme as described in RFC-8032.
-//
-// This package implements two signature variants.
-//
-// | Scheme Name | Sign Function | Verification | Context |
-// |-------------|-------------------|---------------|-------------------|
-// | Ed448 | Sign | Verify | Yes, can be empty |
-// | Ed448Ph | SignPh | VerifyPh | Yes, can be empty |
-// | All above | (PrivateKey).Sign | VerifyAny | As above |
-//
-// Specific functions for sign and verify are defined. A generic signing
-// function for all schemes is available through the crypto.Signer interface,
-// which is implemented by the PrivateKey type. A correspond all-in-one
-// verification method is provided by the VerifyAny function.
-//
-// Both schemes require a context string for domain separation. This parameter
-// is passed using a SignerOptions struct defined in this package.
-//
-// References:
-//
-// - RFC8032: https://rfc-editor.org/rfc/rfc8032.txt
-// - EdDSA for more curves: https://eprint.iacr.org/2015/677
-// - High-speed high-security signatures: https://doi.org/10.1007/s13389-012-0027-1
-package ed448
-
-import (
- "bytes"
- "crypto"
- cryptoRand "crypto/rand"
- "crypto/subtle"
- "errors"
- "fmt"
- "io"
- "strconv"
-
- "github.com/cloudflare/circl/ecc/goldilocks"
- "github.com/cloudflare/circl/internal/sha3"
- "github.com/cloudflare/circl/sign"
-)
-
-const (
- // ContextMaxSize is the maximum length (in bytes) allowed for context.
- ContextMaxSize = 255
- // PublicKeySize is the length in bytes of Ed448 public keys.
- PublicKeySize = 57
- // PrivateKeySize is the length in bytes of Ed448 private keys.
- PrivateKeySize = 114
- // SignatureSize is the length in bytes of signatures.
- SignatureSize = 114
- // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
- SeedSize = 57
-)
-
-const (
- paramB = 456 / 8 // Size of keys in bytes.
- hashSize = 2 * paramB // Size of the hash function's output.
-)
-
-// SignerOptions implements crypto.SignerOpts and augments with parameters
-// that are specific to the Ed448 signature schemes.
-type SignerOptions struct {
- // Hash must be crypto.Hash(0) for both Ed448 and Ed448Ph.
- crypto.Hash
-
- // Context is an optional domain separation string for signing.
- // Its length must be less or equal than 255 bytes.
- Context string
-
- // Scheme is an identifier for choosing a signature scheme.
- Scheme SchemeID
-}
-
-// SchemeID is an identifier for each signature scheme.
-type SchemeID uint
-
-const (
- ED448 SchemeID = iota
- ED448Ph
-)
-
-// PublicKey is the type of Ed448 public keys.
-type PublicKey []byte
-
-// Equal reports whether pub and x have the same value.
-func (pub PublicKey) Equal(x crypto.PublicKey) bool {
- xx, ok := x.(PublicKey)
- return ok && bytes.Equal(pub, xx)
-}
-
-// PrivateKey is the type of Ed448 private keys. It implements crypto.Signer.
-type PrivateKey []byte
-
-// Equal reports whether priv and x have the same value.
-func (priv PrivateKey) Equal(x crypto.PrivateKey) bool {
- xx, ok := x.(PrivateKey)
- return ok && subtle.ConstantTimeCompare(priv, xx) == 1
-}
-
-// Public returns the PublicKey corresponding to priv.
-func (priv PrivateKey) Public() crypto.PublicKey {
- publicKey := make([]byte, PublicKeySize)
- copy(publicKey, priv[SeedSize:])
- return PublicKey(publicKey)
-}
-
-// Seed returns the private key seed corresponding to priv. It is provided for
-// interoperability with RFC 8032. RFC 8032's private keys correspond to seeds
-// in this package.
-func (priv PrivateKey) Seed() []byte {
- seed := make([]byte, SeedSize)
- copy(seed, priv[:SeedSize])
- return seed
-}
-
-func (priv PrivateKey) Scheme() sign.Scheme { return sch }
-
-func (pub PublicKey) Scheme() sign.Scheme { return sch }
-
-func (priv PrivateKey) MarshalBinary() (data []byte, err error) {
- privateKey := make(PrivateKey, PrivateKeySize)
- copy(privateKey, priv)
- return privateKey, nil
-}
-
-func (pub PublicKey) MarshalBinary() (data []byte, err error) {
- publicKey := make(PublicKey, PublicKeySize)
- copy(publicKey, pub)
- return publicKey, nil
-}
-
-// Sign creates a signature of a message given a key pair.
-// This function supports all the two signature variants defined in RFC-8032,
-// namely Ed448 (or pure EdDSA) and Ed448Ph.
-// The opts.HashFunc() must return zero to the specify Ed448 variant. This can
-// be achieved by passing crypto.Hash(0) as the value for opts.
-// Use an Options struct to pass a bool indicating that the ed448Ph variant
-// should be used.
-// The struct can also be optionally used to pass a context string for signing.
-func (priv PrivateKey) Sign(
- rand io.Reader,
- message []byte,
- opts crypto.SignerOpts,
-) (signature []byte, err error) {
- var ctx string
- var scheme SchemeID
-
- if o, ok := opts.(SignerOptions); ok {
- ctx = o.Context
- scheme = o.Scheme
- }
-
- switch true {
- case scheme == ED448 && opts.HashFunc() == crypto.Hash(0):
- return Sign(priv, message, ctx), nil
- case scheme == ED448Ph && opts.HashFunc() == crypto.Hash(0):
- return SignPh(priv, message, ctx), nil
- default:
- return nil, errors.New("ed448: bad hash algorithm")
- }
-}
-
-// GenerateKey generates a public/private key pair using entropy from rand.
-// If rand is nil, crypto/rand.Reader will be used.
-func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
- if rand == nil {
- rand = cryptoRand.Reader
- }
-
- seed := make(PrivateKey, SeedSize)
- if _, err := io.ReadFull(rand, seed); err != nil {
- return nil, nil, err
- }
-
- privateKey := NewKeyFromSeed(seed)
- publicKey := make([]byte, PublicKeySize)
- copy(publicKey, privateKey[SeedSize:])
-
- return publicKey, privateKey, nil
-}
-
-// NewKeyFromSeed calculates a private key from a seed. It will panic if
-// len(seed) is not SeedSize. This function is provided for interoperability
-// with RFC 8032. RFC 8032's private keys correspond to seeds in this
-// package.
-func NewKeyFromSeed(seed []byte) PrivateKey {
- privateKey := make([]byte, PrivateKeySize)
- newKeyFromSeed(privateKey, seed)
- return privateKey
-}
-
-func newKeyFromSeed(privateKey, seed []byte) {
- if l := len(seed); l != SeedSize {
- panic("ed448: bad seed length: " + strconv.Itoa(l))
- }
-
- var h [hashSize]byte
- H := sha3.NewShake256()
- _, _ = H.Write(seed)
- _, _ = H.Read(h[:])
- s := &goldilocks.Scalar{}
- deriveSecretScalar(s, h[:paramB])
-
- copy(privateKey[:SeedSize], seed)
- _ = goldilocks.Curve{}.ScalarBaseMult(s).ToBytes(privateKey[SeedSize:])
-}
-
-func signAll(signature []byte, privateKey PrivateKey, message, ctx []byte, preHash bool) {
- if len(ctx) > ContextMaxSize {
- panic(fmt.Errorf("ed448: bad context length: %v", len(ctx)))
- }
-
- H := sha3.NewShake256()
- var PHM []byte
-
- if preHash {
- var h [64]byte
- _, _ = H.Write(message)
- _, _ = H.Read(h[:])
- PHM = h[:]
- H.Reset()
- } else {
- PHM = message
- }
-
- // 1. Hash the 57-byte private key using SHAKE256(x, 114).
- var h [hashSize]byte
- _, _ = H.Write(privateKey[:SeedSize])
- _, _ = H.Read(h[:])
- s := &goldilocks.Scalar{}
- deriveSecretScalar(s, h[:paramB])
- prefix := h[paramB:]
-
- // 2. Compute SHAKE256(dom4(F, C) || prefix || PH(M), 114).
- var rPM [hashSize]byte
- H.Reset()
-
- writeDom(&H, ctx, preHash)
-
- _, _ = H.Write(prefix)
- _, _ = H.Write(PHM)
- _, _ = H.Read(rPM[:])
-
- // 3. Compute the point [r]B.
- r := &goldilocks.Scalar{}
- r.FromBytes(rPM[:])
- R := (&[paramB]byte{})[:]
- if err := (goldilocks.Curve{}.ScalarBaseMult(r).ToBytes(R)); err != nil {
- panic(err)
- }
- // 4. Compute SHAKE256(dom4(F, C) || R || A || PH(M), 114)
- var hRAM [hashSize]byte
- H.Reset()
-
- writeDom(&H, ctx, preHash)
-
- _, _ = H.Write(R)
- _, _ = H.Write(privateKey[SeedSize:])
- _, _ = H.Write(PHM)
- _, _ = H.Read(hRAM[:])
-
- // 5. Compute S = (r + k * s) mod order.
- k := &goldilocks.Scalar{}
- k.FromBytes(hRAM[:])
- S := &goldilocks.Scalar{}
- S.Mul(k, s)
- S.Add(S, r)
-
- // 6. The signature is the concatenation of R and S.
- copy(signature[:paramB], R[:])
- copy(signature[paramB:], S[:])
-}
-
-// Sign signs the message with privateKey and returns a signature.
-// This function supports the signature variant defined in RFC-8032: Ed448,
-// also known as the pure version of EdDSA.
-// It will panic if len(privateKey) is not PrivateKeySize.
-func Sign(priv PrivateKey, message []byte, ctx string) []byte {
- signature := make([]byte, SignatureSize)
- signAll(signature, priv, message, []byte(ctx), false)
- return signature
-}
-
-// SignPh creates a signature of a message given a keypair.
-// This function supports the signature variant defined in RFC-8032: Ed448ph,
-// meaning it internally hashes the message using SHAKE-256.
-// Context could be passed to this function, which length should be no more than
-// 255. It can be empty.
-func SignPh(priv PrivateKey, message []byte, ctx string) []byte {
- signature := make([]byte, SignatureSize)
- signAll(signature, priv, message, []byte(ctx), true)
- return signature
-}
-
-func verify(public PublicKey, message, signature, ctx []byte, preHash bool) bool {
- if len(public) != PublicKeySize ||
- len(signature) != SignatureSize ||
- len(ctx) > ContextMaxSize ||
- !isLessThanOrder(signature[paramB:]) {
- return false
- }
-
- P, err := goldilocks.FromBytes(public)
- if err != nil {
- return false
- }
-
- H := sha3.NewShake256()
- var PHM []byte
-
- if preHash {
- var h [64]byte
- _, _ = H.Write(message)
- _, _ = H.Read(h[:])
- PHM = h[:]
- H.Reset()
- } else {
- PHM = message
- }
-
- var hRAM [hashSize]byte
- R := signature[:paramB]
-
- writeDom(&H, ctx, preHash)
-
- _, _ = H.Write(R)
- _, _ = H.Write(public)
- _, _ = H.Write(PHM)
- _, _ = H.Read(hRAM[:])
-
- k := &goldilocks.Scalar{}
- k.FromBytes(hRAM[:])
- S := &goldilocks.Scalar{}
- S.FromBytes(signature[paramB:])
-
- encR := (&[paramB]byte{})[:]
- P.Neg()
- _ = goldilocks.Curve{}.CombinedMult(S, k, P).ToBytes(encR)
- return bytes.Equal(R, encR)
-}
-
-// VerifyAny returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded.
-// This function supports all the two signature variants defined in RFC-8032,
-// namely Ed448 (or pure EdDSA) and Ed448Ph.
-// The opts.HashFunc() must return zero, this can be achieved by passing
-// crypto.Hash(0) as the value for opts.
-// Use a SignerOptions struct to pass a context string for signing.
-func VerifyAny(public PublicKey, message, signature []byte, opts crypto.SignerOpts) bool {
- var ctx string
- var scheme SchemeID
- if o, ok := opts.(SignerOptions); ok {
- ctx = o.Context
- scheme = o.Scheme
- }
-
- switch true {
- case scheme == ED448 && opts.HashFunc() == crypto.Hash(0):
- return Verify(public, message, signature, ctx)
- case scheme == ED448Ph && opts.HashFunc() == crypto.Hash(0):
- return VerifyPh(public, message, signature, ctx)
- default:
- return false
- }
-}
-
-// Verify returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded.
-// This function supports the signature variant defined in RFC-8032: Ed448,
-// also known as the pure version of EdDSA.
-func Verify(public PublicKey, message, signature []byte, ctx string) bool {
- return verify(public, message, signature, []byte(ctx), false)
-}
-
-// VerifyPh returns true if the signature is valid. Failure cases are invalid
-// signature, or when the public key cannot be decoded.
-// This function supports the signature variant defined in RFC-8032: Ed448ph,
-// meaning it internally hashes the message using SHAKE-256.
-// Context could be passed to this function, which length should be no more than
-// 255. It can be empty.
-func VerifyPh(public PublicKey, message, signature []byte, ctx string) bool {
- return verify(public, message, signature, []byte(ctx), true)
-}
-
-func deriveSecretScalar(s *goldilocks.Scalar, h []byte) {
- h[0] &= 0xFC // The two least significant bits of the first octet are cleared,
- h[paramB-1] = 0x00 // all eight bits the last octet are cleared, and
- h[paramB-2] |= 0x80 // the highest bit of the second to last octet is set.
- s.FromBytes(h[:paramB])
-}
-
-// isLessThanOrder returns true if 0 <= x < order and if the last byte of x is zero.
-func isLessThanOrder(x []byte) bool {
- order := goldilocks.Curve{}.Order()
- i := len(order) - 1
- for i > 0 && x[i] == order[i] {
- i--
- }
- return x[paramB-1] == 0 && x[i] < order[i]
-}
-
-func writeDom(h io.Writer, ctx []byte, preHash bool) {
- dom4 := "SigEd448"
- _, _ = h.Write([]byte(dom4))
-
- if preHash {
- _, _ = h.Write([]byte{byte(0x01), byte(len(ctx))})
- } else {
- _, _ = h.Write([]byte{byte(0x00), byte(len(ctx))})
- }
- _, _ = h.Write(ctx)
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed448/signapi.go b/vendor/github.com/cloudflare/circl/sign/ed448/signapi.go
deleted file mode 100644
index 22da8bc0a5..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/ed448/signapi.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package ed448
-
-import (
- "crypto/rand"
- "encoding/asn1"
-
- "github.com/cloudflare/circl/sign"
-)
-
-var sch sign.Scheme = &scheme{}
-
-// Scheme returns a signature interface.
-func Scheme() sign.Scheme { return sch }
-
-type scheme struct{}
-
-func (*scheme) Name() string { return "Ed448" }
-func (*scheme) PublicKeySize() int { return PublicKeySize }
-func (*scheme) PrivateKeySize() int { return PrivateKeySize }
-func (*scheme) SignatureSize() int { return SignatureSize }
-func (*scheme) SeedSize() int { return SeedSize }
-func (*scheme) TLSIdentifier() uint { return 0x0808 }
-func (*scheme) SupportsContext() bool { return true }
-func (*scheme) Oid() asn1.ObjectIdentifier {
- return asn1.ObjectIdentifier{1, 3, 101, 113}
-}
-
-func (*scheme) GenerateKey() (sign.PublicKey, sign.PrivateKey, error) {
- return GenerateKey(rand.Reader)
-}
-
-func (*scheme) Sign(
- sk sign.PrivateKey,
- message []byte,
- opts *sign.SignatureOpts,
-) []byte {
- priv, ok := sk.(PrivateKey)
- if !ok {
- panic(sign.ErrTypeMismatch)
- }
- ctx := ""
- if opts != nil {
- ctx = opts.Context
- }
- return Sign(priv, message, ctx)
-}
-
-func (*scheme) Verify(
- pk sign.PublicKey,
- message, signature []byte,
- opts *sign.SignatureOpts,
-) bool {
- pub, ok := pk.(PublicKey)
- if !ok {
- panic(sign.ErrTypeMismatch)
- }
- ctx := ""
- if opts != nil {
- ctx = opts.Context
- }
- return Verify(pub, message, signature, ctx)
-}
-
-func (*scheme) DeriveKey(seed []byte) (sign.PublicKey, sign.PrivateKey) {
- privateKey := NewKeyFromSeed(seed)
- publicKey := make(PublicKey, PublicKeySize)
- copy(publicKey, privateKey[SeedSize:])
- return publicKey, privateKey
-}
-
-func (*scheme) UnmarshalBinaryPublicKey(buf []byte) (sign.PublicKey, error) {
- if len(buf) < PublicKeySize {
- return nil, sign.ErrPubKeySize
- }
- pub := make(PublicKey, PublicKeySize)
- copy(pub, buf[:PublicKeySize])
- return pub, nil
-}
-
-func (*scheme) UnmarshalBinaryPrivateKey(buf []byte) (sign.PrivateKey, error) {
- if len(buf) < PrivateKeySize {
- return nil, sign.ErrPrivKeySize
- }
- priv := make(PrivateKey, PrivateKeySize)
- copy(priv, buf[:PrivateKeySize])
- return priv, nil
-}
diff --git a/vendor/github.com/cloudflare/circl/sign/sign.go b/vendor/github.com/cloudflare/circl/sign/sign.go
deleted file mode 100644
index 557d6f0960..0000000000
--- a/vendor/github.com/cloudflare/circl/sign/sign.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Package sign provides unified interfaces for signature schemes.
-//
-// A register of schemes is available in the package
-//
-// github.com/cloudflare/circl/sign/schemes
-package sign
-
-import (
- "crypto"
- "encoding"
- "errors"
-)
-
-type SignatureOpts struct {
- // If non-empty, includes the given context in the signature if supported
- // and will cause an error during signing otherwise.
- Context string
-}
-
-// A public key is used to verify a signature set by the corresponding private
-// key.
-type PublicKey interface {
- // Returns the signature scheme for this public key.
- Scheme() Scheme
- Equal(crypto.PublicKey) bool
- encoding.BinaryMarshaler
- crypto.PublicKey
-}
-
-// A private key allows one to create signatures.
-type PrivateKey interface {
- // Returns the signature scheme for this private key.
- Scheme() Scheme
- Equal(crypto.PrivateKey) bool
- // For compatibility with Go standard library
- crypto.Signer
- crypto.PrivateKey
- encoding.BinaryMarshaler
-}
-
-// A Scheme represents a specific instance of a signature scheme.
-type Scheme interface {
- // Name of the scheme.
- Name() string
-
- // GenerateKey creates a new key-pair.
- GenerateKey() (PublicKey, PrivateKey, error)
-
- // Creates a signature using the PrivateKey on the given message and
- // returns the signature. opts are additional options which can be nil.
- //
- // Panics if key is nil or wrong type or opts context is not supported.
- Sign(sk PrivateKey, message []byte, opts *SignatureOpts) []byte
-
- // Checks whether the given signature is a valid signature set by
- // the private key corresponding to the given public key on the
- // given message. opts are additional options which can be nil.
- //
- // Panics if key is nil or wrong type or opts context is not supported.
- Verify(pk PublicKey, message []byte, signature []byte, opts *SignatureOpts) bool
-
- // Deterministically derives a keypair from a seed. If you're unsure,
- // you're better off using GenerateKey().
- //
- // Panics if seed is not of length SeedSize().
- DeriveKey(seed []byte) (PublicKey, PrivateKey)
-
- // Unmarshals a PublicKey from the provided buffer.
- UnmarshalBinaryPublicKey([]byte) (PublicKey, error)
-
- // Unmarshals a PublicKey from the provided buffer.
- UnmarshalBinaryPrivateKey([]byte) (PrivateKey, error)
-
- // Size of binary marshalled public keys.
- PublicKeySize() int
-
- // Size of binary marshalled public keys.
- PrivateKeySize() int
-
- // Size of signatures.
- SignatureSize() int
-
- // Size of seeds.
- SeedSize() int
-
- // Returns whether contexts are supported.
- SupportsContext() bool
-}
-
-var (
- // ErrTypeMismatch is the error used if types of, for instance, private
- // and public keys don't match.
- ErrTypeMismatch = errors.New("types mismatch")
-
- // ErrSeedSize is the error used if the provided seed is of the wrong
- // size.
- ErrSeedSize = errors.New("wrong seed size")
-
- // ErrPubKeySize is the error used if the provided public key is of
- // the wrong size.
- ErrPubKeySize = errors.New("wrong size for public key")
-
- // ErrPrivKeySize is the error used if the provided private key is of
- // the wrong size.
- ErrPrivKeySize = errors.New("wrong size for private key")
-
- // ErrContextNotSupported is the error used if a context is not
- // supported.
- ErrContextNotSupported = errors.New("context not supported")
-
- // ErrContextTooLong is the error used if the context string is too long.
- ErrContextTooLong = errors.New("context string too long")
-)
diff --git a/vendor/github.com/docker/docker-credential-helpers/client/command.go b/vendor/github.com/docker/docker-credential-helpers/client/command.go
index 1936234bef..93863480ba 100644
--- a/vendor/github.com/docker/docker-credential-helpers/client/command.go
+++ b/vendor/github.com/docker/docker-credential-helpers/client/command.go
@@ -15,27 +15,30 @@ type Program interface {
// ProgramFunc is a type of function that initializes programs based on arguments.
type ProgramFunc func(args ...string) Program
-// NewShellProgramFunc creates programs that are executed in a Shell.
-func NewShellProgramFunc(name string) ProgramFunc {
- return NewShellProgramFuncWithEnv(name, nil)
+// NewShellProgramFunc creates a [ProgramFunc] to run command in a [Shell].
+func NewShellProgramFunc(command string) ProgramFunc {
+ return func(args ...string) Program {
+ return createProgramCmdRedirectErr(command, args, nil)
+ }
}
-// NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables
-func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc {
+// NewShellProgramFuncWithEnv creates a [ProgramFunc] tu run command
+// in a [Shell] with the given environment variables.
+func NewShellProgramFuncWithEnv(command string, env *map[string]string) ProgramFunc {
return func(args ...string) Program {
- return &Shell{cmd: createProgramCmdRedirectErr(name, args, env)}
+ return createProgramCmdRedirectErr(command, args, env)
}
}
-func createProgramCmdRedirectErr(commandName string, args []string, env *map[string]string) *exec.Cmd {
- programCmd := exec.Command(commandName, args...)
+func createProgramCmdRedirectErr(command string, args []string, env *map[string]string) *Shell {
+ ec := exec.Command(command, args...)
if env != nil {
for k, v := range *env {
- programCmd.Env = append(programCmd.Environ(), k+"="+v)
+ ec.Env = append(ec.Environ(), k+"="+v)
}
}
- programCmd.Stderr = os.Stderr
- return programCmd
+ ec.Stderr = os.Stderr
+ return &Shell{cmd: ec}
}
// Shell invokes shell commands to talk with a remote credentials-helper.
diff --git a/vendor/github.com/go-logr/logr/.golangci.yaml b/vendor/github.com/go-logr/logr/.golangci.yaml
index 0cffafa7bf..0ed62c1a18 100644
--- a/vendor/github.com/go-logr/logr/.golangci.yaml
+++ b/vendor/github.com/go-logr/logr/.golangci.yaml
@@ -1,26 +1,28 @@
+version: "2"
+
run:
timeout: 1m
tests: true
linters:
- disable-all: true
- enable:
+ default: none
+ enable: # please keep this alphabetized
+ - asasalint
- asciicheck
+ - copyloopvar
+ - dupl
- errcheck
- forcetypeassert
+ - goconst
- gocritic
- - gofmt
- - goimports
- - gosimple
- govet
- ineffassign
- misspell
+ - musttag
- revive
- staticcheck
- - typecheck
- unused
issues:
- exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 10
diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go
index 30568e768d..b22c57d713 100644
--- a/vendor/github.com/go-logr/logr/funcr/funcr.go
+++ b/vendor/github.com/go-logr/logr/funcr/funcr.go
@@ -77,7 +77,7 @@ func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink {
write: fn,
}
// For skipping fnlogger.Info and fnlogger.Error.
- l.Formatter.AddCallDepth(1)
+ l.AddCallDepth(1) // via Formatter
return l
}
@@ -164,17 +164,17 @@ type fnlogger struct {
}
func (l fnlogger) WithName(name string) logr.LogSink {
- l.Formatter.AddName(name)
+ l.AddName(name) // via Formatter
return &l
}
func (l fnlogger) WithValues(kvList ...any) logr.LogSink {
- l.Formatter.AddValues(kvList)
+ l.AddValues(kvList) // via Formatter
return &l
}
func (l fnlogger) WithCallDepth(depth int) logr.LogSink {
- l.Formatter.AddCallDepth(depth)
+ l.AddCallDepth(depth) // via Formatter
return &l
}
diff --git a/vendor/github.com/golang/protobuf/proto/buffer.go b/vendor/github.com/golang/protobuf/proto/buffer.go
deleted file mode 100644
index e810e6fea1..0000000000
--- a/vendor/github.com/golang/protobuf/proto/buffer.go
+++ /dev/null
@@ -1,324 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "errors"
- "fmt"
-
- "google.golang.org/protobuf/encoding/prototext"
- "google.golang.org/protobuf/encoding/protowire"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-const (
- WireVarint = 0
- WireFixed32 = 5
- WireFixed64 = 1
- WireBytes = 2
- WireStartGroup = 3
- WireEndGroup = 4
-)
-
-// EncodeVarint returns the varint encoded bytes of v.
-func EncodeVarint(v uint64) []byte {
- return protowire.AppendVarint(nil, v)
-}
-
-// SizeVarint returns the length of the varint encoded bytes of v.
-// This is equal to len(EncodeVarint(v)).
-func SizeVarint(v uint64) int {
- return protowire.SizeVarint(v)
-}
-
-// DecodeVarint parses a varint encoded integer from b,
-// returning the integer value and the length of the varint.
-// It returns (0, 0) if there is a parse error.
-func DecodeVarint(b []byte) (uint64, int) {
- v, n := protowire.ConsumeVarint(b)
- if n < 0 {
- return 0, 0
- }
- return v, n
-}
-
-// Buffer is a buffer for encoding and decoding the protobuf wire format.
-// It may be reused between invocations to reduce memory usage.
-type Buffer struct {
- buf []byte
- idx int
- deterministic bool
-}
-
-// NewBuffer allocates a new Buffer initialized with buf,
-// where the contents of buf are considered the unread portion of the buffer.
-func NewBuffer(buf []byte) *Buffer {
- return &Buffer{buf: buf}
-}
-
-// SetDeterministic specifies whether to use deterministic serialization.
-//
-// Deterministic serialization guarantees that for a given binary, equal
-// messages will always be serialized to the same bytes. This implies:
-//
-// - Repeated serialization of a message will return the same bytes.
-// - Different processes of the same binary (which may be executing on
-// different machines) will serialize equal messages to the same bytes.
-//
-// Note that the deterministic serialization is NOT canonical across
-// languages. It is not guaranteed to remain stable over time. It is unstable
-// across different builds with schema changes due to unknown fields.
-// Users who need canonical serialization (e.g., persistent storage in a
-// canonical form, fingerprinting, etc.) should define their own
-// canonicalization specification and implement their own serializer rather
-// than relying on this API.
-//
-// If deterministic serialization is requested, map entries will be sorted
-// by keys in lexographical order. This is an implementation detail and
-// subject to change.
-func (b *Buffer) SetDeterministic(deterministic bool) {
- b.deterministic = deterministic
-}
-
-// SetBuf sets buf as the internal buffer,
-// where the contents of buf are considered the unread portion of the buffer.
-func (b *Buffer) SetBuf(buf []byte) {
- b.buf = buf
- b.idx = 0
-}
-
-// Reset clears the internal buffer of all written and unread data.
-func (b *Buffer) Reset() {
- b.buf = b.buf[:0]
- b.idx = 0
-}
-
-// Bytes returns the internal buffer.
-func (b *Buffer) Bytes() []byte {
- return b.buf
-}
-
-// Unread returns the unread portion of the buffer.
-func (b *Buffer) Unread() []byte {
- return b.buf[b.idx:]
-}
-
-// Marshal appends the wire-format encoding of m to the buffer.
-func (b *Buffer) Marshal(m Message) error {
- var err error
- b.buf, err = marshalAppend(b.buf, m, b.deterministic)
- return err
-}
-
-// Unmarshal parses the wire-format message in the buffer and
-// places the decoded results in m.
-// It does not reset m before unmarshaling.
-func (b *Buffer) Unmarshal(m Message) error {
- err := UnmarshalMerge(b.Unread(), m)
- b.idx = len(b.buf)
- return err
-}
-
-type unknownFields struct{ XXX_unrecognized protoimpl.UnknownFields }
-
-func (m *unknownFields) String() string { panic("not implemented") }
-func (m *unknownFields) Reset() { panic("not implemented") }
-func (m *unknownFields) ProtoMessage() { panic("not implemented") }
-
-// DebugPrint dumps the encoded bytes of b with a header and footer including s
-// to stdout. This is only intended for debugging.
-func (*Buffer) DebugPrint(s string, b []byte) {
- m := MessageReflect(new(unknownFields))
- m.SetUnknown(b)
- b, _ = prototext.MarshalOptions{AllowPartial: true, Indent: "\t"}.Marshal(m.Interface())
- fmt.Printf("==== %s ====\n%s==== %s ====\n", s, b, s)
-}
-
-// EncodeVarint appends an unsigned varint encoding to the buffer.
-func (b *Buffer) EncodeVarint(v uint64) error {
- b.buf = protowire.AppendVarint(b.buf, v)
- return nil
-}
-
-// EncodeZigzag32 appends a 32-bit zig-zag varint encoding to the buffer.
-func (b *Buffer) EncodeZigzag32(v uint64) error {
- return b.EncodeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
-}
-
-// EncodeZigzag64 appends a 64-bit zig-zag varint encoding to the buffer.
-func (b *Buffer) EncodeZigzag64(v uint64) error {
- return b.EncodeVarint(uint64((uint64(v) << 1) ^ uint64((int64(v) >> 63))))
-}
-
-// EncodeFixed32 appends a 32-bit little-endian integer to the buffer.
-func (b *Buffer) EncodeFixed32(v uint64) error {
- b.buf = protowire.AppendFixed32(b.buf, uint32(v))
- return nil
-}
-
-// EncodeFixed64 appends a 64-bit little-endian integer to the buffer.
-func (b *Buffer) EncodeFixed64(v uint64) error {
- b.buf = protowire.AppendFixed64(b.buf, uint64(v))
- return nil
-}
-
-// EncodeRawBytes appends a length-prefixed raw bytes to the buffer.
-func (b *Buffer) EncodeRawBytes(v []byte) error {
- b.buf = protowire.AppendBytes(b.buf, v)
- return nil
-}
-
-// EncodeStringBytes appends a length-prefixed raw bytes to the buffer.
-// It does not validate whether v contains valid UTF-8.
-func (b *Buffer) EncodeStringBytes(v string) error {
- b.buf = protowire.AppendString(b.buf, v)
- return nil
-}
-
-// EncodeMessage appends a length-prefixed encoded message to the buffer.
-func (b *Buffer) EncodeMessage(m Message) error {
- var err error
- b.buf = protowire.AppendVarint(b.buf, uint64(Size(m)))
- b.buf, err = marshalAppend(b.buf, m, b.deterministic)
- return err
-}
-
-// DecodeVarint consumes an encoded unsigned varint from the buffer.
-func (b *Buffer) DecodeVarint() (uint64, error) {
- v, n := protowire.ConsumeVarint(b.buf[b.idx:])
- if n < 0 {
- return 0, protowire.ParseError(n)
- }
- b.idx += n
- return uint64(v), nil
-}
-
-// DecodeZigzag32 consumes an encoded 32-bit zig-zag varint from the buffer.
-func (b *Buffer) DecodeZigzag32() (uint64, error) {
- v, err := b.DecodeVarint()
- if err != nil {
- return 0, err
- }
- return uint64((uint32(v) >> 1) ^ uint32((int32(v&1)<<31)>>31)), nil
-}
-
-// DecodeZigzag64 consumes an encoded 64-bit zig-zag varint from the buffer.
-func (b *Buffer) DecodeZigzag64() (uint64, error) {
- v, err := b.DecodeVarint()
- if err != nil {
- return 0, err
- }
- return uint64((uint64(v) >> 1) ^ uint64((int64(v&1)<<63)>>63)), nil
-}
-
-// DecodeFixed32 consumes a 32-bit little-endian integer from the buffer.
-func (b *Buffer) DecodeFixed32() (uint64, error) {
- v, n := protowire.ConsumeFixed32(b.buf[b.idx:])
- if n < 0 {
- return 0, protowire.ParseError(n)
- }
- b.idx += n
- return uint64(v), nil
-}
-
-// DecodeFixed64 consumes a 64-bit little-endian integer from the buffer.
-func (b *Buffer) DecodeFixed64() (uint64, error) {
- v, n := protowire.ConsumeFixed64(b.buf[b.idx:])
- if n < 0 {
- return 0, protowire.ParseError(n)
- }
- b.idx += n
- return uint64(v), nil
-}
-
-// DecodeRawBytes consumes a length-prefixed raw bytes from the buffer.
-// If alloc is specified, it returns a copy the raw bytes
-// rather than a sub-slice of the buffer.
-func (b *Buffer) DecodeRawBytes(alloc bool) ([]byte, error) {
- v, n := protowire.ConsumeBytes(b.buf[b.idx:])
- if n < 0 {
- return nil, protowire.ParseError(n)
- }
- b.idx += n
- if alloc {
- v = append([]byte(nil), v...)
- }
- return v, nil
-}
-
-// DecodeStringBytes consumes a length-prefixed raw bytes from the buffer.
-// It does not validate whether the raw bytes contain valid UTF-8.
-func (b *Buffer) DecodeStringBytes() (string, error) {
- v, n := protowire.ConsumeString(b.buf[b.idx:])
- if n < 0 {
- return "", protowire.ParseError(n)
- }
- b.idx += n
- return v, nil
-}
-
-// DecodeMessage consumes a length-prefixed message from the buffer.
-// It does not reset m before unmarshaling.
-func (b *Buffer) DecodeMessage(m Message) error {
- v, err := b.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- return UnmarshalMerge(v, m)
-}
-
-// DecodeGroup consumes a message group from the buffer.
-// It assumes that the start group marker has already been consumed and
-// consumes all bytes until (and including the end group marker).
-// It does not reset m before unmarshaling.
-func (b *Buffer) DecodeGroup(m Message) error {
- v, n, err := consumeGroup(b.buf[b.idx:])
- if err != nil {
- return err
- }
- b.idx += n
- return UnmarshalMerge(v, m)
-}
-
-// consumeGroup parses b until it finds an end group marker, returning
-// the raw bytes of the message (excluding the end group marker) and the
-// the total length of the message (including the end group marker).
-func consumeGroup(b []byte) ([]byte, int, error) {
- b0 := b
- depth := 1 // assume this follows a start group marker
- for {
- _, wtyp, tagLen := protowire.ConsumeTag(b)
- if tagLen < 0 {
- return nil, 0, protowire.ParseError(tagLen)
- }
- b = b[tagLen:]
-
- var valLen int
- switch wtyp {
- case protowire.VarintType:
- _, valLen = protowire.ConsumeVarint(b)
- case protowire.Fixed32Type:
- _, valLen = protowire.ConsumeFixed32(b)
- case protowire.Fixed64Type:
- _, valLen = protowire.ConsumeFixed64(b)
- case protowire.BytesType:
- _, valLen = protowire.ConsumeBytes(b)
- case protowire.StartGroupType:
- depth++
- case protowire.EndGroupType:
- depth--
- default:
- return nil, 0, errors.New("proto: cannot parse reserved wire type")
- }
- if valLen < 0 {
- return nil, 0, protowire.ParseError(valLen)
- }
- b = b[valLen:]
-
- if depth == 0 {
- return b0[:len(b0)-len(b)-tagLen], len(b0) - len(b), nil
- }
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/defaults.go b/vendor/github.com/golang/protobuf/proto/defaults.go
deleted file mode 100644
index d399bf069c..0000000000
--- a/vendor/github.com/golang/protobuf/proto/defaults.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "google.golang.org/protobuf/reflect/protoreflect"
-)
-
-// SetDefaults sets unpopulated scalar fields to their default values.
-// Fields within a oneof are not set even if they have a default value.
-// SetDefaults is recursively called upon any populated message fields.
-func SetDefaults(m Message) {
- if m != nil {
- setDefaults(MessageReflect(m))
- }
-}
-
-func setDefaults(m protoreflect.Message) {
- fds := m.Descriptor().Fields()
- for i := 0; i < fds.Len(); i++ {
- fd := fds.Get(i)
- if !m.Has(fd) {
- if fd.HasDefault() && fd.ContainingOneof() == nil {
- v := fd.Default()
- if fd.Kind() == protoreflect.BytesKind {
- v = protoreflect.ValueOf(append([]byte(nil), v.Bytes()...)) // copy the default bytes
- }
- m.Set(fd, v)
- }
- continue
- }
- }
-
- m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
- switch {
- // Handle singular message.
- case fd.Cardinality() != protoreflect.Repeated:
- if fd.Message() != nil {
- setDefaults(m.Get(fd).Message())
- }
- // Handle list of messages.
- case fd.IsList():
- if fd.Message() != nil {
- ls := m.Get(fd).List()
- for i := 0; i < ls.Len(); i++ {
- setDefaults(ls.Get(i).Message())
- }
- }
- // Handle map of messages.
- case fd.IsMap():
- if fd.MapValue().Message() != nil {
- ms := m.Get(fd).Map()
- ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {
- setDefaults(v.Message())
- return true
- })
- }
- }
- return true
- })
-}
diff --git a/vendor/github.com/golang/protobuf/proto/deprecated.go b/vendor/github.com/golang/protobuf/proto/deprecated.go
deleted file mode 100644
index e8db57e097..0000000000
--- a/vendor/github.com/golang/protobuf/proto/deprecated.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "encoding/json"
- "errors"
- "fmt"
- "strconv"
-
- protoV2 "google.golang.org/protobuf/proto"
-)
-
-var (
- // Deprecated: No longer returned.
- ErrNil = errors.New("proto: Marshal called with nil")
-
- // Deprecated: No longer returned.
- ErrTooLarge = errors.New("proto: message encodes to over 2 GB")
-
- // Deprecated: No longer returned.
- ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
-)
-
-// Deprecated: Do not use.
-type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }
-
-// Deprecated: Do not use.
-func GetStats() Stats { return Stats{} }
-
-// Deprecated: Do not use.
-func MarshalMessageSet(interface{}) ([]byte, error) {
- return nil, errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func UnmarshalMessageSet([]byte, interface{}) error {
- return errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func MarshalMessageSetJSON(interface{}) ([]byte, error) {
- return nil, errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func UnmarshalMessageSetJSON([]byte, interface{}) error {
- return errors.New("proto: not implemented")
-}
-
-// Deprecated: Do not use.
-func RegisterMessageSetType(Message, int32, string) {}
-
-// Deprecated: Do not use.
-func EnumName(m map[int32]string, v int32) string {
- s, ok := m[v]
- if ok {
- return s
- }
- return strconv.Itoa(int(v))
-}
-
-// Deprecated: Do not use.
-func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {
- if data[0] == '"' {
- // New style: enums are strings.
- var repr string
- if err := json.Unmarshal(data, &repr); err != nil {
- return -1, err
- }
- val, ok := m[repr]
- if !ok {
- return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr)
- }
- return val, nil
- }
- // Old style: enums are ints.
- var val int32
- if err := json.Unmarshal(data, &val); err != nil {
- return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName)
- }
- return val, nil
-}
-
-// Deprecated: Do not use; this type existed for intenal-use only.
-type InternalMessageInfo struct{}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) DiscardUnknown(m Message) {
- DiscardUnknown(m)
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Marshal(b []byte, m Message, deterministic bool) ([]byte, error) {
- return protoV2.MarshalOptions{Deterministic: deterministic}.MarshalAppend(b, MessageV2(m))
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Merge(dst, src Message) {
- protoV2.Merge(MessageV2(dst), MessageV2(src))
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Size(m Message) int {
- return protoV2.Size(MessageV2(m))
-}
-
-// Deprecated: Do not use; this method existed for intenal-use only.
-func (*InternalMessageInfo) Unmarshal(m Message, b []byte) error {
- return protoV2.UnmarshalOptions{Merge: true}.Unmarshal(b, MessageV2(m))
-}
diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go
deleted file mode 100644
index 2187e877fa..0000000000
--- a/vendor/github.com/golang/protobuf/proto/discard.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "google.golang.org/protobuf/reflect/protoreflect"
-)
-
-// DiscardUnknown recursively discards all unknown fields from this message
-// and all embedded messages.
-//
-// When unmarshaling a message with unrecognized fields, the tags and values
-// of such fields are preserved in the Message. This allows a later call to
-// marshal to be able to produce a message that continues to have those
-// unrecognized fields. To avoid this, DiscardUnknown is used to
-// explicitly clear the unknown fields after unmarshaling.
-func DiscardUnknown(m Message) {
- if m != nil {
- discardUnknown(MessageReflect(m))
- }
-}
-
-func discardUnknown(m protoreflect.Message) {
- m.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool {
- switch {
- // Handle singular message.
- case fd.Cardinality() != protoreflect.Repeated:
- if fd.Message() != nil {
- discardUnknown(m.Get(fd).Message())
- }
- // Handle list of messages.
- case fd.IsList():
- if fd.Message() != nil {
- ls := m.Get(fd).List()
- for i := 0; i < ls.Len(); i++ {
- discardUnknown(ls.Get(i).Message())
- }
- }
- // Handle map of messages.
- case fd.IsMap():
- if fd.MapValue().Message() != nil {
- ms := m.Get(fd).Map()
- ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {
- discardUnknown(v.Message())
- return true
- })
- }
- }
- return true
- })
-
- // Discard unknown fields.
- if len(m.GetUnknown()) > 0 {
- m.SetUnknown(nil)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go
deleted file mode 100644
index 42fc120c97..0000000000
--- a/vendor/github.com/golang/protobuf/proto/extensions.go
+++ /dev/null
@@ -1,356 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "errors"
- "fmt"
- "reflect"
-
- "google.golang.org/protobuf/encoding/protowire"
- "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
- "google.golang.org/protobuf/runtime/protoiface"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-type (
- // ExtensionDesc represents an extension descriptor and
- // is used to interact with an extension field in a message.
- //
- // Variables of this type are generated in code by protoc-gen-go.
- ExtensionDesc = protoimpl.ExtensionInfo
-
- // ExtensionRange represents a range of message extensions.
- // Used in code generated by protoc-gen-go.
- ExtensionRange = protoiface.ExtensionRangeV1
-
- // Deprecated: Do not use; this is an internal type.
- Extension = protoimpl.ExtensionFieldV1
-
- // Deprecated: Do not use; this is an internal type.
- XXX_InternalExtensions = protoimpl.ExtensionFields
-)
-
-// ErrMissingExtension reports whether the extension was not present.
-var ErrMissingExtension = errors.New("proto: missing extension")
-
-var errNotExtendable = errors.New("proto: not an extendable proto.Message")
-
-// HasExtension reports whether the extension field is present in m
-// either as an explicitly populated field or as an unknown field.
-func HasExtension(m Message, xt *ExtensionDesc) (has bool) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return false
- }
-
- // Check whether any populated known field matches the field number.
- xtd := xt.TypeDescriptor()
- if isValidExtension(mr.Descriptor(), xtd) {
- has = mr.Has(xtd)
- } else {
- mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
- has = int32(fd.Number()) == xt.Field
- return !has
- })
- }
-
- // Check whether any unknown field matches the field number.
- for b := mr.GetUnknown(); !has && len(b) > 0; {
- num, _, n := protowire.ConsumeField(b)
- has = int32(num) == xt.Field
- b = b[n:]
- }
- return has
-}
-
-// ClearExtension removes the extension field from m
-// either as an explicitly populated field or as an unknown field.
-func ClearExtension(m Message, xt *ExtensionDesc) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return
- }
-
- xtd := xt.TypeDescriptor()
- if isValidExtension(mr.Descriptor(), xtd) {
- mr.Clear(xtd)
- } else {
- mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
- if int32(fd.Number()) == xt.Field {
- mr.Clear(fd)
- return false
- }
- return true
- })
- }
- clearUnknown(mr, fieldNum(xt.Field))
-}
-
-// ClearAllExtensions clears all extensions from m.
-// This includes populated fields and unknown fields in the extension range.
-func ClearAllExtensions(m Message) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return
- }
-
- mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
- if fd.IsExtension() {
- mr.Clear(fd)
- }
- return true
- })
- clearUnknown(mr, mr.Descriptor().ExtensionRanges())
-}
-
-// GetExtension retrieves a proto2 extended field from m.
-//
-// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),
-// then GetExtension parses the encoded field and returns a Go value of the specified type.
-// If the field is not present, then the default value is returned (if one is specified),
-// otherwise ErrMissingExtension is reported.
-//
-// If the descriptor is type incomplete (i.e., ExtensionDesc.ExtensionType is nil),
-// then GetExtension returns the raw encoded bytes for the extension field.
-func GetExtension(m Message, xt *ExtensionDesc) (interface{}, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
- return nil, errNotExtendable
- }
-
- // Retrieve the unknown fields for this extension field.
- var bo protoreflect.RawFields
- for bi := mr.GetUnknown(); len(bi) > 0; {
- num, _, n := protowire.ConsumeField(bi)
- if int32(num) == xt.Field {
- bo = append(bo, bi[:n]...)
- }
- bi = bi[n:]
- }
-
- // For type incomplete descriptors, only retrieve the unknown fields.
- if xt.ExtensionType == nil {
- return []byte(bo), nil
- }
-
- // If the extension field only exists as unknown fields, unmarshal it.
- // This is rarely done since proto.Unmarshal eagerly unmarshals extensions.
- xtd := xt.TypeDescriptor()
- if !isValidExtension(mr.Descriptor(), xtd) {
- return nil, fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m)
- }
- if !mr.Has(xtd) && len(bo) > 0 {
- m2 := mr.New()
- if err := (proto.UnmarshalOptions{
- Resolver: extensionResolver{xt},
- }.Unmarshal(bo, m2.Interface())); err != nil {
- return nil, err
- }
- if m2.Has(xtd) {
- mr.Set(xtd, m2.Get(xtd))
- clearUnknown(mr, fieldNum(xt.Field))
- }
- }
-
- // Check whether the message has the extension field set or a default.
- var pv protoreflect.Value
- switch {
- case mr.Has(xtd):
- pv = mr.Get(xtd)
- case xtd.HasDefault():
- pv = xtd.Default()
- default:
- return nil, ErrMissingExtension
- }
-
- v := xt.InterfaceOf(pv)
- rv := reflect.ValueOf(v)
- if isScalarKind(rv.Kind()) {
- rv2 := reflect.New(rv.Type())
- rv2.Elem().Set(rv)
- v = rv2.Interface()
- }
- return v, nil
-}
-
-// extensionResolver is a custom extension resolver that stores a single
-// extension type that takes precedence over the global registry.
-type extensionResolver struct{ xt protoreflect.ExtensionType }
-
-func (r extensionResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
- if xtd := r.xt.TypeDescriptor(); xtd.FullName() == field {
- return r.xt, nil
- }
- return protoregistry.GlobalTypes.FindExtensionByName(field)
-}
-
-func (r extensionResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
- if xtd := r.xt.TypeDescriptor(); xtd.ContainingMessage().FullName() == message && xtd.Number() == field {
- return r.xt, nil
- }
- return protoregistry.GlobalTypes.FindExtensionByNumber(message, field)
-}
-
-// GetExtensions returns a list of the extensions values present in m,
-// corresponding with the provided list of extension descriptors, xts.
-// If an extension is missing in m, the corresponding value is nil.
-func GetExtensions(m Message, xts []*ExtensionDesc) ([]interface{}, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return nil, errNotExtendable
- }
-
- vs := make([]interface{}, len(xts))
- for i, xt := range xts {
- v, err := GetExtension(m, xt)
- if err != nil {
- if err == ErrMissingExtension {
- continue
- }
- return vs, err
- }
- vs[i] = v
- }
- return vs, nil
-}
-
-// SetExtension sets an extension field in m to the provided value.
-func SetExtension(m Message, xt *ExtensionDesc, v interface{}) error {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
- return errNotExtendable
- }
-
- rv := reflect.ValueOf(v)
- if reflect.TypeOf(v) != reflect.TypeOf(xt.ExtensionType) {
- return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", v, xt.ExtensionType)
- }
- if rv.Kind() == reflect.Ptr {
- if rv.IsNil() {
- return fmt.Errorf("proto: SetExtension called with nil value of type %T", v)
- }
- if isScalarKind(rv.Elem().Kind()) {
- v = rv.Elem().Interface()
- }
- }
-
- xtd := xt.TypeDescriptor()
- if !isValidExtension(mr.Descriptor(), xtd) {
- return fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m)
- }
- mr.Set(xtd, xt.ValueOf(v))
- clearUnknown(mr, fieldNum(xt.Field))
- return nil
-}
-
-// SetRawExtension inserts b into the unknown fields of m.
-//
-// Deprecated: Use Message.ProtoReflect.SetUnknown instead.
-func SetRawExtension(m Message, fnum int32, b []byte) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return
- }
-
- // Verify that the raw field is valid.
- for b0 := b; len(b0) > 0; {
- num, _, n := protowire.ConsumeField(b0)
- if int32(num) != fnum {
- panic(fmt.Sprintf("mismatching field number: got %d, want %d", num, fnum))
- }
- b0 = b0[n:]
- }
-
- ClearExtension(m, &ExtensionDesc{Field: fnum})
- mr.SetUnknown(append(mr.GetUnknown(), b...))
-}
-
-// ExtensionDescs returns a list of extension descriptors found in m,
-// containing descriptors for both populated extension fields in m and
-// also unknown fields of m that are in the extension range.
-// For the later case, an type incomplete descriptor is provided where only
-// the ExtensionDesc.Field field is populated.
-// The order of the extension descriptors is undefined.
-func ExtensionDescs(m Message) ([]*ExtensionDesc, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {
- return nil, errNotExtendable
- }
-
- // Collect a set of known extension descriptors.
- extDescs := make(map[protoreflect.FieldNumber]*ExtensionDesc)
- mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
- if fd.IsExtension() {
- xt := fd.(protoreflect.ExtensionTypeDescriptor)
- if xd, ok := xt.Type().(*ExtensionDesc); ok {
- extDescs[fd.Number()] = xd
- }
- }
- return true
- })
-
- // Collect a set of unknown extension descriptors.
- extRanges := mr.Descriptor().ExtensionRanges()
- for b := mr.GetUnknown(); len(b) > 0; {
- num, _, n := protowire.ConsumeField(b)
- if extRanges.Has(num) && extDescs[num] == nil {
- extDescs[num] = nil
- }
- b = b[n:]
- }
-
- // Transpose the set of descriptors into a list.
- var xts []*ExtensionDesc
- for num, xt := range extDescs {
- if xt == nil {
- xt = &ExtensionDesc{Field: int32(num)}
- }
- xts = append(xts, xt)
- }
- return xts, nil
-}
-
-// isValidExtension reports whether xtd is a valid extension descriptor for md.
-func isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool {
- return xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number())
-}
-
-// isScalarKind reports whether k is a protobuf scalar kind (except bytes).
-// This function exists for historical reasons since the representation of
-// scalars differs between v1 and v2, where v1 uses *T and v2 uses T.
-func isScalarKind(k reflect.Kind) bool {
- switch k {
- case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
- return true
- default:
- return false
- }
-}
-
-// clearUnknown removes unknown fields from m where remover.Has reports true.
-func clearUnknown(m protoreflect.Message, remover interface {
- Has(protoreflect.FieldNumber) bool
-}) {
- var bo protoreflect.RawFields
- for bi := m.GetUnknown(); len(bi) > 0; {
- num, _, n := protowire.ConsumeField(bi)
- if !remover.Has(num) {
- bo = append(bo, bi[:n]...)
- }
- bi = bi[n:]
- }
- if bi := m.GetUnknown(); len(bi) != len(bo) {
- m.SetUnknown(bo)
- }
-}
-
-type fieldNum protoreflect.FieldNumber
-
-func (n1 fieldNum) Has(n2 protoreflect.FieldNumber) bool {
- return protoreflect.FieldNumber(n1) == n2
-}
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
deleted file mode 100644
index dcdc2202fa..0000000000
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ /dev/null
@@ -1,306 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "sync"
-
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-// StructProperties represents protocol buffer type information for a
-// generated protobuf message in the open-struct API.
-//
-// Deprecated: Do not use.
-type StructProperties struct {
- // Prop are the properties for each field.
- //
- // Fields belonging to a oneof are stored in OneofTypes instead, with a
- // single Properties representing the parent oneof held here.
- //
- // The order of Prop matches the order of fields in the Go struct.
- // Struct fields that are not related to protobufs have a "XXX_" prefix
- // in the Properties.Name and must be ignored by the user.
- Prop []*Properties
-
- // OneofTypes contains information about the oneof fields in this message.
- // It is keyed by the protobuf field name.
- OneofTypes map[string]*OneofProperties
-}
-
-// Properties represents the type information for a protobuf message field.
-//
-// Deprecated: Do not use.
-type Properties struct {
- // Name is a placeholder name with little meaningful semantic value.
- // If the name has an "XXX_" prefix, the entire Properties must be ignored.
- Name string
- // OrigName is the protobuf field name or oneof name.
- OrigName string
- // JSONName is the JSON name for the protobuf field.
- JSONName string
- // Enum is a placeholder name for enums.
- // For historical reasons, this is neither the Go name for the enum,
- // nor the protobuf name for the enum.
- Enum string // Deprecated: Do not use.
- // Weak contains the full name of the weakly referenced message.
- Weak string
- // Wire is a string representation of the wire type.
- Wire string
- // WireType is the protobuf wire type for the field.
- WireType int
- // Tag is the protobuf field number.
- Tag int
- // Required reports whether this is a required field.
- Required bool
- // Optional reports whether this is a optional field.
- Optional bool
- // Repeated reports whether this is a repeated field.
- Repeated bool
- // Packed reports whether this is a packed repeated field of scalars.
- Packed bool
- // Proto3 reports whether this field operates under the proto3 syntax.
- Proto3 bool
- // Oneof reports whether this field belongs within a oneof.
- Oneof bool
-
- // Default is the default value in string form.
- Default string
- // HasDefault reports whether the field has a default value.
- HasDefault bool
-
- // MapKeyProp is the properties for the key field for a map field.
- MapKeyProp *Properties
- // MapValProp is the properties for the value field for a map field.
- MapValProp *Properties
-}
-
-// OneofProperties represents the type information for a protobuf oneof.
-//
-// Deprecated: Do not use.
-type OneofProperties struct {
- // Type is a pointer to the generated wrapper type for the field value.
- // This is nil for messages that are not in the open-struct API.
- Type reflect.Type
- // Field is the index into StructProperties.Prop for the containing oneof.
- Field int
- // Prop is the properties for the field.
- Prop *Properties
-}
-
-// String formats the properties in the protobuf struct field tag style.
-func (p *Properties) String() string {
- s := p.Wire
- s += "," + strconv.Itoa(p.Tag)
- if p.Required {
- s += ",req"
- }
- if p.Optional {
- s += ",opt"
- }
- if p.Repeated {
- s += ",rep"
- }
- if p.Packed {
- s += ",packed"
- }
- s += ",name=" + p.OrigName
- if p.JSONName != "" {
- s += ",json=" + p.JSONName
- }
- if len(p.Enum) > 0 {
- s += ",enum=" + p.Enum
- }
- if len(p.Weak) > 0 {
- s += ",weak=" + p.Weak
- }
- if p.Proto3 {
- s += ",proto3"
- }
- if p.Oneof {
- s += ",oneof"
- }
- if p.HasDefault {
- s += ",def=" + p.Default
- }
- return s
-}
-
-// Parse populates p by parsing a string in the protobuf struct field tag style.
-func (p *Properties) Parse(tag string) {
- // For example: "bytes,49,opt,name=foo,def=hello!"
- for len(tag) > 0 {
- i := strings.IndexByte(tag, ',')
- if i < 0 {
- i = len(tag)
- }
- switch s := tag[:i]; {
- case strings.HasPrefix(s, "name="):
- p.OrigName = s[len("name="):]
- case strings.HasPrefix(s, "json="):
- p.JSONName = s[len("json="):]
- case strings.HasPrefix(s, "enum="):
- p.Enum = s[len("enum="):]
- case strings.HasPrefix(s, "weak="):
- p.Weak = s[len("weak="):]
- case strings.Trim(s, "0123456789") == "":
- n, _ := strconv.ParseUint(s, 10, 32)
- p.Tag = int(n)
- case s == "opt":
- p.Optional = true
- case s == "req":
- p.Required = true
- case s == "rep":
- p.Repeated = true
- case s == "varint" || s == "zigzag32" || s == "zigzag64":
- p.Wire = s
- p.WireType = WireVarint
- case s == "fixed32":
- p.Wire = s
- p.WireType = WireFixed32
- case s == "fixed64":
- p.Wire = s
- p.WireType = WireFixed64
- case s == "bytes":
- p.Wire = s
- p.WireType = WireBytes
- case s == "group":
- p.Wire = s
- p.WireType = WireStartGroup
- case s == "packed":
- p.Packed = true
- case s == "proto3":
- p.Proto3 = true
- case s == "oneof":
- p.Oneof = true
- case strings.HasPrefix(s, "def="):
- // The default tag is special in that everything afterwards is the
- // default regardless of the presence of commas.
- p.HasDefault = true
- p.Default, i = tag[len("def="):], len(tag)
- }
- tag = strings.TrimPrefix(tag[i:], ",")
- }
-}
-
-// Init populates the properties from a protocol buffer struct tag.
-//
-// Deprecated: Do not use.
-func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
- p.Name = name
- p.OrigName = name
- if tag == "" {
- return
- }
- p.Parse(tag)
-
- if typ != nil && typ.Kind() == reflect.Map {
- p.MapKeyProp = new(Properties)
- p.MapKeyProp.Init(nil, "Key", f.Tag.Get("protobuf_key"), nil)
- p.MapValProp = new(Properties)
- p.MapValProp.Init(nil, "Value", f.Tag.Get("protobuf_val"), nil)
- }
-}
-
-var propertiesCache sync.Map // map[reflect.Type]*StructProperties
-
-// GetProperties returns the list of properties for the type represented by t,
-// which must be a generated protocol buffer message in the open-struct API,
-// where protobuf message fields are represented by exported Go struct fields.
-//
-// Deprecated: Use protobuf reflection instead.
-func GetProperties(t reflect.Type) *StructProperties {
- if p, ok := propertiesCache.Load(t); ok {
- return p.(*StructProperties)
- }
- p, _ := propertiesCache.LoadOrStore(t, newProperties(t))
- return p.(*StructProperties)
-}
-
-func newProperties(t reflect.Type) *StructProperties {
- if t.Kind() != reflect.Struct {
- panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t))
- }
-
- var hasOneof bool
- prop := new(StructProperties)
-
- // Construct a list of properties for each field in the struct.
- for i := 0; i < t.NumField(); i++ {
- p := new(Properties)
- f := t.Field(i)
- tagField := f.Tag.Get("protobuf")
- p.Init(f.Type, f.Name, tagField, &f)
-
- tagOneof := f.Tag.Get("protobuf_oneof")
- if tagOneof != "" {
- hasOneof = true
- p.OrigName = tagOneof
- }
-
- // Rename unrelated struct fields with the "XXX_" prefix since so much
- // user code simply checks for this to exclude special fields.
- if tagField == "" && tagOneof == "" && !strings.HasPrefix(p.Name, "XXX_") {
- p.Name = "XXX_" + p.Name
- p.OrigName = "XXX_" + p.OrigName
- } else if p.Weak != "" {
- p.Name = p.OrigName // avoid possible "XXX_" prefix on weak field
- }
-
- prop.Prop = append(prop.Prop, p)
- }
-
- // Construct a mapping of oneof field names to properties.
- if hasOneof {
- var oneofWrappers []interface{}
- if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok {
- oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[3].Interface().([]interface{})
- }
- if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok {
- oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0].Interface().([]interface{})
- }
- if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(protoreflect.ProtoMessage); ok {
- if m, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *protoimpl.MessageInfo }); ok {
- oneofWrappers = m.ProtoMessageInfo().OneofWrappers
- }
- }
-
- prop.OneofTypes = make(map[string]*OneofProperties)
- for _, wrapper := range oneofWrappers {
- p := &OneofProperties{
- Type: reflect.ValueOf(wrapper).Type(), // *T
- Prop: new(Properties),
- }
- f := p.Type.Elem().Field(0)
- p.Prop.Name = f.Name
- p.Prop.Parse(f.Tag.Get("protobuf"))
-
- // Determine the struct field that contains this oneof.
- // Each wrapper is assignable to exactly one parent field.
- var foundOneof bool
- for i := 0; i < t.NumField() && !foundOneof; i++ {
- if p.Type.AssignableTo(t.Field(i).Type) {
- p.Field = i
- foundOneof = true
- }
- }
- if !foundOneof {
- panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t))
- }
- prop.OneofTypes[p.Prop.OrigName] = p
- }
- }
-
- return prop
-}
-
-func (sp *StructProperties) Len() int { return len(sp.Prop) }
-func (sp *StructProperties) Less(i, j int) bool { return false }
-func (sp *StructProperties) Swap(i, j int) { return }
diff --git a/vendor/github.com/golang/protobuf/proto/proto.go b/vendor/github.com/golang/protobuf/proto/proto.go
deleted file mode 100644
index 5aee89c323..0000000000
--- a/vendor/github.com/golang/protobuf/proto/proto.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package proto provides functionality for handling protocol buffer messages.
-// In particular, it provides marshaling and unmarshaling between a protobuf
-// message and the binary wire format.
-//
-// See https://developers.google.com/protocol-buffers/docs/gotutorial for
-// more information.
-//
-// Deprecated: Use the "google.golang.org/protobuf/proto" package instead.
-package proto
-
-import (
- protoV2 "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/runtime/protoiface"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-const (
- ProtoPackageIsVersion1 = true
- ProtoPackageIsVersion2 = true
- ProtoPackageIsVersion3 = true
- ProtoPackageIsVersion4 = true
-)
-
-// GeneratedEnum is any enum type generated by protoc-gen-go
-// which is a named int32 kind.
-// This type exists for documentation purposes.
-type GeneratedEnum interface{}
-
-// GeneratedMessage is any message type generated by protoc-gen-go
-// which is a pointer to a named struct kind.
-// This type exists for documentation purposes.
-type GeneratedMessage interface{}
-
-// Message is a protocol buffer message.
-//
-// This is the v1 version of the message interface and is marginally better
-// than an empty interface as it lacks any method to programatically interact
-// with the contents of the message.
-//
-// A v2 message is declared in "google.golang.org/protobuf/proto".Message and
-// exposes protobuf reflection as a first-class feature of the interface.
-//
-// To convert a v1 message to a v2 message, use the MessageV2 function.
-// To convert a v2 message to a v1 message, use the MessageV1 function.
-type Message = protoiface.MessageV1
-
-// MessageV1 converts either a v1 or v2 message to a v1 message.
-// It returns nil if m is nil.
-func MessageV1(m GeneratedMessage) protoiface.MessageV1 {
- return protoimpl.X.ProtoMessageV1Of(m)
-}
-
-// MessageV2 converts either a v1 or v2 message to a v2 message.
-// It returns nil if m is nil.
-func MessageV2(m GeneratedMessage) protoV2.Message {
- return protoimpl.X.ProtoMessageV2Of(m)
-}
-
-// MessageReflect returns a reflective view for a message.
-// It returns nil if m is nil.
-func MessageReflect(m Message) protoreflect.Message {
- return protoimpl.X.MessageOf(m)
-}
-
-// Marshaler is implemented by messages that can marshal themselves.
-// This interface is used by the following functions: Size, Marshal,
-// Buffer.Marshal, and Buffer.EncodeMessage.
-//
-// Deprecated: Do not implement.
-type Marshaler interface {
- // Marshal formats the encoded bytes of the message.
- // It should be deterministic and emit valid protobuf wire data.
- // The caller takes ownership of the returned buffer.
- Marshal() ([]byte, error)
-}
-
-// Unmarshaler is implemented by messages that can unmarshal themselves.
-// This interface is used by the following functions: Unmarshal, UnmarshalMerge,
-// Buffer.Unmarshal, Buffer.DecodeMessage, and Buffer.DecodeGroup.
-//
-// Deprecated: Do not implement.
-type Unmarshaler interface {
- // Unmarshal parses the encoded bytes of the protobuf wire input.
- // The provided buffer is only valid for during method call.
- // It should not reset the receiver message.
- Unmarshal([]byte) error
-}
-
-// Merger is implemented by messages that can merge themselves.
-// This interface is used by the following functions: Clone and Merge.
-//
-// Deprecated: Do not implement.
-type Merger interface {
- // Merge merges the contents of src into the receiver message.
- // It clones all data structures in src such that it aliases no mutable
- // memory referenced by src.
- Merge(src Message)
-}
-
-// RequiredNotSetError is an error type returned when
-// marshaling or unmarshaling a message with missing required fields.
-type RequiredNotSetError struct {
- err error
-}
-
-func (e *RequiredNotSetError) Error() string {
- if e.err != nil {
- return e.err.Error()
- }
- return "proto: required field not set"
-}
-func (e *RequiredNotSetError) RequiredNotSet() bool {
- return true
-}
-
-func checkRequiredNotSet(m protoV2.Message) error {
- if err := protoV2.CheckInitialized(m); err != nil {
- return &RequiredNotSetError{err: err}
- }
- return nil
-}
-
-// Clone returns a deep copy of src.
-func Clone(src Message) Message {
- return MessageV1(protoV2.Clone(MessageV2(src)))
-}
-
-// Merge merges src into dst, which must be messages of the same type.
-//
-// Populated scalar fields in src are copied to dst, while populated
-// singular messages in src are merged into dst by recursively calling Merge.
-// The elements of every list field in src is appended to the corresponded
-// list fields in dst. The entries of every map field in src is copied into
-// the corresponding map field in dst, possibly replacing existing entries.
-// The unknown fields of src are appended to the unknown fields of dst.
-func Merge(dst, src Message) {
- protoV2.Merge(MessageV2(dst), MessageV2(src))
-}
-
-// Equal reports whether two messages are equal.
-// If two messages marshal to the same bytes under deterministic serialization,
-// then Equal is guaranteed to report true.
-//
-// Two messages are equal if they are the same protobuf message type,
-// have the same set of populated known and extension field values,
-// and the same set of unknown fields values.
-//
-// Scalar values are compared with the equivalent of the == operator in Go,
-// except bytes values which are compared using bytes.Equal and
-// floating point values which specially treat NaNs as equal.
-// Message values are compared by recursively calling Equal.
-// Lists are equal if each element value is also equal.
-// Maps are equal if they have the same set of keys, where the pair of values
-// for each key is also equal.
-func Equal(x, y Message) bool {
- return protoV2.Equal(MessageV2(x), MessageV2(y))
-}
-
-func isMessageSet(md protoreflect.MessageDescriptor) bool {
- ms, ok := md.(interface{ IsMessageSet() bool })
- return ok && ms.IsMessageSet()
-}
diff --git a/vendor/github.com/golang/protobuf/proto/registry.go b/vendor/github.com/golang/protobuf/proto/registry.go
deleted file mode 100644
index 066b4323b4..0000000000
--- a/vendor/github.com/golang/protobuf/proto/registry.go
+++ /dev/null
@@ -1,317 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io/ioutil"
- "reflect"
- "strings"
- "sync"
-
- "google.golang.org/protobuf/reflect/protodesc"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
- "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-// filePath is the path to the proto source file.
-type filePath = string // e.g., "google/protobuf/descriptor.proto"
-
-// fileDescGZIP is the compressed contents of the encoded FileDescriptorProto.
-type fileDescGZIP = []byte
-
-var fileCache sync.Map // map[filePath]fileDescGZIP
-
-// RegisterFile is called from generated code to register the compressed
-// FileDescriptorProto with the file path for a proto source file.
-//
-// Deprecated: Use protoregistry.GlobalFiles.RegisterFile instead.
-func RegisterFile(s filePath, d fileDescGZIP) {
- // Decompress the descriptor.
- zr, err := gzip.NewReader(bytes.NewReader(d))
- if err != nil {
- panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err))
- }
- b, err := ioutil.ReadAll(zr)
- if err != nil {
- panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err))
- }
-
- // Construct a protoreflect.FileDescriptor from the raw descriptor.
- // Note that DescBuilder.Build automatically registers the constructed
- // file descriptor with the v2 registry.
- protoimpl.DescBuilder{RawDescriptor: b}.Build()
-
- // Locally cache the raw descriptor form for the file.
- fileCache.Store(s, d)
-}
-
-// FileDescriptor returns the compressed FileDescriptorProto given the file path
-// for a proto source file. It returns nil if not found.
-//
-// Deprecated: Use protoregistry.GlobalFiles.FindFileByPath instead.
-func FileDescriptor(s filePath) fileDescGZIP {
- if v, ok := fileCache.Load(s); ok {
- return v.(fileDescGZIP)
- }
-
- // Find the descriptor in the v2 registry.
- var b []byte
- if fd, _ := protoregistry.GlobalFiles.FindFileByPath(s); fd != nil {
- b, _ = Marshal(protodesc.ToFileDescriptorProto(fd))
- }
-
- // Locally cache the raw descriptor form for the file.
- if len(b) > 0 {
- v, _ := fileCache.LoadOrStore(s, protoimpl.X.CompressGZIP(b))
- return v.(fileDescGZIP)
- }
- return nil
-}
-
-// enumName is the name of an enum. For historical reasons, the enum name is
-// neither the full Go name nor the full protobuf name of the enum.
-// The name is the dot-separated combination of just the proto package that the
-// enum is declared within followed by the Go type name of the generated enum.
-type enumName = string // e.g., "my.proto.package.GoMessage_GoEnum"
-
-// enumsByName maps enum values by name to their numeric counterpart.
-type enumsByName = map[string]int32
-
-// enumsByNumber maps enum values by number to their name counterpart.
-type enumsByNumber = map[int32]string
-
-var enumCache sync.Map // map[enumName]enumsByName
-var numFilesCache sync.Map // map[protoreflect.FullName]int
-
-// RegisterEnum is called from the generated code to register the mapping of
-// enum value names to enum numbers for the enum identified by s.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RegisterEnum instead.
-func RegisterEnum(s enumName, _ enumsByNumber, m enumsByName) {
- if _, ok := enumCache.Load(s); ok {
- panic("proto: duplicate enum registered: " + s)
- }
- enumCache.Store(s, m)
-
- // This does not forward registration to the v2 registry since this API
- // lacks sufficient information to construct a complete v2 enum descriptor.
-}
-
-// EnumValueMap returns the mapping from enum value names to enum numbers for
-// the enum of the given name. It returns nil if not found.
-//
-// Deprecated: Use protoregistry.GlobalTypes.FindEnumByName instead.
-func EnumValueMap(s enumName) enumsByName {
- if v, ok := enumCache.Load(s); ok {
- return v.(enumsByName)
- }
-
- // Check whether the cache is stale. If the number of files in the current
- // package differs, then it means that some enums may have been recently
- // registered upstream that we do not know about.
- var protoPkg protoreflect.FullName
- if i := strings.LastIndexByte(s, '.'); i >= 0 {
- protoPkg = protoreflect.FullName(s[:i])
- }
- v, _ := numFilesCache.Load(protoPkg)
- numFiles, _ := v.(int)
- if protoregistry.GlobalFiles.NumFilesByPackage(protoPkg) == numFiles {
- return nil // cache is up-to-date; was not found earlier
- }
-
- // Update the enum cache for all enums declared in the given proto package.
- numFiles = 0
- protoregistry.GlobalFiles.RangeFilesByPackage(protoPkg, func(fd protoreflect.FileDescriptor) bool {
- walkEnums(fd, func(ed protoreflect.EnumDescriptor) {
- name := protoimpl.X.LegacyEnumName(ed)
- if _, ok := enumCache.Load(name); !ok {
- m := make(enumsByName)
- evs := ed.Values()
- for i := evs.Len() - 1; i >= 0; i-- {
- ev := evs.Get(i)
- m[string(ev.Name())] = int32(ev.Number())
- }
- enumCache.LoadOrStore(name, m)
- }
- })
- numFiles++
- return true
- })
- numFilesCache.Store(protoPkg, numFiles)
-
- // Check cache again for enum map.
- if v, ok := enumCache.Load(s); ok {
- return v.(enumsByName)
- }
- return nil
-}
-
-// walkEnums recursively walks all enums declared in d.
-func walkEnums(d interface {
- Enums() protoreflect.EnumDescriptors
- Messages() protoreflect.MessageDescriptors
-}, f func(protoreflect.EnumDescriptor)) {
- eds := d.Enums()
- for i := eds.Len() - 1; i >= 0; i-- {
- f(eds.Get(i))
- }
- mds := d.Messages()
- for i := mds.Len() - 1; i >= 0; i-- {
- walkEnums(mds.Get(i), f)
- }
-}
-
-// messageName is the full name of protobuf message.
-type messageName = string
-
-var messageTypeCache sync.Map // map[messageName]reflect.Type
-
-// RegisterType is called from generated code to register the message Go type
-// for a message of the given name.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RegisterMessage instead.
-func RegisterType(m Message, s messageName) {
- mt := protoimpl.X.LegacyMessageTypeOf(m, protoreflect.FullName(s))
- if err := protoregistry.GlobalTypes.RegisterMessage(mt); err != nil {
- panic(err)
- }
- messageTypeCache.Store(s, reflect.TypeOf(m))
-}
-
-// RegisterMapType is called from generated code to register the Go map type
-// for a protobuf message representing a map entry.
-//
-// Deprecated: Do not use.
-func RegisterMapType(m interface{}, s messageName) {
- t := reflect.TypeOf(m)
- if t.Kind() != reflect.Map {
- panic(fmt.Sprintf("invalid map kind: %v", t))
- }
- if _, ok := messageTypeCache.Load(s); ok {
- panic(fmt.Errorf("proto: duplicate proto message registered: %s", s))
- }
- messageTypeCache.Store(s, t)
-}
-
-// MessageType returns the message type for a named message.
-// It returns nil if not found.
-//
-// Deprecated: Use protoregistry.GlobalTypes.FindMessageByName instead.
-func MessageType(s messageName) reflect.Type {
- if v, ok := messageTypeCache.Load(s); ok {
- return v.(reflect.Type)
- }
-
- // Derive the message type from the v2 registry.
- var t reflect.Type
- if mt, _ := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(s)); mt != nil {
- t = messageGoType(mt)
- }
-
- // If we could not get a concrete type, it is possible that it is a
- // pseudo-message for a map entry.
- if t == nil {
- d, _ := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(s))
- if md, _ := d.(protoreflect.MessageDescriptor); md != nil && md.IsMapEntry() {
- kt := goTypeForField(md.Fields().ByNumber(1))
- vt := goTypeForField(md.Fields().ByNumber(2))
- t = reflect.MapOf(kt, vt)
- }
- }
-
- // Locally cache the message type for the given name.
- if t != nil {
- v, _ := messageTypeCache.LoadOrStore(s, t)
- return v.(reflect.Type)
- }
- return nil
-}
-
-func goTypeForField(fd protoreflect.FieldDescriptor) reflect.Type {
- switch k := fd.Kind(); k {
- case protoreflect.EnumKind:
- if et, _ := protoregistry.GlobalTypes.FindEnumByName(fd.Enum().FullName()); et != nil {
- return enumGoType(et)
- }
- return reflect.TypeOf(protoreflect.EnumNumber(0))
- case protoreflect.MessageKind, protoreflect.GroupKind:
- if mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()); mt != nil {
- return messageGoType(mt)
- }
- return reflect.TypeOf((*protoreflect.Message)(nil)).Elem()
- default:
- return reflect.TypeOf(fd.Default().Interface())
- }
-}
-
-func enumGoType(et protoreflect.EnumType) reflect.Type {
- return reflect.TypeOf(et.New(0))
-}
-
-func messageGoType(mt protoreflect.MessageType) reflect.Type {
- return reflect.TypeOf(MessageV1(mt.Zero().Interface()))
-}
-
-// MessageName returns the full protobuf name for the given message type.
-//
-// Deprecated: Use protoreflect.MessageDescriptor.FullName instead.
-func MessageName(m Message) messageName {
- if m == nil {
- return ""
- }
- if m, ok := m.(interface{ XXX_MessageName() messageName }); ok {
- return m.XXX_MessageName()
- }
- return messageName(protoimpl.X.MessageDescriptorOf(m).FullName())
-}
-
-// RegisterExtension is called from the generated code to register
-// the extension descriptor.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RegisterExtension instead.
-func RegisterExtension(d *ExtensionDesc) {
- if err := protoregistry.GlobalTypes.RegisterExtension(d); err != nil {
- panic(err)
- }
-}
-
-type extensionsByNumber = map[int32]*ExtensionDesc
-
-var extensionCache sync.Map // map[messageName]extensionsByNumber
-
-// RegisteredExtensions returns a map of the registered extensions for the
-// provided protobuf message, indexed by the extension field number.
-//
-// Deprecated: Use protoregistry.GlobalTypes.RangeExtensionsByMessage instead.
-func RegisteredExtensions(m Message) extensionsByNumber {
- // Check whether the cache is stale. If the number of extensions for
- // the given message differs, then it means that some extensions were
- // recently registered upstream that we do not know about.
- s := MessageName(m)
- v, _ := extensionCache.Load(s)
- xs, _ := v.(extensionsByNumber)
- if protoregistry.GlobalTypes.NumExtensionsByMessage(protoreflect.FullName(s)) == len(xs) {
- return xs // cache is up-to-date
- }
-
- // Cache is stale, re-compute the extensions map.
- xs = make(extensionsByNumber)
- protoregistry.GlobalTypes.RangeExtensionsByMessage(protoreflect.FullName(s), func(xt protoreflect.ExtensionType) bool {
- if xd, ok := xt.(*ExtensionDesc); ok {
- xs[int32(xt.TypeDescriptor().Number())] = xd
- } else {
- // TODO: This implies that the protoreflect.ExtensionType is a
- // custom type not generated by protoc-gen-go. We could try and
- // convert the type to an ExtensionDesc.
- }
- return true
- })
- extensionCache.Store(s, xs)
- return xs
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text_decode.go b/vendor/github.com/golang/protobuf/proto/text_decode.go
deleted file mode 100644
index 47eb3e4450..0000000000
--- a/vendor/github.com/golang/protobuf/proto/text_decode.go
+++ /dev/null
@@ -1,801 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "encoding"
- "errors"
- "fmt"
- "reflect"
- "strconv"
- "strings"
- "unicode/utf8"
-
- "google.golang.org/protobuf/encoding/prototext"
- protoV2 "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
-)
-
-const wrapTextUnmarshalV2 = false
-
-// ParseError is returned by UnmarshalText.
-type ParseError struct {
- Message string
-
- // Deprecated: Do not use.
- Line, Offset int
-}
-
-func (e *ParseError) Error() string {
- if wrapTextUnmarshalV2 {
- return e.Message
- }
- if e.Line == 1 {
- return fmt.Sprintf("line 1.%d: %v", e.Offset, e.Message)
- }
- return fmt.Sprintf("line %d: %v", e.Line, e.Message)
-}
-
-// UnmarshalText parses a proto text formatted string into m.
-func UnmarshalText(s string, m Message) error {
- if u, ok := m.(encoding.TextUnmarshaler); ok {
- return u.UnmarshalText([]byte(s))
- }
-
- m.Reset()
- mi := MessageV2(m)
-
- if wrapTextUnmarshalV2 {
- err := prototext.UnmarshalOptions{
- AllowPartial: true,
- }.Unmarshal([]byte(s), mi)
- if err != nil {
- return &ParseError{Message: err.Error()}
- }
- return checkRequiredNotSet(mi)
- } else {
- if err := newTextParser(s).unmarshalMessage(mi.ProtoReflect(), ""); err != nil {
- return err
- }
- return checkRequiredNotSet(mi)
- }
-}
-
-type textParser struct {
- s string // remaining input
- done bool // whether the parsing is finished (success or error)
- backed bool // whether back() was called
- offset, line int
- cur token
-}
-
-type token struct {
- value string
- err *ParseError
- line int // line number
- offset int // byte number from start of input, not start of line
- unquoted string // the unquoted version of value, if it was a quoted string
-}
-
-func newTextParser(s string) *textParser {
- p := new(textParser)
- p.s = s
- p.line = 1
- p.cur.line = 1
- return p
-}
-
-func (p *textParser) unmarshalMessage(m protoreflect.Message, terminator string) (err error) {
- md := m.Descriptor()
- fds := md.Fields()
-
- // A struct is a sequence of "name: value", terminated by one of
- // '>' or '}', or the end of the input. A name may also be
- // "[extension]" or "[type/url]".
- //
- // The whole struct can also be an expanded Any message, like:
- // [type/url] < ... struct contents ... >
- seen := make(map[protoreflect.FieldNumber]bool)
- for {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value == terminator {
- break
- }
- if tok.value == "[" {
- if err := p.unmarshalExtensionOrAny(m, seen); err != nil {
- return err
- }
- continue
- }
-
- // This is a normal, non-extension field.
- name := protoreflect.Name(tok.value)
- fd := fds.ByName(name)
- switch {
- case fd == nil:
- gd := fds.ByName(protoreflect.Name(strings.ToLower(string(name))))
- if gd != nil && gd.Kind() == protoreflect.GroupKind && gd.Message().Name() == name {
- fd = gd
- }
- case fd.Kind() == protoreflect.GroupKind && fd.Message().Name() != name:
- fd = nil
- case fd.IsWeak() && fd.Message().IsPlaceholder():
- fd = nil
- }
- if fd == nil {
- typeName := string(md.FullName())
- if m, ok := m.Interface().(Message); ok {
- t := reflect.TypeOf(m)
- if t.Kind() == reflect.Ptr {
- typeName = t.Elem().String()
- }
- }
- return p.errorf("unknown field name %q in %v", name, typeName)
- }
- if od := fd.ContainingOneof(); od != nil && m.WhichOneof(od) != nil {
- return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, od.Name())
- }
- if fd.Cardinality() != protoreflect.Repeated && seen[fd.Number()] {
- return p.errorf("non-repeated field %q was repeated", fd.Name())
- }
- seen[fd.Number()] = true
-
- // Consume any colon.
- if err := p.checkForColon(fd); err != nil {
- return err
- }
-
- // Parse into the field.
- v := m.Get(fd)
- if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) {
- v = m.Mutable(fd)
- }
- if v, err = p.unmarshalValue(v, fd); err != nil {
- return err
- }
- m.Set(fd, v)
-
- if err := p.consumeOptionalSeparator(); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (p *textParser) unmarshalExtensionOrAny(m protoreflect.Message, seen map[protoreflect.FieldNumber]bool) error {
- name, err := p.consumeExtensionOrAnyName()
- if err != nil {
- return err
- }
-
- // If it contains a slash, it's an Any type URL.
- if slashIdx := strings.LastIndex(name, "/"); slashIdx >= 0 {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- // consume an optional colon
- if tok.value == ":" {
- tok = p.next()
- if tok.err != nil {
- return tok.err
- }
- }
-
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return p.errorf("expected '{' or '<', found %q", tok.value)
- }
-
- mt, err := protoregistry.GlobalTypes.FindMessageByURL(name)
- if err != nil {
- return p.errorf("unrecognized message %q in google.protobuf.Any", name[slashIdx+len("/"):])
- }
- m2 := mt.New()
- if err := p.unmarshalMessage(m2, terminator); err != nil {
- return err
- }
- b, err := protoV2.Marshal(m2.Interface())
- if err != nil {
- return p.errorf("failed to marshal message of type %q: %v", name[slashIdx+len("/"):], err)
- }
-
- urlFD := m.Descriptor().Fields().ByName("type_url")
- valFD := m.Descriptor().Fields().ByName("value")
- if seen[urlFD.Number()] {
- return p.errorf("Any message unpacked multiple times, or %q already set", urlFD.Name())
- }
- if seen[valFD.Number()] {
- return p.errorf("Any message unpacked multiple times, or %q already set", valFD.Name())
- }
- m.Set(urlFD, protoreflect.ValueOfString(name))
- m.Set(valFD, protoreflect.ValueOfBytes(b))
- seen[urlFD.Number()] = true
- seen[valFD.Number()] = true
- return nil
- }
-
- xname := protoreflect.FullName(name)
- xt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname)
- if xt == nil && isMessageSet(m.Descriptor()) {
- xt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append("message_set_extension"))
- }
- if xt == nil {
- return p.errorf("unrecognized extension %q", name)
- }
- fd := xt.TypeDescriptor()
- if fd.ContainingMessage().FullName() != m.Descriptor().FullName() {
- return p.errorf("extension field %q does not extend message %q", name, m.Descriptor().FullName())
- }
-
- if err := p.checkForColon(fd); err != nil {
- return err
- }
-
- v := m.Get(fd)
- if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) {
- v = m.Mutable(fd)
- }
- v, err = p.unmarshalValue(v, fd)
- if err != nil {
- return err
- }
- m.Set(fd, v)
- return p.consumeOptionalSeparator()
-}
-
-func (p *textParser) unmarshalValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == "" {
- return v, p.errorf("unexpected EOF")
- }
-
- switch {
- case fd.IsList():
- lv := v.List()
- var err error
- if tok.value == "[" {
- // Repeated field with list notation, like [1,2,3].
- for {
- vv := lv.NewElement()
- vv, err = p.unmarshalSingularValue(vv, fd)
- if err != nil {
- return v, err
- }
- lv.Append(vv)
-
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == "]" {
- break
- }
- if tok.value != "," {
- return v, p.errorf("Expected ']' or ',' found %q", tok.value)
- }
- }
- return v, nil
- }
-
- // One value of the repeated field.
- p.back()
- vv := lv.NewElement()
- vv, err = p.unmarshalSingularValue(vv, fd)
- if err != nil {
- return v, err
- }
- lv.Append(vv)
- return v, nil
- case fd.IsMap():
- // The map entry should be this sequence of tokens:
- // < key : KEY value : VALUE >
- // However, implementations may omit key or value, and technically
- // we should support them in any order.
- var terminator string
- switch tok.value {
- case "<":
- terminator = ">"
- case "{":
- terminator = "}"
- default:
- return v, p.errorf("expected '{' or '<', found %q", tok.value)
- }
-
- keyFD := fd.MapKey()
- valFD := fd.MapValue()
-
- mv := v.Map()
- kv := keyFD.Default()
- vv := mv.NewValue()
- for {
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == terminator {
- break
- }
- var err error
- switch tok.value {
- case "key":
- if err := p.consumeToken(":"); err != nil {
- return v, err
- }
- if kv, err = p.unmarshalSingularValue(kv, keyFD); err != nil {
- return v, err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return v, err
- }
- case "value":
- if err := p.checkForColon(valFD); err != nil {
- return v, err
- }
- if vv, err = p.unmarshalSingularValue(vv, valFD); err != nil {
- return v, err
- }
- if err := p.consumeOptionalSeparator(); err != nil {
- return v, err
- }
- default:
- p.back()
- return v, p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value)
- }
- }
- mv.Set(kv.MapKey(), vv)
- return v, nil
- default:
- p.back()
- return p.unmarshalSingularValue(v, fd)
- }
-}
-
-func (p *textParser) unmarshalSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
- tok := p.next()
- if tok.err != nil {
- return v, tok.err
- }
- if tok.value == "" {
- return v, p.errorf("unexpected EOF")
- }
-
- switch fd.Kind() {
- case protoreflect.BoolKind:
- switch tok.value {
- case "true", "1", "t", "True":
- return protoreflect.ValueOfBool(true), nil
- case "false", "0", "f", "False":
- return protoreflect.ValueOfBool(false), nil
- }
- case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfInt32(int32(x)), nil
- }
-
- // The C++ parser accepts large positive hex numbers that uses
- // two's complement arithmetic to represent negative numbers.
- // This feature is here for backwards compatibility with C++.
- if strings.HasPrefix(tok.value, "0x") {
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfInt32(int32(-(int64(^x) + 1))), nil
- }
- }
- case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
- if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {
- return protoreflect.ValueOfInt64(int64(x)), nil
- }
-
- // The C++ parser accepts large positive hex numbers that uses
- // two's complement arithmetic to represent negative numbers.
- // This feature is here for backwards compatibility with C++.
- if strings.HasPrefix(tok.value, "0x") {
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- return protoreflect.ValueOfInt64(int64(-(int64(^x) + 1))), nil
- }
- }
- case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
- if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfUint32(uint32(x)), nil
- }
- case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
- if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {
- return protoreflect.ValueOfUint64(uint64(x)), nil
- }
- case protoreflect.FloatKind:
- // Ignore 'f' for compatibility with output generated by C++,
- // but don't remove 'f' when the value is "-inf" or "inf".
- v := tok.value
- if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" {
- v = v[:len(v)-len("f")]
- }
- if x, err := strconv.ParseFloat(v, 32); err == nil {
- return protoreflect.ValueOfFloat32(float32(x)), nil
- }
- case protoreflect.DoubleKind:
- // Ignore 'f' for compatibility with output generated by C++,
- // but don't remove 'f' when the value is "-inf" or "inf".
- v := tok.value
- if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" {
- v = v[:len(v)-len("f")]
- }
- if x, err := strconv.ParseFloat(v, 64); err == nil {
- return protoreflect.ValueOfFloat64(float64(x)), nil
- }
- case protoreflect.StringKind:
- if isQuote(tok.value[0]) {
- return protoreflect.ValueOfString(tok.unquoted), nil
- }
- case protoreflect.BytesKind:
- if isQuote(tok.value[0]) {
- return protoreflect.ValueOfBytes([]byte(tok.unquoted)), nil
- }
- case protoreflect.EnumKind:
- if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
- return protoreflect.ValueOfEnum(protoreflect.EnumNumber(x)), nil
- }
- vd := fd.Enum().Values().ByName(protoreflect.Name(tok.value))
- if vd != nil {
- return protoreflect.ValueOfEnum(vd.Number()), nil
- }
- case protoreflect.MessageKind, protoreflect.GroupKind:
- var terminator string
- switch tok.value {
- case "{":
- terminator = "}"
- case "<":
- terminator = ">"
- default:
- return v, p.errorf("expected '{' or '<', found %q", tok.value)
- }
- err := p.unmarshalMessage(v.Message(), terminator)
- return v, err
- default:
- panic(fmt.Sprintf("invalid kind %v", fd.Kind()))
- }
- return v, p.errorf("invalid %v: %v", fd.Kind(), tok.value)
-}
-
-// Consume a ':' from the input stream (if the next token is a colon),
-// returning an error if a colon is needed but not present.
-func (p *textParser) checkForColon(fd protoreflect.FieldDescriptor) *ParseError {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ":" {
- if fd.Message() == nil {
- return p.errorf("expected ':', found %q", tok.value)
- }
- p.back()
- }
- return nil
-}
-
-// consumeExtensionOrAnyName consumes an extension name or an Any type URL and
-// the following ']'. It returns the name or URL consumed.
-func (p *textParser) consumeExtensionOrAnyName() (string, error) {
- tok := p.next()
- if tok.err != nil {
- return "", tok.err
- }
-
- // If extension name or type url is quoted, it's a single token.
- if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {
- name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))
- if err != nil {
- return "", err
- }
- return name, p.consumeToken("]")
- }
-
- // Consume everything up to "]"
- var parts []string
- for tok.value != "]" {
- parts = append(parts, tok.value)
- tok = p.next()
- if tok.err != nil {
- return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
- }
- if p.done && tok.value != "]" {
- return "", p.errorf("unclosed type_url or extension name")
- }
- }
- return strings.Join(parts, ""), nil
-}
-
-// consumeOptionalSeparator consumes an optional semicolon or comma.
-// It is used in unmarshalMessage to provide backward compatibility.
-func (p *textParser) consumeOptionalSeparator() error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != ";" && tok.value != "," {
- p.back()
- }
- return nil
-}
-
-func (p *textParser) errorf(format string, a ...interface{}) *ParseError {
- pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}
- p.cur.err = pe
- p.done = true
- return pe
-}
-
-func (p *textParser) skipWhitespace() {
- i := 0
- for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {
- if p.s[i] == '#' {
- // comment; skip to end of line or input
- for i < len(p.s) && p.s[i] != '\n' {
- i++
- }
- if i == len(p.s) {
- break
- }
- }
- if p.s[i] == '\n' {
- p.line++
- }
- i++
- }
- p.offset += i
- p.s = p.s[i:len(p.s)]
- if len(p.s) == 0 {
- p.done = true
- }
-}
-
-func (p *textParser) advance() {
- // Skip whitespace
- p.skipWhitespace()
- if p.done {
- return
- }
-
- // Start of non-whitespace
- p.cur.err = nil
- p.cur.offset, p.cur.line = p.offset, p.line
- p.cur.unquoted = ""
- switch p.s[0] {
- case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':
- // Single symbol
- p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]
- case '"', '\'':
- // Quoted string
- i := 1
- for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' {
- if p.s[i] == '\\' && i+1 < len(p.s) {
- // skip escaped char
- i++
- }
- i++
- }
- if i >= len(p.s) || p.s[i] != p.s[0] {
- p.errorf("unmatched quote")
- return
- }
- unq, err := unquoteC(p.s[1:i], rune(p.s[0]))
- if err != nil {
- p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err)
- return
- }
- p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]
- p.cur.unquoted = unq
- default:
- i := 0
- for i < len(p.s) && isIdentOrNumberChar(p.s[i]) {
- i++
- }
- if i == 0 {
- p.errorf("unexpected byte %#x", p.s[0])
- return
- }
- p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]
- }
- p.offset += len(p.cur.value)
-}
-
-// Back off the parser by one token. Can only be done between calls to next().
-// It makes the next advance() a no-op.
-func (p *textParser) back() { p.backed = true }
-
-// Advances the parser and returns the new current token.
-func (p *textParser) next() *token {
- if p.backed || p.done {
- p.backed = false
- return &p.cur
- }
- p.advance()
- if p.done {
- p.cur.value = ""
- } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {
- // Look for multiple quoted strings separated by whitespace,
- // and concatenate them.
- cat := p.cur
- for {
- p.skipWhitespace()
- if p.done || !isQuote(p.s[0]) {
- break
- }
- p.advance()
- if p.cur.err != nil {
- return &p.cur
- }
- cat.value += " " + p.cur.value
- cat.unquoted += p.cur.unquoted
- }
- p.done = false // parser may have seen EOF, but we want to return cat
- p.cur = cat
- }
- return &p.cur
-}
-
-func (p *textParser) consumeToken(s string) error {
- tok := p.next()
- if tok.err != nil {
- return tok.err
- }
- if tok.value != s {
- p.back()
- return p.errorf("expected %q, found %q", s, tok.value)
- }
- return nil
-}
-
-var errBadUTF8 = errors.New("proto: bad UTF-8")
-
-func unquoteC(s string, quote rune) (string, error) {
- // This is based on C++'s tokenizer.cc.
- // Despite its name, this is *not* parsing C syntax.
- // For instance, "\0" is an invalid quoted string.
-
- // Avoid allocation in trivial cases.
- simple := true
- for _, r := range s {
- if r == '\\' || r == quote {
- simple = false
- break
- }
- }
- if simple {
- return s, nil
- }
-
- buf := make([]byte, 0, 3*len(s)/2)
- for len(s) > 0 {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", errBadUTF8
- }
- s = s[n:]
- if r != '\\' {
- if r < utf8.RuneSelf {
- buf = append(buf, byte(r))
- } else {
- buf = append(buf, string(r)...)
- }
- continue
- }
-
- ch, tail, err := unescape(s)
- if err != nil {
- return "", err
- }
- buf = append(buf, ch...)
- s = tail
- }
- return string(buf), nil
-}
-
-func unescape(s string) (ch string, tail string, err error) {
- r, n := utf8.DecodeRuneInString(s)
- if r == utf8.RuneError && n == 1 {
- return "", "", errBadUTF8
- }
- s = s[n:]
- switch r {
- case 'a':
- return "\a", s, nil
- case 'b':
- return "\b", s, nil
- case 'f':
- return "\f", s, nil
- case 'n':
- return "\n", s, nil
- case 'r':
- return "\r", s, nil
- case 't':
- return "\t", s, nil
- case 'v':
- return "\v", s, nil
- case '?':
- return "?", s, nil // trigraph workaround
- case '\'', '"', '\\':
- return string(r), s, nil
- case '0', '1', '2', '3', '4', '5', '6', '7':
- if len(s) < 2 {
- return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
- }
- ss := string(r) + s[:2]
- s = s[2:]
- i, err := strconv.ParseUint(ss, 8, 8)
- if err != nil {
- return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss)
- }
- return string([]byte{byte(i)}), s, nil
- case 'x', 'X', 'u', 'U':
- var n int
- switch r {
- case 'x', 'X':
- n = 2
- case 'u':
- n = 4
- case 'U':
- n = 8
- }
- if len(s) < n {
- return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n)
- }
- ss := s[:n]
- s = s[n:]
- i, err := strconv.ParseUint(ss, 16, 64)
- if err != nil {
- return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss)
- }
- if r == 'x' || r == 'X' {
- return string([]byte{byte(i)}), s, nil
- }
- if i > utf8.MaxRune {
- return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
- }
- return string(rune(i)), s, nil
- }
- return "", "", fmt.Errorf(`unknown escape \%c`, r)
-}
-
-func isIdentOrNumberChar(c byte) bool {
- switch {
- case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':
- return true
- case '0' <= c && c <= '9':
- return true
- }
- switch c {
- case '-', '+', '.', '_':
- return true
- }
- return false
-}
-
-func isWhitespace(c byte) bool {
- switch c {
- case ' ', '\t', '\n', '\r':
- return true
- }
- return false
-}
-
-func isQuote(c byte) bool {
- switch c {
- case '"', '\'':
- return true
- }
- return false
-}
diff --git a/vendor/github.com/golang/protobuf/proto/text_encode.go b/vendor/github.com/golang/protobuf/proto/text_encode.go
deleted file mode 100644
index a31134eeb3..0000000000
--- a/vendor/github.com/golang/protobuf/proto/text_encode.go
+++ /dev/null
@@ -1,560 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- "bytes"
- "encoding"
- "fmt"
- "io"
- "math"
- "sort"
- "strings"
-
- "google.golang.org/protobuf/encoding/prototext"
- "google.golang.org/protobuf/encoding/protowire"
- "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
-)
-
-const wrapTextMarshalV2 = false
-
-// TextMarshaler is a configurable text format marshaler.
-type TextMarshaler struct {
- Compact bool // use compact text format (one line)
- ExpandAny bool // expand google.protobuf.Any messages of known types
-}
-
-// Marshal writes the proto text format of m to w.
-func (tm *TextMarshaler) Marshal(w io.Writer, m Message) error {
- b, err := tm.marshal(m)
- if len(b) > 0 {
- if _, err := w.Write(b); err != nil {
- return err
- }
- }
- return err
-}
-
-// Text returns a proto text formatted string of m.
-func (tm *TextMarshaler) Text(m Message) string {
- b, _ := tm.marshal(m)
- return string(b)
-}
-
-func (tm *TextMarshaler) marshal(m Message) ([]byte, error) {
- mr := MessageReflect(m)
- if mr == nil || !mr.IsValid() {
- return []byte(""), nil
- }
-
- if wrapTextMarshalV2 {
- if m, ok := m.(encoding.TextMarshaler); ok {
- return m.MarshalText()
- }
-
- opts := prototext.MarshalOptions{
- AllowPartial: true,
- EmitUnknown: true,
- }
- if !tm.Compact {
- opts.Indent = " "
- }
- if !tm.ExpandAny {
- opts.Resolver = (*protoregistry.Types)(nil)
- }
- return opts.Marshal(mr.Interface())
- } else {
- w := &textWriter{
- compact: tm.Compact,
- expandAny: tm.ExpandAny,
- complete: true,
- }
-
- if m, ok := m.(encoding.TextMarshaler); ok {
- b, err := m.MarshalText()
- if err != nil {
- return nil, err
- }
- w.Write(b)
- return w.buf, nil
- }
-
- err := w.writeMessage(mr)
- return w.buf, err
- }
-}
-
-var (
- defaultTextMarshaler = TextMarshaler{}
- compactTextMarshaler = TextMarshaler{Compact: true}
-)
-
-// MarshalText writes the proto text format of m to w.
-func MarshalText(w io.Writer, m Message) error { return defaultTextMarshaler.Marshal(w, m) }
-
-// MarshalTextString returns a proto text formatted string of m.
-func MarshalTextString(m Message) string { return defaultTextMarshaler.Text(m) }
-
-// CompactText writes the compact proto text format of m to w.
-func CompactText(w io.Writer, m Message) error { return compactTextMarshaler.Marshal(w, m) }
-
-// CompactTextString returns a compact proto text formatted string of m.
-func CompactTextString(m Message) string { return compactTextMarshaler.Text(m) }
-
-var (
- newline = []byte("\n")
- endBraceNewline = []byte("}\n")
- posInf = []byte("inf")
- negInf = []byte("-inf")
- nan = []byte("nan")
-)
-
-// textWriter is an io.Writer that tracks its indentation level.
-type textWriter struct {
- compact bool // same as TextMarshaler.Compact
- expandAny bool // same as TextMarshaler.ExpandAny
- complete bool // whether the current position is a complete line
- indent int // indentation level; never negative
- buf []byte
-}
-
-func (w *textWriter) Write(p []byte) (n int, _ error) {
- newlines := bytes.Count(p, newline)
- if newlines == 0 {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.buf = append(w.buf, p...)
- w.complete = false
- return len(p), nil
- }
-
- frags := bytes.SplitN(p, newline, newlines+1)
- if w.compact {
- for i, frag := range frags {
- if i > 0 {
- w.buf = append(w.buf, ' ')
- n++
- }
- w.buf = append(w.buf, frag...)
- n += len(frag)
- }
- return n, nil
- }
-
- for i, frag := range frags {
- if w.complete {
- w.writeIndent()
- }
- w.buf = append(w.buf, frag...)
- n += len(frag)
- if i+1 < len(frags) {
- w.buf = append(w.buf, '\n')
- n++
- }
- }
- w.complete = len(frags[len(frags)-1]) == 0
- return n, nil
-}
-
-func (w *textWriter) WriteByte(c byte) error {
- if w.compact && c == '\n' {
- c = ' '
- }
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.buf = append(w.buf, c)
- w.complete = c == '\n'
- return nil
-}
-
-func (w *textWriter) writeName(fd protoreflect.FieldDescriptor) {
- if !w.compact && w.complete {
- w.writeIndent()
- }
- w.complete = false
-
- if fd.Kind() != protoreflect.GroupKind {
- w.buf = append(w.buf, fd.Name()...)
- w.WriteByte(':')
- } else {
- // Use message type name for group field name.
- w.buf = append(w.buf, fd.Message().Name()...)
- }
-
- if !w.compact {
- w.WriteByte(' ')
- }
-}
-
-func requiresQuotes(u string) bool {
- // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
- for _, ch := range u {
- switch {
- case ch == '.' || ch == '/' || ch == '_':
- continue
- case '0' <= ch && ch <= '9':
- continue
- case 'A' <= ch && ch <= 'Z':
- continue
- case 'a' <= ch && ch <= 'z':
- continue
- default:
- return true
- }
- }
- return false
-}
-
-// writeProto3Any writes an expanded google.protobuf.Any message.
-//
-// It returns (false, nil) if sv value can't be unmarshaled (e.g. because
-// required messages are not linked in).
-//
-// It returns (true, error) when sv was written in expanded format or an error
-// was encountered.
-func (w *textWriter) writeProto3Any(m protoreflect.Message) (bool, error) {
- md := m.Descriptor()
- fdURL := md.Fields().ByName("type_url")
- fdVal := md.Fields().ByName("value")
-
- url := m.Get(fdURL).String()
- mt, err := protoregistry.GlobalTypes.FindMessageByURL(url)
- if err != nil {
- return false, nil
- }
-
- b := m.Get(fdVal).Bytes()
- m2 := mt.New()
- if err := proto.Unmarshal(b, m2.Interface()); err != nil {
- return false, nil
- }
- w.Write([]byte("["))
- if requiresQuotes(url) {
- w.writeQuotedString(url)
- } else {
- w.Write([]byte(url))
- }
- if w.compact {
- w.Write([]byte("]:<"))
- } else {
- w.Write([]byte("]: <\n"))
- w.indent++
- }
- if err := w.writeMessage(m2); err != nil {
- return true, err
- }
- if w.compact {
- w.Write([]byte("> "))
- } else {
- w.indent--
- w.Write([]byte(">\n"))
- }
- return true, nil
-}
-
-func (w *textWriter) writeMessage(m protoreflect.Message) error {
- md := m.Descriptor()
- if w.expandAny && md.FullName() == "google.protobuf.Any" {
- if canExpand, err := w.writeProto3Any(m); canExpand {
- return err
- }
- }
-
- fds := md.Fields()
- for i := 0; i < fds.Len(); {
- fd := fds.Get(i)
- if od := fd.ContainingOneof(); od != nil {
- fd = m.WhichOneof(od)
- i += od.Fields().Len()
- } else {
- i++
- }
- if fd == nil || !m.Has(fd) {
- continue
- }
-
- switch {
- case fd.IsList():
- lv := m.Get(fd).List()
- for j := 0; j < lv.Len(); j++ {
- w.writeName(fd)
- v := lv.Get(j)
- if err := w.writeSingularValue(v, fd); err != nil {
- return err
- }
- w.WriteByte('\n')
- }
- case fd.IsMap():
- kfd := fd.MapKey()
- vfd := fd.MapValue()
- mv := m.Get(fd).Map()
-
- type entry struct{ key, val protoreflect.Value }
- var entries []entry
- mv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {
- entries = append(entries, entry{k.Value(), v})
- return true
- })
- sort.Slice(entries, func(i, j int) bool {
- switch kfd.Kind() {
- case protoreflect.BoolKind:
- return !entries[i].key.Bool() && entries[j].key.Bool()
- case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
- return entries[i].key.Int() < entries[j].key.Int()
- case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
- return entries[i].key.Uint() < entries[j].key.Uint()
- case protoreflect.StringKind:
- return entries[i].key.String() < entries[j].key.String()
- default:
- panic("invalid kind")
- }
- })
- for _, entry := range entries {
- w.writeName(fd)
- w.WriteByte('<')
- if !w.compact {
- w.WriteByte('\n')
- }
- w.indent++
- w.writeName(kfd)
- if err := w.writeSingularValue(entry.key, kfd); err != nil {
- return err
- }
- w.WriteByte('\n')
- w.writeName(vfd)
- if err := w.writeSingularValue(entry.val, vfd); err != nil {
- return err
- }
- w.WriteByte('\n')
- w.indent--
- w.WriteByte('>')
- w.WriteByte('\n')
- }
- default:
- w.writeName(fd)
- if err := w.writeSingularValue(m.Get(fd), fd); err != nil {
- return err
- }
- w.WriteByte('\n')
- }
- }
-
- if b := m.GetUnknown(); len(b) > 0 {
- w.writeUnknownFields(b)
- }
- return w.writeExtensions(m)
-}
-
-func (w *textWriter) writeSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) error {
- switch fd.Kind() {
- case protoreflect.FloatKind, protoreflect.DoubleKind:
- switch vf := v.Float(); {
- case math.IsInf(vf, +1):
- w.Write(posInf)
- case math.IsInf(vf, -1):
- w.Write(negInf)
- case math.IsNaN(vf):
- w.Write(nan)
- default:
- fmt.Fprint(w, v.Interface())
- }
- case protoreflect.StringKind:
- // NOTE: This does not validate UTF-8 for historical reasons.
- w.writeQuotedString(string(v.String()))
- case protoreflect.BytesKind:
- w.writeQuotedString(string(v.Bytes()))
- case protoreflect.MessageKind, protoreflect.GroupKind:
- var bra, ket byte = '<', '>'
- if fd.Kind() == protoreflect.GroupKind {
- bra, ket = '{', '}'
- }
- w.WriteByte(bra)
- if !w.compact {
- w.WriteByte('\n')
- }
- w.indent++
- m := v.Message()
- if m2, ok := m.Interface().(encoding.TextMarshaler); ok {
- b, err := m2.MarshalText()
- if err != nil {
- return err
- }
- w.Write(b)
- } else {
- w.writeMessage(m)
- }
- w.indent--
- w.WriteByte(ket)
- case protoreflect.EnumKind:
- if ev := fd.Enum().Values().ByNumber(v.Enum()); ev != nil {
- fmt.Fprint(w, ev.Name())
- } else {
- fmt.Fprint(w, v.Enum())
- }
- default:
- fmt.Fprint(w, v.Interface())
- }
- return nil
-}
-
-// writeQuotedString writes a quoted string in the protocol buffer text format.
-func (w *textWriter) writeQuotedString(s string) {
- w.WriteByte('"')
- for i := 0; i < len(s); i++ {
- switch c := s[i]; c {
- case '\n':
- w.buf = append(w.buf, `\n`...)
- case '\r':
- w.buf = append(w.buf, `\r`...)
- case '\t':
- w.buf = append(w.buf, `\t`...)
- case '"':
- w.buf = append(w.buf, `\"`...)
- case '\\':
- w.buf = append(w.buf, `\\`...)
- default:
- if isPrint := c >= 0x20 && c < 0x7f; isPrint {
- w.buf = append(w.buf, c)
- } else {
- w.buf = append(w.buf, fmt.Sprintf(`\%03o`, c)...)
- }
- }
- }
- w.WriteByte('"')
-}
-
-func (w *textWriter) writeUnknownFields(b []byte) {
- if !w.compact {
- fmt.Fprintf(w, "/* %d unknown bytes */\n", len(b))
- }
-
- for len(b) > 0 {
- num, wtyp, n := protowire.ConsumeTag(b)
- if n < 0 {
- return
- }
- b = b[n:]
-
- if wtyp == protowire.EndGroupType {
- w.indent--
- w.Write(endBraceNewline)
- continue
- }
- fmt.Fprint(w, num)
- if wtyp != protowire.StartGroupType {
- w.WriteByte(':')
- }
- if !w.compact || wtyp == protowire.StartGroupType {
- w.WriteByte(' ')
- }
- switch wtyp {
- case protowire.VarintType:
- v, n := protowire.ConsumeVarint(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprint(w, v)
- case protowire.Fixed32Type:
- v, n := protowire.ConsumeFixed32(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprint(w, v)
- case protowire.Fixed64Type:
- v, n := protowire.ConsumeFixed64(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprint(w, v)
- case protowire.BytesType:
- v, n := protowire.ConsumeBytes(b)
- if n < 0 {
- return
- }
- b = b[n:]
- fmt.Fprintf(w, "%q", v)
- case protowire.StartGroupType:
- w.WriteByte('{')
- w.indent++
- default:
- fmt.Fprintf(w, "/* unknown wire type %d */", wtyp)
- }
- w.WriteByte('\n')
- }
-}
-
-// writeExtensions writes all the extensions in m.
-func (w *textWriter) writeExtensions(m protoreflect.Message) error {
- md := m.Descriptor()
- if md.ExtensionRanges().Len() == 0 {
- return nil
- }
-
- type ext struct {
- desc protoreflect.FieldDescriptor
- val protoreflect.Value
- }
- var exts []ext
- m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
- if fd.IsExtension() {
- exts = append(exts, ext{fd, v})
- }
- return true
- })
- sort.Slice(exts, func(i, j int) bool {
- return exts[i].desc.Number() < exts[j].desc.Number()
- })
-
- for _, ext := range exts {
- // For message set, use the name of the message as the extension name.
- name := string(ext.desc.FullName())
- if isMessageSet(ext.desc.ContainingMessage()) {
- name = strings.TrimSuffix(name, ".message_set_extension")
- }
-
- if !ext.desc.IsList() {
- if err := w.writeSingularExtension(name, ext.val, ext.desc); err != nil {
- return err
- }
- } else {
- lv := ext.val.List()
- for i := 0; i < lv.Len(); i++ {
- if err := w.writeSingularExtension(name, lv.Get(i), ext.desc); err != nil {
- return err
- }
- }
- }
- }
- return nil
-}
-
-func (w *textWriter) writeSingularExtension(name string, v protoreflect.Value, fd protoreflect.FieldDescriptor) error {
- fmt.Fprintf(w, "[%s]:", name)
- if !w.compact {
- w.WriteByte(' ')
- }
- if err := w.writeSingularValue(v, fd); err != nil {
- return err
- }
- w.WriteByte('\n')
- return nil
-}
-
-func (w *textWriter) writeIndent() {
- if !w.complete {
- return
- }
- for i := 0; i < w.indent*2; i++ {
- w.buf = append(w.buf, ' ')
- }
- w.complete = false
-}
diff --git a/vendor/github.com/golang/protobuf/proto/wire.go b/vendor/github.com/golang/protobuf/proto/wire.go
deleted file mode 100644
index d7c28da5a7..0000000000
--- a/vendor/github.com/golang/protobuf/proto/wire.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-import (
- protoV2 "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/runtime/protoiface"
-)
-
-// Size returns the size in bytes of the wire-format encoding of m.
-func Size(m Message) int {
- if m == nil {
- return 0
- }
- mi := MessageV2(m)
- return protoV2.Size(mi)
-}
-
-// Marshal returns the wire-format encoding of m.
-func Marshal(m Message) ([]byte, error) {
- b, err := marshalAppend(nil, m, false)
- if b == nil {
- b = zeroBytes
- }
- return b, err
-}
-
-var zeroBytes = make([]byte, 0, 0)
-
-func marshalAppend(buf []byte, m Message, deterministic bool) ([]byte, error) {
- if m == nil {
- return nil, ErrNil
- }
- mi := MessageV2(m)
- nbuf, err := protoV2.MarshalOptions{
- Deterministic: deterministic,
- AllowPartial: true,
- }.MarshalAppend(buf, mi)
- if err != nil {
- return buf, err
- }
- if len(buf) == len(nbuf) {
- if !mi.ProtoReflect().IsValid() {
- return buf, ErrNil
- }
- }
- return nbuf, checkRequiredNotSet(mi)
-}
-
-// Unmarshal parses a wire-format message in b and places the decoded results in m.
-//
-// Unmarshal resets m before starting to unmarshal, so any existing data in m is always
-// removed. Use UnmarshalMerge to preserve and append to existing data.
-func Unmarshal(b []byte, m Message) error {
- m.Reset()
- return UnmarshalMerge(b, m)
-}
-
-// UnmarshalMerge parses a wire-format message in b and places the decoded results in m.
-func UnmarshalMerge(b []byte, m Message) error {
- mi := MessageV2(m)
- out, err := protoV2.UnmarshalOptions{
- AllowPartial: true,
- Merge: true,
- }.UnmarshalState(protoiface.UnmarshalInput{
- Buf: b,
- Message: mi.ProtoReflect(),
- })
- if err != nil {
- return err
- }
- if out.Flags&protoiface.UnmarshalInitialized > 0 {
- return nil
- }
- return checkRequiredNotSet(mi)
-}
diff --git a/vendor/github.com/golang/protobuf/proto/wrappers.go b/vendor/github.com/golang/protobuf/proto/wrappers.go
deleted file mode 100644
index 398e348599..0000000000
--- a/vendor/github.com/golang/protobuf/proto/wrappers.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proto
-
-// Bool stores v in a new bool value and returns a pointer to it.
-func Bool(v bool) *bool { return &v }
-
-// Int stores v in a new int32 value and returns a pointer to it.
-//
-// Deprecated: Use Int32 instead.
-func Int(v int) *int32 { return Int32(int32(v)) }
-
-// Int32 stores v in a new int32 value and returns a pointer to it.
-func Int32(v int32) *int32 { return &v }
-
-// Int64 stores v in a new int64 value and returns a pointer to it.
-func Int64(v int64) *int64 { return &v }
-
-// Uint32 stores v in a new uint32 value and returns a pointer to it.
-func Uint32(v uint32) *uint32 { return &v }
-
-// Uint64 stores v in a new uint64 value and returns a pointer to it.
-func Uint64(v uint64) *uint64 { return &v }
-
-// Float32 stores v in a new float32 value and returns a pointer to it.
-func Float32(v float32) *float32 { return &v }
-
-// Float64 stores v in a new float64 value and returns a pointer to it.
-func Float64(v float64) *float64 { return &v }
-
-// String stores v in a new string value and returns a pointer to it.
-func String(v string) *string { return &v }
diff --git a/vendor/github.com/google/certificate-transparency-go/.golangci.yaml b/vendor/github.com/google/certificate-transparency-go/.golangci.yaml
index 405740a1f1..e9b683b2bd 100644
--- a/vendor/github.com/google/certificate-transparency-go/.golangci.yaml
+++ b/vendor/github.com/google/certificate-transparency-go/.golangci.yaml
@@ -1,28 +1,39 @@
-run:
- deadline: 90s
- skip-dirs:
- - (^|/)x509($|/)
- - (^|/)x509util($|/)
- - (^|/)asn1($|/)
-
-linters-settings:
- gocyclo:
- min-complexity: 25
- depguard:
- list-type: blacklist
- packages:
- - ^golang.org/x/net/context$
- - github.com/gogo/protobuf/proto
- - encoding/asn1
- - crypto/x509
-
-issues:
- exclude-use-default: false
- exclude-rules:
- # The following grpc linters are excluded because grpc.Dial, grpc.DialContext and grpc.WithBlock will be supported throughout 1.x.
- - linters: [staticcheck]
- text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
- - linters: [staticcheck]
- text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
- - linters: [staticcheck]
- text: 'SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient'
+version: "2"
+linters:
+ settings:
+ depguard:
+ rules:
+ main:
+ deny:
+ - pkg: ^golang.org/x/net/context$
+ - pkg: github.com/gogo/protobuf/proto
+ - pkg: encoding/asn1
+ - pkg: crypto/x509
+ gocyclo:
+ min-complexity: 25
+ exclusions:
+ generated: lax
+ rules:
+ - linters:
+ - staticcheck
+ text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
+ - linters:
+ - staticcheck
+ text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
+ - linters:
+ - staticcheck
+ text: 'SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient'
+ paths:
+ - (^|/)x509($|/)
+ - (^|/)x509util($|/)
+ - (^|/)asn1($|/)
+ - third_party$
+ - builtin$
+ - examples$
+formatters:
+ exclusions:
+ generated: lax
+ paths:
+ - third_party$
+ - builtin$
+ - examples$
diff --git a/vendor/github.com/google/certificate-transparency-go/CHANGELOG.md b/vendor/github.com/google/certificate-transparency-go/CHANGELOG.md
index 5cb7b7d433..0206cfe124 100644
--- a/vendor/github.com/google/certificate-transparency-go/CHANGELOG.md
+++ b/vendor/github.com/google/certificate-transparency-go/CHANGELOG.md
@@ -2,6 +2,77 @@
## HEAD
+## v1.3.2
+
+### Misc
+
+* [migrillian] remove etcd support in #1699
+* Bump golangci-lint from 1.55.1 to 1.61.0 (developers should update to this version).
+* Update ctclient tool to support SCT extensions field by @liweitianux in https://github.com/google/certificate-transparency-go/pull/1645
+* Bump go to 1.23
+* [ct_hammer] support HTTPS and Bearer token for Authentication.
+* [preloader] support Bearer token Authentication for non temporal logs.
+* [preloader] support end indexes
+* [CTFE] Short cache max-age when get-entries returns fewer entries than requested by @robstradling in https://github.com/google/certificate-transparency-go/pull/1707
+* [CTFE] Disalllow mismatching signature algorithm identifiers in #702.
+* [jsonclient] surface HTTP Do and Read errors #1695 by @FiloSottile
+
+### CTFE Storage Saving: Extra Data Issuance Chain Deduplication
+
+* Suppress unnecessary duplicate key errors in the IssuanceChainStorage PostgreSQL implementation by @robstradling in https://github.com/google/certificate-transparency-go/pull/1678
+* Only store IssuanceChain if not cached by @robstradling in https://github.com/google/certificate-transparency-go/pull/1679
+
+### CTFE Rate Limiting Of Non-Fresh Submissions
+
+To protect a log from being flooded with requests for "old" certificates, optional rate limiting for "non-fresh submissions" can be configured by providing the following flags:
+
+- `non_fresh_submission_age`
+- `non_fresh_submission_burst`
+- `non_fresh_submission_limit`
+
+This can help to ensure that the log maintains its ability to (1) accept "fresh" submissions and (2) distribute all log entries to monitors.
+
+* [CTFE] Configurable mechanism to rate-limit non-fresh submissions by @robstradling in https://github.com/google/certificate-transparency-go/pull/1698
+
+### Dependency updates
+
+* Bump the docker-deps group across 5 directories with 3 updates (#1705)
+* Bump google.golang.org/grpc from 1.72.1 to 1.72.2 in the all-deps group (#1704)
+* Bump github.com/go-jose/go-jose/v4 in the go_modules group (#1700)
+* Bump the all-deps group with 7 updates (#1701)
+* Bump the all-deps group with 7 updates (#1693)
+* Bump the docker-deps group across 4 directories with 1 update (#1694)
+* Bump github/codeql-action from 3.28.13 to 3.28.16 in the all-deps group (#1692)
+* Bump the all-deps group across 1 directory with 7 updates (#1688)
+* Bump distroless/base-debian12 (#1686)
+* Bump golangci/golangci-lint-action from 6.5.1 to 7.0.0 in the all-deps group (#1685)
+* Bump the all-deps group with 4 updates (#1681)
+* Bump the all-deps group with 6 updates (#1683)
+* Bump the docker-deps group across 4 directories with 2 updates (#1682)
+* Bump github.com/golang-jwt/jwt/v4 in the go_modules group (#1680)
+* Bump golangci/golangci-lint-action in the all-deps group (#1676)
+* Bump the all-deps group with 2 updates (#1677)
+* Bump github/codeql-action from 3.28.10 to 3.28.11 in the all-deps group (#1670)
+* Bump the all-deps group with 8 updates (#1672)
+* Bump the docker-deps group across 4 directories with 1 update (#1671)
+* Bump the docker-deps group across 4 directories with 1 update (#1668)
+* Bump the all-deps group with 4 updates (#1666)
+* Bump golangci-lint from 1.55.1 to 1.61.0 (#1667)
+* Bump the all-deps group with 3 updates (#1665)
+* Bump github.com/spf13/cobra from 1.8.1 to 1.9.1 in the all-deps group (#1660)
+* Bump the docker-deps group across 5 directories with 2 updates (#1661)
+* Bump golangci/golangci-lint-action in the all-deps group (#1662)
+* Bump the docker-deps group across 4 directories with 1 update (#1656)
+* Bump the all-deps group with 2 updates (#1654)
+* Bump the all-deps group with 4 updates (#1657)
+* Bump github/codeql-action from 3.28.5 to 3.28.8 in the all-deps group (#1652)
+* Bump github.com/spf13/pflag from 1.0.5 to 1.0.6 in the all-deps group (#1651)
+* Bump the all-deps group with 2 updates (#1649)
+* Bump the all-deps group with 5 updates (#1650)
+* Bump the docker-deps group across 5 directories with 3 updates (#1648)
+* Bump google.golang.org/protobuf in the all-deps group (#1647)
+* Bump golangci/golangci-lint-action in the all-deps group (#1646)
+
## v1.3.1
* Add AllLogListSignatureURL by @AlexLaroche in https://github.com/google/certificate-transparency-go/pull/1634
diff --git a/vendor/github.com/google/certificate-transparency-go/README.md b/vendor/github.com/google/certificate-transparency-go/README.md
index b528c55755..bade700508 100644
--- a/vendor/github.com/google/certificate-transparency-go/README.md
+++ b/vendor/github.com/google/certificate-transparency-go/README.md
@@ -6,7 +6,7 @@
This repository holds Go code related to
[Certificate Transparency](https://www.certificate-transparency.org/) (CT). The
-repository requires Go version 1.22.
+repository requires Go version 1.23.
- [Repository Structure](#repository-structure)
- [Trillian CT Personality](#trillian-ct-personality)
@@ -85,7 +85,7 @@ pull requests for review.
```bash
# Install golangci-lint
-go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.1
+go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
# Run code generation, build, test and linters
./scripts/presubmit.sh
diff --git a/vendor/github.com/google/certificate-transparency-go/client/logclient.go b/vendor/github.com/google/certificate-transparency-go/client/logclient.go
index 7842c8e288..0e90c1077f 100644
--- a/vendor/github.com/google/certificate-transparency-go/client/logclient.go
+++ b/vendor/github.com/google/certificate-transparency-go/client/logclient.go
@@ -160,6 +160,7 @@ func (c *LogClient) VerifySCTSignature(sct ct.SignedCertificateTimestamp, ctype
if err != nil {
return fmt.Errorf("failed to build MerkleTreeLeaf: %v", err)
}
+ leaf.TimestampedEntry.Extensions = sct.Extensions
entry := ct.LogEntry{Leaf: *leaf}
return c.Verifier.VerifySCTSignature(sct, entry)
}
diff --git a/vendor/github.com/google/certificate-transparency-go/jsonclient/client.go b/vendor/github.com/google/certificate-transparency-go/jsonclient/client.go
index 1dee4cb601..edb8f919af 100644
--- a/vendor/github.com/google/certificate-transparency-go/jsonclient/client.go
+++ b/vendor/github.com/google/certificate-transparency-go/jsonclient/client.go
@@ -34,8 +34,6 @@ import (
ct "github.com/google/certificate-transparency-go"
"github.com/google/certificate-transparency-go/x509"
- "golang.org/x/net/context/ctxhttp"
- "k8s.io/klog/v2"
)
const maxJitter = 250 * time.Millisecond
@@ -56,12 +54,13 @@ type backoffer interface {
// JSONClient provides common functionality for interacting with a JSON server
// that uses cryptographic signatures.
type JSONClient struct {
- uri string // the base URI of the server. e.g. https://ct.googleapis/pilot
- httpClient *http.Client // used to interact with the server via HTTP
- Verifier *ct.SignatureVerifier // nil for no verification (e.g. no public key available)
- logger Logger // interface to use for logging warnings and errors
- backoff backoffer // object used to store and calculate backoff information
- userAgent string // If set, this is sent as the UserAgent header.
+ uri string // the base URI of the server. e.g. https://ct.googleapis/pilot
+ httpClient *http.Client // used to interact with the server via HTTP
+ Verifier *ct.SignatureVerifier // nil for no verification (e.g. no public key available)
+ logger Logger // interface to use for logging warnings and errors
+ backoff backoffer // object used to store and calculate backoff information
+ userAgent string // If set, this is sent as the UserAgent header.
+ authorization string // If set, this is sent as the Authorization header.
}
// Logger is a simple logging interface used to log internal errors and warnings
@@ -81,6 +80,8 @@ type Options struct {
PublicKeyDER []byte
// UserAgent, if set, will be sent as the User-Agent header with each request.
UserAgent string
+ // If set, this is sent as the Authorization header with each request.
+ Authorization string
}
// ParsePublicKey parses and returns the public key contained in opts.
@@ -150,12 +151,13 @@ func New(uri string, hc *http.Client, opts Options) (*JSONClient, error) {
logger = &basicLogger{}
}
return &JSONClient{
- uri: strings.TrimRight(uri, "/"),
- httpClient: hc,
- Verifier: verifier,
- logger: logger,
- backoff: &backoff{},
- userAgent: opts.UserAgent,
+ uri: strings.TrimRight(uri, "/"),
+ httpClient: hc,
+ Verifier: verifier,
+ logger: logger,
+ backoff: &backoff{},
+ userAgent: opts.UserAgent,
+ authorization: opts.Authorization,
}, nil
}
@@ -167,7 +169,8 @@ func (c *JSONClient) BaseURI() string {
// GetAndParse makes a HTTP GET call to the given path, and attempts to parse
// the response as a JSON representation of the rsp structure. Returns the
// http.Response, the body of the response, and an error (which may be of
-// type RspError if the HTTP response was available).
+// type RspError if the HTTP response was available). It returns an error
+// if the response status code is not 200 OK.
func (c *JSONClient) GetAndParse(ctx context.Context, path string, params map[string]string, rsp interface{}) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("context.Context required")
@@ -178,29 +181,28 @@ func (c *JSONClient) GetAndParse(ctx context.Context, path string, params map[st
vals.Add(k, v)
}
fullURI := fmt.Sprintf("%s%s?%s", c.uri, path, vals.Encode())
- klog.V(2).Infof("GET %s", fullURI)
- httpReq, err := http.NewRequest(http.MethodGet, fullURI, nil)
+ httpReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fullURI, nil)
if err != nil {
return nil, nil, err
}
if len(c.userAgent) != 0 {
httpReq.Header.Set("User-Agent", c.userAgent)
}
+ if len(c.authorization) != 0 {
+ httpReq.Header.Add("Authorization", c.authorization)
+ }
- httpRsp, err := ctxhttp.Do(ctx, c.httpClient, httpReq)
+ httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return nil, nil, err
}
-
- // Read everything now so http.Client can reuse the connection.
body, err := io.ReadAll(httpRsp.Body)
- if err := httpRsp.Body.Close(); err != nil {
- return nil, nil, err
- }
if err != nil {
- return nil, nil, RspError{Err: fmt.Errorf("failed to read response body: %v", err), StatusCode: httpRsp.StatusCode, Body: body}
+ return nil, nil, RspError{Err: fmt.Errorf("failed to read response body: %w", err), StatusCode: httpRsp.StatusCode, Body: body}
+ }
+ if err := httpRsp.Body.Close(); err != nil {
+ return nil, nil, RspError{Err: fmt.Errorf("failed to close response body: %w", err), StatusCode: httpRsp.StatusCode, Body: body}
}
-
if httpRsp.StatusCode != http.StatusOK {
return nil, nil, RspError{Err: fmt.Errorf("got HTTP Status %q", httpRsp.Status), StatusCode: httpRsp.StatusCode, Body: body}
}
@@ -216,6 +218,7 @@ func (c *JSONClient) GetAndParse(ctx context.Context, path string, params map[st
// parameters, and attempts to parse the response as a JSON representation of
// the rsp structure. Returns the http.Response, the body of the response, and
// an error (which may be of type RspError if the HTTP response was available).
+// It does NOT return an error if the response status code is not 200 OK.
func (c *JSONClient) PostAndParse(ctx context.Context, path string, req, rsp interface{}) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("context.Context required")
@@ -226,30 +229,28 @@ func (c *JSONClient) PostAndParse(ctx context.Context, path string, req, rsp int
return nil, nil, err
}
fullURI := fmt.Sprintf("%s%s", c.uri, path)
- klog.V(2).Infof("POST %s", fullURI)
- httpReq, err := http.NewRequest(http.MethodPost, fullURI, bytes.NewReader(postBody))
+ httpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, fullURI, bytes.NewReader(postBody))
if err != nil {
return nil, nil, err
}
if len(c.userAgent) != 0 {
httpReq.Header.Set("User-Agent", c.userAgent)
}
+ if len(c.authorization) != 0 {
+ httpReq.Header.Add("Authorization", c.authorization)
+ }
httpReq.Header.Set("Content-Type", "application/json")
- httpRsp, err := ctxhttp.Do(ctx, c.httpClient, httpReq)
-
- // Read all of the body, if there is one, so that the http.Client can do Keep-Alive.
- var body []byte
- if httpRsp != nil {
- body, err = io.ReadAll(httpRsp.Body)
- if err := httpRsp.Body.Close(); err != nil {
- return nil, nil, err
- }
+ httpRsp, err := c.httpClient.Do(httpReq)
+ if err != nil {
+ return nil, nil, err
}
+ body, err := io.ReadAll(httpRsp.Body)
if err != nil {
- if httpRsp != nil {
- return nil, nil, RspError{StatusCode: httpRsp.StatusCode, Body: body, Err: err}
- }
+ _ = httpRsp.Body.Close()
+ return nil, nil, err
+ }
+ if err := httpRsp.Body.Close(); err != nil {
return nil, nil, err
}
if httpRsp.Request.Method != http.MethodPost {
@@ -258,7 +259,7 @@ func (c *JSONClient) PostAndParse(ctx context.Context, path string, req, rsp int
}
if httpRsp.StatusCode == http.StatusOK {
- if err = json.Unmarshal(body, &rsp); err != nil {
+ if err := json.Unmarshal(body, &rsp); err != nil {
return nil, nil, RspError{StatusCode: httpRsp.StatusCode, Body: body, Err: err}
}
}
@@ -292,21 +293,21 @@ func (c *JSONClient) PostAndParseWithRetry(ctx context.Context, path string, req
httpRsp, body, err := c.PostAndParse(ctx, path, req, rsp)
if err != nil {
// Don't retry context errors.
- if err == context.Canceled || err == context.DeadlineExceeded {
+ if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return nil, nil, err
}
wait := c.backoff.set(nil)
c.logger.Printf("Request to %s failed, backing-off %s: %s", c.uri, wait, err)
} else {
- switch {
- case httpRsp.StatusCode == http.StatusOK:
+ switch httpRsp.StatusCode {
+ case http.StatusOK:
return httpRsp, body, nil
- case httpRsp.StatusCode == http.StatusRequestTimeout:
+ case http.StatusRequestTimeout:
// Request timeout, retry immediately
c.logger.Printf("Request to %s timed out, retrying immediately", c.uri)
- case httpRsp.StatusCode == http.StatusServiceUnavailable:
+ case http.StatusServiceUnavailable:
fallthrough
- case httpRsp.StatusCode == http.StatusTooManyRequests:
+ case http.StatusTooManyRequests:
var backoff *time.Duration
// Retry-After may be either a number of seconds as a int or a RFC 1123
// date string (RFC 7231 Section 7.1.3)
diff --git a/vendor/github.com/google/certificate-transparency-go/loglist3/logfilter.go b/vendor/github.com/google/certificate-transparency-go/loglist3/logfilter.go
index 34949be057..9ac54bae91 100644
--- a/vendor/github.com/google/certificate-transparency-go/loglist3/logfilter.go
+++ b/vendor/github.com/google/certificate-transparency-go/loglist3/logfilter.go
@@ -17,7 +17,6 @@ package loglist3
import (
"github.com/google/certificate-transparency-go/x509"
"github.com/google/certificate-transparency-go/x509util"
- "k8s.io/klog/v2"
)
// LogRoots maps Log-URLs (stated at LogList) to the pools of their accepted
@@ -68,7 +67,8 @@ func (ll *LogList) RootCompatible(certRoot *x509.Certificate, roots LogRoots) Lo
// Check whether root is a CA-cert.
if certRoot != nil && !certRoot.IsCA {
- klog.Warningf("Compatible method expects fully rooted chain, while last cert of the chain provided is not root")
+ // Compatible method expects fully rooted chain, while last cert of the chain provided is not root.
+ // Proceed anyway.
return compatible
}
diff --git a/vendor/github.com/google/certificate-transparency-go/x509/pkix/pkix.go b/vendor/github.com/google/certificate-transparency-go/x509/pkix/pkix.go
index 843fa1f2cd..1716f908ab 100644
--- a/vendor/github.com/google/certificate-transparency-go/x509/pkix/pkix.go
+++ b/vendor/github.com/google/certificate-transparency-go/x509/pkix/pkix.go
@@ -18,6 +18,7 @@ import (
// AlgorithmIdentifier represents the ASN.1 structure of the same name. See RFC
// 5280, section 4.1.1.2.
type AlgorithmIdentifier struct {
+ Raw asn1.RawContent
Algorithm asn1.ObjectIdentifier
Parameters asn1.RawValue `asn1:"optional"`
}
diff --git a/vendor/github.com/google/certificate-transparency-go/x509/x509.go b/vendor/github.com/google/certificate-transparency-go/x509/x509.go
index 3059a6facc..917d78779f 100644
--- a/vendor/github.com/google/certificate-transparency-go/x509/x509.go
+++ b/vendor/github.com/google/certificate-transparency-go/x509/x509.go
@@ -11,40 +11,40 @@
// This is a fork of the Go library crypto/x509 package, primarily adapted for
// use with Certificate Transparency. Main areas of difference are:
//
-// - Life as a fork:
-// - Rename OS-specific cgo code so it doesn't clash with main Go library.
-// - Use local library imports (asn1, pkix) throughout.
-// - Add version-specific wrappers for Go version-incompatible code (in
-// ptr_*_windows.go).
-// - Laxer certificate parsing:
-// - Add options to disable various validation checks (times, EKUs etc).
-// - Use NonFatalErrors type for some errors and continue parsing; this
-// can be checked with IsFatal(err).
-// - Support for short bitlength ECDSA curves (in curves.go).
-// - Certificate Transparency specific function:
-// - Parsing and marshaling of SCTList extension.
-// - RemoveSCTList() function for rebuilding CT leaf entry.
-// - Pre-certificate processing (RemoveCTPoison(), BuildPrecertTBS(),
-// ParseTBSCertificate(), IsPrecertificate()).
-// - Revocation list processing:
-// - Detailed CRL parsing (in revoked.go)
-// - Detailed error recording mechanism (in error.go, errors.go)
-// - Factor out parseDistributionPoints() for reuse.
-// - Factor out and generalize GeneralNames parsing (in names.go)
-// - Fix CRL commenting.
-// - RPKI support:
-// - Support for SubjectInfoAccess extension
-// - Support for RFC3779 extensions (in rpki.go)
-// - RSAES-OAEP support:
-// - Support for parsing RSASES-OAEP public keys from certificates
-// - Ed25519 support:
-// - Support for parsing and marshaling Ed25519 keys
-// - General improvements:
-// - Export and use OID values throughout.
-// - Export OIDFromNamedCurve().
-// - Export SignatureAlgorithmFromAI().
-// - Add OID value to UnhandledCriticalExtension error.
-// - Minor typo/lint fixes.
+// Life as a fork:
+// - Rename OS-specific cgo code so it doesn't clash with main Go library.
+// - Use local library imports (asn1, pkix) throughout.
+// - Add version-specific wrappers for Go version-incompatible code (in
+// ptr_*_windows.go).
+// Laxer certificate parsing:
+// - Add options to disable various validation checks (times, EKUs etc).
+// - Use NonFatalErrors type for some errors and continue parsing; this
+// can be checked with IsFatal(err).
+// - Support for short bitlength ECDSA curves (in curves.go).
+// Certificate Transparency specific function:
+// - Parsing and marshaling of SCTList extension.
+// - RemoveSCTList() function for rebuilding CT leaf entry.
+// - Pre-certificate processing (RemoveCTPoison(), BuildPrecertTBS(),
+// ParseTBSCertificate(), IsPrecertificate()).
+// Revocation list processing:
+// - Detailed CRL parsing (in revoked.go)
+// - Detailed error recording mechanism (in error.go, errors.go)
+// - Factor out parseDistributionPoints() for reuse.
+// - Factor out and generalize GeneralNames parsing (in names.go)
+// - Fix CRL commenting.
+// RPKI support:
+// - Support for SubjectInfoAccess extension
+// - Support for RFC3779 extensions (in rpki.go)
+// RSAES-OAEP support:
+// - Support for parsing RSASES-OAEP public keys from certificates
+// Ed25519 support:
+// - Support for parsing and marshaling Ed25519 keys
+// General improvements:
+// - Export and use OID values throughout.
+// - Export OIDFromNamedCurve().
+// - Export SignatureAlgorithmFromAI().
+// - Add OID value to UnhandledCriticalExtension error.
+// - Minor typo/lint fixes.
package x509
import (
@@ -1813,9 +1813,25 @@ func parseNameConstraintsExtension(out *Certificate, e pkix.Extension, nfe *NonF
return unhandled, nil
}
-func parseCertificate(in *certificate) (*Certificate, error) {
+func parseCertificate(in *certificate, tbsOnly bool) (*Certificate, error) {
var nfe NonFatalErrors
+ // Certificates contain two signature algorithm identifier fields,
+ // one in the inner signed tbsCertificate structure and one in the
+ // outer unsigned certificate structure. RFC 5280 requires these
+ // fields match, but golang doesn't impose this restriction. Because
+ // the outer structure is not covered by the signature the algorithm
+ // field is entirely malleable. This allows a user to bypass the
+ // leaf data uniqueness check that happens in trillian by altering
+ // the unbounded OID or parameter fields of the algorithmIdentifier
+ // structure and submit an infinite number of duplicate but slightly
+ // different looking certificates to a log. To avoid this directly
+ // compare the bytes of the two algorithmIdentifier structures
+ // and reject the certificate if they do not match.
+ if !tbsOnly && !bytes.Equal(in.SignatureAlgorithm.Raw, in.TBSCertificate.SignatureAlgorithm.Raw) {
+ return nil, errors.New("x509: mismatching signature algorithm identifiers")
+ }
+
out := new(Certificate)
out.Raw = in.Raw
out.RawTBSCertificate = in.TBSCertificate.Raw
@@ -2095,7 +2111,7 @@ func ParseTBSCertificate(asn1Data []byte) (*Certificate, error) {
}
ret, err := parseCertificate(&certificate{
Raw: tbsCert.Raw,
- TBSCertificate: tbsCert})
+ TBSCertificate: tbsCert}, true)
if err != nil {
errs, ok := err.(NonFatalErrors)
if !ok {
@@ -2127,7 +2143,7 @@ func ParseCertificate(asn1Data []byte) (*Certificate, error) {
if len(rest) > 0 {
return nil, asn1.SyntaxError{Msg: "trailing data"}
}
- ret, err := parseCertificate(&cert)
+ ret, err := parseCertificate(&cert, false)
if err != nil {
errs, ok := err.(NonFatalErrors)
if !ok {
@@ -2166,7 +2182,7 @@ func ParseCertificates(asn1Data []byte) ([]*Certificate, error) {
ret := make([]*Certificate, len(v))
for i, ci := range v {
- cert, err := parseCertificate(ci)
+ cert, err := parseCertificate(ci, false)
if err != nil {
errs, ok := err.(NonFatalErrors)
if !ok {
diff --git a/vendor/github.com/google/certificate-transparency-go/x509util/pem_cert_pool.go b/vendor/github.com/google/certificate-transparency-go/x509util/pem_cert_pool.go
index e419659fa9..c21bd65058 100644
--- a/vendor/github.com/google/certificate-transparency-go/x509util/pem_cert_pool.go
+++ b/vendor/github.com/google/certificate-transparency-go/x509util/pem_cert_pool.go
@@ -22,7 +22,6 @@ import (
"os"
"github.com/google/certificate-transparency-go/x509"
- "k8s.io/klog/v2"
)
// String for certificate blocks in BEGIN / END PEM headers
@@ -80,7 +79,6 @@ func (p *PEMCertPool) AppendCertsFromPEM(pemCerts []byte) (ok bool) {
cert, err := x509.ParseCertificate(block.Bytes)
if x509.IsFatal(err) {
- klog.Warningf("error parsing PEM certificate: %v", err)
return false
}
diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/digest.go b/vendor/github.com/google/go-containerregistry/pkg/name/digest.go
index 28f6967ba7..5b8eb4ff46 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/name/digest.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/name/digest.go
@@ -17,6 +17,7 @@ package name
import (
// nolint: depguard
_ "crypto/sha256" // Recommended by go-digest.
+ "encoding"
"encoding/json"
"strings"
@@ -32,8 +33,11 @@ type Digest struct {
original string
}
-// Ensure Digest implements Reference
var _ Reference = (*Digest)(nil)
+var _ encoding.TextMarshaler = (*Digest)(nil)
+var _ encoding.TextUnmarshaler = (*Digest)(nil)
+var _ json.Marshaler = (*Digest)(nil)
+var _ json.Unmarshaler = (*Digest)(nil)
// Context implements Reference.
func (d Digest) Context() Repository {
@@ -79,6 +83,21 @@ func (d *Digest) UnmarshalJSON(data []byte) error {
return nil
}
+// MarshalText formats the digest into a string for text serialization.
+func (d Digest) MarshalText() ([]byte, error) {
+ return []byte(d.String()), nil
+}
+
+// UnmarshalText parses a text string into a Digest.
+func (d *Digest) UnmarshalText(data []byte) error {
+ n, err := NewDigest(string(data))
+ if err != nil {
+ return err
+ }
+ *d = n
+ return nil
+}
+
// NewDigest returns a new Digest representing the given name.
func NewDigest(name string, opts ...Option) (Digest, error) {
// Split on "@"
diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/registry.go b/vendor/github.com/google/go-containerregistry/pkg/name/registry.go
index 5b0d01769c..5e6b6e62a0 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/name/registry.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/name/registry.go
@@ -15,6 +15,8 @@
package name
import (
+ "encoding"
+ "encoding/json"
"net"
"net/url"
"path"
@@ -37,6 +39,11 @@ type Registry struct {
registry string
}
+var _ encoding.TextMarshaler = (*Registry)(nil)
+var _ encoding.TextUnmarshaler = (*Registry)(nil)
+var _ json.Marshaler = (*Registry)(nil)
+var _ json.Unmarshaler = (*Registry)(nil)
+
// RegistryStr returns the registry component of the Registry.
func (r Registry) RegistryStr() string {
return r.registry
@@ -140,3 +147,33 @@ func NewInsecureRegistry(name string, opts ...Option) (Registry, error) {
opts = append(opts, Insecure)
return NewRegistry(name, opts...)
}
+
+// MarshalJSON formats the Registry into a string for JSON serialization.
+func (r Registry) MarshalJSON() ([]byte, error) { return json.Marshal(r.String()) }
+
+// UnmarshalJSON parses a JSON string into a Registry.
+func (r *Registry) UnmarshalJSON(data []byte) error {
+ var s string
+ if err := json.Unmarshal(data, &s); err != nil {
+ return err
+ }
+ n, err := NewRegistry(s)
+ if err != nil {
+ return err
+ }
+ *r = n
+ return nil
+}
+
+// MarshalText formats the registry into a string for text serialization.
+func (r Registry) MarshalText() ([]byte, error) { return []byte(r.String()), nil }
+
+// UnmarshalText parses a text string into a Registry.
+func (r *Registry) UnmarshalText(data []byte) error {
+ n, err := NewRegistry(string(data))
+ if err != nil {
+ return err
+ }
+ *r = n
+ return nil
+}
diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/repository.go b/vendor/github.com/google/go-containerregistry/pkg/name/repository.go
index 9250e36252..290797575e 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/name/repository.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/name/repository.go
@@ -15,6 +15,8 @@
package name
import (
+ "encoding"
+ "encoding/json"
"fmt"
"strings"
)
@@ -31,6 +33,11 @@ type Repository struct {
repository string
}
+var _ encoding.TextMarshaler = (*Repository)(nil)
+var _ encoding.TextUnmarshaler = (*Repository)(nil)
+var _ json.Marshaler = (*Repository)(nil)
+var _ json.Unmarshaler = (*Repository)(nil)
+
// See https://docs.docker.com/docker-hub/official_repos
func hasImplicitNamespace(repo string, reg Registry) bool {
return !strings.ContainsRune(repo, '/') && reg.RegistryStr() == DefaultRegistry
@@ -119,3 +126,33 @@ func (r Repository) Digest(identifier string) Digest {
d.original = d.Name()
return d
}
+
+// MarshalJSON formats the Repository into a string for JSON serialization.
+func (r Repository) MarshalJSON() ([]byte, error) { return json.Marshal(r.String()) }
+
+// UnmarshalJSON parses a JSON string into a Repository.
+func (r *Repository) UnmarshalJSON(data []byte) error {
+ var s string
+ if err := json.Unmarshal(data, &s); err != nil {
+ return err
+ }
+ n, err := NewRepository(s)
+ if err != nil {
+ return err
+ }
+ *r = n
+ return nil
+}
+
+// MarshalText formats the repository name into a string for text serialization.
+func (r Repository) MarshalText() ([]byte, error) { return []byte(r.String()), nil }
+
+// UnmarshalText parses a text string into a Repository.
+func (r *Repository) UnmarshalText(data []byte) error {
+ n, err := NewRepository(string(data))
+ if err != nil {
+ return err
+ }
+ *r = n
+ return nil
+}
diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/tag.go b/vendor/github.com/google/go-containerregistry/pkg/name/tag.go
index 66bd1bec3d..cfa923f59d 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/name/tag.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/name/tag.go
@@ -15,6 +15,8 @@
package name
import (
+ "encoding"
+ "encoding/json"
"strings"
)
@@ -31,8 +33,11 @@ type Tag struct {
original string
}
-// Ensure Tag implements Reference
var _ Reference = (*Tag)(nil)
+var _ encoding.TextMarshaler = (*Tag)(nil)
+var _ encoding.TextUnmarshaler = (*Tag)(nil)
+var _ json.Marshaler = (*Tag)(nil)
+var _ json.Unmarshaler = (*Tag)(nil)
// Context implements Reference.
func (t Tag) Context() Repository {
@@ -80,6 +85,9 @@ func NewTag(name string, opts ...Option) (Tag, error) {
if len(parts) > 1 && !strings.Contains(parts[len(parts)-1], regRepoDelimiter) {
base = strings.Join(parts[:len(parts)-1], tagDelim)
tag = parts[len(parts)-1]
+ if tag == "" {
+ return Tag{}, newErrBadName("%s must specify a tag name after the colon", name)
+ }
}
// We don't require a tag, but if we get one check it's valid,
@@ -106,3 +114,33 @@ func NewTag(name string, opts ...Option) (Tag, error) {
original: name,
}, nil
}
+
+// MarshalJSON formats the Tag into a string for JSON serialization.
+func (t Tag) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) }
+
+// UnmarshalJSON parses a JSON string into a Tag.
+func (t *Tag) UnmarshalJSON(data []byte) error {
+ var s string
+ if err := json.Unmarshal(data, &s); err != nil {
+ return err
+ }
+ n, err := NewTag(s)
+ if err != nil {
+ return err
+ }
+ *t = n
+ return nil
+}
+
+// MarshalText formats the tag into a string for text serialization.
+func (t Tag) MarshalText() ([]byte, error) { return []byte(t.String()), nil }
+
+// UnmarshalText parses a text string into a Tag.
+func (t *Tag) UnmarshalText(data []byte) error {
+ n, err := NewTag(string(data))
+ if err != nil {
+ return err
+ }
+ *t = n
+ return nil
+}
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/google/list.go b/vendor/github.com/google/go-containerregistry/pkg/v1/google/list.go
index 8a5906c235..cfb7143472 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/google/list.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/google/list.go
@@ -89,8 +89,8 @@ func newLister(repo name.Repository, options ...Option) (*lister, error) {
func (l *lister) list(repo name.Repository) (*Tags, error) {
uri := &url.URL{
- Scheme: repo.Registry.Scheme(),
- Host: repo.Registry.RegistryStr(),
+ Scheme: repo.Scheme(),
+ Host: repo.RegistryStr(),
Path: fmt.Sprintf("/v2/%s/tags/list", repo.RepositoryStr()),
RawQuery: "n=10000",
}
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go b/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go
index f78a5fa89e..d81593bd59 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go
@@ -16,12 +16,12 @@ package v1
import (
"crypto"
+ "encoding"
"encoding/hex"
"encoding/json"
"fmt"
"hash"
"io"
- "strconv"
"strings"
)
@@ -34,6 +34,11 @@ type Hash struct {
Hex string
}
+var _ encoding.TextMarshaler = (*Hash)(nil)
+var _ encoding.TextUnmarshaler = (*Hash)(nil)
+var _ json.Marshaler = (*Hash)(nil)
+var _ json.Unmarshaler = (*Hash)(nil)
+
// String reverses NewHash returning the string-form of the hash.
func (h Hash) String() string {
return fmt.Sprintf("%s:%s", h.Algorithm, h.Hex)
@@ -49,14 +54,12 @@ func NewHash(s string) (Hash, error) {
}
// MarshalJSON implements json.Marshaler
-func (h Hash) MarshalJSON() ([]byte, error) {
- return json.Marshal(h.String())
-}
+func (h Hash) MarshalJSON() ([]byte, error) { return json.Marshal(h.String()) }
// UnmarshalJSON implements json.Unmarshaler
func (h *Hash) UnmarshalJSON(data []byte) error {
- s, err := strconv.Unquote(string(data))
- if err != nil {
+ var s string
+ if err := json.Unmarshal(data, &s); err != nil {
return err
}
return h.parse(s)
@@ -64,15 +67,11 @@ func (h *Hash) UnmarshalJSON(data []byte) error {
// MarshalText implements encoding.TextMarshaler. This is required to use
// v1.Hash as a key in a map when marshalling JSON.
-func (h Hash) MarshalText() (text []byte, err error) {
- return []byte(h.String()), nil
-}
+func (h Hash) MarshalText() ([]byte, error) { return []byte(h.String()), nil }
// UnmarshalText implements encoding.TextUnmarshaler. This is required to use
// v1.Hash as a key in a map when unmarshalling JSON.
-func (h *Hash) UnmarshalText(text []byte) error {
- return h.parse(string(text))
-}
+func (h *Hash) UnmarshalText(text []byte) error { return h.parse(string(text)) }
// Hasher returns a hash.Hash for the named algorithm (e.g. "sha256")
func Hasher(name string) (hash.Hash, error) {
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go
index 19e4d1db8a..df583d029d 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go
@@ -126,13 +126,13 @@ func (l Path) ReplaceIndex(ii v1.ImageIndex, matcher match.Matcher, options ...O
// replaceDescriptor adds a descriptor to the index.json of the Path, replacing
// any one matching matcher, if found.
-func (l Path) replaceDescriptor(append mutate.Appendable, matcher match.Matcher, options ...Option) error {
+func (l Path) replaceDescriptor(appendable mutate.Appendable, matcher match.Matcher, options ...Option) error {
ii, err := l.ImageIndex()
if err != nil {
return err
}
- desc, err := partial.Descriptor(append)
+ desc, err := partial.Descriptor(appendable)
if err != nil {
return err
}
@@ -143,7 +143,7 @@ func (l Path) replaceDescriptor(append mutate.Appendable, matcher match.Matcher,
}
add := mutate.IndexAddendum{
- Add: append,
+ Add: appendable,
Descriptor: *desc,
}
ii = mutate.AppendManifests(mutate.RemoveManifests(ii, matcher), add)
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go
index 512effef67..a6fdaceed5 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go
@@ -35,26 +35,26 @@ func computeDescriptor(ia IndexAddendum) (*v1.Descriptor, error) {
}
// The IndexAddendum allows overriding Descriptor values.
- if ia.Descriptor.Size != 0 {
- desc.Size = ia.Descriptor.Size
+ if ia.Size != 0 {
+ desc.Size = ia.Size
}
- if string(ia.Descriptor.MediaType) != "" {
- desc.MediaType = ia.Descriptor.MediaType
+ if string(ia.MediaType) != "" {
+ desc.MediaType = ia.MediaType
}
- if ia.Descriptor.Digest != (v1.Hash{}) {
- desc.Digest = ia.Descriptor.Digest
+ if ia.Digest != (v1.Hash{}) {
+ desc.Digest = ia.Digest
}
- if ia.Descriptor.Platform != nil {
- desc.Platform = ia.Descriptor.Platform
+ if ia.Platform != nil {
+ desc.Platform = ia.Platform
}
- if len(ia.Descriptor.URLs) != 0 {
- desc.URLs = ia.Descriptor.URLs
+ if len(ia.URLs) != 0 {
+ desc.URLs = ia.URLs
}
- if len(ia.Descriptor.Annotations) != 0 {
- desc.Annotations = ia.Descriptor.Annotations
+ if len(ia.Annotations) != 0 {
+ desc.Annotations = ia.Annotations
}
- if ia.Descriptor.Data != nil {
- desc.Data = ia.Descriptor.Data
+ if ia.Data != nil {
+ desc.Data = ia.Data
}
return desc, nil
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go
index 4207740c35..c044796004 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go
@@ -328,7 +328,7 @@ func extract(img v1.Image, w io.Writer) error {
// mark file as handled. non-directory implicitly tombstones
// any entries with a matching (or child) name
- fileMap[name] = tombstone || !(header.Typeflag == tar.TypeDir)
+ fileMap[name] = tombstone || (header.Typeflag != tar.TypeDir)
if !tombstone {
if err := tarWriter.WriteHeader(header); err != nil {
return err
@@ -345,10 +345,7 @@ func extract(img v1.Image, w io.Writer) error {
}
func inWhiteoutDir(fileMap map[string]bool, file string) bool {
- for {
- if file == "" {
- break
- }
+ for file != "" {
dirname := filepath.Dir(file)
if file == dirname {
break
@@ -361,13 +358,6 @@ func inWhiteoutDir(fileMap map[string]bool, file string) bool {
return false
}
-func max(a, b int) int {
- if a > b {
- return a
- }
- return b
-}
-
// Time sets all timestamps in an image to the given timestamp.
func Time(img v1.Image, t time.Time) (v1.Image, error) {
newImage := empty.Image
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go
index 332d8ca0ad..47e3b806ee 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go
@@ -162,7 +162,7 @@ func (p *Pusher) Delete(ctx context.Context, ref name.Reference) error {
}
u := url.URL{
- Scheme: ref.Context().Registry.Scheme(),
+ Scheme: ref.Context().Scheme(),
Host: ref.Context().RegistryStr(),
Path: fmt.Sprintf("/v2/%s/manifests/%s", ref.Context().RepositoryStr(), ref.Identifier()),
}
diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go
index 1167cb793a..94d207de1a 100644
--- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go
+++ b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go
@@ -101,7 +101,7 @@ func makeWriter(ctx context.Context, repo name.Repository, ls []v1.Layer, o *opt
// url returns a url.Url for the specified path in the context of this remote image reference.
func (w *writer) url(path string) url.URL {
return url.URL{
- Scheme: w.repo.Registry.Scheme(),
+ Scheme: w.repo.Scheme(),
Host: w.repo.RegistryStr(),
Path: path,
}
@@ -394,7 +394,7 @@ func (w *writer) uploadOne(ctx context.Context, l v1.Layer) error {
return err
}
smt := string(mt)
- if !(strings.HasSuffix(smt, "+json") || strings.HasSuffix(smt, "+yaml")) {
+ if !strings.HasSuffix(smt, "+json") && !strings.HasSuffix(smt, "+yaml") {
ctx = redact.NewContext(ctx, "omitting binary blobs from logs")
}
diff --git a/vendor/github.com/google/go-github/v55/github/actions_required_workflows.go b/vendor/github.com/google/go-github/v55/github/actions_required_workflows.go
deleted file mode 100644
index 3566eb9d20..0000000000
--- a/vendor/github.com/google/go-github/v55/github/actions_required_workflows.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2023 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// OrgRequiredWorkflow represents a required workflow object at the org level.
-type OrgRequiredWorkflow struct {
- ID *int64 `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- Path *string `json:"path,omitempty"`
- Scope *string `json:"scope,omitempty"`
- Ref *string `json:"ref,omitempty"`
- State *string `json:"state,omitempty"`
- SelectedRepositoriesURL *string `json:"selected_repositories_url,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- Repository *Repository `json:"repository,omitempty"`
-}
-
-// OrgRequiredWorkflows represents the required workflows for the org.
-type OrgRequiredWorkflows struct {
- TotalCount *int `json:"total_count,omitempty"`
- RequiredWorkflows []*OrgRequiredWorkflow `json:"required_workflows,omitempty"`
-}
-
-// CreateUpdateRequiredWorkflowOptions represents the input object used to create or update required workflows.
-type CreateUpdateRequiredWorkflowOptions struct {
- WorkflowFilePath *string `json:"workflow_file_path,omitempty"`
- RepositoryID *int64 `json:"repository_id,omitempty"`
- Scope *string `json:"scope,omitempty"`
- SelectedRepositoryIDs *SelectedRepoIDs `json:"selected_repository_ids,omitempty"`
-}
-
-// RequiredWorkflowSelectedRepos represents the repos that a required workflow is applied to.
-type RequiredWorkflowSelectedRepos struct {
- TotalCount *int `json:"total_count,omitempty"`
- Repositories []*Repository `json:"repositories,omitempty"`
-}
-
-// RepoRequiredWorkflow represents a required workflow object at the repo level.
-type RepoRequiredWorkflow struct {
- ID *int64 `json:"id,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- Name *string `json:"name,omitempty"`
- Path *string `json:"path,omitempty"`
- State *string `json:"state,omitempty"`
- URL *string `json:"url,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- BadgeURL *string `json:"badge_url,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- SourceRepository *Repository `json:"source_repository,omitempty"`
-}
-
-// RepoRequiredWorkflows represents the required workflows for a repo.
-type RepoRequiredWorkflows struct {
- TotalCount *int `json:"total_count,omitempty"`
- RequiredWorkflows []*RepoRequiredWorkflow `json:"required_workflows,omitempty"`
-}
-
-// ListOrgRequiredWorkflows lists the RequiredWorkflows for an org.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-required-workflows
-func (s *ActionsService) ListOrgRequiredWorkflows(ctx context.Context, org string, opts *ListOptions) (*OrgRequiredWorkflows, *Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows", org)
- u, err := addOptions(url, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- requiredWorkflows := new(OrgRequiredWorkflows)
- resp, err := s.client.Do(ctx, req, &requiredWorkflows)
- if err != nil {
- return nil, resp, err
- }
-
- return requiredWorkflows, resp, nil
-}
-
-// CreateRequiredWorkflow creates the required workflow in an org.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#create-a-required-workflow
-func (s *ActionsService) CreateRequiredWorkflow(ctx context.Context, org string, createRequiredWorkflowOptions *CreateUpdateRequiredWorkflowOptions) (*OrgRequiredWorkflow, *Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows", org)
- req, err := s.client.NewRequest("POST", url, createRequiredWorkflowOptions)
- if err != nil {
- return nil, nil, err
- }
-
- orgRequiredWorkflow := new(OrgRequiredWorkflow)
- resp, err := s.client.Do(ctx, req, orgRequiredWorkflow)
- if err != nil {
- return nil, resp, err
- }
-
- return orgRequiredWorkflow, resp, nil
-}
-
-// GetRequiredWorkflowByID get the RequiredWorkflows for an org by its ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-required-workflows
-func (s *ActionsService) GetRequiredWorkflowByID(ctx context.Context, owner string, requiredWorkflowID int64) (*OrgRequiredWorkflow, *Response, error) {
- u := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", owner, requiredWorkflowID)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- requiredWorkflow := new(OrgRequiredWorkflow)
- resp, err := s.client.Do(ctx, req, &requiredWorkflow)
- if err != nil {
- return nil, resp, err
- }
-
- return requiredWorkflow, resp, nil
-}
-
-// UpdateRequiredWorkflow updates a required workflow in an org.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#update-a-required-workflow
-func (s *ActionsService) UpdateRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID int64, updateRequiredWorkflowOptions *CreateUpdateRequiredWorkflowOptions) (*OrgRequiredWorkflow, *Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", org, requiredWorkflowID)
- req, err := s.client.NewRequest("PATCH", url, updateRequiredWorkflowOptions)
- if err != nil {
- return nil, nil, err
- }
-
- orgRequiredWorkflow := new(OrgRequiredWorkflow)
- resp, err := s.client.Do(ctx, req, orgRequiredWorkflow)
- if err != nil {
- return nil, resp, err
- }
-
- return orgRequiredWorkflow, resp, nil
-}
-
-// DeleteRequiredWorkflow deletes a required workflow in an org.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#update-a-required-workflow
-func (s *ActionsService) DeleteRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID int64) (*Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v", org, requiredWorkflowID)
- req, err := s.client.NewRequest("DELETE", url, nil)
- if err != nil {
- return nil, err
- }
- return s.client.Do(ctx, req, nil)
-}
-
-// ListRequiredWorkflowSelectedRepos lists the Repositories selected for a workflow.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-selected-repositories-for-a-required-workflow
-func (s *ActionsService) ListRequiredWorkflowSelectedRepos(ctx context.Context, org string, requiredWorkflowID int64, opts *ListOptions) (*RequiredWorkflowSelectedRepos, *Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories", org, requiredWorkflowID)
- u, err := addOptions(url, opts)
- if err != nil {
- return nil, nil, err
- }
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- requiredWorkflowRepos := new(RequiredWorkflowSelectedRepos)
- resp, err := s.client.Do(ctx, req, &requiredWorkflowRepos)
- if err != nil {
- return nil, resp, err
- }
-
- return requiredWorkflowRepos, resp, nil
-}
-
-// SetRequiredWorkflowSelectedRepos sets the Repositories selected for a workflow.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#sets-repositories-for-a-required-workflow
-func (s *ActionsService) SetRequiredWorkflowSelectedRepos(ctx context.Context, org string, requiredWorkflowID int64, ids SelectedRepoIDs) (*Response, error) {
- type repoIDs struct {
- SelectedIDs SelectedRepoIDs `json:"selected_repository_ids"`
- }
- url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories", org, requiredWorkflowID)
- req, err := s.client.NewRequest("PUT", url, repoIDs{SelectedIDs: ids})
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// AddRepoToRequiredWorkflow adds the Repository to a required workflow.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#add-a-repository-to-a-required-workflow
-func (s *ActionsService) AddRepoToRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID, repoID int64) (*Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories/%v", org, requiredWorkflowID, repoID)
- req, err := s.client.NewRequest("PUT", url, nil)
- if err != nil {
- return nil, err
- }
- return s.client.Do(ctx, req, nil)
-}
-
-// RemoveRepoFromRequiredWorkflow removes the Repository from a required workflow.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#add-a-repository-to-a-required-workflow
-func (s *ActionsService) RemoveRepoFromRequiredWorkflow(ctx context.Context, org string, requiredWorkflowID, repoID int64) (*Response, error) {
- url := fmt.Sprintf("orgs/%v/actions/required_workflows/%v/repositories/%v", org, requiredWorkflowID, repoID)
- req, err := s.client.NewRequest("DELETE", url, nil)
- if err != nil {
- return nil, err
- }
- return s.client.Do(ctx, req, nil)
-}
-
-// ListRepoRequiredWorkflows lists the RequiredWorkflows for a repo.
-//
-// Github API docs:https://docs.github.com/en/rest/actions/required-workflows?apiVersion=2022-11-28#list-repository-required-workflows
-func (s *ActionsService) ListRepoRequiredWorkflows(ctx context.Context, owner, repo string, opts *ListOptions) (*RepoRequiredWorkflows, *Response, error) {
- url := fmt.Sprintf("repos/%v/%v/actions/required_workflows", owner, repo)
- u, err := addOptions(url, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- requiredWorkflows := new(RepoRequiredWorkflows)
- resp, err := s.client.Do(ctx, req, &requiredWorkflows)
- if err != nil {
- return nil, resp, err
- }
-
- return requiredWorkflows, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v55/github/actions_workflow_runs.go
deleted file mode 100644
index 0022108611..0000000000
--- a/vendor/github.com/google/go-github/v55/github/actions_workflow_runs.go
+++ /dev/null
@@ -1,373 +0,0 @@
-// Copyright 2020 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-)
-
-// WorkflowRun represents a repository action workflow run.
-type WorkflowRun struct {
- ID *int64 `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- HeadBranch *string `json:"head_branch,omitempty"`
- HeadSHA *string `json:"head_sha,omitempty"`
- RunNumber *int `json:"run_number,omitempty"`
- RunAttempt *int `json:"run_attempt,omitempty"`
- Event *string `json:"event,omitempty"`
- DisplayTitle *string `json:"display_title,omitempty"`
- Status *string `json:"status,omitempty"`
- Conclusion *string `json:"conclusion,omitempty"`
- WorkflowID *int64 `json:"workflow_id,omitempty"`
- CheckSuiteID *int64 `json:"check_suite_id,omitempty"`
- CheckSuiteNodeID *string `json:"check_suite_node_id,omitempty"`
- URL *string `json:"url,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- PullRequests []*PullRequest `json:"pull_requests,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- RunStartedAt *Timestamp `json:"run_started_at,omitempty"`
- JobsURL *string `json:"jobs_url,omitempty"`
- LogsURL *string `json:"logs_url,omitempty"`
- CheckSuiteURL *string `json:"check_suite_url,omitempty"`
- ArtifactsURL *string `json:"artifacts_url,omitempty"`
- CancelURL *string `json:"cancel_url,omitempty"`
- RerunURL *string `json:"rerun_url,omitempty"`
- PreviousAttemptURL *string `json:"previous_attempt_url,omitempty"`
- HeadCommit *HeadCommit `json:"head_commit,omitempty"`
- WorkflowURL *string `json:"workflow_url,omitempty"`
- Repository *Repository `json:"repository,omitempty"`
- HeadRepository *Repository `json:"head_repository,omitempty"`
- Actor *User `json:"actor,omitempty"`
- TriggeringActor *User `json:"triggering_actor,omitempty"`
-}
-
-// WorkflowRuns represents a slice of repository action workflow run.
-type WorkflowRuns struct {
- TotalCount *int `json:"total_count,omitempty"`
- WorkflowRuns []*WorkflowRun `json:"workflow_runs,omitempty"`
-}
-
-// ListWorkflowRunsOptions specifies optional parameters to ListWorkflowRuns.
-type ListWorkflowRunsOptions struct {
- Actor string `url:"actor,omitempty"`
- Branch string `url:"branch,omitempty"`
- Event string `url:"event,omitempty"`
- Status string `url:"status,omitempty"`
- Created string `url:"created,omitempty"`
- HeadSHA string `url:"head_sha,omitempty"`
- ExcludePullRequests bool `url:"exclude_pull_requests,omitempty"`
- CheckSuiteID int64 `url:"check_suite_id,omitempty"`
- ListOptions
-}
-
-// WorkflowRunUsage represents a usage of a specific workflow run.
-type WorkflowRunUsage struct {
- Billable *WorkflowRunBillMap `json:"billable,omitempty"`
- RunDurationMS *int64 `json:"run_duration_ms,omitempty"`
-}
-
-// WorkflowRunBillMap represents different runner environments available for a workflow run.
-// Its key is the name of its environment, e.g. "UBUNTU", "MACOS", "WINDOWS", etc.
-type WorkflowRunBillMap map[string]*WorkflowRunBill
-
-// WorkflowRunBill specifies billable time for a specific environment in a workflow run.
-type WorkflowRunBill struct {
- TotalMS *int64 `json:"total_ms,omitempty"`
- Jobs *int `json:"jobs,omitempty"`
- JobRuns []*WorkflowRunJobRun `json:"job_runs,omitempty"`
-}
-
-// WorkflowRunJobRun represents a usage of individual jobs of a specific workflow run.
-type WorkflowRunJobRun struct {
- JobID *int `json:"job_id,omitempty"`
- DurationMS *int64 `json:"duration_ms,omitempty"`
-}
-
-// WorkflowRunAttemptOptions specifies optional parameters to GetWorkflowRunAttempt.
-type WorkflowRunAttemptOptions struct {
- ExcludePullRequests *bool `url:"exclude_pull_requests,omitempty"`
-}
-
-// PendingDeploymentsRequest specifies body parameters to PendingDeployments.
-type PendingDeploymentsRequest struct {
- EnvironmentIDs []int64 `json:"environment_ids"`
- // State can be one of: "approved", "rejected".
- State string `json:"state"`
- Comment string `json:"comment"`
-}
-
-func (s *ActionsService) listWorkflowRuns(ctx context.Context, endpoint string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) {
- u, err := addOptions(endpoint, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- runs := new(WorkflowRuns)
- resp, err := s.client.Do(ctx, req, &runs)
- if err != nil {
- return nil, resp, err
- }
-
- return runs, resp, nil
-}
-
-// ListWorkflowRunsByID lists all workflow runs by workflow ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs
-func (s *ActionsService) ListWorkflowRunsByID(ctx context.Context, owner, repo string, workflowID int64, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) {
- u := fmt.Sprintf("repos/%s/%s/actions/workflows/%v/runs", owner, repo, workflowID)
- return s.listWorkflowRuns(ctx, u, opts)
-}
-
-// ListWorkflowRunsByFileName lists all workflow runs by workflow file name.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs
-func (s *ActionsService) ListWorkflowRunsByFileName(ctx context.Context, owner, repo, workflowFileName string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) {
- u := fmt.Sprintf("repos/%s/%s/actions/workflows/%v/runs", owner, repo, workflowFileName)
- return s.listWorkflowRuns(ctx, u, opts)
-}
-
-// ListRepositoryWorkflowRuns lists all workflow runs for a repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs-for-a-repository
-func (s *ActionsService) ListRepositoryWorkflowRuns(ctx context.Context, owner, repo string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) {
- u := fmt.Sprintf("repos/%s/%s/actions/runs", owner, repo)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- runs := new(WorkflowRuns)
- resp, err := s.client.Do(ctx, req, &runs)
- if err != nil {
- return nil, resp, err
- }
-
- return runs, resp, nil
-}
-
-// GetWorkflowRunByID gets a specific workflow run by ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run
-func (s *ActionsService) GetWorkflowRunByID(ctx context.Context, owner, repo string, runID int64) (*WorkflowRun, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v", owner, repo, runID)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- run := new(WorkflowRun)
- resp, err := s.client.Do(ctx, req, run)
- if err != nil {
- return nil, resp, err
- }
-
- return run, resp, nil
-}
-
-// GetWorkflowRunAttempt gets a specific workflow run attempt.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run-attempt
-func (s *ActionsService) GetWorkflowRunAttempt(ctx context.Context, owner, repo string, runID int64, attemptNumber int, opts *WorkflowRunAttemptOptions) (*WorkflowRun, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/attempts/%v", owner, repo, runID, attemptNumber)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- run := new(WorkflowRun)
- resp, err := s.client.Do(ctx, req, run)
- if err != nil {
- return nil, resp, err
- }
-
- return run, resp, nil
-}
-
-// GetWorkflowRunAttemptLogs gets a redirect URL to download a plain text file of logs for a workflow run for attempt number.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#download-workflow-run-attempt-logs
-func (s *ActionsService) GetWorkflowRunAttemptLogs(ctx context.Context, owner, repo string, runID int64, attemptNumber int, followRedirects bool) (*url.URL, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/attempts/%v/logs", owner, repo, runID, attemptNumber)
-
- resp, err := s.client.roundTripWithOptionalFollowRedirect(ctx, u, followRedirects)
- if err != nil {
- return nil, nil, err
- }
- defer resp.Body.Close()
-
- if resp.StatusCode != http.StatusFound {
- return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status)
- }
-
- parsedURL, err := url.Parse(resp.Header.Get("Location"))
- return parsedURL, newResponse(resp), err
-}
-
-// RerunWorkflowByID re-runs a workflow by ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#re-run-a-workflow
-func (s *ActionsService) RerunWorkflowByID(ctx context.Context, owner, repo string, runID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/rerun", owner, repo, runID)
-
- req, err := s.client.NewRequest("POST", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// RerunFailedJobsByID re-runs all of the failed jobs and their dependent jobs in a workflow run by ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run
-func (s *ActionsService) RerunFailedJobsByID(ctx context.Context, owner, repo string, runID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/rerun-failed-jobs", owner, repo, runID)
-
- req, err := s.client.NewRequest("POST", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// RerunJobByID re-runs a job and its dependent jobs in a workflow run by ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run
-func (s *ActionsService) RerunJobByID(ctx context.Context, owner, repo string, jobID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/jobs/%v/rerun", owner, repo, jobID)
-
- req, err := s.client.NewRequest("POST", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// CancelWorkflowRunByID cancels a workflow run by ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#cancel-a-workflow-run
-func (s *ActionsService) CancelWorkflowRunByID(ctx context.Context, owner, repo string, runID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/cancel", owner, repo, runID)
-
- req, err := s.client.NewRequest("POST", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// GetWorkflowRunLogs gets a redirect URL to download a plain text file of logs for a workflow run.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#download-workflow-run-logs
-func (s *ActionsService) GetWorkflowRunLogs(ctx context.Context, owner, repo string, runID int64, followRedirects bool) (*url.URL, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/logs", owner, repo, runID)
-
- resp, err := s.client.roundTripWithOptionalFollowRedirect(ctx, u, followRedirects)
- if err != nil {
- return nil, nil, err
- }
- defer resp.Body.Close()
-
- if resp.StatusCode != http.StatusFound {
- return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status)
- }
-
- parsedURL, err := url.Parse(resp.Header.Get("Location"))
- return parsedURL, newResponse(resp), err
-}
-
-// DeleteWorkflowRun deletes a workflow run by ID.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#delete-a-workflow-run
-func (s *ActionsService) DeleteWorkflowRun(ctx context.Context, owner, repo string, runID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v", owner, repo, runID)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// DeleteWorkflowRunLogs deletes all logs for a workflow run.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#delete-workflow-run-logs
-func (s *ActionsService) DeleteWorkflowRunLogs(ctx context.Context, owner, repo string, runID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/logs", owner, repo, runID)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// GetWorkflowRunUsageByID gets a specific workflow usage run by run ID in the unit of billable milliseconds.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#get-workflow-run-usage
-func (s *ActionsService) GetWorkflowRunUsageByID(ctx context.Context, owner, repo string, runID int64) (*WorkflowRunUsage, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/timing", owner, repo, runID)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- workflowRunUsage := new(WorkflowRunUsage)
- resp, err := s.client.Do(ctx, req, workflowRunUsage)
- if err != nil {
- return nil, resp, err
- }
-
- return workflowRunUsage, resp, nil
-}
-
-// PendingDeployments approve or reject pending deployments that are waiting on approval by a required reviewer.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run
-func (s *ActionsService) PendingDeployments(ctx context.Context, owner, repo string, runID int64, request *PendingDeploymentsRequest) ([]*Deployment, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/pending_deployments", owner, repo, runID)
-
- req, err := s.client.NewRequest("POST", u, request)
- if err != nil {
- return nil, nil, err
- }
-
- var deployments []*Deployment
- resp, err := s.client.Do(ctx, req, &deployments)
- if err != nil {
- return nil, resp, err
- }
-
- return deployments, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/apps.go b/vendor/github.com/google/go-github/v55/github/apps.go
deleted file mode 100644
index ab83d59ab2..0000000000
--- a/vendor/github.com/google/go-github/v55/github/apps.go
+++ /dev/null
@@ -1,359 +0,0 @@
-// Copyright 2016 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// AppsService provides access to the installation related functions
-// in the GitHub API.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/
-type AppsService service
-
-// App represents a GitHub App.
-type App struct {
- ID *int64 `json:"id,omitempty"`
- Slug *string `json:"slug,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- Owner *User `json:"owner,omitempty"`
- Name *string `json:"name,omitempty"`
- Description *string `json:"description,omitempty"`
- ExternalURL *string `json:"external_url,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- Permissions *InstallationPermissions `json:"permissions,omitempty"`
- Events []string `json:"events,omitempty"`
- InstallationsCount *int `json:"installations_count,omitempty"`
-}
-
-// InstallationToken represents an installation token.
-type InstallationToken struct {
- Token *string `json:"token,omitempty"`
- ExpiresAt *Timestamp `json:"expires_at,omitempty"`
- Permissions *InstallationPermissions `json:"permissions,omitempty"`
- Repositories []*Repository `json:"repositories,omitempty"`
-}
-
-// InstallationTokenOptions allow restricting a token's access to specific repositories.
-type InstallationTokenOptions struct {
- // The IDs of the repositories that the installation token can access.
- // Providing repository IDs restricts the access of an installation token to specific repositories.
- RepositoryIDs []int64 `json:"repository_ids,omitempty"`
-
- // The names of the repositories that the installation token can access.
- // Providing repository names restricts the access of an installation token to specific repositories.
- Repositories []string `json:"repositories,omitempty"`
-
- // The permissions granted to the access token.
- // The permissions object includes the permission names and their access type.
- Permissions *InstallationPermissions `json:"permissions,omitempty"`
-}
-
-// InstallationPermissions lists the repository and organization permissions for an installation.
-//
-// Permission names taken from:
-//
-// https://docs.github.com/en/enterprise-server@3.0/rest/apps#create-an-installation-access-token-for-an-app
-// https://docs.github.com/en/rest/apps#create-an-installation-access-token-for-an-app
-type InstallationPermissions struct {
- Actions *string `json:"actions,omitempty"`
- Administration *string `json:"administration,omitempty"`
- Blocking *string `json:"blocking,omitempty"`
- Checks *string `json:"checks,omitempty"`
- Contents *string `json:"contents,omitempty"`
- ContentReferences *string `json:"content_references,omitempty"`
- Deployments *string `json:"deployments,omitempty"`
- Emails *string `json:"emails,omitempty"`
- Environments *string `json:"environments,omitempty"`
- Followers *string `json:"followers,omitempty"`
- Issues *string `json:"issues,omitempty"`
- Metadata *string `json:"metadata,omitempty"`
- Members *string `json:"members,omitempty"`
- OrganizationAdministration *string `json:"organization_administration,omitempty"`
- OrganizationCustomRoles *string `json:"organization_custom_roles,omitempty"`
- OrganizationHooks *string `json:"organization_hooks,omitempty"`
- OrganizationPackages *string `json:"organization_packages,omitempty"`
- OrganizationPlan *string `json:"organization_plan,omitempty"`
- OrganizationPreReceiveHooks *string `json:"organization_pre_receive_hooks,omitempty"`
- OrganizationProjects *string `json:"organization_projects,omitempty"`
- OrganizationSecrets *string `json:"organization_secrets,omitempty"`
- OrganizationSelfHostedRunners *string `json:"organization_self_hosted_runners,omitempty"`
- OrganizationUserBlocking *string `json:"organization_user_blocking,omitempty"`
- Packages *string `json:"packages,omitempty"`
- Pages *string `json:"pages,omitempty"`
- PullRequests *string `json:"pull_requests,omitempty"`
- RepositoryHooks *string `json:"repository_hooks,omitempty"`
- RepositoryProjects *string `json:"repository_projects,omitempty"`
- RepositoryPreReceiveHooks *string `json:"repository_pre_receive_hooks,omitempty"`
- Secrets *string `json:"secrets,omitempty"`
- SecretScanningAlerts *string `json:"secret_scanning_alerts,omitempty"`
- SecurityEvents *string `json:"security_events,omitempty"`
- SingleFile *string `json:"single_file,omitempty"`
- Statuses *string `json:"statuses,omitempty"`
- TeamDiscussions *string `json:"team_discussions,omitempty"`
- VulnerabilityAlerts *string `json:"vulnerability_alerts,omitempty"`
- Workflows *string `json:"workflows,omitempty"`
-}
-
-// Installation represents a GitHub Apps installation.
-type Installation struct {
- ID *int64 `json:"id,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- AppID *int64 `json:"app_id,omitempty"`
- AppSlug *string `json:"app_slug,omitempty"`
- TargetID *int64 `json:"target_id,omitempty"`
- Account *User `json:"account,omitempty"`
- AccessTokensURL *string `json:"access_tokens_url,omitempty"`
- RepositoriesURL *string `json:"repositories_url,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- TargetType *string `json:"target_type,omitempty"`
- SingleFileName *string `json:"single_file_name,omitempty"`
- RepositorySelection *string `json:"repository_selection,omitempty"`
- Events []string `json:"events,omitempty"`
- SingleFilePaths []string `json:"single_file_paths,omitempty"`
- Permissions *InstallationPermissions `json:"permissions,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- HasMultipleSingleFiles *bool `json:"has_multiple_single_files,omitempty"`
- SuspendedBy *User `json:"suspended_by,omitempty"`
- SuspendedAt *Timestamp `json:"suspended_at,omitempty"`
-}
-
-// Attachment represents a GitHub Apps attachment.
-type Attachment struct {
- ID *int64 `json:"id,omitempty"`
- Title *string `json:"title,omitempty"`
- Body *string `json:"body,omitempty"`
-}
-
-// ContentReference represents a reference to a URL in an issue or pull request.
-type ContentReference struct {
- ID *int64 `json:"id,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- Reference *string `json:"reference,omitempty"`
-}
-
-func (i Installation) String() string {
- return Stringify(i)
-}
-
-// Get a single GitHub App. Passing the empty string will get
-// the authenticated GitHub App.
-//
-// Note: appSlug is just the URL-friendly name of your GitHub App.
-// You can find this on the settings page for your GitHub App
-// (e.g., https://github.com/settings/apps/:app_slug).
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#get-the-authenticated-app
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#get-an-app
-func (s *AppsService) Get(ctx context.Context, appSlug string) (*App, *Response, error) {
- var u string
- if appSlug != "" {
- u = fmt.Sprintf("apps/%v", appSlug)
- } else {
- u = "app"
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- app := new(App)
- resp, err := s.client.Do(ctx, req, app)
- if err != nil {
- return nil, resp, err
- }
-
- return app, resp, nil
-}
-
-// ListInstallations lists the installations that the current GitHub App has.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#list-installations-for-the-authenticated-app
-func (s *AppsService) ListInstallations(ctx context.Context, opts *ListOptions) ([]*Installation, *Response, error) {
- u, err := addOptions("app/installations", opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var i []*Installation
- resp, err := s.client.Do(ctx, req, &i)
- if err != nil {
- return nil, resp, err
- }
-
- return i, resp, nil
-}
-
-// GetInstallation returns the specified installation.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#get-an-installation-for-the-authenticated-app
-func (s *AppsService) GetInstallation(ctx context.Context, id int64) (*Installation, *Response, error) {
- return s.getInstallation(ctx, fmt.Sprintf("app/installations/%v", id))
-}
-
-// ListUserInstallations lists installations that are accessible to the authenticated user.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/installations#list-app-installations-accessible-to-the-user-access-token
-func (s *AppsService) ListUserInstallations(ctx context.Context, opts *ListOptions) ([]*Installation, *Response, error) {
- u, err := addOptions("user/installations", opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var i struct {
- Installations []*Installation `json:"installations"`
- }
- resp, err := s.client.Do(ctx, req, &i)
- if err != nil {
- return nil, resp, err
- }
-
- return i.Installations, resp, nil
-}
-
-// SuspendInstallation suspends the specified installation.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#suspend-an-app-installation
-func (s *AppsService) SuspendInstallation(ctx context.Context, id int64) (*Response, error) {
- u := fmt.Sprintf("app/installations/%v/suspended", id)
-
- req, err := s.client.NewRequest("PUT", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// UnsuspendInstallation unsuspends the specified installation.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#unsuspend-an-app-installation
-func (s *AppsService) UnsuspendInstallation(ctx context.Context, id int64) (*Response, error) {
- u := fmt.Sprintf("app/installations/%v/suspended", id)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// DeleteInstallation deletes the specified installation.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#delete-an-installation-for-the-authenticated-app
-func (s *AppsService) DeleteInstallation(ctx context.Context, id int64) (*Response, error) {
- u := fmt.Sprintf("app/installations/%v", id)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
-
-// CreateInstallationToken creates a new installation token.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#create-an-installation-access-token-for-an-app
-func (s *AppsService) CreateInstallationToken(ctx context.Context, id int64, opts *InstallationTokenOptions) (*InstallationToken, *Response, error) {
- u := fmt.Sprintf("app/installations/%v/access_tokens", id)
-
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- t := new(InstallationToken)
- resp, err := s.client.Do(ctx, req, t)
- if err != nil {
- return nil, resp, err
- }
-
- return t, resp, nil
-}
-
-// CreateAttachment creates a new attachment on user comment containing a url.
-//
-// TODO: Find GitHub API docs.
-func (s *AppsService) CreateAttachment(ctx context.Context, contentReferenceID int64, title, body string) (*Attachment, *Response, error) {
- u := fmt.Sprintf("content_references/%v/attachments", contentReferenceID)
- payload := &Attachment{Title: String(title), Body: String(body)}
- req, err := s.client.NewRequest("POST", u, payload)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeContentAttachmentsPreview)
-
- m := &Attachment{}
- resp, err := s.client.Do(ctx, req, m)
- if err != nil {
- return nil, resp, err
- }
-
- return m, resp, nil
-}
-
-// FindOrganizationInstallation finds the organization's installation information.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#get-an-organization-installation-for-the-authenticated-app
-func (s *AppsService) FindOrganizationInstallation(ctx context.Context, org string) (*Installation, *Response, error) {
- return s.getInstallation(ctx, fmt.Sprintf("orgs/%v/installation", org))
-}
-
-// FindRepositoryInstallation finds the repository's installation information.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#get-a-repository-installation-for-the-authenticated-app
-func (s *AppsService) FindRepositoryInstallation(ctx context.Context, owner, repo string) (*Installation, *Response, error) {
- return s.getInstallation(ctx, fmt.Sprintf("repos/%v/%v/installation", owner, repo))
-}
-
-// FindRepositoryInstallationByID finds the repository's installation information.
-//
-// Note: FindRepositoryInstallationByID uses the undocumented GitHub API endpoint /repositories/:id/installation.
-func (s *AppsService) FindRepositoryInstallationByID(ctx context.Context, id int64) (*Installation, *Response, error) {
- return s.getInstallation(ctx, fmt.Sprintf("repositories/%d/installation", id))
-}
-
-// FindUserInstallation finds the user's installation information.
-//
-// GitHub API docs: https://docs.github.com/en/rest/apps/apps#get-a-user-installation-for-the-authenticated-app
-func (s *AppsService) FindUserInstallation(ctx context.Context, user string) (*Installation, *Response, error) {
- return s.getInstallation(ctx, fmt.Sprintf("users/%v/installation", user))
-}
-
-func (s *AppsService) getInstallation(ctx context.Context, url string) (*Installation, *Response, error) {
- req, err := s.client.NewRequest("GET", url, nil)
- if err != nil {
- return nil, nil, err
- }
-
- i := new(Installation)
- resp, err := s.client.Do(ctx, req, i)
- if err != nil {
- return nil, resp, err
- }
-
- return i, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/enterprise_actions_runners.go b/vendor/github.com/google/go-github/v55/github/enterprise_actions_runners.go
deleted file mode 100644
index daafc5e628..0000000000
--- a/vendor/github.com/google/go-github/v55/github/enterprise_actions_runners.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2020 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ListRunnerApplicationDownloads lists self-hosted runner application binaries that can be downloaded and run.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners#list-runner-applications-for-an-enterprise
-func (s *EnterpriseService) ListRunnerApplicationDownloads(ctx context.Context, enterprise string) ([]*RunnerApplicationDownload, *Response, error) {
- u := fmt.Sprintf("enterprises/%v/actions/runners/downloads", enterprise)
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var rads []*RunnerApplicationDownload
- resp, err := s.client.Do(ctx, req, &rads)
- if err != nil {
- return nil, resp, err
- }
-
- return rads, resp, nil
-}
-
-// CreateRegistrationToken creates a token that can be used to add a self-hosted runner.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners#create-a-registration-token-for-an-enterprise
-func (s *EnterpriseService) CreateRegistrationToken(ctx context.Context, enterprise string) (*RegistrationToken, *Response, error) {
- u := fmt.Sprintf("enterprises/%v/actions/runners/registration-token", enterprise)
-
- req, err := s.client.NewRequest("POST", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- registrationToken := new(RegistrationToken)
- resp, err := s.client.Do(ctx, req, registrationToken)
- if err != nil {
- return nil, resp, err
- }
-
- return registrationToken, resp, nil
-}
-
-// ListRunners lists all the self-hosted runners for a enterprise.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-enterprise
-func (s *EnterpriseService) ListRunners(ctx context.Context, enterprise string, opts *ListOptions) (*Runners, *Response, error) {
- u := fmt.Sprintf("enterprises/%v/actions/runners", enterprise)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- runners := &Runners{}
- resp, err := s.client.Do(ctx, req, &runners)
- if err != nil {
- return nil, resp, err
- }
-
- return runners, resp, nil
-}
-
-// RemoveRunner forces the removal of a self-hosted runner from an enterprise using the runner id.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-enterprise
-func (s *EnterpriseService) RemoveRunner(ctx context.Context, enterprise string, runnerID int64) (*Response, error) {
- u := fmt.Sprintf("enterprises/%v/actions/runners/%v", enterprise, runnerID)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
diff --git a/vendor/github.com/google/go-github/v55/github/misc.go b/vendor/github.com/google/go-github/v55/github/misc.go
deleted file mode 100644
index 8961524157..0000000000
--- a/vendor/github.com/google/go-github/v55/github/misc.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright 2014 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "bytes"
- "context"
- "fmt"
- "net/url"
-)
-
-// MarkdownOptions specifies optional parameters to the Markdown method.
-type MarkdownOptions struct {
- // Mode identifies the rendering mode. Possible values are:
- // markdown - render a document as plain Markdown, just like
- // README files are rendered.
- //
- // gfm - to render a document as user-content, e.g. like user
- // comments or issues are rendered. In GFM mode, hard line breaks are
- // always taken into account, and issue and user mentions are linked
- // accordingly.
- //
- // Default is "markdown".
- Mode string
-
- // Context identifies the repository context. Only taken into account
- // when rendering as "gfm".
- Context string
-}
-
-type markdownRequest struct {
- Text *string `json:"text,omitempty"`
- Mode *string `json:"mode,omitempty"`
- Context *string `json:"context,omitempty"`
-}
-
-// Markdown renders an arbitrary Markdown document.
-//
-// GitHub API docs: https://docs.github.com/en/rest/markdown/
-func (c *Client) Markdown(ctx context.Context, text string, opts *MarkdownOptions) (string, *Response, error) {
- request := &markdownRequest{Text: String(text)}
- if opts != nil {
- if opts.Mode != "" {
- request.Mode = String(opts.Mode)
- }
- if opts.Context != "" {
- request.Context = String(opts.Context)
- }
- }
-
- req, err := c.NewRequest("POST", "markdown", request)
- if err != nil {
- return "", nil, err
- }
-
- buf := new(bytes.Buffer)
- resp, err := c.Do(ctx, req, buf)
- if err != nil {
- return "", resp, err
- }
-
- return buf.String(), resp, nil
-}
-
-// ListEmojis returns the emojis available to use on GitHub.
-//
-// GitHub API docs: https://docs.github.com/en/rest/emojis/
-func (c *Client) ListEmojis(ctx context.Context) (map[string]string, *Response, error) {
- req, err := c.NewRequest("GET", "emojis", nil)
- if err != nil {
- return nil, nil, err
- }
-
- var emoji map[string]string
- resp, err := c.Do(ctx, req, &emoji)
- if err != nil {
- return nil, resp, err
- }
-
- return emoji, resp, nil
-}
-
-// CodeOfConduct represents a code of conduct.
-type CodeOfConduct struct {
- Name *string `json:"name,omitempty"`
- Key *string `json:"key,omitempty"`
- URL *string `json:"url,omitempty"`
- Body *string `json:"body,omitempty"`
-}
-
-func (c *CodeOfConduct) String() string {
- return Stringify(c)
-}
-
-// ListCodesOfConduct returns all codes of conduct.
-//
-// GitHub API docs: https://docs.github.com/en/rest/codes_of_conduct/#list-all-codes-of-conduct
-func (c *Client) ListCodesOfConduct(ctx context.Context) ([]*CodeOfConduct, *Response, error) {
- req, err := c.NewRequest("GET", "codes_of_conduct", nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeCodesOfConductPreview)
-
- var cs []*CodeOfConduct
- resp, err := c.Do(ctx, req, &cs)
- if err != nil {
- return nil, resp, err
- }
-
- return cs, resp, nil
-}
-
-// GetCodeOfConduct returns an individual code of conduct.
-//
-// https://docs.github.com/en/rest/codes_of_conduct/#get-an-individual-code-of-conduct
-func (c *Client) GetCodeOfConduct(ctx context.Context, key string) (*CodeOfConduct, *Response, error) {
- u := fmt.Sprintf("codes_of_conduct/%s", key)
- req, err := c.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeCodesOfConductPreview)
-
- coc := new(CodeOfConduct)
- resp, err := c.Do(ctx, req, coc)
- if err != nil {
- return nil, resp, err
- }
-
- return coc, resp, nil
-}
-
-// APIMeta represents metadata about the GitHub API.
-type APIMeta struct {
- // An Array of IP addresses in CIDR format specifying the addresses
- // that incoming service hooks will originate from on GitHub.com.
- Hooks []string `json:"hooks,omitempty"`
-
- // An Array of IP addresses in CIDR format specifying the Git servers
- // for GitHub.com.
- Git []string `json:"git,omitempty"`
-
- // Whether authentication with username and password is supported.
- // (GitHub Enterprise instances using CAS or OAuth for authentication
- // will return false. Features like Basic Authentication with a
- // username and password, sudo mode, and two-factor authentication are
- // not supported on these servers.)
- VerifiablePasswordAuthentication *bool `json:"verifiable_password_authentication,omitempty"`
-
- // An array of IP addresses in CIDR format specifying the addresses
- // which serve GitHub Pages websites.
- Pages []string `json:"pages,omitempty"`
-
- // An Array of IP addresses specifying the addresses that source imports
- // will originate from on GitHub.com.
- Importer []string `json:"importer,omitempty"`
-
- // An array of IP addresses in CIDR format specifying the IP addresses
- // GitHub Actions will originate from.
- Actions []string `json:"actions,omitempty"`
-
- // An array of IP addresses in CIDR format specifying the IP addresses
- // Dependabot will originate from.
- Dependabot []string `json:"dependabot,omitempty"`
-
- // A map of algorithms to SSH key fingerprints.
- SSHKeyFingerprints map[string]string `json:"ssh_key_fingerprints,omitempty"`
-
- // An array of SSH keys.
- SSHKeys []string `json:"ssh_keys,omitempty"`
-
- // An array of IP addresses in CIDR format specifying the addresses
- // which serve GitHub websites.
- Web []string `json:"web,omitempty"`
-
- // An array of IP addresses in CIDR format specifying the addresses
- // which serve GitHub APIs.
- API []string `json:"api,omitempty"`
-}
-
-// APIMeta returns information about GitHub.com, the service. Or, if you access
-// this endpoint on your organization’s GitHub Enterprise installation, this
-// endpoint provides information about that installation.
-//
-// GitHub API docs: https://docs.github.com/en/rest/meta#get-github-meta-information
-func (c *Client) APIMeta(ctx context.Context) (*APIMeta, *Response, error) {
- req, err := c.NewRequest("GET", "meta", nil)
- if err != nil {
- return nil, nil, err
- }
-
- meta := new(APIMeta)
- resp, err := c.Do(ctx, req, meta)
- if err != nil {
- return nil, resp, err
- }
-
- return meta, resp, nil
-}
-
-// Octocat returns an ASCII art octocat with the specified message in a speech
-// bubble. If message is empty, a random zen phrase is used.
-func (c *Client) Octocat(ctx context.Context, message string) (string, *Response, error) {
- u := "octocat"
- if message != "" {
- u = fmt.Sprintf("%s?s=%s", u, url.QueryEscape(message))
- }
-
- req, err := c.NewRequest("GET", u, nil)
- if err != nil {
- return "", nil, err
- }
-
- buf := new(bytes.Buffer)
- resp, err := c.Do(ctx, req, buf)
- if err != nil {
- return "", resp, err
- }
-
- return buf.String(), resp, nil
-}
-
-// Zen returns a random line from The Zen of GitHub.
-//
-// see also: http://warpspire.com/posts/taste/
-func (c *Client) Zen(ctx context.Context) (string, *Response, error) {
- req, err := c.NewRequest("GET", "zen", nil)
- if err != nil {
- return "", nil, err
- }
-
- buf := new(bytes.Buffer)
- resp, err := c.Do(ctx, req, buf)
- if err != nil {
- return "", resp, err
- }
-
- return buf.String(), resp, nil
-}
-
-// ServiceHook represents a hook that has configuration settings, a list of
-// available events, and default events.
-type ServiceHook struct {
- Name *string `json:"name,omitempty"`
- Events []string `json:"events,omitempty"`
- SupportedEvents []string `json:"supported_events,omitempty"`
- Schema [][]string `json:"schema,omitempty"`
-}
-
-func (s *ServiceHook) String() string {
- return Stringify(s)
-}
-
-// ListServiceHooks lists all of the available service hooks.
-//
-// GitHub API docs: https://developer.github.com/webhooks/#services
-func (c *Client) ListServiceHooks(ctx context.Context) ([]*ServiceHook, *Response, error) {
- u := "hooks"
- req, err := c.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var hooks []*ServiceHook
- resp, err := c.Do(ctx, req, &hooks)
- if err != nil {
- return nil, resp, err
- }
-
- return hooks, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/orgs_actions_allowed.go b/vendor/github.com/google/go-github/v55/github/orgs_actions_allowed.go
deleted file mode 100644
index e3b35b1df1..0000000000
--- a/vendor/github.com/google/go-github/v55/github/orgs_actions_allowed.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2021 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ActionsAllowed represents selected actions that are allowed.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions
-type ActionsAllowed struct {
- GithubOwnedAllowed *bool `json:"github_owned_allowed,omitempty"`
- VerifiedAllowed *bool `json:"verified_allowed,omitempty"`
- PatternsAllowed []string `json:"patterns_allowed,omitempty"`
-}
-
-func (a ActionsAllowed) String() string {
- return Stringify(a)
-}
-
-// GetActionsAllowed gets the actions that are allowed in an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization
-func (s *OrganizationsService) GetActionsAllowed(ctx context.Context, org string) (*ActionsAllowed, *Response, error) {
- u := fmt.Sprintf("orgs/%v/actions/permissions/selected-actions", org)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- actionsAllowed := new(ActionsAllowed)
- resp, err := s.client.Do(ctx, req, actionsAllowed)
- if err != nil {
- return nil, resp, err
- }
-
- return actionsAllowed, resp, nil
-}
-
-// EditActionsAllowed sets the actions that are allowed in an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-organization
-func (s *OrganizationsService) EditActionsAllowed(ctx context.Context, org string, actionsAllowed ActionsAllowed) (*ActionsAllowed, *Response, error) {
- u := fmt.Sprintf("orgs/%v/actions/permissions/selected-actions", org)
- req, err := s.client.NewRequest("PUT", u, actionsAllowed)
- if err != nil {
- return nil, nil, err
- }
-
- p := new(ActionsAllowed)
- resp, err := s.client.Do(ctx, req, p)
- if err != nil {
- return nil, resp, err
- }
-
- return p, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/orgs_actions_permissions.go b/vendor/github.com/google/go-github/v55/github/orgs_actions_permissions.go
deleted file mode 100644
index 6d1db2ee0a..0000000000
--- a/vendor/github.com/google/go-github/v55/github/orgs_actions_permissions.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2021 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ActionsPermissions represents a policy for repositories and allowed actions in an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions
-type ActionsPermissions struct {
- EnabledRepositories *string `json:"enabled_repositories,omitempty"`
- AllowedActions *string `json:"allowed_actions,omitempty"`
- SelectedActionsURL *string `json:"selected_actions_url,omitempty"`
-}
-
-func (a ActionsPermissions) String() string {
- return Stringify(a)
-}
-
-// GetActionsPermissions gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions#get-github-actions-permissions-for-an-organization
-func (s *OrganizationsService) GetActionsPermissions(ctx context.Context, org string) (*ActionsPermissions, *Response, error) {
- u := fmt.Sprintf("orgs/%v/actions/permissions", org)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- permissions := new(ActionsPermissions)
- resp, err := s.client.Do(ctx, req, permissions)
- if err != nil {
- return nil, resp, err
- }
-
- return permissions, resp, nil
-}
-
-// EditActionsPermissions sets the permissions policy for repositories and allowed actions in an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions#set-github-actions-permissions-for-an-organization
-func (s *OrganizationsService) EditActionsPermissions(ctx context.Context, org string, actionsPermissions ActionsPermissions) (*ActionsPermissions, *Response, error) {
- u := fmt.Sprintf("orgs/%v/actions/permissions", org)
- req, err := s.client.NewRequest("PUT", u, actionsPermissions)
- if err != nil {
- return nil, nil, err
- }
-
- p := new(ActionsPermissions)
- resp, err := s.client.Do(ctx, req, p)
- if err != nil {
- return nil, resp, err
- }
-
- return p, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/orgs_audit_log.go b/vendor/github.com/google/go-github/v55/github/orgs_audit_log.go
deleted file mode 100644
index 4c34445fa1..0000000000
--- a/vendor/github.com/google/go-github/v55/github/orgs_audit_log.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2021 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// GetAuditLogOptions sets up optional parameters to query audit-log endpoint.
-type GetAuditLogOptions struct {
- Phrase *string `url:"phrase,omitempty"` // A search phrase. (Optional.)
- Include *string `url:"include,omitempty"` // Event type includes. Can be one of "web", "git", "all". Default: "web". (Optional.)
- Order *string `url:"order,omitempty"` // The order of audit log events. Can be one of "asc" or "desc". Default: "desc". (Optional.)
-
- ListCursorOptions
-}
-
-// HookConfig describes metadata about a webhook configuration.
-type HookConfig struct {
- ContentType *string `json:"content_type,omitempty"`
- InsecureSSL *string `json:"insecure_ssl,omitempty"`
- URL *string `json:"url,omitempty"`
-
- // Secret is returned obfuscated by GitHub, but it can be set for outgoing requests.
- Secret *string `json:"secret,omitempty"`
-}
-
-// ActorLocation contains information about reported location for an actor.
-type ActorLocation struct {
- CountryCode *string `json:"country_code,omitempty"`
-}
-
-// PolicyOverrideReason contains user-supplied information about why a policy was overridden.
-type PolicyOverrideReason struct {
- Code *string `json:"code,omitempty"`
- Message *string `json:"message,omitempty"`
-}
-
-// AuditEntry describes the fields that may be represented by various audit-log "action" entries.
-// For a list of actions see - https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#audit-log-actions
-type AuditEntry struct {
- ActorIP *string `json:"actor_ip,omitempty"`
- Action *string `json:"action,omitempty"` // The name of the action that was performed, for example `user.login` or `repo.create`.
- Active *bool `json:"active,omitempty"`
- ActiveWas *bool `json:"active_was,omitempty"`
- Actor *string `json:"actor,omitempty"` // The actor who performed the action.
- ActorLocation *ActorLocation `json:"actor_location,omitempty"`
- BlockedUser *string `json:"blocked_user,omitempty"`
- Business *string `json:"business,omitempty"`
- CancelledAt *Timestamp `json:"cancelled_at,omitempty"`
- CompletedAt *Timestamp `json:"completed_at,omitempty"`
- Conclusion *string `json:"conclusion,omitempty"`
- Config *HookConfig `json:"config,omitempty"`
- ConfigWas *HookConfig `json:"config_was,omitempty"`
- ContentType *string `json:"content_type,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- DeployKeyFingerprint *string `json:"deploy_key_fingerprint,omitempty"`
- DocumentID *string `json:"_document_id,omitempty"`
- Emoji *string `json:"emoji,omitempty"`
- EnvironmentName *string `json:"environment_name,omitempty"`
- Event *string `json:"event,omitempty"`
- Events []string `json:"events,omitempty"`
- EventsWere []string `json:"events_were,omitempty"`
- Explanation *string `json:"explanation,omitempty"`
- Fingerprint *string `json:"fingerprint,omitempty"`
- HashedToken *string `json:"hashed_token,omitempty"`
- HeadBranch *string `json:"head_branch,omitempty"`
- HeadSHA *string `json:"head_sha,omitempty"`
- HookID *int64 `json:"hook_id,omitempty"`
- IsHostedRunner *bool `json:"is_hosted_runner,omitempty"`
- JobName *string `json:"job_name,omitempty"`
- JobWorkflowRef *string `json:"job_workflow_ref,omitempty"`
- LimitedAvailability *bool `json:"limited_availability,omitempty"`
- Message *string `json:"message,omitempty"`
- Name *string `json:"name,omitempty"`
- OAuthApplicationID *int64 `json:"oauth_application_id,omitempty"`
- OldUser *string `json:"old_user,omitempty"`
- OldPermission *string `json:"old_permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
- OpenSSHPublicKey *string `json:"openssh_public_key,omitempty"`
- OperationType *string `json:"operation_type,omitempty"`
- Org *string `json:"org,omitempty"`
- OrgID *int64 `json:"org_id,omitempty"`
- OverriddenCodes []string `json:"overridden_codes,omitempty"`
- Permission *string `json:"permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
- PreviousVisibility *string `json:"previous_visibility,omitempty"`
- ProgrammaticAccessType *string `json:"programmatic_access_type,omitempty"`
- PullRequestID *int64 `json:"pull_request_id,omitempty"`
- PullRequestTitle *string `json:"pull_request_title,omitempty"`
- PullRequestURL *string `json:"pull_request_url,omitempty"`
- ReadOnly *string `json:"read_only,omitempty"`
- Reasons []*PolicyOverrideReason `json:"reasons,omitempty"`
- Repo *string `json:"repo,omitempty"`
- Repository *string `json:"repository,omitempty"`
- RepositoryPublic *bool `json:"repository_public,omitempty"`
- RunAttempt *int64 `json:"run_attempt,omitempty"`
- RunnerGroupID *int64 `json:"runner_group_id,omitempty"`
- RunnerGroupName *string `json:"runner_group_name,omitempty"`
- RunnerID *int64 `json:"runner_id,omitempty"`
- RunnerLabels []string `json:"runner_labels,omitempty"`
- RunnerName *string `json:"runner_name,omitempty"`
- RunNumber *int64 `json:"run_number,omitempty"`
- SecretsPassed []string `json:"secrets_passed,omitempty"`
- SourceVersion *string `json:"source_version,omitempty"`
- StartedAt *Timestamp `json:"started_at,omitempty"`
- TargetLogin *string `json:"target_login,omitempty"`
- TargetVersion *string `json:"target_version,omitempty"`
- Team *string `json:"team,omitempty"`
- Timestamp *Timestamp `json:"@timestamp,omitempty"` // The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
- TokenID *int64 `json:"token_id,omitempty"`
- TokenScopes *string `json:"token_scopes,omitempty"`
- Topic *string `json:"topic,omitempty"`
- TransportProtocolName *string `json:"transport_protocol_name,omitempty"` // A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data.
- TransportProtocol *int `json:"transport_protocol,omitempty"` // The type of protocol (for example, HTTP=1 or SSH=2) used to transfer Git data.
- TriggerID *int64 `json:"trigger_id,omitempty"`
- User *string `json:"user,omitempty"` // The user that was affected by the action performed (if available).
- UserAgent *string `json:"user_agent,omitempty"`
- Visibility *string `json:"visibility,omitempty"` // The repository visibility, for example `public` or `private`.
- WorkflowID *int64 `json:"workflow_id,omitempty"`
- WorkflowRunID *int64 `json:"workflow_run_id,omitempty"`
-
- Data *AuditEntryData `json:"data,omitempty"`
-}
-
-// AuditEntryData represents additional information stuffed into a `data` field.
-type AuditEntryData struct {
- OldName *string `json:"old_name,omitempty"` // The previous name of the repository, for a name change
- OldLogin *string `json:"old_login,omitempty"` // The previous name of the organization, for a name change
-}
-
-// GetAuditLog gets the audit-log entries for an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/orgs#get-the-audit-log-for-an-organization
-func (s *OrganizationsService) GetAuditLog(ctx context.Context, org string, opts *GetAuditLogOptions) ([]*AuditEntry, *Response, error) {
- u := fmt.Sprintf("orgs/%v/audit-log", org)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var auditEntries []*AuditEntry
- resp, err := s.client.Do(ctx, req, &auditEntries)
- if err != nil {
- return nil, resp, err
- }
-
- return auditEntries, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/orgs_personal_access_tokens.go b/vendor/github.com/google/go-github/v55/github/orgs_personal_access_tokens.go
deleted file mode 100644
index c30ff2843e..0000000000
--- a/vendor/github.com/google/go-github/v55/github/orgs_personal_access_tokens.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2023 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
- "net/http"
-)
-
-// ReviewPersonalAccessTokenRequestOptions specifies the parameters to the ReviewPersonalAccessTokenRequest method.
-type ReviewPersonalAccessTokenRequestOptions struct {
- Action string `json:"action"`
- Reason *string `json:"reason,omitempty"`
-}
-
-// ReviewPersonalAccessTokenRequest approves or denies a pending request to access organization resources via a fine-grained personal access token.
-// Only GitHub Apps can call this API, using the `organization_personal_access_token_requests: write` permission.
-// `action` can be one of `approve` or `deny`.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/personal-access-tokens?apiVersion=2022-11-28#review-a-request-to-access-organization-resources-with-a-fine-grained-personal-access-token
-func (s *OrganizationsService) ReviewPersonalAccessTokenRequest(ctx context.Context, org string, requestID int64, opts ReviewPersonalAccessTokenRequestOptions) (*Response, error) {
- u := fmt.Sprintf("orgs/%v/personal-access-token-requests/%v", org, requestID)
-
- req, err := s.client.NewRequest(http.MethodPost, u, &opts)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
diff --git a/vendor/github.com/google/go-github/v55/github/orgs_projects.go b/vendor/github.com/google/go-github/v55/github/orgs_projects.go
deleted file mode 100644
index d49eae54dc..0000000000
--- a/vendor/github.com/google/go-github/v55/github/orgs_projects.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2017 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ListProjects lists the projects for an organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#list-organization-projects
-func (s *OrganizationsService) ListProjects(ctx context.Context, org string, opts *ProjectListOptions) ([]*Project, *Response, error) {
- u := fmt.Sprintf("orgs/%v/projects", org)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- var projects []*Project
- resp, err := s.client.Do(ctx, req, &projects)
- if err != nil {
- return nil, resp, err
- }
-
- return projects, resp, nil
-}
-
-// CreateProject creates a GitHub Project for the specified organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#create-an-organization-project
-func (s *OrganizationsService) CreateProject(ctx context.Context, org string, opts *ProjectOptions) (*Project, *Response, error) {
- u := fmt.Sprintf("orgs/%v/projects", org)
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- project := &Project{}
- resp, err := s.client.Do(ctx, req, project)
- if err != nil {
- return nil, resp, err
- }
-
- return project, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/orgs_rules.go b/vendor/github.com/google/go-github/v55/github/orgs_rules.go
deleted file mode 100644
index a3905af8fb..0000000000
--- a/vendor/github.com/google/go-github/v55/github/orgs_rules.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2023 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// GetAllOrganizationRulesets gets all the rulesets for the specified organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#get-all-organization-repository-rulesets
-func (s *OrganizationsService) GetAllOrganizationRulesets(ctx context.Context, org string) ([]*Ruleset, *Response, error) {
- u := fmt.Sprintf("orgs/%v/rulesets", org)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var rulesets []*Ruleset
- resp, err := s.client.Do(ctx, req, &rulesets)
- if err != nil {
- return nil, resp, err
- }
-
- return rulesets, resp, nil
-}
-
-// CreateOrganizationRuleset creates a ruleset for the specified organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#create-an-organization-repository-ruleset
-func (s *OrganizationsService) CreateOrganizationRuleset(ctx context.Context, org string, rs *Ruleset) (*Ruleset, *Response, error) {
- u := fmt.Sprintf("orgs/%v/rulesets", org)
-
- req, err := s.client.NewRequest("POST", u, rs)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset *Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// GetOrganizationRuleset gets a ruleset from the specified organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#get-an-organization-repository-ruleset
-func (s *OrganizationsService) GetOrganizationRuleset(ctx context.Context, org string, rulesetID int64) (*Ruleset, *Response, error) {
- u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset *Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// UpdateOrganizationRuleset updates a ruleset from the specified organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#update-an-organization-repository-ruleset
-func (s *OrganizationsService) UpdateOrganizationRuleset(ctx context.Context, org string, rulesetID int64, rs *Ruleset) (*Ruleset, *Response, error) {
- u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID)
-
- req, err := s.client.NewRequest("PUT", u, rs)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset *Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// DeleteOrganizationRuleset deletes a ruleset from the specified organization.
-//
-// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#delete-an-organization-repository-ruleset
-func (s *OrganizationsService) DeleteOrganizationRuleset(ctx context.Context, org string, rulesetID int64) (*Response, error) {
- u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
diff --git a/vendor/github.com/google/go-github/v55/github/packages.go b/vendor/github.com/google/go-github/v55/github/packages.go
deleted file mode 100644
index ef7df07405..0000000000
--- a/vendor/github.com/google/go-github/v55/github/packages.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2020 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-// Package represents a GitHub package.
-type Package struct {
- ID *int64 `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- PackageType *string `json:"package_type,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- Owner *User `json:"owner,omitempty"`
- PackageVersion *PackageVersion `json:"package_version,omitempty"`
- Registry *PackageRegistry `json:"registry,omitempty"`
- URL *string `json:"url,omitempty"`
- VersionCount *int64 `json:"version_count,omitempty"`
- Visibility *string `json:"visibility,omitempty"`
- Repository *Repository `json:"repository,omitempty"`
-}
-
-func (p Package) String() string {
- return Stringify(p)
-}
-
-// PackageVersion represents a GitHub package version.
-type PackageVersion struct {
- ID *int64 `json:"id,omitempty"`
- Version *string `json:"version,omitempty"`
- Summary *string `json:"summary,omitempty"`
- Body *string `json:"body,omitempty"`
- BodyHTML *string `json:"body_html,omitempty"`
- Release *PackageRelease `json:"release,omitempty"`
- Manifest *string `json:"manifest,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- TagName *string `json:"tag_name,omitempty"`
- TargetCommitish *string `json:"target_commitish,omitempty"`
- TargetOID *string `json:"target_oid,omitempty"`
- Draft *bool `json:"draft,omitempty"`
- Prerelease *bool `json:"prerelease,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- PackageFiles []*PackageFile `json:"package_files,omitempty"`
- Author *User `json:"author,omitempty"`
- InstallationCommand *string `json:"installation_command,omitempty"`
- Metadata *PackageMetadata `json:"metadata,omitempty"`
- PackageHTMLURL *string `json:"package_html_url,omitempty"`
- Name *string `json:"name,omitempty"`
- URL *string `json:"url,omitempty"`
-}
-
-func (pv PackageVersion) String() string {
- return Stringify(pv)
-}
-
-// PackageRelease represents a GitHub package version release.
-type PackageRelease struct {
- URL *string `json:"url,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- ID *int64 `json:"id,omitempty"`
- TagName *string `json:"tag_name,omitempty"`
- TargetCommitish *string `json:"target_commitish,omitempty"`
- Name *string `json:"name,omitempty"`
- Draft *bool `json:"draft,omitempty"`
- Author *User `json:"author,omitempty"`
- Prerelease *bool `json:"prerelease,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- PublishedAt *Timestamp `json:"published_at,omitempty"`
-}
-
-func (r PackageRelease) String() string {
- return Stringify(r)
-}
-
-// PackageFile represents a GitHub package version release file.
-type PackageFile struct {
- DownloadURL *string `json:"download_url,omitempty"`
- ID *int64 `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- SHA256 *string `json:"sha256,omitempty"`
- SHA1 *string `json:"sha1,omitempty"`
- MD5 *string `json:"md5,omitempty"`
- ContentType *string `json:"content_type,omitempty"`
- State *string `json:"state,omitempty"`
- Author *User `json:"author,omitempty"`
- Size *int64 `json:"size,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
-}
-
-func (pf PackageFile) String() string {
- return Stringify(pf)
-}
-
-// PackageRegistry represents a GitHub package registry.
-type PackageRegistry struct {
- AboutURL *string `json:"about_url,omitempty"`
- Name *string `json:"name,omitempty"`
- Type *string `json:"type,omitempty"`
- URL *string `json:"url,omitempty"`
- Vendor *string `json:"vendor,omitempty"`
-}
-
-func (r PackageRegistry) String() string {
- return Stringify(r)
-}
-
-// PackageListOptions represents the optional list options for a package.
-type PackageListOptions struct {
- // Visibility of packages "public", "internal" or "private".
- Visibility *string `url:"visibility,omitempty"`
-
- // PackageType represents the type of package.
- // It can be one of "npm", "maven", "rubygems", "nuget", "docker", or "container".
- PackageType *string `url:"package_type,omitempty"`
-
- // State of package either "active" or "deleted".
- State *string `url:"state,omitempty"`
-
- ListOptions
-}
-
-// PackageMetadata represents metadata from a package.
-type PackageMetadata struct {
- PackageType *string `json:"package_type,omitempty"`
- Container *PackageContainerMetadata `json:"container,omitempty"`
-}
-
-func (r PackageMetadata) String() string {
- return Stringify(r)
-}
-
-// PackageContainerMetadata represents container metadata for docker container packages.
-type PackageContainerMetadata struct {
- Tags []string `json:"tags,omitempty"`
-}
-
-func (r PackageContainerMetadata) String() string {
- return Stringify(r)
-}
diff --git a/vendor/github.com/google/go-github/v55/github/projects.go b/vendor/github.com/google/go-github/v55/github/projects.go
deleted file mode 100644
index df7ad6cd97..0000000000
--- a/vendor/github.com/google/go-github/v55/github/projects.go
+++ /dev/null
@@ -1,596 +0,0 @@
-// Copyright 2016 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ProjectsService provides access to the projects functions in the
-// GitHub API.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects
-type ProjectsService service
-
-// Project represents a GitHub Project.
-type Project struct {
- ID *int64 `json:"id,omitempty"`
- URL *string `json:"url,omitempty"`
- HTMLURL *string `json:"html_url,omitempty"`
- ColumnsURL *string `json:"columns_url,omitempty"`
- OwnerURL *string `json:"owner_url,omitempty"`
- Name *string `json:"name,omitempty"`
- Body *string `json:"body,omitempty"`
- Number *int `json:"number,omitempty"`
- State *string `json:"state,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- OrganizationPermission *string `json:"organization_permission,omitempty"`
- Private *bool `json:"private,omitempty"`
-
- // The User object that generated the project.
- Creator *User `json:"creator,omitempty"`
-}
-
-func (p Project) String() string {
- return Stringify(p)
-}
-
-// GetProject gets a GitHub Project for a repo.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#get-a-project
-func (s *ProjectsService) GetProject(ctx context.Context, id int64) (*Project, *Response, error) {
- u := fmt.Sprintf("projects/%v", id)
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- project := &Project{}
- resp, err := s.client.Do(ctx, req, project)
- if err != nil {
- return nil, resp, err
- }
-
- return project, resp, nil
-}
-
-// ProjectOptions specifies the parameters to the
-// RepositoriesService.CreateProject and
-// ProjectsService.UpdateProject methods.
-type ProjectOptions struct {
- // The name of the project. (Required for creation; optional for update.)
- Name *string `json:"name,omitempty"`
- // The body of the project. (Optional.)
- Body *string `json:"body,omitempty"`
-
- // The following field(s) are only applicable for update.
- // They should be left with zero values for creation.
-
- // State of the project. Either "open" or "closed". (Optional.)
- State *string `json:"state,omitempty"`
- // The permission level that all members of the project's organization
- // will have on this project.
- // Setting the organization permission is only available
- // for organization projects. (Optional.)
- OrganizationPermission *string `json:"organization_permission,omitempty"`
- // Sets visibility of the project within the organization.
- // Setting visibility is only available
- // for organization projects.(Optional.)
- Private *bool `json:"private,omitempty"`
-}
-
-// UpdateProject updates a repository project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#update-a-project
-func (s *ProjectsService) UpdateProject(ctx context.Context, id int64, opts *ProjectOptions) (*Project, *Response, error) {
- u := fmt.Sprintf("projects/%v", id)
- req, err := s.client.NewRequest("PATCH", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- project := &Project{}
- resp, err := s.client.Do(ctx, req, project)
- if err != nil {
- return nil, resp, err
- }
-
- return project, resp, nil
-}
-
-// DeleteProject deletes a GitHub Project from a repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#delete-a-project
-func (s *ProjectsService) DeleteProject(ctx context.Context, id int64) (*Response, error) {
- u := fmt.Sprintf("projects/%v", id)
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// ProjectColumn represents a column of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/projects/
-type ProjectColumn struct {
- ID *int64 `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- URL *string `json:"url,omitempty"`
- ProjectURL *string `json:"project_url,omitempty"`
- CardsURL *string `json:"cards_url,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
-}
-
-// ListProjectColumns lists the columns of a GitHub Project for a repo.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/columns#list-project-columns
-func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int64, opts *ListOptions) ([]*ProjectColumn, *Response, error) {
- u := fmt.Sprintf("projects/%v/columns", projectID)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- columns := []*ProjectColumn{}
- resp, err := s.client.Do(ctx, req, &columns)
- if err != nil {
- return nil, resp, err
- }
-
- return columns, resp, nil
-}
-
-// GetProjectColumn gets a column of a GitHub Project for a repo.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/columns#get-a-project-column
-func (s *ProjectsService) GetProjectColumn(ctx context.Context, id int64) (*ProjectColumn, *Response, error) {
- u := fmt.Sprintf("projects/columns/%v", id)
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- column := &ProjectColumn{}
- resp, err := s.client.Do(ctx, req, column)
- if err != nil {
- return nil, resp, err
- }
-
- return column, resp, nil
-}
-
-// ProjectColumnOptions specifies the parameters to the
-// ProjectsService.CreateProjectColumn and
-// ProjectsService.UpdateProjectColumn methods.
-type ProjectColumnOptions struct {
- // The name of the project column. (Required for creation and update.)
- Name string `json:"name"`
-}
-
-// CreateProjectColumn creates a column for the specified (by number) project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/columns#create-a-project-column
-func (s *ProjectsService) CreateProjectColumn(ctx context.Context, projectID int64, opts *ProjectColumnOptions) (*ProjectColumn, *Response, error) {
- u := fmt.Sprintf("projects/%v/columns", projectID)
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- column := &ProjectColumn{}
- resp, err := s.client.Do(ctx, req, column)
- if err != nil {
- return nil, resp, err
- }
-
- return column, resp, nil
-}
-
-// UpdateProjectColumn updates a column of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/columns#update-an-existing-project-column
-func (s *ProjectsService) UpdateProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnOptions) (*ProjectColumn, *Response, error) {
- u := fmt.Sprintf("projects/columns/%v", columnID)
- req, err := s.client.NewRequest("PATCH", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- column := &ProjectColumn{}
- resp, err := s.client.Do(ctx, req, column)
- if err != nil {
- return nil, resp, err
- }
-
- return column, resp, nil
-}
-
-// DeleteProjectColumn deletes a column from a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/columns#delete-a-project-column
-func (s *ProjectsService) DeleteProjectColumn(ctx context.Context, columnID int64) (*Response, error) {
- u := fmt.Sprintf("projects/columns/%v", columnID)
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// ProjectColumnMoveOptions specifies the parameters to the
-// ProjectsService.MoveProjectColumn method.
-type ProjectColumnMoveOptions struct {
- // Position can be one of "first", "last", or "after:", where
- // is the ID of a column in the same project. (Required.)
- Position string `json:"position"`
-}
-
-// MoveProjectColumn moves a column within a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/columns#move-a-project-column
-func (s *ProjectsService) MoveProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnMoveOptions) (*Response, error) {
- u := fmt.Sprintf("projects/columns/%v/moves", columnID)
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// ProjectCard represents a card in a column of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards/#get-a-project-card
-type ProjectCard struct {
- URL *string `json:"url,omitempty"`
- ColumnURL *string `json:"column_url,omitempty"`
- ContentURL *string `json:"content_url,omitempty"`
- ID *int64 `json:"id,omitempty"`
- Note *string `json:"note,omitempty"`
- Creator *User `json:"creator,omitempty"`
- CreatedAt *Timestamp `json:"created_at,omitempty"`
- UpdatedAt *Timestamp `json:"updated_at,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- Archived *bool `json:"archived,omitempty"`
-
- // The following fields are only populated by Webhook events.
- ColumnID *int64 `json:"column_id,omitempty"`
-
- // The following fields are only populated by Events API.
- ProjectID *int64 `json:"project_id,omitempty"`
- ProjectURL *string `json:"project_url,omitempty"`
- ColumnName *string `json:"column_name,omitempty"`
- PreviousColumnName *string `json:"previous_column_name,omitempty"` // Populated in "moved_columns_in_project" event deliveries.
-}
-
-// ProjectCardListOptions specifies the optional parameters to the
-// ProjectsService.ListProjectCards method.
-type ProjectCardListOptions struct {
- // ArchivedState is used to list all, archived, or not_archived project cards.
- // Defaults to not_archived when you omit this parameter.
- ArchivedState *string `url:"archived_state,omitempty"`
-
- ListOptions
-}
-
-// ListProjectCards lists the cards in a column of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards#list-project-cards
-func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int64, opts *ProjectCardListOptions) ([]*ProjectCard, *Response, error) {
- u := fmt.Sprintf("projects/columns/%v/cards", columnID)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- cards := []*ProjectCard{}
- resp, err := s.client.Do(ctx, req, &cards)
- if err != nil {
- return nil, resp, err
- }
-
- return cards, resp, nil
-}
-
-// GetProjectCard gets a card in a column of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards#get-a-project-card
-func (s *ProjectsService) GetProjectCard(ctx context.Context, cardID int64) (*ProjectCard, *Response, error) {
- u := fmt.Sprintf("projects/columns/cards/%v", cardID)
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- card := &ProjectCard{}
- resp, err := s.client.Do(ctx, req, card)
- if err != nil {
- return nil, resp, err
- }
-
- return card, resp, nil
-}
-
-// ProjectCardOptions specifies the parameters to the
-// ProjectsService.CreateProjectCard and
-// ProjectsService.UpdateProjectCard methods.
-type ProjectCardOptions struct {
- // The note of the card. Note and ContentID are mutually exclusive.
- Note string `json:"note,omitempty"`
- // The ID (not Number) of the Issue to associate with this card.
- // Note and ContentID are mutually exclusive.
- ContentID int64 `json:"content_id,omitempty"`
- // The type of content to associate with this card. Possible values are: "Issue" and "PullRequest".
- ContentType string `json:"content_type,omitempty"`
- // Use true to archive a project card.
- // Specify false if you need to restore a previously archived project card.
- Archived *bool `json:"archived,omitempty"`
-}
-
-// CreateProjectCard creates a card in the specified column of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards#create-a-project-card
-func (s *ProjectsService) CreateProjectCard(ctx context.Context, columnID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error) {
- u := fmt.Sprintf("projects/columns/%v/cards", columnID)
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- card := &ProjectCard{}
- resp, err := s.client.Do(ctx, req, card)
- if err != nil {
- return nil, resp, err
- }
-
- return card, resp, nil
-}
-
-// UpdateProjectCard updates a card of a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards#update-an-existing-project-card
-func (s *ProjectsService) UpdateProjectCard(ctx context.Context, cardID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error) {
- u := fmt.Sprintf("projects/columns/cards/%v", cardID)
- req, err := s.client.NewRequest("PATCH", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- card := &ProjectCard{}
- resp, err := s.client.Do(ctx, req, card)
- if err != nil {
- return nil, resp, err
- }
-
- return card, resp, nil
-}
-
-// DeleteProjectCard deletes a card from a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards#delete-a-project-card
-func (s *ProjectsService) DeleteProjectCard(ctx context.Context, cardID int64) (*Response, error) {
- u := fmt.Sprintf("projects/columns/cards/%v", cardID)
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// ProjectCardMoveOptions specifies the parameters to the
-// ProjectsService.MoveProjectCard method.
-type ProjectCardMoveOptions struct {
- // Position can be one of "top", "bottom", or "after:", where
- // is the ID of a card in the same project.
- Position string `json:"position"`
- // ColumnID is the ID of a column in the same project. Note that ColumnID
- // is required when using Position "after:" when that card is in
- // another column; otherwise it is optional.
- ColumnID int64 `json:"column_id,omitempty"`
-}
-
-// MoveProjectCard moves a card within a GitHub Project.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/cards#move-a-project-card
-func (s *ProjectsService) MoveProjectCard(ctx context.Context, cardID int64, opts *ProjectCardMoveOptions) (*Response, error) {
- u := fmt.Sprintf("projects/columns/cards/%v/moves", cardID)
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// ProjectCollaboratorOptions specifies the optional parameters to the
-// ProjectsService.AddProjectCollaborator method.
-type ProjectCollaboratorOptions struct {
- // Permission specifies the permission to grant to the collaborator.
- // Possible values are:
- // "read" - can read, but not write to or administer this project.
- // "write" - can read and write, but not administer this project.
- // "admin" - can read, write and administer this project.
- //
- // Default value is "write"
- Permission *string `json:"permission,omitempty"`
-}
-
-// AddProjectCollaborator adds a collaborator to an organization project and sets
-// their permission level. You must be an organization owner or a project admin to add a collaborator.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/collaborators#add-project-collaborator
-func (s *ProjectsService) AddProjectCollaborator(ctx context.Context, id int64, username string, opts *ProjectCollaboratorOptions) (*Response, error) {
- u := fmt.Sprintf("projects/%v/collaborators/%v", id, username)
- req, err := s.client.NewRequest("PUT", u, opts)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// RemoveProjectCollaborator removes a collaborator from an organization project.
-// You must be an organization owner or a project admin to remove a collaborator.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/collaborators#remove-user-as-a-collaborator
-func (s *ProjectsService) RemoveProjectCollaborator(ctx context.Context, id int64, username string) (*Response, error) {
- u := fmt.Sprintf("projects/%v/collaborators/%v", id, username)
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- return s.client.Do(ctx, req, nil)
-}
-
-// ListCollaboratorOptions specifies the optional parameters to the
-// ProjectsService.ListProjectCollaborators method.
-type ListCollaboratorOptions struct {
- // Affiliation specifies how collaborators should be filtered by their affiliation.
- // Possible values are:
- // "outside" - All outside collaborators of an organization-owned repository
- // "direct" - All collaborators with permissions to an organization-owned repository,
- // regardless of organization membership status
- // "all" - All collaborators the authenticated user can see
- //
- // Default value is "all".
- Affiliation *string `url:"affiliation,omitempty"`
-
- ListOptions
-}
-
-// ListProjectCollaborators lists the collaborators for an organization project. For a project,
-// the list of collaborators includes outside collaborators, organization members that are direct
-// collaborators, organization members with access through team memberships, organization members
-// with access through default organization permissions, and organization owners. You must be an
-// organization owner or a project admin to list collaborators.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/collaborators#list-project-collaborators
-func (s *ProjectsService) ListProjectCollaborators(ctx context.Context, id int64, opts *ListCollaboratorOptions) ([]*User, *Response, error) {
- u := fmt.Sprintf("projects/%v/collaborators", id)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- var users []*User
- resp, err := s.client.Do(ctx, req, &users)
- if err != nil {
- return nil, resp, err
- }
-
- return users, resp, nil
-}
-
-// ProjectPermissionLevel represents the permission level an organization
-// member has for a given project.
-type ProjectPermissionLevel struct {
- // Possible values: "admin", "write", "read", "none"
- Permission *string `json:"permission,omitempty"`
-
- User *User `json:"user,omitempty"`
-}
-
-// ReviewProjectCollaboratorPermission returns the collaborator's permission level for an organization
-// project. Possible values for the permission key: "admin", "write", "read", "none".
-// You must be an organization owner or a project admin to review a user's permission level.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/collaborators#get-project-permission-for-a-user
-func (s *ProjectsService) ReviewProjectCollaboratorPermission(ctx context.Context, id int64, username string) (*ProjectPermissionLevel, *Response, error) {
- u := fmt.Sprintf("projects/%v/collaborators/%v/permission", id, username)
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- ppl := new(ProjectPermissionLevel)
- resp, err := s.client.Do(ctx, req, ppl)
- if err != nil {
- return nil, resp, err
- }
- return ppl, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/repos_actions_permissions.go b/vendor/github.com/google/go-github/v55/github/repos_actions_permissions.go
deleted file mode 100644
index 45f844cec0..0000000000
--- a/vendor/github.com/google/go-github/v55/github/repos_actions_permissions.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2022 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ActionsPermissionsRepository represents a policy for repositories and allowed actions in a repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions
-type ActionsPermissionsRepository struct {
- Enabled *bool `json:"enabled,omitempty"`
- AllowedActions *string `json:"allowed_actions,omitempty"`
- SelectedActionsURL *string `json:"selected_actions_url,omitempty"`
-}
-
-func (a ActionsPermissionsRepository) String() string {
- return Stringify(a)
-}
-
-// GetActionsPermissions gets the GitHub Actions permissions policy for repositories and allowed actions in a repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions#get-github-actions-permissions-for-a-repository
-func (s *RepositoriesService) GetActionsPermissions(ctx context.Context, owner, repo string) (*ActionsPermissionsRepository, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/permissions", owner, repo)
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- permissions := new(ActionsPermissionsRepository)
- resp, err := s.client.Do(ctx, req, permissions)
- if err != nil {
- return nil, resp, err
- }
-
- return permissions, resp, nil
-}
-
-// EditActionsPermissions sets the permissions policy for repositories and allowed actions in a repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/actions/permissions#set-github-actions-permissions-for-a-repository
-func (s *RepositoriesService) EditActionsPermissions(ctx context.Context, owner, repo string, actionsPermissionsRepository ActionsPermissionsRepository) (*ActionsPermissionsRepository, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/actions/permissions", owner, repo)
- req, err := s.client.NewRequest("PUT", u, actionsPermissionsRepository)
- if err != nil {
- return nil, nil, err
- }
-
- permissions := new(ActionsPermissionsRepository)
- resp, err := s.client.Do(ctx, req, permissions)
- if err != nil {
- return nil, resp, err
- }
-
- return permissions, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/repos_projects.go b/vendor/github.com/google/go-github/v55/github/repos_projects.go
deleted file mode 100644
index a3001dee98..0000000000
--- a/vendor/github.com/google/go-github/v55/github/repos_projects.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2017 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ProjectListOptions specifies the optional parameters to the
-// OrganizationsService.ListProjects and RepositoriesService.ListProjects methods.
-type ProjectListOptions struct {
- // Indicates the state of the projects to return. Can be either open, closed, or all. Default: open
- State string `url:"state,omitempty"`
-
- ListOptions
-}
-
-// ListProjects lists the projects for a repo.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#list-repository-projects
-func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo string, opts *ProjectListOptions) ([]*Project, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/projects", owner, repo)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- var projects []*Project
- resp, err := s.client.Do(ctx, req, &projects)
- if err != nil {
- return nil, resp, err
- }
-
- return projects, resp, nil
-}
-
-// CreateProject creates a GitHub Project for the specified repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#create-a-repository-project
-func (s *RepositoriesService) CreateProject(ctx context.Context, owner, repo string, opts *ProjectOptions) (*Project, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/projects", owner, repo)
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept headers when APIs fully launch.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- project := &Project{}
- resp, err := s.client.Do(ctx, req, project)
- if err != nil {
- return nil, resp, err
- }
-
- return project, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/repos_rules.go b/vendor/github.com/google/go-github/v55/github/repos_rules.go
deleted file mode 100644
index 7f964fe665..0000000000
--- a/vendor/github.com/google/go-github/v55/github/repos_rules.go
+++ /dev/null
@@ -1,464 +0,0 @@
-// Copyright 2023 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "encoding/json"
- "fmt"
-)
-
-// BypassActor represents the bypass actors from a ruleset.
-type BypassActor struct {
- ActorID *int64 `json:"actor_id,omitempty"`
- // Possible values for ActorType are: RepositoryRole, Team, Integration, OrganizationAdmin
- ActorType *string `json:"actor_type,omitempty"`
- // Possible values for BypassMode are: always, pull_request
- BypassMode *string `json:"bypass_mode,omitempty"`
-}
-
-// RulesetLink represents a single link object from GitHub ruleset request _links.
-type RulesetLink struct {
- HRef *string `json:"href,omitempty"`
-}
-
-// RulesetLinks represents the "_links" object in a Ruleset.
-type RulesetLinks struct {
- Self *RulesetLink `json:"self,omitempty"`
-}
-
-// RulesetRefConditionParameters represents the conditions object for ref_names.
-type RulesetRefConditionParameters struct {
- Include []string `json:"include"`
- Exclude []string `json:"exclude"`
-}
-
-// RulesetRepositoryNamesConditionParameters represents the conditions object for repository_names.
-type RulesetRepositoryNamesConditionParameters struct {
- Include []string `json:"include"`
- Exclude []string `json:"exclude"`
- Protected *bool `json:"protected,omitempty"`
-}
-
-// RulesetRepositoryIDsConditionParameters represents the conditions object for repository_ids.
-type RulesetRepositoryIDsConditionParameters struct {
- RepositoryIDs []int64 `json:"repository_ids,omitempty"`
-}
-
-// RulesetCondition represents the conditions object in a ruleset.
-// Set either RepositoryName or RepositoryID, not both.
-type RulesetConditions struct {
- RefName *RulesetRefConditionParameters `json:"ref_name,omitempty"`
- RepositoryName *RulesetRepositoryNamesConditionParameters `json:"repository_name,omitempty"`
- RepositoryID *RulesetRepositoryIDsConditionParameters `json:"repository_id,omitempty"`
-}
-
-// RulePatternParameters represents the rule pattern parameters.
-type RulePatternParameters struct {
- Name *string `json:"name,omitempty"`
- // If Negate is true, the rule will fail if the pattern matches.
- Negate *bool `json:"negate,omitempty"`
- // Possible values for Operator are: starts_with, ends_with, contains, regex
- Operator string `json:"operator"`
- Pattern string `json:"pattern"`
-}
-
-// UpdateAllowsFetchAndMergeRuleParameters represents the update rule parameters.
-type UpdateAllowsFetchAndMergeRuleParameters struct {
- UpdateAllowsFetchAndMerge bool `json:"update_allows_fetch_and_merge"`
-}
-
-// RequiredDeploymentEnvironmentsRuleParameters represents the required_deployments rule parameters.
-type RequiredDeploymentEnvironmentsRuleParameters struct {
- RequiredDeploymentEnvironments []string `json:"required_deployment_environments"`
-}
-
-// PullRequestRuleParameters represents the pull_request rule parameters.
-type PullRequestRuleParameters struct {
- DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"`
- RequireCodeOwnerReview bool `json:"require_code_owner_review"`
- RequireLastPushApproval bool `json:"require_last_push_approval"`
- RequiredApprovingReviewCount int `json:"required_approving_review_count"`
- RequiredReviewThreadResolution bool `json:"required_review_thread_resolution"`
-}
-
-// RuleRequiredStatusChecks represents the RequiredStatusChecks for the RequiredStatusChecksRuleParameters object.
-type RuleRequiredStatusChecks struct {
- Context string `json:"context"`
- IntegrationID *int64 `json:"integration_id,omitempty"`
-}
-
-// RequiredStatusChecksRuleParameters represents the required_status_checks rule parameters.
-type RequiredStatusChecksRuleParameters struct {
- RequiredStatusChecks []RuleRequiredStatusChecks `json:"required_status_checks"`
- StrictRequiredStatusChecksPolicy bool `json:"strict_required_status_checks_policy"`
-}
-
-// RepositoryRule represents a GitHub Rule.
-type RepositoryRule struct {
- Type string `json:"type"`
- Parameters *json.RawMessage `json:"parameters,omitempty"`
-}
-
-// UnmarshalJSON implements the json.Unmarshaler interface.
-// This helps us handle the fact that RepositoryRule parameter field can be of numerous types.
-func (r *RepositoryRule) UnmarshalJSON(data []byte) error {
- type rule RepositoryRule
- var RepositoryRule rule
- if err := json.Unmarshal(data, &RepositoryRule); err != nil {
- return err
- }
-
- r.Type = RepositoryRule.Type
-
- switch RepositoryRule.Type {
- case "creation", "deletion", "required_linear_history", "required_signatures", "non_fast_forward":
- r.Parameters = nil
- case "update":
- if RepositoryRule.Parameters == nil {
- r.Parameters = nil
- return nil
- }
- params := UpdateAllowsFetchAndMergeRuleParameters{}
- if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil {
- return err
- }
-
- bytes, _ := json.Marshal(params)
- rawParams := json.RawMessage(bytes)
-
- r.Parameters = &rawParams
-
- case "required_deployments":
- params := RequiredDeploymentEnvironmentsRuleParameters{}
- if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil {
- return err
- }
-
- bytes, _ := json.Marshal(params)
- rawParams := json.RawMessage(bytes)
-
- r.Parameters = &rawParams
- case "commit_message_pattern", "commit_author_email_pattern", "committer_email_pattern", "branch_name_pattern", "tag_name_pattern":
- params := RulePatternParameters{}
- if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil {
- return err
- }
-
- bytes, _ := json.Marshal(params)
- rawParams := json.RawMessage(bytes)
-
- r.Parameters = &rawParams
- case "pull_request":
- params := PullRequestRuleParameters{}
- if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil {
- return err
- }
-
- bytes, _ := json.Marshal(params)
- rawParams := json.RawMessage(bytes)
-
- r.Parameters = &rawParams
- case "required_status_checks":
- params := RequiredStatusChecksRuleParameters{}
- if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil {
- return err
- }
-
- bytes, _ := json.Marshal(params)
- rawParams := json.RawMessage(bytes)
-
- r.Parameters = &rawParams
- default:
- r.Type = ""
- r.Parameters = nil
- return fmt.Errorf("RepositoryRule.Type %T is not yet implemented, unable to unmarshal", RepositoryRule.Type)
- }
-
- return nil
-}
-
-// NewCreationRule creates a rule to only allow users with bypass permission to create matching refs.
-func NewCreationRule() (rule *RepositoryRule) {
- return &RepositoryRule{
- Type: "creation",
- }
-}
-
-// NewUpdateRule creates a rule to only allow users with bypass permission to update matching refs.
-func NewUpdateRule(params *UpdateAllowsFetchAndMergeRuleParameters) (rule *RepositoryRule) {
- if params != nil {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "update",
- Parameters: &rawParams,
- }
- }
- return &RepositoryRule{
- Type: "update",
- }
-}
-
-// NewDeletionRule creates a rule to only allow users with bypass permissions to delete matching refs.
-func NewDeletionRule() (rule *RepositoryRule) {
- return &RepositoryRule{
- Type: "deletion",
- }
-}
-
-// NewRequiredLinearHistoryRule creates a rule to prevent merge commits from being pushed to matching branches.
-func NewRequiredLinearHistoryRule() (rule *RepositoryRule) {
- return &RepositoryRule{
- Type: "required_linear_history",
- }
-}
-
-// NewRequiredDeploymentsRule creates a rule to require environments to be successfully deployed before they can be merged into the matching branches.
-func NewRequiredDeploymentsRule(params *RequiredDeploymentEnvironmentsRuleParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "required_deployments",
- Parameters: &rawParams,
- }
-}
-
-// NewRequiredSignaturesRule creates a rule a to require commits pushed to matching branches to have verified signatures.
-func NewRequiredSignaturesRule() (rule *RepositoryRule) {
- return &RepositoryRule{
- Type: "required_signatures",
- }
-}
-
-// NewPullRequestRule creates a rule to require all commits be made to a non-target branch and submitted via a pull request before they can be merged.
-func NewPullRequestRule(params *PullRequestRuleParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "pull_request",
- Parameters: &rawParams,
- }
-}
-
-// NewRequiredStatusChecksRule creates a rule to require which status checks must pass before branches can be merged into a branch rule.
-func NewRequiredStatusChecksRule(params *RequiredStatusChecksRuleParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "required_status_checks",
- Parameters: &rawParams,
- }
-}
-
-// NewNonFastForwardRule creates a rule as part to prevent users with push access from force pushing to matching branches.
-func NewNonFastForwardRule() (rule *RepositoryRule) {
- return &RepositoryRule{
- Type: "non_fast_forward",
- }
-}
-
-// NewCommitMessagePatternRule creates a rule to restrict commit message patterns being pushed to matching branches.
-func NewCommitMessagePatternRule(params *RulePatternParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "commit_message_pattern",
- Parameters: &rawParams,
- }
-}
-
-// NewCommitAuthorEmailPatternRule creates a rule to restrict commits with author email patterns being merged into matching branches.
-func NewCommitAuthorEmailPatternRule(params *RulePatternParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "commit_author_email_pattern",
- Parameters: &rawParams,
- }
-}
-
-// NewCommitterEmailPatternRule creates a rule to restrict commits with committer email patterns being merged into matching branches.
-func NewCommitterEmailPatternRule(params *RulePatternParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "committer_email_pattern",
- Parameters: &rawParams,
- }
-}
-
-// NewBranchNamePatternRule creates a rule to restrict branch patterns from being merged into matching branches.
-func NewBranchNamePatternRule(params *RulePatternParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "branch_name_pattern",
- Parameters: &rawParams,
- }
-}
-
-// NewTagNamePatternRule creates a rule to restrict tag patterns contained in non-target branches from being merged into matching branches.
-func NewTagNamePatternRule(params *RulePatternParameters) (rule *RepositoryRule) {
- bytes, _ := json.Marshal(params)
-
- rawParams := json.RawMessage(bytes)
-
- return &RepositoryRule{
- Type: "tag_name_pattern",
- Parameters: &rawParams,
- }
-}
-
-// Ruleset represents a GitHub ruleset object.
-type Ruleset struct {
- ID *int64 `json:"id,omitempty"`
- Name string `json:"name"`
- // Possible values for Target are branch, tag
- Target *string `json:"target,omitempty"`
- // Possible values for SourceType are: Repository, Organization
- SourceType *string `json:"source_type,omitempty"`
- Source string `json:"source"`
- // Possible values for Enforcement are: disabled, active, evaluate
- Enforcement string `json:"enforcement"`
- BypassActors []*BypassActor `json:"bypass_actors,omitempty"`
- NodeID *string `json:"node_id,omitempty"`
- Links *RulesetLinks `json:"_links,omitempty"`
- Conditions *RulesetConditions `json:"conditions,omitempty"`
- Rules []*RepositoryRule `json:"rules,omitempty"`
-}
-
-// GetRulesForBranch gets all the rules that apply to the specified branch.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/rules#get-rules-for-a-branch
-func (s *RepositoriesService) GetRulesForBranch(ctx context.Context, owner, repo, branch string) ([]*RepositoryRule, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/rules/branches/%v", owner, repo, branch)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var rules []*RepositoryRule
- resp, err := s.client.Do(ctx, req, &rules)
- if err != nil {
- return nil, resp, err
- }
-
- return rules, resp, nil
-}
-
-// GetAllRulesets gets all the rules that apply to the specified repository.
-// If includesParents is true, rulesets configured at the organization level that apply to the repository will be returned.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/rules#get-all-repository-rulesets
-func (s *RepositoriesService) GetAllRulesets(ctx context.Context, owner, repo string, includesParents bool) ([]*Ruleset, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/rulesets?includes_parents=%v", owner, repo, includesParents)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset []*Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// CreateRuleset creates a ruleset for the specified repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/rules#create-a-repository-ruleset
-func (s *RepositoriesService) CreateRuleset(ctx context.Context, owner, repo string, rs *Ruleset) (*Ruleset, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/rulesets", owner, repo)
-
- req, err := s.client.NewRequest("POST", u, rs)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset *Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// GetRuleset gets a ruleset for the specified repository.
-// If includesParents is true, rulesets configured at the organization level that apply to the repository will be returned.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/rules#get-a-repository-ruleset
-func (s *RepositoriesService) GetRuleset(ctx context.Context, owner, repo string, rulesetID int64, includesParents bool) (*Ruleset, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/rulesets/%v?includes_parents=%v", owner, repo, rulesetID, includesParents)
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset *Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// UpdateRuleset updates a ruleset for the specified repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/rules#update-a-repository-ruleset
-func (s *RepositoriesService) UpdateRuleset(ctx context.Context, owner, repo string, rulesetID int64, rs *Ruleset) (*Ruleset, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/rulesets/%v", owner, repo, rulesetID)
-
- req, err := s.client.NewRequest("PUT", u, rs)
- if err != nil {
- return nil, nil, err
- }
-
- var ruleset *Ruleset
- resp, err := s.client.Do(ctx, req, &ruleset)
- if err != nil {
- return nil, resp, err
- }
-
- return ruleset, resp, nil
-}
-
-// DeleteRuleset deletes a ruleset for the specified repository.
-//
-// GitHub API docs: https://docs.github.com/en/rest/repos/rules#delete-a-repository-ruleset
-func (s *RepositoriesService) DeleteRuleset(ctx context.Context, owner, repo string, rulesetID int64) (*Response, error) {
- u := fmt.Sprintf("repos/%v/%v/rulesets/%v", owner, repo, rulesetID)
-
- req, err := s.client.NewRequest("DELETE", u, nil)
- if err != nil {
- return nil, err
- }
-
- return s.client.Do(ctx, req, nil)
-}
diff --git a/vendor/github.com/google/go-github/v55/github/security_advisories.go b/vendor/github.com/google/go-github/v55/github/security_advisories.go
deleted file mode 100644
index a75fce54d9..0000000000
--- a/vendor/github.com/google/go-github/v55/github/security_advisories.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2023 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-type SecurityAdvisoriesService service
-
-// RequestCVE requests a Common Vulnerabilities and Exposures (CVE) for a repository security advisory.
-// The ghsaID is the GitHub Security Advisory identifier of the advisory.
-//
-// GitHub API docs: https://docs.github.com/en/rest/security-advisories/repository-advisories#request-a-cve-for-a-repository-security-advisory
-func (s *SecurityAdvisoriesService) RequestCVE(ctx context.Context, owner, repo, ghsaID string) (*Response, error) {
- url := fmt.Sprintf("repos/%v/%v/security-advisories/%v/cve", owner, repo, ghsaID)
-
- req, err := s.client.NewRequest("POST", url, nil)
- if err != nil {
- return nil, err
- }
-
- resp, err := s.client.Do(ctx, req, nil)
- if err != nil {
- if _, ok := err.(*AcceptedError); ok {
- return resp, nil
- }
-
- return resp, err
- }
-
- return resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/github/users_projects.go b/vendor/github.com/google/go-github/v55/github/users_projects.go
deleted file mode 100644
index 0cbd61f923..0000000000
--- a/vendor/github.com/google/go-github/v55/github/users_projects.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2019 The go-github AUTHORS. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package github
-
-import (
- "context"
- "fmt"
-)
-
-// ListProjects lists the projects for the specified user.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#list-user-projects
-func (s *UsersService) ListProjects(ctx context.Context, user string, opts *ProjectListOptions) ([]*Project, *Response, error) {
- u := fmt.Sprintf("users/%v/projects", user)
- u, err := addOptions(u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- var projects []*Project
- resp, err := s.client.Do(ctx, req, &projects)
- if err != nil {
- return nil, resp, err
- }
-
- return projects, resp, nil
-}
-
-// CreateUserProjectOptions specifies the parameters to the UsersService.CreateProject method.
-type CreateUserProjectOptions struct {
- // The name of the project. (Required.)
- Name string `json:"name"`
- // The description of the project. (Optional.)
- Body *string `json:"body,omitempty"`
-}
-
-// CreateProject creates a GitHub Project for the current user.
-//
-// GitHub API docs: https://docs.github.com/en/rest/projects/projects#create-a-user-project
-func (s *UsersService) CreateProject(ctx context.Context, opts *CreateUserProjectOptions) (*Project, *Response, error) {
- u := "user/projects"
- req, err := s.client.NewRequest("POST", u, opts)
- if err != nil {
- return nil, nil, err
- }
-
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeProjectsPreview)
-
- project := &Project{}
- resp, err := s.client.Do(ctx, req, project)
- if err != nil {
- return nil, resp, err
- }
-
- return project, resp, nil
-}
diff --git a/vendor/github.com/google/go-github/v55/AUTHORS b/vendor/github.com/google/go-github/v72/AUTHORS
similarity index 88%
rename from vendor/github.com/google/go-github/v55/AUTHORS
rename to vendor/github.com/google/go-github/v72/AUTHORS
index 74a21dc604..a6104ffa9a 100644
--- a/vendor/github.com/google/go-github/v55/AUTHORS
+++ b/vendor/github.com/google/go-github/v72/AUTHORS
@@ -13,10 +13,14 @@
413x
6543 <6543@obermui.de>
Abed Kibbe
+Abhijit Hota
Abhinav Gupta
+abhishek
+Abhishek Sharma
Abhishek Veeramalla
aboy
Adam Kohring
+Aditya Mahendrakar
adrienzieba
afdesk
Ahmad Nurus S
@@ -35,19 +39,26 @@ Alex Orr
Alex Su
Alex Unger
Alexander Harkness
+Alexey Alekhin
+Alexis Couvreur
Alexis Gauthiez
Ali Farooq
+Alin Balutoiu
Allan Guwatudde
Allen Sun
Amey Sakhadeo
Anders Janmyr
+Andreas Deininger
Andreas Garnæs
+Andrew Gillis
Andrew Ryabchun
Andrew Svoboda
+Andriyun
Andy Grunwald
Andy Hume
Andy Lindeman
angie pinilla
+Anish Rajan
anjanashenoy
Anshuman Bhartiya
Antoine
@@ -59,6 +70,7 @@ aprp
apurwaj2
Aravind
Arda Kuyumcu
+Ary
Arıl Bozoluk
Asier Marruedo
Austin Burdine
@@ -66,9 +78,11 @@ Austin Dizzy
Azuka Okuleye
Ben Batha
Benjamen Keroack
+Benjamin Nater
Berkay Tacyildiz
Beshr Kayali
Beyang Liu
+billnapier
Billy Keyes
Billy Lynch
Bingtan Lu
@@ -93,11 +107,13 @@ Cami Diez
Carl Johnson
Carlos Alexandro Becker
Carlos Tadeu Panato Junior
+Casey
ChandanChainani
chandresh-pancholi
Charles Fenwick Elliott
Charlie Yan
Chmouel Boudjnah
+Chris Allen Lane
Chris King
Chris Mc
Chris Raborg
@@ -109,6 +125,7 @@ Christian Muehlhaeuser
Christoph Jerolimov
Christoph Sassenberg
CI Monk
+Clemens W
Colin Misare
Craig Gumbley
Craig Peterson
@@ -137,6 +154,7 @@ DeviousLab
Dhi Aurrahman
Diego Lapiduz
Diogo Vilela
+Dion Gionet Mallet
Dmitri Shuralyov
dmnlk
Don Petersen
@@ -149,10 +167,14 @@ Eli Uriegas
Elliott Beach
Emerson Wood
Emil V
+Emma Sax
Eng Zer Jun
+Enrico Candino
eperm
Erick Fejta
+Erik Elkins
Erik Nobel
+Erwan Finot
erwinvaneyk
Evan Anderson
Evan Elias
@@ -163,6 +185,7 @@ Federico Di Pierro
Felix Geisendörfer
Filippo Valsorda
Florian Forster
+Florian Maier
Florian Wagner
Francesc Gil
Francis
@@ -178,6 +201,7 @@ Glen Mailer
Gnahz
Google Inc.
Grachev Mikhail
+Gregory Oschwald
griffin_stewie
guangwu
Guillaume Jacquet
@@ -188,6 +212,7 @@ Hari haran
Harikesh00
haya14busa
haya14busa
+Henrik Lundström
Hiroki Ito
Hubot Jr
Huy Tr
@@ -200,8 +225,10 @@ Ioannis Georgoulas
Isao Jonas
ishan upadhyay
isqua
+Ivan Martos
Jacob Valdemar
Jake Krammer
+Jake Scaltreto
Jake White
Jameel Haffejee
James Bowes
@@ -210,6 +237,7 @@ James Loh
James Maguire
James Turley
Jamie West
+Jan Guth
Jan Kosecki
Jan Švábík
Jason Field
@@ -224,6 +252,7 @@ Jihoon Chung
Jille Timmermans
Jimmi Dyson
Joan Saum
+JoannaaKL
Joe Tsai
John Barton
John Engelman
@@ -232,6 +261,7 @@ John Liu
Jordan Brockopp
Jordan Burandt
Jordan Sussman
+Jorge Ferrero
Jorge Gómez Reus
Joshua Bezaleel Abednego
João Cerqueira
@@ -240,6 +270,7 @@ jpbelanger-mtl
Juan
Juan Basso
Julien Garcia Gonzalez
+Julien Midedji
Julien Rostand
Junya Kono
Justin Abrahms
@@ -257,6 +288,7 @@ Kevin Burke
Kevin Wang
Kevin Zhao
kgalli
+Khanh Ngo
Kirill
Konrad Malawski
Kookheon Kwon
@@ -266,10 +298,12 @@ Kshitij Saraogi
Kumar Saurabh
Kyle Kurz
kyokomi
+Lachlan Cooper
Lars Lehtonen
Laurent Verdoïa
leopoldwang
Liam Galvin
+Liam Stanley
Lluis Campos
Lovro Mažgon
Loïs Postula
@@ -283,6 +317,8 @@ Luke Kysow
Luke Roberts
Luke Young
lynn [they]
+Léo Salé
+M. Ryan Rigdon
Magnus Kulke
Maksim Zhylinski
Marc Binder
@@ -294,6 +330,7 @@ Martins Sipenko
Marwan Sulaiman
Masayuki Izumi
Mat Geist
+Matheus Santos Araújo
Matija Horvat
Matin Rahmanian
Matt
@@ -301,8 +338,10 @@ Matt Brender
Matt Dainty
Matt Gaunt
Matt Landis
+Matt Mencel
Matt Moore
Matt Simons
+Matthew Reidy
Maxime Bury
Michael Meng
Michael Spiegel
@@ -311,8 +350,12 @@ Michał Glapa
Michelangelo Morrillo
Miguel Elias dos Santos
Mike Chen
+Miles Crabill
+Mishin Nikolai
mohammad ali <2018cs92@student.uet.edu.pk>
Mohammed AlDujaili
+Mohammed Nafees
+Mudit
Mukundan Senthil
Munia Balayil
Mustafa Abban
@@ -320,20 +363,25 @@ Nadav Kaner
Naoki Kanatani
Nathan VanBenschoten
Navaneeth Suresh
+Nayeem Hasan
Neal Caffery
Neil O'Toole