C2SP / C2SP/wycheproof

Pick a strategy for accumulated or "compressed" vectors

Open
#134 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3.1k
Forks
333
Avg merge
8d 19h
Merged PRs (30d)
1

Description

Some vectors are too large to put in JSON, but sometimes there are strategies to still define them.

One example is accumulated (or Monte Carlo) vectors, where you perform a bunch of operations on inputs derived from a deterministic source (like SHAKE) and hash the outputs, and check you get the right result at the end. https://words.filippo.io/accumulated/

A similar technique is "compressing" vectors that test particularly large inputs and/or outputs, by instead specifying how to generate the input and/or the hash of the output. (The difference from the previous case being that this is for a single large invocation, instead of a sequence of many invocations.) https://github.com/golang/go/blob/24b395119/src/crypto/sha3/sha3_test.go#L374-L383

Finally, one can massage vectors to have repeating patterns that compress well with regular compression algorithms. https://github.com/C2SP/CCTV/commit/9a140526866400baf22bd4d61441b2284f8424e2

We should decide if we want these tests in Wycheproof, and if so how to represent them and specify them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.