Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions TestVectorsAwsCryptographicMaterialProviders/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,23 @@ test_decrypt_encrypt_vectors_rust:

test_decrypt_encrypt_vectors_go:
go -C runtimes/go/ImplementationFromDafny-go run ImplementationFromDafny.go decrypt --manifest-path=..

# Fuzz Testing Command

#TODO-Fuzztesting: remove echo statement to eliminate noise when testing on large test-vector suite
# Usage: make test_fuzz_interop ENCRYPT_LANG= DECRYPT_LANG=
test_fuzz_interop:
Copy link
Member

Choose a reason for hiding this comment

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

Interop test does not need this why do we need this for interoperability for fuzzed test?

Copy link
Member

Choose a reason for hiding this comment

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

This is blocking because we will be have to maintain two different process where we can have just one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The name might be misleading, but essentially I need the setup and runtime implementations that are done in interop to run cross-runtime testing.

Copy link
Member

@rishav-karanjit rishav-karanjit Jul 29, 2025

Choose a reason for hiding this comment

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

With this command, its hard to re-use the existing CI workflow.

Copy link
Member

Choose a reason for hiding this comment

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

Interop does generate with dafny code, encrypt and decrypt
Fuzz test does generate with code you wrote, encrypt and decrypt

But, Interop does not have make command like this but fuzz test does. So, either we need to have this makefile command and change how interop test works or change this to what interop test does unless introducing a new process has a reason.

@echo "Testing interoperability from $(ENCRYPT_LANG) to $(DECRYPT_LANG)"

cd dafny/TestVectorsAwsCryptographicMaterialProviders/test && python3 fuzz_generator.py --num-vectors 10000

cp dafny/TestVectorsAwsCryptographicMaterialProviders/test/manifest.json runtimes/$(ENCRYPT_LANG)/
cp dafny/TestVectorsAwsCryptographicMaterialProviders/test/keys.json runtimes/$(ENCRYPT_LANG)/
$(MAKE) test_encrypt_vectors_$(ENCRYPT_LANG)

@if [ "$(ENCRYPT_LANG)" != "$(DECRYPT_LANG)" ]; then \
cp runtimes/$(ENCRYPT_LANG)/manifest.json runtimes/$(DECRYPT_LANG)/; \
cp runtimes/$(ENCRYPT_LANG)/keys.json runtimes/$(DECRYPT_LANG)/; \
fi

$(MAKE) test_decrypt_encrypt_vectors_$(DECRYPT_LANG)
Loading