瀏覽代碼

msan: in msan mode disable bench for kyber INDCPA encryption

blog/frodo_constant_time_issue
Henry Case 3 年之前
父節點
當前提交
6d3550454a
共有 1 個檔案被更改,包括 8 行新增2 行删除
  1. +8
    -2
      test/bench/kyber.cc

+ 8
- 2
test/bench/kyber.cc 查看文件

@@ -59,6 +59,7 @@ static void BenchKyberKeygen(benchmark::State &st) {
cpucycle(st, total);
}

#ifndef PQC_MEMSAN_BUILD
static void BenchKyberEncaps(benchmark::State &st) {
int64_t t, total = 0;
uint8_t sk[1632];
@@ -91,6 +92,7 @@ static void BenchKyberDecaps(benchmark::State &st) {
}
cpucycle(st, total);
}
#endif

static void BenchKyberBaseMulAVX(benchmark::State &st) {
int64_t t, total = 0;
@@ -120,7 +122,11 @@ static void BenchKyberNttAVX(benchmark::State &st) {
BENCHMARK(BenchKyberMatK2);
BENCHMARK(BenchKyberRejSampling);
BENCHMARK(BenchKyberKeygen);
BENCHMARK(BenchKyberEncaps);
BENCHMARK(BenchKyberDecaps);
BENCHMARK(BenchKyberBaseMulAVX);
BENCHMARK(BenchKyberNttAVX);

// TODO: not sure why but memcheck fails in INDCPA encryption
#ifndef PQC_MEMSAN_BUILD
BENCHMARK(BenchKyberEncaps);
BENCHMARK(BenchKyberDecaps);
#endif

Loading…
取消
儲存