Daiki Ueno ueno@gnu.org writes:
The zip file is no longer accessible, but I still keep a copy and it seems identical to the one at: https://github.com/pyca/cryptography/tree/main/vectors/cryptography_vectors/...
Is it OK to use the vector assuming it is public domain?
According to the closest LICENSE file, https://github.com/pyca/cryptography/blob/main/vectors/LICENSE, it's dual licensed apache/BSD (our choice), so I think that is fine. And if we copy just the test vectors and not any surrounding code, it seems questionable if that is even copyrightable.
So I think copying from there, with proper attribution, is perfectly fine. Formally, we'll be exercising the BSD option.
Yes, the length should match key->size; I've omitted the ciphertext_length argument.
Thanks. Please remove everywhere, it looks like it's still present in some form in the test code. (You may still want to allocate an extra byte at the end and check that it isn't modified. Alternatively, rely on valgrind for detecting overwrites instead).
I'm not sure about the leading zeros though; as far as I read, nettle_mpz_to_octets seems to keep them.
I think nettle_mpz_to_octets is fine. The problem was when the length passed to this function was computed using nettle_mpz_sizeinbase_256_u, like it was in a previous revision.
Regards, /Niels