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