-
Notifications
You must be signed in to change notification settings - Fork 306
Description
When writing some test vectors, I noticed that the JSON formatting is a bit uneven. It looks like the original Wycheproof test put a space before the :
in JSON dictionaries, which is a bit uncommon. I see we've already had other test vectors, such as ML-DSA, which use the more conventional pattern: only a space after the :
.
I propose we use a uniform encoding, and use one without the extra space. (I.e. we run a tool to rewrite all the old vectors.) The value of a more common encoding is that contributors can more easily add test vectors without a ton of diff noise. This came up when I was putting together #161 and had to figure out how to reproduce the original formatting. It happens that Python has a separators
parameter to reproduce it but other APIs (JS, Go) only control the indent . We should pick a convention that the most tools can reproduce easily.
(Even better would be if there were some tool for folding a contributor's test vector set into the combined file, and then the formatting would be whatever that tool thinks it is, but either way I think we would be better served by a more conventional formatting.)