Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: seebees <ryanemer@amazon.com>
Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com>
Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com>
Co-authored-by: J Plasmeier <76071473+justplaz@users.noreply.github.com>
  • Loading branch information
5 people committed Jun 21, 2024
1 parent c12845f commit 51c24ab
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
6 changes: 3 additions & 3 deletions framework/test-vectors/complete-vectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

## Summary

For each type of key or cmm description,
For each type of keyring or cmm description,
there is a file that describes how this component is tested.
This simplifies reasoning about each component.
To find out how the DefaultCMM is tested
For example, to find out how the DefaultCMM is tested,
look at the default-cmm.md file
that describes how this component is tested
and the various features that can be reasoned about.
Expand All @@ -18,7 +18,7 @@ Unless otherwise specified, all "Basic Tests" MUST use a `DefaultCMM`

## Motivation

By keeping every component separate is is easier to find
By keeping every component separate it is easier to find
and reason about the completeness of testing.
This also allows top level clients like the ESDK or DBESDK to
reuse the key or cmm description to avoid reinventing the wheel.
4 changes: 2 additions & 2 deletions framework/test-vectors/complete-vectors/default-cmm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For example, `{ a: a, b: b }` produces the complete set of keys subsets: `{ {},
For every `requiredEncryptionContextKeys` produced above
`reproducedEncryptionContext` MUST be attempted
for every subset of the encryption context
who's keys fully intersect with the `requiredEncryptionContextKeys`.
where the `requiredEncryptionContextKeys` is a subset of the attempted subset.

For example:

Expand All @@ -50,7 +50,7 @@ For a given [encryption context](../../structures.md#encryption-context),
every subset of the keys for this encryption context
MUST be attempted as the `requiredEncryptionContextKeys`.
The keys of the encryption context attempted however
MUST NOT fully intersect with the `requiredEncryptionContextKeys`.
where the `requiredEncryptionContextKeys` MUST NOT be a subset of the attempted subset.

For example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ For example, `{ a: a, b: b }` produces the complete set of keys subsets: `{ {},
For every `requiredEncryptionContextKeys` produced above
`reproducedEncryptionContext` MUST be attempted
for every subset of the encryption context
who's keys fully intersect with the `requiredEncryptionContextKeys`.
whose keys fully intersect with the `requiredEncryptionContextKeys`.

For example:

Expand Down
14 changes: 5 additions & 9 deletions framework/test-vectors/decryption-manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,30 @@ This type of manifest describes test vectors to create.
Processing these test scenarios will result in [encryption materials](../structures.md#encryption-materials).

Each test scenario includes all necessary instructions to construct
an [encryption materials request](../cmm-interface.md#encryption-materials-request).
a [decryption materials request](../cmm-interface.md#decryption-materials-request).
This includes all necessary inputs including algorithm suite, encryption context, and keyrings/CMMs.

## Reference-level Explanation

### manifest
### Manifest

Map identifying the manifest.

- `type` : Identifies the manifest as an AWS Encryption SDK message encryption manifest.
- Must be `aws-mpl-encrypt`
- MUST be `aws-mpl-encrypt`
- `version` : Identifies the version of this feature document that describes the manifest.

#### keys
#### Keys

URI identifying a [keys manifest](./keys-manifest.md) to use with all tests.

### tests
### Tests

Map object mapping a test case ID to a test case description
that describes how to generate an [encryption materials request](../cmm-interface.md#encryption-materials-request).
Optional members on [encryption materials request](../cmm-interface.md#encryption-materials-request)
are optional in the test.

Map object mapping a test case ID to a test case description
that describes how to generate an [encryption materials request](../cmm-interface.md#encryption-materials-request).
Optional members on [encryption materials request](../cmm-interface.md#encryption-materials-request)
are optional in the test.

- type : The type of test
- Allowed Values
Expand Down
6 changes: 3 additions & 3 deletions framework/test-vectors/encryption-manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ by demonstrating that different configurations succeed or fail correctly.
## Guide-level Explanation

This type of manifest describes test vectors to create.
Processing these test scenarios will result in [decryption materials](../structures.md#decryption-materials).
Processing these test scenarios will result in [encryption materials](../structures.md#encryption-materials).

Each test scenario includes all necessary instructions to construct
an [decryption materials request](../cmm-interface.md#decrypt-materials-request).
an [encryption materials request](../cmm-interface.md#encryption-materials-request).
This includes all necessary inputs including algorithm suite, encryption context, and keyrings/CMMs.

## Reference-level Explanation
Expand All @@ -50,7 +50,7 @@ This includes all necessary inputs including algorithm suite, encryption context
Map identifying the manifest.

- `type` : Identifies the manifest as an AWS Encryption SDK message encryption manifest.
- Must be `aws-mpl-decrypt`
- Must be `aws-mpl-encrypt`
- `version` : Identifies the version of this feature document that describes the manifest.

#### keys
Expand Down
4 changes: 2 additions & 2 deletions framework/test-vectors/key-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ This serves as a reference of all features that this feature depends on.

The Key Description structure defines a standard way of describing
keyring configuration as part of a manifest.
The AwsCryptographicMaterialProvidersLibrary describes a common way
to configured key distribution.
The MPL describes a common way
to configure key distribution.
These key descriptions explain how to instantiate the required [keyring](../keyring-interface.md)
or [cmm](../cmm-interface.md).

Expand Down

0 comments on commit 51c24ab

Please sign in to comment.