Freeze the Go implementation as a test-only oracle, with vectors

oracle/go is the Go code at 4c1507c, moved unchanged, plus test-only
generators that record what it computes. tests/vectors holds the
deterministic crypto/store vectors and synthetic fixtures they produce.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andy Dixon
2026-10-08 09:55:17 +01:00
co-authored by Claude
parent 4c1507c463
commit 69f4b90777
60 changed files with 4843 additions and 0 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
-----BEGIN VAULT KEY-----
VkFVTFRLRVkxAAAAAwABAAAE7NkqKMY7sbZZjHitika7SuJ2Nn8IXjsNrc05bRD3
/5n6gg09m6shM9w4JZCrZ84P9QdttuuLaTotx4TIi6ALwRpuQ1GETVN8aC2cPUlQ
eAZjKThQyzilIkqfNWBEk6O1SWHiH4RM7wvmXM2HraTzWiKrLC0hc8Fhcdwv/eDR
kM6uh6iAmk74hWC8PIWuSscS5aW7Vl2OAyKr7vISRH611vXXsSwAAcEAPcoMeKgD
YQcl9EJX
-----END VAULT KEY-----
+7
View File
@@ -0,0 +1,7 @@
-----BEGIN VAULT KEY-----
VkFVTFRLRVkxAAAAAwABAAAEgOQrPuXO8L/uhqn/gPncOQDW1UGohTv1BUEG37eX
g/wZRVl2Nptu6xbqAhL1xgLstttod4sT5iNfFxvYsZnSQLsCMjaNwO5/a8rn8fOw
QhRKx38573ADf3kA8Hv9qiykMgEAa3Ml9Qz6vlqB5gRWuK4meXSpEuxdz7XcpxIn
lOo0jYKzagOhNM40jTBkiQmJvvYJIWt48Ckl/goDk+GQRY1SWFRW0ioQF89dHK7D
XlBfBz9o
-----END VAULT KEY-----
+1
View File
@@ -0,0 +1 @@
VAULT 2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+291
View File
@@ -0,0 +1,291 @@
{
"argon2id": [
{
"key": "ad4a178e6b0786a48f9bb3443df83f76b822c6fdac15a80277483fd84551ac52",
"passphrase_hex": "",
"salt": "000102030405060708090a0b0c0d0e0f"
},
{
"key": "31d553d292080fe042ee1a2d65b3673aedaa45cc63611410a866805455452d2c",
"passphrase_hex": "61",
"salt": "101112131415161718191a1b1c1d1e1f"
},
{
"key": "537025a925815556ec88beffea074f810f5a28b6c5f5ccea0077f2819e8b3fb8",
"passphrase_hex": "636f727265637420686f727365",
"salt": "202122232425262728292a2b2c2d2e2f"
},
{
"key": "24d4e3608a444089a6f78ef8b07946879e570652b8387414895e0ad55ae68fb2",
"passphrase_hex": "70c3a4737377c3b6726420c3bc",
"salt": "303132333435363738393a3b3c3d3e3f"
},
{
"key": "bccc0063f95f2003f01532a75ae0feff25bdce4d940b904753d3b0326563a944",
"passphrase_hex": "780079",
"salt": "404142434445464748494a4b4c4d4e4f"
}
],
"durations": {
"": null,
"+5m": {
"ns": 300000000000,
"string": "5m0s"
},
"-5m": {
"ns": -300000000000,
"string": "-5m0s"
},
".5s": {
"ns": 500000000,
"string": "500ms"
},
"0": {
"ns": 0,
"string": "0s"
},
"1.5h": {
"ns": 5400000000000,
"string": "1h30m0s"
},
"1d": null,
"1h": {
"ns": 3600000000000,
"string": "1h0m0s"
},
"1h30m": {
"ns": 5400000000000,
"string": "1h30m0s"
},
"1ns": {
"ns": 1,
"string": "1ns"
},
"1us": {
"ns": 1000,
"string": "1µs"
},
"1µs": {
"ns": 1000,
"string": "1µs"
},
"2h45m30.5s": {
"ns": 9930500000000,
"string": "2h45m30.5s"
},
"300ms": {
"ns": 300000000,
"string": "300ms"
},
"5": null,
"5.s": {
"ns": 5000000000,
"string": "5s"
},
"5m": {
"ns": 300000000000,
"string": "5m0s"
},
"90s": {
"ns": 90000000000,
"string": "1m30s"
},
"9223372036854775807ns": {
"ns": 9223372036854775807,
"string": "2562047h47m16.854775807s"
},
"9223372036854775808ns": null
},
"human_size": {
"0": "0 B",
"1": "1 B",
"1023": "1023 B",
"10239": "10.0 KiB",
"1024": "1.0 KiB",
"10240": "10.0 KiB",
"1025": "1.0 KiB",
"1048575": "1024.0 KiB",
"1048576": "1.0 MiB",
"1073741824": "1.0 GiB",
"1075": "1.0 KiB",
"1099511627775": "1024.0 GiB",
"1099511627776": "1.0 TiB",
"1101": "1.1 KiB",
"1126": "1.1 KiB",
"1177": "1.1 KiB",
"1536": "1.5 KiB",
"1638": "1.6 KiB",
"1689": "1.6 KiB",
"4611686018427400249": "4.0 EiB",
"9223372036854775807": "8.0 EiB"
},
"key_header_hex": "5641554c544b455931000000030001000004",
"keys": {
"key-no-decoy.pem": {
"real": {
"passphrase": "oracle-real passphrase",
"seed": "6ba0719d2a5433702aa5cc4948ef81f0dfc74ca1a3d1bb0a7ebcf08b283c17d4",
"suite": 1
}
},
"key-with-decoy.pem": {
"decoy": {
"passphrase": "oracle-decoy passphrase",
"seed": "8123774aca365941cfbb50482315c8bdba09744d24b5f3ae9a6597578b246259",
"suite": 1
},
"real": {
"passphrase": "oracle-real passphrase",
"seed": "d11a7d21d5eb484aff4fbbfb4dd05469e719ca0338d8475bd0547fe7e42e706c",
"suite": 1
}
}
},
"object_count": {
"0": 1,
"1": 1,
"1048576": 1,
"1099511627776": 262146,
"16": 1,
"4194287": 1,
"4194288": 1,
"4194289": 2,
"4194303": 2,
"4194304": 2,
"65535": 1,
"65536": 1,
"65537": 1,
"8388576": 2
},
"object_ids": {
"big_index": "0f793077e14e9c9c44cffd32229248aa",
"big_index_value": 1099511627776,
"ids": [
"9f0cd9b94097fe4929918d2b8942b344",
"c432e059c378eef7fe2f1181a4050836",
"f92ad613cd014c7449fcc5d4ce98ad02",
"96cee9f29e43c395c608a454b854da2b"
],
"seed": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"
},
"padded_size": {
"0": 65536,
"1": 65536,
"1048576": 1048576,
"1099511627776": 1099511627776,
"16": 65536,
"4194287": 4194304,
"4194288": 4194304,
"4194289": 4194304,
"4194303": 4194304,
"4194304": 4194304,
"65535": 65536,
"65536": 65536,
"65537": 131072,
"8388576": 8388608
},
"parse_size": {
"": null,
" 1": null,
"+5": 5,
"-0": 0,
"-1": null,
"0": 0,
"0x10": null,
"1.5G": null,
"1024G": 1099511627776,
"1025G": null,
"1099511627776": 1099511627776,
"1099511627777": null,
"1KB": 1024,
"1MK": 1048576,
"1T": 1099511627776,
"1TB": 1099511627776,
"1bb": null,
"1kb": 1024,
"2G": 2147483648,
"2T": null,
"2X": null,
"2k": 2048,
"500M": 524288000,
"512": 512,
"B": null,
"G": null
},
"path_clean": {
"": ".",
".": ".",
"..": "..",
"../../a": "../../a",
"./": ".",
"/": "/",
"/../a": "/a",
"//": "/",
"/a/b/..": "/a",
"a/./b/": "a/b",
"a//b": "a/b",
"a/b/../../..": "..",
"a/b/../c": "a/c",
"abc/def/ghi/../..": "abc"
},
"provenance": "oracle/go at 4c1507c, oracle_vectors_test.go",
"records": [
{
"added_unix_nano": 1700000001000000000,
"json": "{\"name\":\"plain.txt\",\"seed\":\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\",\"size\":5,\"mode\":420,\"modified\":\"2023-11-14T22:13:20.123456789Z\",\"added\":\"2023-11-14T22:13:21Z\"}",
"modified_unix_nano": 1700000000123456789,
"name": "plain.txt"
},
{
"added_unix_nano": 1000000100,
"json": "{\"name\":\"\\u003ca\\u0026b\\u003e/\\u2028\\u2029'\\\"\\\\x\",\"seed\":\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\",\"size\":0,\"mode\":493,\"modified\":\"1970-01-01T00:00:00Z\",\"added\":\"1970-01-01T00:00:01.0000001Z\"}",
"modified_unix_nano": 0,
"name": "\u003ca\u0026b\u003e/\u2028\u2029'\"\\x"
},
{
"added_unix_nano": -4852116231933722625,
"json": "{\"name\":\"ü/日本語\",\"seed\":\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\",\"size\":1099511627776,\"mode\":384,\"modified\":\"1969-12-31T23:59:59.5Z\",\"added\":\"9999-12-31T23:59:59.999999999Z\"}",
"modified_unix_nano": -500000000,
"name": "ü/日本語"
},
{
"added_unix_nano": 1234567890000001000,
"json": "{\"name\":\"tab\\there\",\"seed\":\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\",\"size\":1,\"mode\":0,\"modified\":\"2009-02-13T23:31:30.12Z\",\"added\":\"2009-02-13T23:31:30.000001Z\"}",
"modified_unix_nano": 1234567890120000000,
"name": "tab\there"
}
],
"valid_name_hex": {
"": false,
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": false,
"2061": true,
"2e": false,
"2e2e": false,
"2e2e2e": true,
"2e2e2f61": false,
"2e2e61": true,
"2e2f61": false,
"2f61": false,
"61": true,
"610062": false,
"610a62": false,
"612062": true,
"612f": false,
"612f2e2e": false,
"612f2e2e2e": true,
"612f2e2e2f62": false,
"612f2e2f62": false,
"612f2e62": true,
"612f2f62": false,
"612f62": true,
"615c62": false,
"6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a": true,
"6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b6c6d6e6f707172737475767778797a6162636465666768696a6b": false,
"617f62": false,
"61c28562": false,
"61e2808b62": true,
"c3bc2fc3b1": true,
"e280a8": true,
"ff": false
}
}
+72
View File
@@ -0,0 +1,72 @@
{
"key": "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
"plaintext": "byte(i*13+7)",
"provenance": "oracle/go at 4c1507c, internal/stream/oracle_vectors_test.go",
"vectors": [
{
"size": 0,
"ct_len": 16,
"ct_sha256": "b5e6c4d4c2d8e2448c7b13550cb447361c6319f8303eb2189e3c00109946633e",
"ct_hex": "ebc87bb498d2cf767b620485d8e74873"
},
{
"size": 1,
"ct_len": 17,
"ct_sha256": "4b431b2d3c656dd5565f045f3afaa216a29bd624d84b14a6b15ad7fcdf0bcc3c",
"ct_hex": "13e2ae1e27b20a055d353c18584d29dfec"
},
{
"size": 15,
"ct_len": 31,
"ct_sha256": "a226ce0a65bacca756d4620c4a8103df0009486b7db9a36c577ac305c03f23bb",
"ct_hex": "13485b85b3b4d036ed77edd5eb120ae816391a9b23c88452779018a527ffd0"
},
{
"size": 16,
"ct_len": 32,
"ct_sha256": "fa29f52ecc1bce80108d7fc89f1d55ec231ab3eb9308d0ded0bb525e3ec6addd",
"ct_hex": "13485b85b3b4d036ed77edd5eb120afe1d7171433f4aa6d81d9f1a1c43f1563f"
},
{
"size": 17,
"ct_len": 33,
"ct_sha256": "e7519a9721bc45677ae60f546e6b1909ad89b6bd9041388f5b501efbbfd956de",
"ct_hex": "13485b85b3b4d036ed77edd5eb120afe778bfe094bac290062ec1b004fabc63ceb"
},
{
"size": 65535,
"ct_len": 65551,
"ct_sha256": "89435c31d8a1759df899f6fd7bc9a030ad0ef2d9151b746fb289fe994d9f567a"
},
{
"size": 65536,
"ct_len": 65552,
"ct_sha256": "2b1c36c92c08df57448197d86efb6b321e29141ffb1b241eb3f90961f760a9b6"
},
{
"size": 65537,
"ct_len": 65569,
"ct_sha256": "eb41600f5ad326e7d7056ae89e94bd29a05525e8b471c210af4a1b4275798a09"
},
{
"size": 131072,
"ct_len": 131104,
"ct_sha256": "752ee27990e31a12fe923039a1a7fcd83f267fd3e9a237cab86f6df7575d4350"
},
{
"size": 131073,
"ct_len": 131121,
"ct_sha256": "b93769dc38c7cebe0aa0196e2124f20eff2e50bdab01ed03313dcc29bef39c38"
},
{
"size": 196592,
"ct_len": 196640,
"ct_sha256": "7ca38701023c57deb64762376269ea37f32b8f462fd57db22ba99b3a6a440ba3"
},
{
"size": 300000,
"ct_len": 300080,
"ct_sha256": "ecd2f49ba7cd7d4efc39243d10e9ae4264fc4b5e182a92335587dd54822eefac"
}
]
}