Skip to content

Commit

Permalink
test: fix flaky test-crypto-timing-safe-dqual-benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Apr 29, 2021
1 parent 746cc88 commit c388d11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/pummel/test-crypto-timing-safe-equal-benchmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function runOneBenchmark(compareFunc, firstBufFill, secondBufFill, bufSize) {
}

function getTValue(compareFunc) {
const numTrials = 1e5;
const numTrials = 1e6;
const bufSize = 10000;
// Perform benchmarks to verify that timingSafeEqual is actually timing-safe.

Expand Down Expand Up @@ -111,7 +111,7 @@ assert(
`timingSafeEqual should not leak information from its execution time (t=${t})`
);

// As a sanity check to make sure the statistical tests are working, run the
// As a coherence check to make sure the statistical tests are working, run the
// same benchmarks again, this time with an unsafe comparison function. In this
// case the t-value should be above the threshold.
const unsafeCompare = (bufA, bufB) => bufA.equals(bufB);
Expand Down

0 comments on commit c388d11

Please sign in to comment.