Daiki Ueno <u...@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/asymmetric/RSA/pkcs-1v2-1d2-vec
>
> 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

-- 
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list -- nettle-bugs@lists.lysator.liu.se
To unsubscribe send an email to nettle-bugs-le...@lists.lysator.liu.se

Reply via email to