|
| 1 | +# HashLib Test Data |
| 2 | + |
| 3 | +External test vectors for HashLib4Pascal unit tests. |
| 4 | + |
| 5 | +Cryptographic test corpora — especially multi-megabyte BLAKE2 known-answer JSON and |
| 6 | +extensible KDF CSV tables — are kept here as data files rather than embedded in Pascal |
| 7 | +source. Vector sets will continue to grow as more algorithms and standards land; keeping |
| 8 | +them outside the codebase keeps the library and test sources readable, avoids bloating |
| 9 | +builds with megabytes of string literals, and lets fixtures be updated or extended |
| 10 | +without recompiling test code. |
| 11 | + |
| 12 | +This folder holds the files the test suite loads at runtime (JSON KAT corpora, CSV test |
| 13 | +vectors, and related fixtures). Layout and formats are documented below. |
| 14 | + |
| 15 | +## Layout |
| 16 | + |
| 17 | +All folders and files use **PascalCase** names. |
| 18 | + |
| 19 | +``` |
| 20 | +Data/ |
| 21 | +└── Crypto/ Algorithm vectors (JSON, CSV) |
| 22 | +``` |
| 23 | + |
| 24 | +### `Crypto/` subfolders |
| 25 | + |
| 26 | +| Folder | Contents | |
| 27 | +|--------|----------| |
| 28 | +| `Blake2`, `Blake3` | Hash KAT JSON vectors | |
| 29 | +| `Scrypt`, `Argon2`, `Pbkdf2` | Password-based KDF vectors | |
| 30 | + |
| 31 | +## Vector formats |
| 32 | + |
| 33 | +### Hash |
| 34 | + |
| 35 | +| Path | Format | |
| 36 | +|------|--------| |
| 37 | +| `Crypto/Blake2/blake2-kat.json` | BLAKE2 KAT JSON: `[{hash,in,key,out},…]` | |
| 38 | +| `Crypto/Blake3/test_vectors.json` | BLAKE3 test vectors: `{"cases":[{input_len,hash,keyed_hash,derive_key},…]}` | |
| 39 | + |
| 40 | +### KDF, digest, and MAC |
| 41 | + |
| 42 | +| Path | Format | |
| 43 | +|------|--------| |
| 44 | +| `Crypto/Scrypt/TestVectors.csv` | RFC 7914: `Enabled,Password,Salt,Cost,BlockSize,Parallelism,OutputLenBytes,ExpectedHex` | |
| 45 | +| `Crypto/Argon2/TestVectors.csv` | Argon2 test vectors | |
| 46 | +| `Crypto/Pbkdf2/TestVectors.csv` | RFC 6070-style: `Algorithm,PasswordHex,SaltHex,Iterations,OutputLenBytes,ExpectedHex` | |
0 commit comments