Coverage Report

Created: 2020-06-30 13:58

/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
218
   {
14
218
   if(len > 8192/8)
15
17
      return;
16
201
17
201
   Botan::BigInt x = Botan::BigInt::decode(in, len);
18
201
19
201
   Botan::BigInt x_sqr = square(x);
20
201
   Botan::BigInt x_mul = x * x;
21
201
22
201
   FUZZER_ASSERT_EQUAL(x_sqr, x_mul);
23
201
   }
24