-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test vectors? #27
Comments
For testing purposes I think it would be better to have an option to "disable" all crypto randomness, and just set all random results to zero. So all private keys and nonces will be zero, and it allows to implement test vectors and achieve deterministic results. In c-like languages we can use preprocessor directive (like I do in DiscoNet), in others (go and python) the only way to deal with it is to define global variables for the same purpose. The only places to add this is GenerateKeyPair, EncryptAndAuthenticate, Encrypt. |
If possible, I think it'd be good to follow the Noise test vectors format. I test for them here and they require you to set the ephemeral key for each test. So in my Noise implementation I have an extra field
(Now that I'm thinking about it, I probably don't need this extra field since I'm inside the library.) If you want I can get that done this week end, as I already have this code it should be pretty straight forward for me to output the test vectors instead of reading from them. |
I got the idea about Key Pairs, but what about the nonces? As we call Ad operation on random nonce the state is updated in non deterministic way, so each call give new strobe state. I don't need test vectors right now. I have some other "Disco" things to do at this moment, so don't hurry. |
Are you talking about the nonces of the symmetric library? In this case I don't think it is necessary to cover this via the test vectors since we already cover strobe with test vectors and this is a pretty simple wrapper around strobe. |
No description provided.
The text was updated successfully, but these errors were encountered: