wycheproof icon indicating copy to clipboard operation
wycheproof copied to clipboard

Add Go AES-GCM tests.

Open jhoyla opened this issue 6 years ago • 10 comments

This is a preliminary piece of work, beginning to apply Wycheproof to Golang's crypto library.

Some tests fail for minor issues, but I thought it more important to mirror the Java tests accurately than to achieve no failures.

Tests that fail:

  1. AllVectors - The Go crypto library allows you to force a non-standard sized nonce. If forced, it will allow a zero size nonce.
  2. IVReuse - The Go crypto library does not track IVs, and thus allows IV reuse.
  3. ByteArrayTooShort - Go does not throw an error on writing to an array that is too short, the write fails silently. This behaviour differs from the Java behaviour.
  4. EncryptWithPlaintextWithEmptyIv (forced) - See 1.
  5. DecryptWithEmptyIv (forced) - See 1.

jhoyla avatar Jan 24 '19 00:01 jhoyla

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

googlebot avatar Jan 24 '19 00:01 googlebot

I signed it.

jhoyla avatar Jan 24 '19 00:01 jhoyla

CLAs look good, thanks!

googlebot avatar Jan 24 '19 00:01 googlebot

Wow, I didn't notice this thread. Will take a look closely and merge.

thaidn avatar Mar 13 '19 22:03 thaidn

It looks interesting. Any hope to get it merged?

kriskwiatkowski avatar Apr 12 '19 17:04 kriskwiatkowski

We'll take a look. In order to merge something, our internal tooling requires us to sync internal changes to here first, but we're blocked by a logistic issue that prevents us from updating this repo.

Stay tuned!

thaidn avatar Apr 12 '19 17:04 thaidn

The logistic issue was resolved. I'm trying to merge this by the end of this week.

thaidn avatar Nov 26 '19 02:11 thaidn

This PR is on hold because it's not clear atm that we'd have resources to maintain new test drivers.

thaidn avatar Dec 17 '19 01:12 thaidn

Following up after a long while... I'm going to close this PR as maintaining additional drivers is out of scope, as alluded to previously.

If you haven't already seen it, you may be interested in https://cs.opensource.google/go/x/crypto/+/master:internal/wycheproof/.

Those tests include coverage for a large chunk of the Go crypto libraries. For reference., the AES-GCM tests can be found here alongside other AEADs.

chuckx avatar Mar 13 '24 05:03 chuckx