-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MPL): Add Raw ECDH and AWS KMS ECDH Keyrings (#419)
Co-authored-by: Andrew Jewell <[email protected]> Co-authored-by: Lucas McDonald <[email protected]> Co-authored-by: seebees <[email protected]>
- Loading branch information
1 parent
c5b961b
commit 0946a7e
Showing
165 changed files
with
25,249 additions
and
659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[submodule "libraries"] | ||
path = libraries | ||
url = https://github.com/dafny-lang/libraries.git | ||
[submodule "aws-encryption-sdk-specification"] | ||
path = aws-encryption-sdk-specification | ||
url = https://github.com/awslabs/aws-encryption-sdk-specification.git | ||
[submodule "smithy-dafny"] | ||
path = smithy-dafny | ||
url = https://[email protected]/smithy-lang/smithy-dafny.git | ||
[submodule "aws-encryption-sdk-specification"] | ||
path = aws-encryption-sdk-specification | ||
url = [email protected]:awslabs/aws-encryption-sdk-specification.git |
269 changes: 227 additions & 42 deletions
269
...s/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy
Large diffs are not rendered by default.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
...terialProviders/dafny/AwsCryptographicMaterialProviders/Model/key-agreement-scheme.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
namespace aws.cryptography.materialProviders | ||
|
||
use aws.polymorph#javadoc | ||
|
||
// Key Agreement Schemes | ||
@javadoc("Supported ECDH Key Agreement Schemes.") | ||
union KeyAgreementScheme { | ||
StaticConfiguration: StaticConfigurations | ||
} | ||
|
||
@javadoc("Supported configurations for the StaticConfiguration Key Agreement Scheme.") | ||
union StaticConfigurations { | ||
AWS_KMS_ECDH: KmsEcdhStaticConfigurations, | ||
RAW_ECDH: RawEcdhStaticConfigurations | ||
} | ||
|
||
@javadoc("Allowed configurations when using KmsEcdhStaticConfigurations.") | ||
union KmsEcdhStaticConfigurations { | ||
KmsPublicKeyDiscovery: KmsPublicKeyDiscoveryInput, | ||
KmsPrivateKeyToStaticPublicKey: KmsPrivateKeyToStaticPublicKeyInput, | ||
} | ||
|
||
@javadoc("List of configurations when using RawEcdhStaticConfigurations.") | ||
union RawEcdhStaticConfigurations { | ||
PublicKeyDiscovery: PublicKeyDiscoveryInput, | ||
RawPrivateKeyToStaticPublicKey: RawPrivateKeyToStaticPublicKeyInput, | ||
EphemeralPrivateKeyToStaticPublicKey: EphemeralPrivateKeyToStaticPublicKeyInput | ||
} | ||
|
||
|
||
@javadoc("Inputs for creating a KmsPublicKeyDiscovery Configuration. This is a DECRYPT ONLY configuration.") | ||
structure KmsPublicKeyDiscoveryInput { | ||
@required | ||
@javadoc("AWS KMS key identifier belonging to the recipient.") | ||
recipientKmsIdentifier: KmsKeyId | ||
} | ||
|
||
@javadoc("Inputs for creating a KmsPrivateKeyToStaticPublicKey Configuration.") | ||
structure KmsPrivateKeyToStaticPublicKeyInput { | ||
@required | ||
@javadoc("AWS KMS Key Identifier belonging to the sender.") | ||
senderKmsIdentifier: KmsKeyId, | ||
@javadoc("Sender Public Key. This is the raw public ECC key in DER format that belongs to the senderKmsIdentifier.") | ||
senderPublicKey: Blob, | ||
@required | ||
@javadoc("Recipient Public Key. This MUST be a raw public ECC key in DER format.") | ||
recipientPublicKey: Blob, | ||
} | ||
|
||
@javadoc("Inputs for creating a EphemeralPrivateKeyToStaticPublicKey Configuration.") | ||
structure EphemeralPrivateKeyToStaticPublicKeyInput { | ||
@required | ||
@javadoc("The recipient's public key. MUST be DER encoded.") | ||
recipientPublicKey: Blob, | ||
} | ||
|
||
@javadoc("Inputs for creating a PublicKeyDiscovery Configuration.") | ||
structure PublicKeyDiscoveryInput { | ||
@required | ||
@javadoc("The sender's private key. MUST be PEM encoded.") | ||
recipientStaticPrivateKey: Blob, | ||
} | ||
|
||
@javadoc("Inputs for creating a RawPrivateKeyToStaticPublicKey Configuration.") | ||
structure RawPrivateKeyToStaticPublicKeyInput { | ||
@required | ||
@javadoc("The sender's private key. MUST be PEM encoded.") | ||
senderStaticPrivateKey: Blob, | ||
@required | ||
@javadoc("The recipient's public key. MUST be DER encoded.") | ||
recipientPublicKey: Blob, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.