Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more test vectors #959

Merged
merged 9 commits into from
Apr 25, 2024
Merged

feat: more test vectors #959

merged 9 commits into from
Apr 25, 2024

Conversation

ajewellamz
Copy link
Contributor

Description of changes:

Add test vectors to cover all permutations of encrypt and decrypt configurations.

Fix bug found decrypting V2 items with V1 Config and vice versa.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ajewellamz ajewellamz requested a review from a team as a code owner April 25, 2024 20:03
ajewellamz and others added 4 commits April 25, 2024 17:38
…aphyDbEncryptionSdkDynamoDbItemEncryptorOperations.dfy

Co-authored-by: José Corella <39066999+josecorella@users.noreply.github.com>
…aphyDbEncryptionSdkDynamoDbItemEncryptorOperations.dfy

Co-authored-by: José Corella <39066999+josecorella@users.noreply.github.com>
Co-authored-by: José Corella <39066999+josecorella@users.noreply.github.com>
Comment on lines +93 to +94
var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_33a.json");
var _ :- expect DecryptManifest.Decrypt("decrypt_java_33a.json");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are we keeping track the difference between 32, 33, and 33a?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32 was generated with 3.2
33 was generated with 3.3
33a was also generated with 3.3, but has new extra stuff in it.

When we near the end of 3.4, we'll make _34

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some words to the README.md to this effect

}

// make a test for every valid combination of Crypto Actions
method MakeConfigTests() returns (output : seq<(string, JSON)>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a WIP ESDK spec PR on a framework for enumerating test vectors: https://github.com/awslabs/aws-encryption-sdk-specification/pull/266/files

It would be cool to write a spec for DBESDK test vector enumeration at some point.

ajewellamz and others added 3 commits April 25, 2024 17:59
Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com>
Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com>
@ajewellamz ajewellamz merged commit 3ca15af into main Apr 25, 2024
30 checks passed
@ajewellamz ajewellamz deleted the ajewell/test-vectors branch April 25, 2024 23:35
josecorella pushed a commit that referenced this pull request Apr 30, 2024
## [3.4.0](v3.3.0...v3.4.0) (2024-04-30)

### Features

* enforce Dafny formatting ([#865](#865)) ([dfc0dbd](dfc0dbd))
* more test vectors ([#959](#959)) ([3ca15af](3ca15af))

### Maintenance

* add verify test for test vectors ([#897](#897)) ([6c980e7](6c980e7))
* Adopt SmithyDafnyMakefile.mk, progress towards fixing nightly build ([#797](#797)) ([785481c](785481c)), closes [/github.com//pull/797/files#diff-692e2b06d124c9775e2fcd9cd9dbd10e0c8ea470e08174ed0b258b0301622581R182](https://github.com/aws//github.com/aws/aws-database-encryption-sdk-dynamodb/pull/797/files/issues/diff-692e2b06d124c9775e2fcd9cd9dbd10e0c8ea470e08174ed0b258b0301622581R182)
* **CI/CD:** add semantic release automation ([#949](#949)) ([3f22abc](3f22abc))
* **deps:** bump actions/setup-dotnet from 3 to 4 in /.github/workflows ([#943](#943)) ([f5d9748](f5d9748))
* **deps:** bump aws-actions/configure-aws-credentials ([#954](#954)) ([90d7d78](90d7d78))
* **deps:** bump io.github.gradle-nexus.publish-plugin ([#903](#903)) ([04c6cc4](04c6cc4))
* **deps:** bump org.projectlombok:lombok ([#838](#838)) ([56f1cd1](56f1cd1))
* **deps:** bump rrainn/dynamodb-action in /.github/workflows ([#932](#932)) ([16e4d7b](16e4d7b))
* **docs:** mention sign_and_include in javadoc for keyid supplier ([#966](#966)) ([2796693](2796693))
* point to the correct readme ([#845](#845)) ([b950b4a](b950b4a))
* repair json file names ([#846](#846)) ([3ca955a](3ca955a))
* test "dotnet pack" in CI ([#851](#851)) ([75e44d0](75e44d0))
* **test:** add tests for attribute names that seem structured ([#964](#964)) ([c4c0886](c4c0886))
* Update MPL to 1.3.0 ([#972](#972)) ([3d8acae](3d8acae))
josecorella added a commit that referenced this pull request May 1, 2024
* chore(release): 3.4.0 [skip ci]

## [3.4.0](v3.3.0...v3.4.0) (2024-04-30)

### Notes
#### .NET
- [#797](#797) ([785481c](785481c)) Enforces User input Constraints at Type Conversion.

Prior to this fix, unset Integers defaulted to `0`, and unset Booleans defaulted to `false`.

Now, all required fields MUST be set or a Runtime Exception will be thrown.

This particularly effects Searchable Encryption's 
`ConstructorPart`, who's required field previously
would have defaulted to false.
Any configuration ever created for Searchable Encryption can be re-created with the fix, but they may look different.

### Features

*  **feat(.NET):** Validate user input #797 (785481c)


### Maintenance

* **format:** enforce Dafny formatting ([#865](#865)) ([dfc0dbd](dfc0dbd))
* **test:** more test vectors ([#959](#959)) ([3ca15af](3ca15af))
* **CI** add verify test for test vectors ([#897](#897)) ([6c980e7](6c980e7))
* **CI/CD:** add semantic release automation ([#949](#949)) ([3f22abc](3f22abc))
* **deps:** bump actions/setup-dotnet from 3 to 4 in /.github/workflows ([#943](#943)) ([f5d9748](f5d9748))
* **deps:** bump aws-actions/configure-aws-credentials ([#954](#954)) ([90d7d78](90d7d78))
* **deps(Java):** bump io.github.gradle-nexus.publish-plugin ([#903](#903)) ([04c6cc4](04c6cc4))
* **deps(Java):** bump org.projectlombok:lombok ([#838](#838)) ([56f1cd1](56f1cd1))
* **deps:** bump rrainn/dynamodb-action in /.github/workflows ([#932](#932)) ([16e4d7b](16e4d7b))
* **docs:** mention sign_and_include in javadoc for keyid supplier ([#966](#966)) ([2796693](2796693))
* **docs:** point to the correct readme ([#845](#845)) ([b950b4a](b950b4a))
* **fix:** repair json file names ([#846](#846)) ([3ca955a](3ca955a))
* **test(.NET):** "dotnet pack" in CI ([#851](#851)) ([75e44d0](75e44d0))
* **test:** add tests for attribute names that seem structured ([#964](#964)) ([c4c0886](c4c0886))
* **deps(Java & .NET):** Update MPL to 1.3.0 ([#972](#972)) ([3d8acae](3d8acae))

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants