A test vector pairs a predefined cryptographic input with its expected output. Feeding these matching pairs to an implementation checks whether it behaves correctly. section 16.2
Use test vectors to:
- Validate an implementation against the behavior specified by a cryptographic standard. section 16.2
- Expose tricky bugs in widely used algorithms and implementations. section 16.3
- Reduce the chance of mistakes when implementing a primitive or protocol, though vectors cannot replace careful design or a good library. section 16.2 section 16.3
Wycheproof catches edge cases
Google’s Wycheproof provides suites of test vectors for algorithms such as ECDSA and AES-GCM. Running an implementation against these inputs and expected results can reveal subtle bugs. section 16.3
