diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy index a830e859a..126f3ceb1 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy @@ -222,6 +222,9 @@ structure StormTrackingCache { timeUnits: TimeUnits } +@documentation("The time unit for gracePeriod, graceInterval, and inFlightTTL. +The default is seconds. +If this is set to milliseconds, then these values will be treated as milliseconds.") @enum([ { name: "Seconds", diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy index 25f3ed360..eb65e8363 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy @@ -14,6 +14,7 @@ namespace aws.cryptography.materialProviders //# | FORBID_ENCRYPT_ALLOW_DECRYPT | //# | REQUIRE_ENCRYPT_ALLOW_DECRYPT | //# | REQUIRE_ENCRYPT_REQUIRE_DECRYPT | +@documentation("Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum.") @enum([ { name: "FORBID_ENCRYPT_ALLOW_DECRYPT", @@ -30,6 +31,7 @@ namespace aws.cryptography.materialProviders ]) string ESDKCommitmentPolicy +@documentation("Supported DBE Commitment Policies.") @enum([ { name: "REQUIRE_ENCRYPT_REQUIRE_DECRYPT", @@ -54,7 +56,7 @@ union CommitmentPolicy { // Padding -// Values come from: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes +@documentation("Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes.") @enum([ { name: "PKCS1", @@ -79,7 +81,7 @@ union CommitmentPolicy { ]) string PaddingScheme -// AES wrapping algorithms +@documentation("Supported AES wrapping algorithms.") @enum([ { name: "ALG_AES128_GCM_IV12_TAG16", diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy index 6177d2484..ce2298cdc 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy @@ -7,7 +7,8 @@ namespace aws.cryptography.materialProviders // customer facing, we will need to either model the AlgorithmSuiteProperties // as a separate structure (with an associated resource/operation for translating // from name to properties) or use more advanced custom traits which allow us to -// model all properties of the algorithm suite in one structure. +// model all properties of the algorithm suite in one structure. +@documentation("Supported ESDK Algorithm Suite Ids.") @enum([ { name: "ALG_AES_128_GCM_IV12_TAG16_NO_KDF", @@ -56,6 +57,7 @@ namespace aws.cryptography.materialProviders ]) string ESDKAlgorithmSuiteId +@documentation("Supported DBE Algorithm Suite Ids.") @enum([ { name: "ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384", diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go index 90c25acc2..397c70a02 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go @@ -108,10 +108,12 @@ func (input CreateKeyInput) aws_cryptography_keyStore_CreateKeyInput_encryptionC return nil } +// Outputs for Branch Key creation. type CreateKeyOutput struct { BranchKeyIdentifier string } +// Outputs for Branch Key creation. func (input CreateKeyOutput) Validate() error { return nil @@ -125,10 +127,12 @@ func (input CreateKeyStoreInput) Validate() error { return nil } +// Outputs for Key Store DynamoDB table creation. type CreateKeyStoreOutput struct { TableArn string } +// Outputs for Key Store DynamoDB table creation. func (input CreateKeyStoreOutput) Validate() error { if len(input.TableArn) < 1 { return fmt.Errorf("TableArn has a minimum length of 1 but has the length of %d.", len(input.TableArn)) @@ -148,19 +152,23 @@ func (input Discovery) Validate() error { return nil } +// Inputs for getting a Branch Key's ACTIVE version. type GetActiveBranchKeyInput struct { BranchKeyIdentifier string } +// Inputs for getting a Branch Key's ACTIVE version. func (input GetActiveBranchKeyInput) Validate() error { return nil } +// Outputs for getting a Branch Key's ACTIVE version. type GetActiveBranchKeyOutput struct { BranchKeyMaterials BranchKeyMaterials } +// Outputs for getting a Branch Key's ACTIVE version. func (input GetActiveBranchKeyOutput) Validate() error { if input.BranchKeyMaterials.Validate() != nil { return input.BranchKeyMaterials.Validate() @@ -169,19 +177,23 @@ func (input GetActiveBranchKeyOutput) Validate() error { return nil } +// Inputs for getting a Beacon Key type GetBeaconKeyInput struct { BranchKeyIdentifier string } +// Inputs for getting a Beacon Key func (input GetBeaconKeyInput) Validate() error { return nil } +// Outputs for getting a Beacon Key type GetBeaconKeyOutput struct { BeaconKeyMaterials BeaconKeyMaterials } +// Outputs for getting a Beacon Key func (input GetBeaconKeyOutput) Validate() error { if input.BeaconKeyMaterials.Validate() != nil { return input.BeaconKeyMaterials.Validate() @@ -190,21 +202,25 @@ func (input GetBeaconKeyOutput) Validate() error { return nil } +// Inputs for getting a version of a Branch Key. type GetBranchKeyVersionInput struct { BranchKeyIdentifier string BranchKeyVersion string } +// Inputs for getting a version of a Branch Key. func (input GetBranchKeyVersionInput) Validate() error { return nil } +// Outputs for getting a version of a Branch Key. type GetBranchKeyVersionOutput struct { BranchKeyMaterials BranchKeyMaterials } +// Outputs for getting a version of a Branch Key. func (input GetBranchKeyVersionOutput) Validate() error { if input.BranchKeyMaterials.Validate() != nil { return input.BranchKeyMaterials.Validate() @@ -228,6 +244,7 @@ func (input MRDiscovery) Validate() error { return nil } +// The configuration information for a Key Store. type GetKeyStoreInfoOutput struct { GrantTokens []string @@ -240,6 +257,7 @@ type GetKeyStoreInfoOutput struct { LogicalKeyStoreName string } +// The configuration information for a Key Store. func (input GetKeyStoreInfoOutput) Validate() error { if input.GrantTokens == nil { return fmt.Errorf("input.GrantTokens is required but has a nil value.") @@ -295,18 +313,22 @@ func (input GetKeyStoreInfoOutput) aws_cryptography_keyStore_GetKeyStoreInfoOutp return nil } +// Inputs for versioning a Branch Key. type VersionKeyInput struct { BranchKeyIdentifier string } +// Inputs for versioning a Branch Key. func (input VersionKeyInput) Validate() error { return nil } +// Outputs for versioning a Branch Key. type VersionKeyOutput struct { } +// Outputs for versioning a Branch Key. func (input VersionKeyOutput) Validate() error { return nil @@ -396,32 +418,38 @@ func (input KeyStoreConfig) aws_cryptography_keyStore_KeyStoreConfig_kmsConfigur return nil } -// KMSConfigurationMemberdiscovery -// KMSConfigurationMemberkmsKeyArn -// KMSConfigurationMemberkmsMRKeyArn -// KMSConfigurationMembermrDiscovery +// KMSConfigurationMemberdiscovery +// KMSConfigurationMemberkmsKeyArn +// KMSConfigurationMemberkmsMRKeyArn +// KMSConfigurationMembermrDiscovery +// +// Configures Key Store's KMS Key ARN restrictions. type KMSConfiguration interface { isKMSConfiguration() } +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMemberdiscovery struct { Value Discovery } func (*KMSConfigurationMemberdiscovery) isKMSConfiguration() {} +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMemberkmsKeyArn struct { Value string } func (*KMSConfigurationMemberkmsKeyArn) isKMSConfiguration() {} +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMemberkmsMRKeyArn struct { Value string } func (*KMSConfigurationMemberkmsMRKeyArn) isKMSConfiguration() {} +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMembermrDiscovery struct { Value MRDiscovery } diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go index 147df8a84..a61cc7bdc 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go @@ -4,13 +4,16 @@ package awscryptographymaterialproviderssmithygeneratedtypes type AesWrappingAlg string +// Supported AES wrapping algorithms. const ( AesWrappingAlgAlgAes128GcmIv12Tag16 AesWrappingAlg = "ALG_AES128_GCM_IV12_TAG16" AesWrappingAlgAlgAes192GcmIv12Tag16 AesWrappingAlg = "ALG_AES192_GCM_IV12_TAG16" AesWrappingAlgAlgAes256GcmIv12Tag16 AesWrappingAlg = "ALG_AES256_GCM_IV12_TAG16" ) +// Supported AES wrapping algorithms. func (AesWrappingAlg) Values() []AesWrappingAlg { + // Supported AES wrapping algorithms. return []AesWrappingAlg{ "ALG_AES128_GCM_IV12_TAG16", "ALG_AES192_GCM_IV12_TAG16", @@ -20,12 +23,15 @@ func (AesWrappingAlg) Values() []AesWrappingAlg { type DBEAlgorithmSuiteId string +// Supported DBE Algorithm Suite Ids. const ( DBEAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384 DBEAlgorithmSuiteId = "0x6700" DBEAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384 DBEAlgorithmSuiteId = "0x6701" ) +// Supported DBE Algorithm Suite Ids. func (DBEAlgorithmSuiteId) Values() []DBEAlgorithmSuiteId { + // Supported DBE Algorithm Suite Ids. return []DBEAlgorithmSuiteId{ "0x6700", "0x6701", @@ -34,6 +40,7 @@ func (DBEAlgorithmSuiteId) Values() []DBEAlgorithmSuiteId { type ESDKAlgorithmSuiteId string +// Supported ESDK Algorithm Suite Ids. const ( ESDKAlgorithmSuiteIdAlgAes128GcmIv12Tag16NoKdf ESDKAlgorithmSuiteId = "0x0014" ESDKAlgorithmSuiteIdAlgAes192GcmIv12Tag16NoKdf ESDKAlgorithmSuiteId = "0x0046" @@ -48,7 +55,9 @@ const ( ESDKAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeyEcdsaP384 ESDKAlgorithmSuiteId = "0x0578" ) +// Supported ESDK Algorithm Suite Ids. func (ESDKAlgorithmSuiteId) Values() []ESDKAlgorithmSuiteId { + // Supported ESDK Algorithm Suite Ids. return []ESDKAlgorithmSuiteId{ "0x0014", "0x0046", @@ -66,12 +75,21 @@ func (ESDKAlgorithmSuiteId) Values() []ESDKAlgorithmSuiteId { type TimeUnits string +// The time unit for gracePeriod, graceInterval, and inFlightTTL. +// The default is seconds. +// If this is set to milliseconds, then these values will be treated as milliseconds. const ( TimeUnitsSeconds TimeUnits = "Seconds" TimeUnitsMilliseconds TimeUnits = "Milliseconds" ) +// The time unit for gracePeriod, graceInterval, and inFlightTTL. +// The default is seconds. +// If this is set to milliseconds, then these values will be treated as milliseconds. func (TimeUnits) Values() []TimeUnits { + // The time unit for gracePeriod, graceInterval, and inFlightTTL. + // The default is seconds. + // If this is set to milliseconds, then these values will be treated as milliseconds. return []TimeUnits{ "Seconds", "Milliseconds", @@ -80,6 +98,7 @@ func (TimeUnits) Values() []TimeUnits { type PaddingScheme string +// Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes. const ( PaddingSchemePkcs1 PaddingScheme = "PKCS1" PaddingSchemeOaepSha1Mgf1 PaddingScheme = "OAEP_SHA1_MGF1" @@ -88,7 +107,9 @@ const ( PaddingSchemeOaepSha512Mgf1 PaddingScheme = "OAEP_SHA512_MGF1" ) +// Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes. func (PaddingScheme) Values() []PaddingScheme { + // Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes. return []PaddingScheme{ "PKCS1", "OAEP_SHA1_MGF1", @@ -100,11 +121,14 @@ func (PaddingScheme) Values() []PaddingScheme { type DBECommitmentPolicy string +// Supported DBE Commitment Policies. const ( DBECommitmentPolicyRequireEncryptRequireDecrypt DBECommitmentPolicy = "REQUIRE_ENCRYPT_REQUIRE_DECRYPT" ) +// Supported DBE Commitment Policies. func (DBECommitmentPolicy) Values() []DBECommitmentPolicy { + // Supported DBE Commitment Policies. return []DBECommitmentPolicy{ "REQUIRE_ENCRYPT_REQUIRE_DECRYPT", } @@ -112,13 +136,16 @@ func (DBECommitmentPolicy) Values() []DBECommitmentPolicy { type ESDKCommitmentPolicy string +// Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum. const ( ESDKCommitmentPolicyForbidEncryptAllowDecrypt ESDKCommitmentPolicy = "FORBID_ENCRYPT_ALLOW_DECRYPT" ESDKCommitmentPolicyRequireEncryptAllowDecrypt ESDKCommitmentPolicy = "REQUIRE_ENCRYPT_ALLOW_DECRYPT" ESDKCommitmentPolicyRequireEncryptRequireDecrypt ESDKCommitmentPolicy = "REQUIRE_ENCRYPT_REQUIRE_DECRYPT" ) +// Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum. func (ESDKCommitmentPolicy) Values() []ESDKCommitmentPolicy { + // Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum. return []ESDKCommitmentPolicy{ "FORBID_ENCRYPT_ALLOW_DECRYPT", "REQUIRE_ENCRYPT_ALLOW_DECRYPT", diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go index cd2046f6d..3b81280c8 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go @@ -375,10 +375,12 @@ func (input AlgorithmSuiteInfo) aws_cryptography_materialProviders_AlgorithmSuit return nil } +// Inputs for getting a AWS KMS Client. type GetClientInput struct { Region string } +// Inputs for getting a AWS KMS Client. func (input GetClientInput) Validate() error { return nil @@ -401,12 +403,14 @@ func (input GetClientOutput) Validate() error { return nil } +// A filter which defines what AWS partition and AWS accounts a KMS Key may be in for a Keyring to be allowed to attempt to decrypt it. type DiscoveryFilter struct { AccountIds []string Partition string } +// A filter which defines what AWS partition and AWS accounts a KMS Key may be in for a Keyring to be allowed to attempt to decrypt it. func (input DiscoveryFilter) Validate() error { if input.AccountIds == nil { return fmt.Errorf("input.AccountIds is required but has a nil value.") @@ -415,6 +419,7 @@ func (input DiscoveryFilter) Validate() error { return nil } +// Inputs for for creating a AWS KMS Discovery Keyring. type CreateAwsKmsDiscoveryKeyringInput struct { KmsClient *kms.Client @@ -423,6 +428,7 @@ type CreateAwsKmsDiscoveryKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS Discovery Keyring. func (input CreateAwsKmsDiscoveryKeyringInput) Validate() error { if input.DiscoveryFilter != nil { if input.DiscoveryFilter.Validate() != nil { @@ -442,10 +448,12 @@ func (input KeyringReference) Validate() error { return nil } +// Outputs for creating a Keyring. type CreateKeyringOutput struct { Keyring IKeyring } +// Outputs for creating a Keyring. func (input CreateKeyringOutput) Validate() error { return nil @@ -459,6 +467,7 @@ func (input ClientSupplierReference) Validate() error { return nil } +// Inputs for for creating an AWS KMS Discovery Multi-Keyring. type CreateAwsKmsDiscoveryMultiKeyringInput struct { Regions []string @@ -469,6 +478,7 @@ type CreateAwsKmsDiscoveryMultiKeyringInput struct { GrantTokens []string } +// Inputs for for creating an AWS KMS Discovery Multi-Keyring. func (input CreateAwsKmsDiscoveryMultiKeyringInput) Validate() error { if input.Regions == nil { return fmt.Errorf("input.Regions is required but has a nil value.") @@ -483,6 +493,7 @@ func (input CreateAwsKmsDiscoveryMultiKeyringInput) Validate() error { return nil } +// Inputs for creating a KmsPrivateKeyToStaticPublicKey Configuration. type KmsPrivateKeyToStaticPublicKeyInput struct { RecipientPublicKey []byte @@ -491,20 +502,24 @@ type KmsPrivateKeyToStaticPublicKeyInput struct { SenderPublicKey []byte } +// Inputs for creating a KmsPrivateKeyToStaticPublicKey Configuration. func (input KmsPrivateKeyToStaticPublicKeyInput) Validate() error { return nil } +// Inputs for creating a KmsPublicKeyDiscovery Configuration. This is a DECRYPT ONLY configuration. type KmsPublicKeyDiscoveryInput struct { RecipientKmsIdentifier string } +// Inputs for creating a KmsPublicKeyDiscovery Configuration. This is a DECRYPT ONLY configuration. func (input KmsPublicKeyDiscoveryInput) Validate() error { return nil } +// Inputs for creating an AWS KMS ECDH Keyring. type CreateAwsKmsEcdhKeyringInput struct { CurveSpec awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec @@ -515,6 +530,7 @@ type CreateAwsKmsEcdhKeyringInput struct { GrantTokens []string } +// Inputs for creating an AWS KMS ECDH Keyring. func (input CreateAwsKmsEcdhKeyringInput) Validate() error { if input.KeyAgreementScheme == nil { return fmt.Errorf("input.KeyAgreementScheme is required but has a nil value.") @@ -555,10 +571,12 @@ func (input BranchKeyIdSupplierReference) Validate() error { return nil } +// The best choice for most situations. Probably a StormTrackingCache. type DefaultCache struct { EntryCapacity int32 } +// The best choice for most situations. Probably a StormTrackingCache. func (input DefaultCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -567,12 +585,14 @@ func (input DefaultCache) Validate() error { return nil } +// A cache that is safe for use in a multi threaded environment, but no extra functionality. type MultiThreadedCache struct { EntryCapacity int32 EntryPruningTailSize *int32 } +// A cache that is safe for use in a multi threaded environment, but no extra functionality. func (input MultiThreadedCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -586,9 +606,11 @@ func (input MultiThreadedCache) Validate() error { return nil } +// Nothing should ever be cached. type NoCache struct { } +// Nothing should ever be cached. func (input NoCache) Validate() error { return nil @@ -602,12 +624,14 @@ func (input CryptographicMaterialsCacheReference) Validate() error { return nil } +// A cache that is NOT safe for use in a multi threaded environment. type SingleThreadedCache struct { EntryCapacity int32 EntryPruningTailSize *int32 } +// A cache that is NOT safe for use in a multi threaded environment. func (input SingleThreadedCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -621,6 +645,8 @@ func (input SingleThreadedCache) Validate() error { return nil } +// A cache that is safe for use in a multi threaded environment, +// and tries to prevent redundant or overly parallel backend calls. type StormTrackingCache struct { EntryCapacity int32 @@ -639,6 +665,8 @@ type StormTrackingCache struct { TimeUnits *TimeUnits } +// A cache that is safe for use in a multi threaded environment, +// and tries to prevent redundant or overly parallel backend calls. func (input StormTrackingCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -675,6 +703,7 @@ func (input KeyStoreReference) Validate() error { return nil } +// Inputs for creating a Hierarchical Keyring. type CreateAwsKmsHierarchicalKeyringInput struct { KeyStore *awscryptographykeystoresmithygenerated.Client @@ -689,6 +718,7 @@ type CreateAwsKmsHierarchicalKeyringInput struct { PartitionId *string } +// Inputs for creating a Hierarchical Keyring. func (input CreateAwsKmsHierarchicalKeyringInput) Validate() error { if input.TtlSeconds < 0 { return fmt.Errorf("PositiveLong has a minimum of 0 but has the value of %d.", input.TtlSeconds) @@ -734,6 +764,7 @@ func (input CreateAwsKmsHierarchicalKeyringInput) aws_cryptography_materialProvi return nil } +// Inputs for for creating a AWS KMS Keyring. type CreateAwsKmsKeyringInput struct { KmsClient *kms.Client @@ -742,11 +773,13 @@ type CreateAwsKmsKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS Keyring. func (input CreateAwsKmsKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS MRK Discovery Keyring. type CreateAwsKmsMrkDiscoveryKeyringInput struct { KmsClient *kms.Client @@ -757,6 +790,7 @@ type CreateAwsKmsMrkDiscoveryKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS MRK Discovery Keyring. func (input CreateAwsKmsMrkDiscoveryKeyringInput) Validate() error { if input.DiscoveryFilter != nil { if input.DiscoveryFilter.Validate() != nil { @@ -768,6 +802,7 @@ func (input CreateAwsKmsMrkDiscoveryKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS MRK Discovery Multi-Keyring. type CreateAwsKmsMrkDiscoveryMultiKeyringInput struct { Regions []string @@ -778,6 +813,7 @@ type CreateAwsKmsMrkDiscoveryMultiKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS MRK Discovery Multi-Keyring. func (input CreateAwsKmsMrkDiscoveryMultiKeyringInput) Validate() error { if input.Regions == nil { return fmt.Errorf("input.Regions is required but has a nil value.") @@ -792,6 +828,7 @@ func (input CreateAwsKmsMrkDiscoveryMultiKeyringInput) Validate() error { return nil } +// Inputs for for creating an AWS KMS MRK Keyring. type CreateAwsKmsMrkKeyringInput struct { KmsClient *kms.Client @@ -800,11 +837,13 @@ type CreateAwsKmsMrkKeyringInput struct { GrantTokens []string } +// Inputs for for creating an AWS KMS MRK Keyring. func (input CreateAwsKmsMrkKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS MRK Multi-Keyring. type CreateAwsKmsMrkMultiKeyringInput struct { ClientSupplier IClientSupplier @@ -815,11 +854,13 @@ type CreateAwsKmsMrkMultiKeyringInput struct { KmsKeyIds []string } +// Inputs for for creating a AWS KMS MRK Multi-Keyring. func (input CreateAwsKmsMrkMultiKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS Multi-Keyring. type CreateAwsKmsMultiKeyringInput struct { ClientSupplier IClientSupplier @@ -830,11 +871,13 @@ type CreateAwsKmsMultiKeyringInput struct { KmsKeyIds []string } +// Inputs for for creating a AWS KMS Multi-Keyring. func (input CreateAwsKmsMultiKeyringInput) Validate() error { return nil } +// Inputs for creating a AWS KMS RSA Keyring. type CreateAwsKmsRsaKeyringInput struct { EncryptionAlgorithm kmstypes.EncryptionAlgorithmSpec @@ -847,6 +890,7 @@ type CreateAwsKmsRsaKeyringInput struct { PublicKey []byte } +// Inputs for creating a AWS KMS RSA Keyring. func (input CreateAwsKmsRsaKeyringInput) Validate() error { return nil @@ -935,30 +979,36 @@ func (input CryptographicMaterialsManagerReference) Validate() error { return nil } +// Outputs for creating a Default Cryptographic Materials Manager. type CreateCryptographicMaterialsManagerOutput struct { MaterialsManager ICryptographicMaterialsManager } +// Outputs for creating a Default Cryptographic Materials Manager. func (input CreateCryptographicMaterialsManagerOutput) Validate() error { return nil } +// Inputs for creating a Default Cryptographic Materials Manager. type CreateDefaultCryptographicMaterialsManagerInput struct { Keyring IKeyring } +// Inputs for creating a Default Cryptographic Materials Manager. func (input CreateDefaultCryptographicMaterialsManagerInput) Validate() error { return nil } +// Inputs for creating a Multi-Keyring. type CreateMultiKeyringInput struct { ChildKeyrings []IKeyring Generator IKeyring } +// Inputs for creating a Multi-Keyring. func (input CreateMultiKeyringInput) Validate() error { if input.ChildKeyrings == nil { return fmt.Errorf("input.ChildKeyrings is required but has a nil value.") @@ -967,6 +1017,7 @@ func (input CreateMultiKeyringInput) Validate() error { return nil } +// Inputs for creating a Raw AES Keyring. type CreateRawAesKeyringInput struct { KeyName string @@ -977,46 +1028,55 @@ type CreateRawAesKeyringInput struct { WrappingKey []byte } +// Inputs for creating a Raw AES Keyring. func (input CreateRawAesKeyringInput) Validate() error { return nil } +// Inputs for creating a EphemeralPrivateKeyToStaticPublicKey Configuration. type EphemeralPrivateKeyToStaticPublicKeyInput struct { RecipientPublicKey []byte } +// Inputs for creating a EphemeralPrivateKeyToStaticPublicKey Configuration. func (input EphemeralPrivateKeyToStaticPublicKeyInput) Validate() error { return nil } +// Inputs for creating a PublicKeyDiscovery Configuration. type PublicKeyDiscoveryInput struct { RecipientStaticPrivateKey []byte } +// Inputs for creating a PublicKeyDiscovery Configuration. func (input PublicKeyDiscoveryInput) Validate() error { return nil } +// Inputs for creating a RawPrivateKeyToStaticPublicKey Configuration. type RawPrivateKeyToStaticPublicKeyInput struct { RecipientPublicKey []byte SenderStaticPrivateKey []byte } +// Inputs for creating a RawPrivateKeyToStaticPublicKey Configuration. func (input RawPrivateKeyToStaticPublicKeyInput) Validate() error { return nil } +// Inputs for creating a raw ECDH Keyring. type CreateRawEcdhKeyringInput struct { CurveSpec awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec KeyAgreementScheme RawEcdhStaticConfigurations } +// Inputs for creating a raw ECDH Keyring. func (input CreateRawEcdhKeyringInput) Validate() error { if input.KeyAgreementScheme == nil { return fmt.Errorf("input.KeyAgreementScheme is required but has a nil value.") @@ -1053,6 +1113,7 @@ func (input CreateRawEcdhKeyringInput) aws_cryptography_materialProviders_Create return nil } +// Inputs for creating a Raw RAW Keyring. type CreateRawRsaKeyringInput struct { KeyName string @@ -1065,11 +1126,13 @@ type CreateRawRsaKeyringInput struct { PublicKey []byte } +// Inputs for creating a Raw RAW Keyring. func (input CreateRawRsaKeyringInput) Validate() error { return nil } +// Inputs for creating an Required Encryption Context Cryptographic Materials Manager. type CreateRequiredEncryptionContextCMMInput struct { RequiredEncryptionContextKeys []string @@ -1078,6 +1141,7 @@ type CreateRequiredEncryptionContextCMMInput struct { UnderlyingCMM ICryptographicMaterialsManager } +// Inputs for creating an Required Encryption Context Cryptographic Materials Manager. func (input CreateRequiredEncryptionContextCMMInput) Validate() error { if input.RequiredEncryptionContextKeys == nil { return fmt.Errorf("input.RequiredEncryptionContextKeys is required but has a nil value.") @@ -1099,10 +1163,12 @@ func (input CreateRequiredEncryptionContextCMMInput) aws_cryptography_materialPr return nil } +// Outputs for creating an Required Encryption Context Cryptographic Materials Manager. type CreateRequiredEncryptionContextCMMOutput struct { MaterialsManager ICryptographicMaterialsManager } +// Outputs for creating an Required Encryption Context Cryptographic Materials Manager. func (input CreateRequiredEncryptionContextCMMOutput) Validate() error { return nil @@ -1819,10 +1885,12 @@ func (input ValidEncryptionMaterialsTransitionInput) Validate() error { return nil } +// Inputs for determining the Branch Key which should be used to wrap or unwrap the data key for this encryption or decryption type GetBranchKeyIdInput struct { EncryptionContext map[string]string } +// Inputs for determining the Branch Key which should be used to wrap or unwrap the data key for this encryption or decryption func (input GetBranchKeyIdInput) Validate() error { if input.EncryptionContext == nil { return fmt.Errorf("input.EncryptionContext is required but has a nil value.") @@ -1847,10 +1915,12 @@ func (input GetBranchKeyIdInput) aws_cryptography_materialProviders_GetBranchKey return nil } +// Outputs for the Branch Key responsible for wrapping or unwrapping the data key in this encryption or decryption. type GetBranchKeyIdOutput struct { BranchKeyId string } +// Outputs for the Branch Key responsible for wrapping or unwrapping the data key in this encryption or decryption. func (input GetBranchKeyIdOutput) Validate() error { return nil @@ -2176,23 +2246,29 @@ type EncryptMemberAES_GCM struct { func (*EncryptMemberAES_GCM) isEncrypt() {} -// KeyAgreementSchemeMemberStaticConfiguration +// KeyAgreementSchemeMemberStaticConfiguration +// +// Supported ECDH Key Agreement Schemes. type KeyAgreementScheme interface { isKeyAgreementScheme() } +// Supported ECDH Key Agreement Schemes. type KeyAgreementSchemeMemberStaticConfiguration struct { Value StaticConfigurations } func (*KeyAgreementSchemeMemberStaticConfiguration) isKeyAgreementScheme() {} -// KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey -// KmsEcdhStaticConfigurationsMemberKmsPublicKeyDiscovery +// KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey +// KmsEcdhStaticConfigurationsMemberKmsPublicKeyDiscovery +// +// Allowed configurations when using KmsEcdhStaticConfigurations. type KmsEcdhStaticConfigurations interface { isKmsEcdhStaticConfigurations() } +// Allowed configurations when using KmsEcdhStaticConfigurations. type KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey struct { Value KmsPrivateKeyToStaticPublicKeyInput } @@ -2200,6 +2276,7 @@ type KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey struct { func (*KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey) isKmsEcdhStaticConfigurations() { } +// Allowed configurations when using KmsEcdhStaticConfigurations. type KmsEcdhStaticConfigurationsMemberKmsPublicKeyDiscovery struct { Value KmsPublicKeyDiscoveryInput } @@ -2238,13 +2315,16 @@ type MaterialsMemberEncryption struct { func (*MaterialsMemberEncryption) isMaterials() {} -// RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey -// RawEcdhStaticConfigurationsMemberPublicKeyDiscovery -// RawEcdhStaticConfigurationsMemberRawPrivateKeyToStaticPublicKey +// RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey +// RawEcdhStaticConfigurationsMemberPublicKeyDiscovery +// RawEcdhStaticConfigurationsMemberRawPrivateKeyToStaticPublicKey +// +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurations interface { isRawEcdhStaticConfigurations() } +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey struct { Value EphemeralPrivateKeyToStaticPublicKeyInput } @@ -2252,12 +2332,14 @@ type RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey struc func (*RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey) isRawEcdhStaticConfigurations() { } +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurationsMemberPublicKeyDiscovery struct { Value PublicKeyDiscoveryInput } func (*RawEcdhStaticConfigurationsMemberPublicKeyDiscovery) isRawEcdhStaticConfigurations() {} +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurationsMemberRawPrivateKeyToStaticPublicKey struct { Value RawPrivateKeyToStaticPublicKeyInput } @@ -2283,18 +2365,22 @@ type SignatureAlgorithmMemberNone struct { func (*SignatureAlgorithmMemberNone) isSignatureAlgorithm() {} -// StaticConfigurationsMemberAWS_KMS_ECDH -// StaticConfigurationsMemberRAW_ECDH +// StaticConfigurationsMemberAWS_KMS_ECDH +// StaticConfigurationsMemberRAW_ECDH +// +// Supported configurations for the StaticConfiguration Key Agreement Scheme. type StaticConfigurations interface { isStaticConfigurations() } +// Supported configurations for the StaticConfiguration Key Agreement Scheme. type StaticConfigurationsMemberAWS_KMS_ECDH struct { Value KmsEcdhStaticConfigurations } func (*StaticConfigurationsMemberAWS_KMS_ECDH) isStaticConfigurations() {} +// Supported configurations for the StaticConfiguration Key Agreement Scheme. type StaticConfigurationsMemberRAW_ECDH struct { Value RawEcdhStaticConfigurations } diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go index 90c25acc2..397c70a02 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygeneratedtypes/types.go @@ -108,10 +108,12 @@ func (input CreateKeyInput) aws_cryptography_keyStore_CreateKeyInput_encryptionC return nil } +// Outputs for Branch Key creation. type CreateKeyOutput struct { BranchKeyIdentifier string } +// Outputs for Branch Key creation. func (input CreateKeyOutput) Validate() error { return nil @@ -125,10 +127,12 @@ func (input CreateKeyStoreInput) Validate() error { return nil } +// Outputs for Key Store DynamoDB table creation. type CreateKeyStoreOutput struct { TableArn string } +// Outputs for Key Store DynamoDB table creation. func (input CreateKeyStoreOutput) Validate() error { if len(input.TableArn) < 1 { return fmt.Errorf("TableArn has a minimum length of 1 but has the length of %d.", len(input.TableArn)) @@ -148,19 +152,23 @@ func (input Discovery) Validate() error { return nil } +// Inputs for getting a Branch Key's ACTIVE version. type GetActiveBranchKeyInput struct { BranchKeyIdentifier string } +// Inputs for getting a Branch Key's ACTIVE version. func (input GetActiveBranchKeyInput) Validate() error { return nil } +// Outputs for getting a Branch Key's ACTIVE version. type GetActiveBranchKeyOutput struct { BranchKeyMaterials BranchKeyMaterials } +// Outputs for getting a Branch Key's ACTIVE version. func (input GetActiveBranchKeyOutput) Validate() error { if input.BranchKeyMaterials.Validate() != nil { return input.BranchKeyMaterials.Validate() @@ -169,19 +177,23 @@ func (input GetActiveBranchKeyOutput) Validate() error { return nil } +// Inputs for getting a Beacon Key type GetBeaconKeyInput struct { BranchKeyIdentifier string } +// Inputs for getting a Beacon Key func (input GetBeaconKeyInput) Validate() error { return nil } +// Outputs for getting a Beacon Key type GetBeaconKeyOutput struct { BeaconKeyMaterials BeaconKeyMaterials } +// Outputs for getting a Beacon Key func (input GetBeaconKeyOutput) Validate() error { if input.BeaconKeyMaterials.Validate() != nil { return input.BeaconKeyMaterials.Validate() @@ -190,21 +202,25 @@ func (input GetBeaconKeyOutput) Validate() error { return nil } +// Inputs for getting a version of a Branch Key. type GetBranchKeyVersionInput struct { BranchKeyIdentifier string BranchKeyVersion string } +// Inputs for getting a version of a Branch Key. func (input GetBranchKeyVersionInput) Validate() error { return nil } +// Outputs for getting a version of a Branch Key. type GetBranchKeyVersionOutput struct { BranchKeyMaterials BranchKeyMaterials } +// Outputs for getting a version of a Branch Key. func (input GetBranchKeyVersionOutput) Validate() error { if input.BranchKeyMaterials.Validate() != nil { return input.BranchKeyMaterials.Validate() @@ -228,6 +244,7 @@ func (input MRDiscovery) Validate() error { return nil } +// The configuration information for a Key Store. type GetKeyStoreInfoOutput struct { GrantTokens []string @@ -240,6 +257,7 @@ type GetKeyStoreInfoOutput struct { LogicalKeyStoreName string } +// The configuration information for a Key Store. func (input GetKeyStoreInfoOutput) Validate() error { if input.GrantTokens == nil { return fmt.Errorf("input.GrantTokens is required but has a nil value.") @@ -295,18 +313,22 @@ func (input GetKeyStoreInfoOutput) aws_cryptography_keyStore_GetKeyStoreInfoOutp return nil } +// Inputs for versioning a Branch Key. type VersionKeyInput struct { BranchKeyIdentifier string } +// Inputs for versioning a Branch Key. func (input VersionKeyInput) Validate() error { return nil } +// Outputs for versioning a Branch Key. type VersionKeyOutput struct { } +// Outputs for versioning a Branch Key. func (input VersionKeyOutput) Validate() error { return nil @@ -396,32 +418,38 @@ func (input KeyStoreConfig) aws_cryptography_keyStore_KeyStoreConfig_kmsConfigur return nil } -// KMSConfigurationMemberdiscovery -// KMSConfigurationMemberkmsKeyArn -// KMSConfigurationMemberkmsMRKeyArn -// KMSConfigurationMembermrDiscovery +// KMSConfigurationMemberdiscovery +// KMSConfigurationMemberkmsKeyArn +// KMSConfigurationMemberkmsMRKeyArn +// KMSConfigurationMembermrDiscovery +// +// Configures Key Store's KMS Key ARN restrictions. type KMSConfiguration interface { isKMSConfiguration() } +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMemberdiscovery struct { Value Discovery } func (*KMSConfigurationMemberdiscovery) isKMSConfiguration() {} +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMemberkmsKeyArn struct { Value string } func (*KMSConfigurationMemberkmsKeyArn) isKMSConfiguration() {} +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMemberkmsMRKeyArn struct { Value string } func (*KMSConfigurationMemberkmsMRKeyArn) isKMSConfiguration() {} +// Configures Key Store's KMS Key ARN restrictions. type KMSConfigurationMembermrDiscovery struct { Value MRDiscovery } diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go index 147df8a84..a61cc7bdc 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/enums.go @@ -4,13 +4,16 @@ package awscryptographymaterialproviderssmithygeneratedtypes type AesWrappingAlg string +// Supported AES wrapping algorithms. const ( AesWrappingAlgAlgAes128GcmIv12Tag16 AesWrappingAlg = "ALG_AES128_GCM_IV12_TAG16" AesWrappingAlgAlgAes192GcmIv12Tag16 AesWrappingAlg = "ALG_AES192_GCM_IV12_TAG16" AesWrappingAlgAlgAes256GcmIv12Tag16 AesWrappingAlg = "ALG_AES256_GCM_IV12_TAG16" ) +// Supported AES wrapping algorithms. func (AesWrappingAlg) Values() []AesWrappingAlg { + // Supported AES wrapping algorithms. return []AesWrappingAlg{ "ALG_AES128_GCM_IV12_TAG16", "ALG_AES192_GCM_IV12_TAG16", @@ -20,12 +23,15 @@ func (AesWrappingAlg) Values() []AesWrappingAlg { type DBEAlgorithmSuiteId string +// Supported DBE Algorithm Suite Ids. const ( DBEAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeySymsigHmacSha384 DBEAlgorithmSuiteId = "0x6700" DBEAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384 DBEAlgorithmSuiteId = "0x6701" ) +// Supported DBE Algorithm Suite Ids. func (DBEAlgorithmSuiteId) Values() []DBEAlgorithmSuiteId { + // Supported DBE Algorithm Suite Ids. return []DBEAlgorithmSuiteId{ "0x6700", "0x6701", @@ -34,6 +40,7 @@ func (DBEAlgorithmSuiteId) Values() []DBEAlgorithmSuiteId { type ESDKAlgorithmSuiteId string +// Supported ESDK Algorithm Suite Ids. const ( ESDKAlgorithmSuiteIdAlgAes128GcmIv12Tag16NoKdf ESDKAlgorithmSuiteId = "0x0014" ESDKAlgorithmSuiteIdAlgAes192GcmIv12Tag16NoKdf ESDKAlgorithmSuiteId = "0x0046" @@ -48,7 +55,9 @@ const ( ESDKAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeyEcdsaP384 ESDKAlgorithmSuiteId = "0x0578" ) +// Supported ESDK Algorithm Suite Ids. func (ESDKAlgorithmSuiteId) Values() []ESDKAlgorithmSuiteId { + // Supported ESDK Algorithm Suite Ids. return []ESDKAlgorithmSuiteId{ "0x0014", "0x0046", @@ -66,12 +75,21 @@ func (ESDKAlgorithmSuiteId) Values() []ESDKAlgorithmSuiteId { type TimeUnits string +// The time unit for gracePeriod, graceInterval, and inFlightTTL. +// The default is seconds. +// If this is set to milliseconds, then these values will be treated as milliseconds. const ( TimeUnitsSeconds TimeUnits = "Seconds" TimeUnitsMilliseconds TimeUnits = "Milliseconds" ) +// The time unit for gracePeriod, graceInterval, and inFlightTTL. +// The default is seconds. +// If this is set to milliseconds, then these values will be treated as milliseconds. func (TimeUnits) Values() []TimeUnits { + // The time unit for gracePeriod, graceInterval, and inFlightTTL. + // The default is seconds. + // If this is set to milliseconds, then these values will be treated as milliseconds. return []TimeUnits{ "Seconds", "Milliseconds", @@ -80,6 +98,7 @@ func (TimeUnits) Values() []TimeUnits { type PaddingScheme string +// Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes. const ( PaddingSchemePkcs1 PaddingScheme = "PKCS1" PaddingSchemeOaepSha1Mgf1 PaddingScheme = "OAEP_SHA1_MGF1" @@ -88,7 +107,9 @@ const ( PaddingSchemeOaepSha512Mgf1 PaddingScheme = "OAEP_SHA512_MGF1" ) +// Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes. func (PaddingScheme) Values() []PaddingScheme { + // Supported Padding Schemes. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes. return []PaddingScheme{ "PKCS1", "OAEP_SHA1_MGF1", @@ -100,11 +121,14 @@ func (PaddingScheme) Values() []PaddingScheme { type DBECommitmentPolicy string +// Supported DBE Commitment Policies. const ( DBECommitmentPolicyRequireEncryptRequireDecrypt DBECommitmentPolicy = "REQUIRE_ENCRYPT_REQUIRE_DECRYPT" ) +// Supported DBE Commitment Policies. func (DBECommitmentPolicy) Values() []DBECommitmentPolicy { + // Supported DBE Commitment Policies. return []DBECommitmentPolicy{ "REQUIRE_ENCRYPT_REQUIRE_DECRYPT", } @@ -112,13 +136,16 @@ func (DBECommitmentPolicy) Values() []DBECommitmentPolicy { type ESDKCommitmentPolicy string +// Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum. const ( ESDKCommitmentPolicyForbidEncryptAllowDecrypt ESDKCommitmentPolicy = "FORBID_ENCRYPT_ALLOW_DECRYPT" ESDKCommitmentPolicyRequireEncryptAllowDecrypt ESDKCommitmentPolicy = "REQUIRE_ENCRYPT_ALLOW_DECRYPT" ESDKCommitmentPolicyRequireEncryptRequireDecrypt ESDKCommitmentPolicy = "REQUIRE_ENCRYPT_REQUIRE_DECRYPT" ) +// Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum. func (ESDKCommitmentPolicy) Values() []ESDKCommitmentPolicy { + // Supported ESDK Commitment Policies. For more information, see: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/commitment-policy.md#supported-format-commitment-policy-enum. return []ESDKCommitmentPolicy{ "FORBID_ENCRYPT_ALLOW_DECRYPT", "REQUIRE_ENCRYPT_ALLOW_DECRYPT", diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go index cd2046f6d..3b81280c8 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes/types.go @@ -375,10 +375,12 @@ func (input AlgorithmSuiteInfo) aws_cryptography_materialProviders_AlgorithmSuit return nil } +// Inputs for getting a AWS KMS Client. type GetClientInput struct { Region string } +// Inputs for getting a AWS KMS Client. func (input GetClientInput) Validate() error { return nil @@ -401,12 +403,14 @@ func (input GetClientOutput) Validate() error { return nil } +// A filter which defines what AWS partition and AWS accounts a KMS Key may be in for a Keyring to be allowed to attempt to decrypt it. type DiscoveryFilter struct { AccountIds []string Partition string } +// A filter which defines what AWS partition and AWS accounts a KMS Key may be in for a Keyring to be allowed to attempt to decrypt it. func (input DiscoveryFilter) Validate() error { if input.AccountIds == nil { return fmt.Errorf("input.AccountIds is required but has a nil value.") @@ -415,6 +419,7 @@ func (input DiscoveryFilter) Validate() error { return nil } +// Inputs for for creating a AWS KMS Discovery Keyring. type CreateAwsKmsDiscoveryKeyringInput struct { KmsClient *kms.Client @@ -423,6 +428,7 @@ type CreateAwsKmsDiscoveryKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS Discovery Keyring. func (input CreateAwsKmsDiscoveryKeyringInput) Validate() error { if input.DiscoveryFilter != nil { if input.DiscoveryFilter.Validate() != nil { @@ -442,10 +448,12 @@ func (input KeyringReference) Validate() error { return nil } +// Outputs for creating a Keyring. type CreateKeyringOutput struct { Keyring IKeyring } +// Outputs for creating a Keyring. func (input CreateKeyringOutput) Validate() error { return nil @@ -459,6 +467,7 @@ func (input ClientSupplierReference) Validate() error { return nil } +// Inputs for for creating an AWS KMS Discovery Multi-Keyring. type CreateAwsKmsDiscoveryMultiKeyringInput struct { Regions []string @@ -469,6 +478,7 @@ type CreateAwsKmsDiscoveryMultiKeyringInput struct { GrantTokens []string } +// Inputs for for creating an AWS KMS Discovery Multi-Keyring. func (input CreateAwsKmsDiscoveryMultiKeyringInput) Validate() error { if input.Regions == nil { return fmt.Errorf("input.Regions is required but has a nil value.") @@ -483,6 +493,7 @@ func (input CreateAwsKmsDiscoveryMultiKeyringInput) Validate() error { return nil } +// Inputs for creating a KmsPrivateKeyToStaticPublicKey Configuration. type KmsPrivateKeyToStaticPublicKeyInput struct { RecipientPublicKey []byte @@ -491,20 +502,24 @@ type KmsPrivateKeyToStaticPublicKeyInput struct { SenderPublicKey []byte } +// Inputs for creating a KmsPrivateKeyToStaticPublicKey Configuration. func (input KmsPrivateKeyToStaticPublicKeyInput) Validate() error { return nil } +// Inputs for creating a KmsPublicKeyDiscovery Configuration. This is a DECRYPT ONLY configuration. type KmsPublicKeyDiscoveryInput struct { RecipientKmsIdentifier string } +// Inputs for creating a KmsPublicKeyDiscovery Configuration. This is a DECRYPT ONLY configuration. func (input KmsPublicKeyDiscoveryInput) Validate() error { return nil } +// Inputs for creating an AWS KMS ECDH Keyring. type CreateAwsKmsEcdhKeyringInput struct { CurveSpec awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec @@ -515,6 +530,7 @@ type CreateAwsKmsEcdhKeyringInput struct { GrantTokens []string } +// Inputs for creating an AWS KMS ECDH Keyring. func (input CreateAwsKmsEcdhKeyringInput) Validate() error { if input.KeyAgreementScheme == nil { return fmt.Errorf("input.KeyAgreementScheme is required but has a nil value.") @@ -555,10 +571,12 @@ func (input BranchKeyIdSupplierReference) Validate() error { return nil } +// The best choice for most situations. Probably a StormTrackingCache. type DefaultCache struct { EntryCapacity int32 } +// The best choice for most situations. Probably a StormTrackingCache. func (input DefaultCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -567,12 +585,14 @@ func (input DefaultCache) Validate() error { return nil } +// A cache that is safe for use in a multi threaded environment, but no extra functionality. type MultiThreadedCache struct { EntryCapacity int32 EntryPruningTailSize *int32 } +// A cache that is safe for use in a multi threaded environment, but no extra functionality. func (input MultiThreadedCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -586,9 +606,11 @@ func (input MultiThreadedCache) Validate() error { return nil } +// Nothing should ever be cached. type NoCache struct { } +// Nothing should ever be cached. func (input NoCache) Validate() error { return nil @@ -602,12 +624,14 @@ func (input CryptographicMaterialsCacheReference) Validate() error { return nil } +// A cache that is NOT safe for use in a multi threaded environment. type SingleThreadedCache struct { EntryCapacity int32 EntryPruningTailSize *int32 } +// A cache that is NOT safe for use in a multi threaded environment. func (input SingleThreadedCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -621,6 +645,8 @@ func (input SingleThreadedCache) Validate() error { return nil } +// A cache that is safe for use in a multi threaded environment, +// and tries to prevent redundant or overly parallel backend calls. type StormTrackingCache struct { EntryCapacity int32 @@ -639,6 +665,8 @@ type StormTrackingCache struct { TimeUnits *TimeUnits } +// A cache that is safe for use in a multi threaded environment, +// and tries to prevent redundant or overly parallel backend calls. func (input StormTrackingCache) Validate() error { if input.EntryCapacity < 1 { return fmt.Errorf("CountingNumber has a minimum of 1 but has the value of %d.", input.EntryCapacity) @@ -675,6 +703,7 @@ func (input KeyStoreReference) Validate() error { return nil } +// Inputs for creating a Hierarchical Keyring. type CreateAwsKmsHierarchicalKeyringInput struct { KeyStore *awscryptographykeystoresmithygenerated.Client @@ -689,6 +718,7 @@ type CreateAwsKmsHierarchicalKeyringInput struct { PartitionId *string } +// Inputs for creating a Hierarchical Keyring. func (input CreateAwsKmsHierarchicalKeyringInput) Validate() error { if input.TtlSeconds < 0 { return fmt.Errorf("PositiveLong has a minimum of 0 but has the value of %d.", input.TtlSeconds) @@ -734,6 +764,7 @@ func (input CreateAwsKmsHierarchicalKeyringInput) aws_cryptography_materialProvi return nil } +// Inputs for for creating a AWS KMS Keyring. type CreateAwsKmsKeyringInput struct { KmsClient *kms.Client @@ -742,11 +773,13 @@ type CreateAwsKmsKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS Keyring. func (input CreateAwsKmsKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS MRK Discovery Keyring. type CreateAwsKmsMrkDiscoveryKeyringInput struct { KmsClient *kms.Client @@ -757,6 +790,7 @@ type CreateAwsKmsMrkDiscoveryKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS MRK Discovery Keyring. func (input CreateAwsKmsMrkDiscoveryKeyringInput) Validate() error { if input.DiscoveryFilter != nil { if input.DiscoveryFilter.Validate() != nil { @@ -768,6 +802,7 @@ func (input CreateAwsKmsMrkDiscoveryKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS MRK Discovery Multi-Keyring. type CreateAwsKmsMrkDiscoveryMultiKeyringInput struct { Regions []string @@ -778,6 +813,7 @@ type CreateAwsKmsMrkDiscoveryMultiKeyringInput struct { GrantTokens []string } +// Inputs for for creating a AWS KMS MRK Discovery Multi-Keyring. func (input CreateAwsKmsMrkDiscoveryMultiKeyringInput) Validate() error { if input.Regions == nil { return fmt.Errorf("input.Regions is required but has a nil value.") @@ -792,6 +828,7 @@ func (input CreateAwsKmsMrkDiscoveryMultiKeyringInput) Validate() error { return nil } +// Inputs for for creating an AWS KMS MRK Keyring. type CreateAwsKmsMrkKeyringInput struct { KmsClient *kms.Client @@ -800,11 +837,13 @@ type CreateAwsKmsMrkKeyringInput struct { GrantTokens []string } +// Inputs for for creating an AWS KMS MRK Keyring. func (input CreateAwsKmsMrkKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS MRK Multi-Keyring. type CreateAwsKmsMrkMultiKeyringInput struct { ClientSupplier IClientSupplier @@ -815,11 +854,13 @@ type CreateAwsKmsMrkMultiKeyringInput struct { KmsKeyIds []string } +// Inputs for for creating a AWS KMS MRK Multi-Keyring. func (input CreateAwsKmsMrkMultiKeyringInput) Validate() error { return nil } +// Inputs for for creating a AWS KMS Multi-Keyring. type CreateAwsKmsMultiKeyringInput struct { ClientSupplier IClientSupplier @@ -830,11 +871,13 @@ type CreateAwsKmsMultiKeyringInput struct { KmsKeyIds []string } +// Inputs for for creating a AWS KMS Multi-Keyring. func (input CreateAwsKmsMultiKeyringInput) Validate() error { return nil } +// Inputs for creating a AWS KMS RSA Keyring. type CreateAwsKmsRsaKeyringInput struct { EncryptionAlgorithm kmstypes.EncryptionAlgorithmSpec @@ -847,6 +890,7 @@ type CreateAwsKmsRsaKeyringInput struct { PublicKey []byte } +// Inputs for creating a AWS KMS RSA Keyring. func (input CreateAwsKmsRsaKeyringInput) Validate() error { return nil @@ -935,30 +979,36 @@ func (input CryptographicMaterialsManagerReference) Validate() error { return nil } +// Outputs for creating a Default Cryptographic Materials Manager. type CreateCryptographicMaterialsManagerOutput struct { MaterialsManager ICryptographicMaterialsManager } +// Outputs for creating a Default Cryptographic Materials Manager. func (input CreateCryptographicMaterialsManagerOutput) Validate() error { return nil } +// Inputs for creating a Default Cryptographic Materials Manager. type CreateDefaultCryptographicMaterialsManagerInput struct { Keyring IKeyring } +// Inputs for creating a Default Cryptographic Materials Manager. func (input CreateDefaultCryptographicMaterialsManagerInput) Validate() error { return nil } +// Inputs for creating a Multi-Keyring. type CreateMultiKeyringInput struct { ChildKeyrings []IKeyring Generator IKeyring } +// Inputs for creating a Multi-Keyring. func (input CreateMultiKeyringInput) Validate() error { if input.ChildKeyrings == nil { return fmt.Errorf("input.ChildKeyrings is required but has a nil value.") @@ -967,6 +1017,7 @@ func (input CreateMultiKeyringInput) Validate() error { return nil } +// Inputs for creating a Raw AES Keyring. type CreateRawAesKeyringInput struct { KeyName string @@ -977,46 +1028,55 @@ type CreateRawAesKeyringInput struct { WrappingKey []byte } +// Inputs for creating a Raw AES Keyring. func (input CreateRawAesKeyringInput) Validate() error { return nil } +// Inputs for creating a EphemeralPrivateKeyToStaticPublicKey Configuration. type EphemeralPrivateKeyToStaticPublicKeyInput struct { RecipientPublicKey []byte } +// Inputs for creating a EphemeralPrivateKeyToStaticPublicKey Configuration. func (input EphemeralPrivateKeyToStaticPublicKeyInput) Validate() error { return nil } +// Inputs for creating a PublicKeyDiscovery Configuration. type PublicKeyDiscoveryInput struct { RecipientStaticPrivateKey []byte } +// Inputs for creating a PublicKeyDiscovery Configuration. func (input PublicKeyDiscoveryInput) Validate() error { return nil } +// Inputs for creating a RawPrivateKeyToStaticPublicKey Configuration. type RawPrivateKeyToStaticPublicKeyInput struct { RecipientPublicKey []byte SenderStaticPrivateKey []byte } +// Inputs for creating a RawPrivateKeyToStaticPublicKey Configuration. func (input RawPrivateKeyToStaticPublicKeyInput) Validate() error { return nil } +// Inputs for creating a raw ECDH Keyring. type CreateRawEcdhKeyringInput struct { CurveSpec awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec KeyAgreementScheme RawEcdhStaticConfigurations } +// Inputs for creating a raw ECDH Keyring. func (input CreateRawEcdhKeyringInput) Validate() error { if input.KeyAgreementScheme == nil { return fmt.Errorf("input.KeyAgreementScheme is required but has a nil value.") @@ -1053,6 +1113,7 @@ func (input CreateRawEcdhKeyringInput) aws_cryptography_materialProviders_Create return nil } +// Inputs for creating a Raw RAW Keyring. type CreateRawRsaKeyringInput struct { KeyName string @@ -1065,11 +1126,13 @@ type CreateRawRsaKeyringInput struct { PublicKey []byte } +// Inputs for creating a Raw RAW Keyring. func (input CreateRawRsaKeyringInput) Validate() error { return nil } +// Inputs for creating an Required Encryption Context Cryptographic Materials Manager. type CreateRequiredEncryptionContextCMMInput struct { RequiredEncryptionContextKeys []string @@ -1078,6 +1141,7 @@ type CreateRequiredEncryptionContextCMMInput struct { UnderlyingCMM ICryptographicMaterialsManager } +// Inputs for creating an Required Encryption Context Cryptographic Materials Manager. func (input CreateRequiredEncryptionContextCMMInput) Validate() error { if input.RequiredEncryptionContextKeys == nil { return fmt.Errorf("input.RequiredEncryptionContextKeys is required but has a nil value.") @@ -1099,10 +1163,12 @@ func (input CreateRequiredEncryptionContextCMMInput) aws_cryptography_materialPr return nil } +// Outputs for creating an Required Encryption Context Cryptographic Materials Manager. type CreateRequiredEncryptionContextCMMOutput struct { MaterialsManager ICryptographicMaterialsManager } +// Outputs for creating an Required Encryption Context Cryptographic Materials Manager. func (input CreateRequiredEncryptionContextCMMOutput) Validate() error { return nil @@ -1819,10 +1885,12 @@ func (input ValidEncryptionMaterialsTransitionInput) Validate() error { return nil } +// Inputs for determining the Branch Key which should be used to wrap or unwrap the data key for this encryption or decryption type GetBranchKeyIdInput struct { EncryptionContext map[string]string } +// Inputs for determining the Branch Key which should be used to wrap or unwrap the data key for this encryption or decryption func (input GetBranchKeyIdInput) Validate() error { if input.EncryptionContext == nil { return fmt.Errorf("input.EncryptionContext is required but has a nil value.") @@ -1847,10 +1915,12 @@ func (input GetBranchKeyIdInput) aws_cryptography_materialProviders_GetBranchKey return nil } +// Outputs for the Branch Key responsible for wrapping or unwrapping the data key in this encryption or decryption. type GetBranchKeyIdOutput struct { BranchKeyId string } +// Outputs for the Branch Key responsible for wrapping or unwrapping the data key in this encryption or decryption. func (input GetBranchKeyIdOutput) Validate() error { return nil @@ -2176,23 +2246,29 @@ type EncryptMemberAES_GCM struct { func (*EncryptMemberAES_GCM) isEncrypt() {} -// KeyAgreementSchemeMemberStaticConfiguration +// KeyAgreementSchemeMemberStaticConfiguration +// +// Supported ECDH Key Agreement Schemes. type KeyAgreementScheme interface { isKeyAgreementScheme() } +// Supported ECDH Key Agreement Schemes. type KeyAgreementSchemeMemberStaticConfiguration struct { Value StaticConfigurations } func (*KeyAgreementSchemeMemberStaticConfiguration) isKeyAgreementScheme() {} -// KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey -// KmsEcdhStaticConfigurationsMemberKmsPublicKeyDiscovery +// KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey +// KmsEcdhStaticConfigurationsMemberKmsPublicKeyDiscovery +// +// Allowed configurations when using KmsEcdhStaticConfigurations. type KmsEcdhStaticConfigurations interface { isKmsEcdhStaticConfigurations() } +// Allowed configurations when using KmsEcdhStaticConfigurations. type KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey struct { Value KmsPrivateKeyToStaticPublicKeyInput } @@ -2200,6 +2276,7 @@ type KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey struct { func (*KmsEcdhStaticConfigurationsMemberKmsPrivateKeyToStaticPublicKey) isKmsEcdhStaticConfigurations() { } +// Allowed configurations when using KmsEcdhStaticConfigurations. type KmsEcdhStaticConfigurationsMemberKmsPublicKeyDiscovery struct { Value KmsPublicKeyDiscoveryInput } @@ -2238,13 +2315,16 @@ type MaterialsMemberEncryption struct { func (*MaterialsMemberEncryption) isMaterials() {} -// RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey -// RawEcdhStaticConfigurationsMemberPublicKeyDiscovery -// RawEcdhStaticConfigurationsMemberRawPrivateKeyToStaticPublicKey +// RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey +// RawEcdhStaticConfigurationsMemberPublicKeyDiscovery +// RawEcdhStaticConfigurationsMemberRawPrivateKeyToStaticPublicKey +// +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurations interface { isRawEcdhStaticConfigurations() } +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey struct { Value EphemeralPrivateKeyToStaticPublicKeyInput } @@ -2252,12 +2332,14 @@ type RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey struc func (*RawEcdhStaticConfigurationsMemberEphemeralPrivateKeyToStaticPublicKey) isRawEcdhStaticConfigurations() { } +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurationsMemberPublicKeyDiscovery struct { Value PublicKeyDiscoveryInput } func (*RawEcdhStaticConfigurationsMemberPublicKeyDiscovery) isRawEcdhStaticConfigurations() {} +// List of configurations when using RawEcdhStaticConfigurations. type RawEcdhStaticConfigurationsMemberRawPrivateKeyToStaticPublicKey struct { Value RawPrivateKeyToStaticPublicKeyInput } @@ -2283,18 +2365,22 @@ type SignatureAlgorithmMemberNone struct { func (*SignatureAlgorithmMemberNone) isSignatureAlgorithm() {} -// StaticConfigurationsMemberAWS_KMS_ECDH -// StaticConfigurationsMemberRAW_ECDH +// StaticConfigurationsMemberAWS_KMS_ECDH +// StaticConfigurationsMemberRAW_ECDH +// +// Supported configurations for the StaticConfiguration Key Agreement Scheme. type StaticConfigurations interface { isStaticConfigurations() } +// Supported configurations for the StaticConfiguration Key Agreement Scheme. type StaticConfigurationsMemberAWS_KMS_ECDH struct { Value KmsEcdhStaticConfigurations } func (*StaticConfigurationsMemberAWS_KMS_ECDH) isStaticConfigurations() {} +// Supported configurations for the StaticConfiguration Key Agreement Scheme. type StaticConfigurationsMemberRAW_ECDH struct { Value RawEcdhStaticConfigurations } diff --git a/AwsCryptographyPrimitives/Model/digest.smithy b/AwsCryptographyPrimitives/Model/digest.smithy index 6d553974f..43e7e7769 100644 --- a/AwsCryptographyPrimitives/Model/digest.smithy +++ b/AwsCryptographyPrimitives/Model/digest.smithy @@ -1,5 +1,6 @@ namespace aws.cryptography.primitives +@documentation("Supported Digest Algorithms.") @enum([ { name: "SHA_512", diff --git a/AwsCryptographyPrimitives/Model/ecdh.smithy b/AwsCryptographyPrimitives/Model/ecdh.smithy index 47aebb684..56d4ca228 100644 --- a/AwsCryptographyPrimitives/Model/ecdh.smithy +++ b/AwsCryptographyPrimitives/Model/ecdh.smithy @@ -1,5 +1,6 @@ namespace aws.cryptography.primitives +@documentation("Supported ECDH Curve specifications.") @enum([ { name: "ECC_NIST_P256", diff --git a/AwsCryptographyPrimitives/Model/rsa.smithy b/AwsCryptographyPrimitives/Model/rsa.smithy index eede95792..3abc6dc95 100644 --- a/AwsCryptographyPrimitives/Model/rsa.smithy +++ b/AwsCryptographyPrimitives/Model/rsa.smithy @@ -1,5 +1,6 @@ namespace aws.cryptography.primitives +@documentation("Supported RSA Padding Modes.") @enum([ { name: "PKCS1", diff --git a/AwsCryptographyPrimitives/Model/signature.smithy b/AwsCryptographyPrimitives/Model/signature.smithy index f7e6e1461..02bfe7e56 100644 --- a/AwsCryptographyPrimitives/Model/signature.smithy +++ b/AwsCryptographyPrimitives/Model/signature.smithy @@ -1,5 +1,6 @@ namespace aws.cryptography.primitives +@documentation("Supported ECDSA Signature Algorithms.") @enum([ { name: "ECDSA_P384", diff --git a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go index 11a7802a1..90ab1d2de 100644 --- a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go +++ b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go @@ -4,6 +4,7 @@ package awscryptographyprimitivessmithygeneratedtypes type ECDHCurveSpec string +// Supported ECDH Curve specifications. const ( ECDHCurveSpecEccNistP256 ECDHCurveSpec = "ECC_NIST_P256" ECDHCurveSpecEccNistP384 ECDHCurveSpec = "ECC_NIST_P384" @@ -11,7 +12,9 @@ const ( ECDHCurveSpecSm2 ECDHCurveSpec = "SM2" ) +// Supported ECDH Curve specifications. func (ECDHCurveSpec) Values() []ECDHCurveSpec { + // Supported ECDH Curve specifications. return []ECDHCurveSpec{ "ECC_NIST_P256", "ECC_NIST_P384", @@ -22,13 +25,16 @@ func (ECDHCurveSpec) Values() []ECDHCurveSpec { type DigestAlgorithm string +// Supported Digest Algorithms. const ( DigestAlgorithmSha512 DigestAlgorithm = "SHA_512" DigestAlgorithmSha384 DigestAlgorithm = "SHA_384" DigestAlgorithmSha256 DigestAlgorithm = "SHA_256" ) +// Supported Digest Algorithms. func (DigestAlgorithm) Values() []DigestAlgorithm { + // Supported Digest Algorithms. return []DigestAlgorithm{ "SHA_512", "SHA_384", @@ -38,12 +44,15 @@ func (DigestAlgorithm) Values() []DigestAlgorithm { type ECDSASignatureAlgorithm string +// Supported ECDSA Signature Algorithms. const ( ECDSASignatureAlgorithmEcdsaP384 ECDSASignatureAlgorithm = "ECDSA_P384" ECDSASignatureAlgorithmEcdsaP256 ECDSASignatureAlgorithm = "ECDSA_P256" ) +// Supported ECDSA Signature Algorithms. func (ECDSASignatureAlgorithm) Values() []ECDSASignatureAlgorithm { + // Supported ECDSA Signature Algorithms. return []ECDSASignatureAlgorithm{ "ECDSA_P384", "ECDSA_P256", @@ -52,6 +61,7 @@ func (ECDSASignatureAlgorithm) Values() []ECDSASignatureAlgorithm { type RSAPaddingMode string +// Supported RSA Padding Modes. const ( RSAPaddingModePkcs1 RSAPaddingMode = "PKCS1" RSAPaddingModeOaepSha1 RSAPaddingMode = "OAEP_SHA1" @@ -60,7 +70,9 @@ const ( RSAPaddingModeOaepSha512 RSAPaddingMode = "OAEP_SHA512" ) +// Supported RSA Padding Modes. func (RSAPaddingMode) Values() []RSAPaddingMode { + // Supported RSA Padding Modes. return []RSAPaddingMode{ "PKCS1", "OAEP_SHA1", diff --git a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go index 11a7802a1..90ab1d2de 100644 --- a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go +++ b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygeneratedtypes/enums.go @@ -4,6 +4,7 @@ package awscryptographyprimitivessmithygeneratedtypes type ECDHCurveSpec string +// Supported ECDH Curve specifications. const ( ECDHCurveSpecEccNistP256 ECDHCurveSpec = "ECC_NIST_P256" ECDHCurveSpecEccNistP384 ECDHCurveSpec = "ECC_NIST_P384" @@ -11,7 +12,9 @@ const ( ECDHCurveSpecSm2 ECDHCurveSpec = "SM2" ) +// Supported ECDH Curve specifications. func (ECDHCurveSpec) Values() []ECDHCurveSpec { + // Supported ECDH Curve specifications. return []ECDHCurveSpec{ "ECC_NIST_P256", "ECC_NIST_P384", @@ -22,13 +25,16 @@ func (ECDHCurveSpec) Values() []ECDHCurveSpec { type DigestAlgorithm string +// Supported Digest Algorithms. const ( DigestAlgorithmSha512 DigestAlgorithm = "SHA_512" DigestAlgorithmSha384 DigestAlgorithm = "SHA_384" DigestAlgorithmSha256 DigestAlgorithm = "SHA_256" ) +// Supported Digest Algorithms. func (DigestAlgorithm) Values() []DigestAlgorithm { + // Supported Digest Algorithms. return []DigestAlgorithm{ "SHA_512", "SHA_384", @@ -38,12 +44,15 @@ func (DigestAlgorithm) Values() []DigestAlgorithm { type ECDSASignatureAlgorithm string +// Supported ECDSA Signature Algorithms. const ( ECDSASignatureAlgorithmEcdsaP384 ECDSASignatureAlgorithm = "ECDSA_P384" ECDSASignatureAlgorithmEcdsaP256 ECDSASignatureAlgorithm = "ECDSA_P256" ) +// Supported ECDSA Signature Algorithms. func (ECDSASignatureAlgorithm) Values() []ECDSASignatureAlgorithm { + // Supported ECDSA Signature Algorithms. return []ECDSASignatureAlgorithm{ "ECDSA_P384", "ECDSA_P256", @@ -52,6 +61,7 @@ func (ECDSASignatureAlgorithm) Values() []ECDSASignatureAlgorithm { type RSAPaddingMode string +// Supported RSA Padding Modes. const ( RSAPaddingModePkcs1 RSAPaddingMode = "PKCS1" RSAPaddingModeOaepSha1 RSAPaddingMode = "OAEP_SHA1" @@ -60,7 +70,9 @@ const ( RSAPaddingModeOaepSha512 RSAPaddingMode = "OAEP_SHA512" ) +// Supported RSA Padding Modes. func (RSAPaddingMode) Values() []RSAPaddingMode { + // Supported RSA Padding Modes. return []RSAPaddingMode{ "PKCS1", "OAEP_SHA1", diff --git a/smithy-dafny b/smithy-dafny index 5fb3f25ea..27cfbb30a 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit 5fb3f25ea3444c51b2ad30b25ab03964cf866cd1 +Subproject commit 27cfbb30a6d66545f469a569596e3672cf31e7a2