In addition to the policy of keeping any code path in PyNaCl covered by unit tests, the output from cryptographic primitives and constructions must be verified as being conformant to the reference implementations or standards.
Imported reference vectors¶
Wherever possible it is the PyNaCl project’s policy to use existing reference vectors for primitives or constructions. These vectors should ideally be in their original format, but it is acceptable to make minimal changes to ease parsing at our discretion.
The reference vector for testing the
implementation come from libsodium’s
test/default/box2.c and the corresponding expected outputs
Custom generated reference vectors¶
In cases where there are no standardized test vectors, or the available ones are not applicable to libsodium’s implementation, test vectors are custom generated.