// Copyright (c) 2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include FUZZ_TARGET(crypto_poly1305) { FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()}; const std::vector key = ConsumeFixedLengthByteVector(fuzzed_data_provider, POLY1305_KEYLEN); const std::vector in = ConsumeRandomLengthByteVector(fuzzed_data_provider); std::vector tag_out(POLY1305_TAGLEN); poly1305_auth(tag_out.data(), in.data(), in.size(), key.data()); }