diff options
author | Thomas Holenstein <tholenst@google.com> | 2024-06-12 12:58:43 +0200 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-06-12 15:25:27 +0000 |
commit | 9cac8a6b38c1cbd45c77aee108411d588da006fe (patch) | |
tree | c94f533b4430d63fc178746e15ec86e2826d9b7c /crypto | |
parent | 11acdc6abf13cc8139c30ac9455840a347793110 (diff) | |
download | boringssl-9cac8a6b38c1cbd45c77aee108411d588da006fe.zip boringssl-9cac8a6b38c1cbd45c77aee108411d588da006fe.tar.gz boringssl-9cac8a6b38c1cbd45c77aee108411d588da006fe.tar.bz2 |
Fix pointers in CONSTTIME_DECLASSIFY.
Tested by compiling with valgrind.
Before:
$ cmake -GNinja -B build -D CONSTANT_TIME_VALIDATION=1
$ ninja -C build
[...]
/home/tholenst/boringssl/boringssl/crypto/dilithium/dilithium.c:1199:25: error: ‘pub’ undeclared (first use in this function)
1199 | CONSTTIME_DECLASSIFY(&pub.t1, sizeof(pub.t1));
After:
$ ninja -C build
ninja: Entering directory `build'
[440/440] Linking CXX executable ssl/test/handshaker
Change-Id: I26481d69e9d033b0c23b7486970991b673132d20
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/69267
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dilithium/dilithium.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dilithium/dilithium.c b/crypto/dilithium/dilithium.c index 584fb16..4f209bf 100644 --- a/crypto/dilithium/dilithium.c +++ b/crypto/dilithium/dilithium.c @@ -1196,7 +1196,7 @@ int DILITHIUM_generate_key_external_entropy( vectork_power2_round(&values->pub.t1, &priv->t0, &values->t); // t1 is public. - CONSTTIME_DECLASSIFY(&pub.t1, sizeof(pub.t1)); + CONSTTIME_DECLASSIFY(&values->pub.t1, sizeof(values->pub.t1)); CBB cbb; CBB_init_fixed(&cbb, out_encoded_public_key, DILITHIUM_PUBLIC_KEY_BYTES); |