Coverage Report

Created: 2022-06-23 06:44

/src/botan/src/fuzzer/bn_sqr.cpp
Line
Count
Source
1
/*
2
* (C) 2015,2016 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6
7
#include "fuzzers.h"
8
9
#include <botan/bigint.h>
10
#include <botan/numthry.h>
11
12
void fuzz(const uint8_t in[], size_t len)
13
369
   {
14
369
   if(len > 8192/8)
15
17
      return;
16
17
352
   Botan::BigInt x = Botan::BigInt::decode(in, len);
18
19
352
   Botan::BigInt x_sqr = square(x);
20
352
   Botan::BigInt x_mul = x * x;
21
22
352
   FUZZER_ASSERT_EQUAL(x_sqr, x_mul);
23
352
   }
24