0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-21 12:22:50 -05:00
bitcoin-bitcoin-core/src/test/fuzz
Pieter Wuille 511a8d406e crypto: Implement RFC8439-compatible variant of ChaCha20
There are two variants of ChaCha20 in use. The original one uses a 64-bit
nonce and a 64-bit block counter, while the one used in RFC8439 uses a
96-bit nonce and 32-bit block counter. This commit changes the interface
to use the 96/32 split (but automatically incrementing the first 32-bit
part of the nonce when the 32-bit block counter overflows, so to retain
compatibility with >256 GiB output).

Simultaneously, also merge the SetIV and Seek64 functions, as we almost
always call both anyway.

Co-authored-by: dhruv <856960+dhruv@users.noreply.github.com>
2023-07-07 17:16:27 -04:00
..
util scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
addition_overflow.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
addrman.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
asmap.cpp [netgroupman] Add GetMappedAS() and GetGroup() 2022-04-20 14:35:52 +01:00
asmap_direct.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
autofile.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
banman.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
base_encode_decode.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
bech32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bitdeque.cpp fuzz: Avoid timeout in bitdeque fuzz target 2022-09-05 15:38:33 +02:00
block.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
block_header.cpp
blockfilter.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bloom_filter.cpp
buffered_file.cpp util: improve streams.h:FindByte() performance 2023-05-05 06:03:17 -06:00
chain.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
checkqueue.cpp refactor: Use move semantics in CCheckQueue::Loop 2023-03-21 13:04:21 +00:00
coins_view.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
coinscache_sim.cpp Exercise non-DIRTY spent coins in caches in fuzz test 2023-02-03 10:33:31 -05:00
connman.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
crypto.cpp
crypto_aes256.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_aes256cbc.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_chacha20.cpp crypto: Implement RFC8439-compatible variant of ChaCha20 2023-07-07 17:16:27 -04:00
crypto_chacha20_poly1305_aead.cpp Move AdditionOverflow to util, Add CheckedAdd with unit tests 2021-12-17 10:46:39 +01:00
crypto_common.cpp
crypto_diff_fuzz_chacha20.cpp crypto: Implement RFC8439-compatible variant of ChaCha20 2023-07-07 17:16:27 -04:00
crypto_hkdf_hmac_sha256_l32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_poly1305.cpp
cuckoocache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
decode_tx.cpp
descriptor_parse.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
deserialize.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
eval_script.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
fee_rate.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fees.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
flatfile.cpp Refactor: Remove unused FlatFilePos::SetNull 2023-03-21 13:54:11 +01:00
float.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fuzz.cpp fuzz: Print error message when FUZZ is missing 2023-05-22 10:02:29 +02:00
fuzz.h
FuzzedDataProvider.h
golomb_rice.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
headerssync.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
hex.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
http_request.cpp Merge bitcoin/bitcoin#25619: net: avoid overriding non-virtual ToString() in CService and use better naming 2023-02-17 13:34:40 -05:00
i2p.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
integer.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
key.cpp Fuzz test for Ellswift ECDH 2023-06-23 14:22:39 -04:00
key_io.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
kitchen_sink.cpp
load_external_block_file.cpp refactor: Make mapBlocksUnknownParent local, and rename it 2022-07-18 12:06:14 -06:00
locale.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
merkleblock.cpp
message.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
mini_miner.cpp fuzz: Fix mini_miner_selection running out of coin 2023-06-12 14:19:53 -04:00
miniscript.cpp ci: use clang-16 in tidy task 2023-04-05 11:43:42 +01:00
minisketch.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
muhash.cpp
multiplication_overflow.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
net.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
net_permissions.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
netaddress.cpp Merge bitcoin/bitcoin#25619: net: avoid overriding non-virtual ToString() in CService and use better naming 2023-02-17 13:34:40 -05:00
netbase_dns_lookup.cpp p2p, refactor: return std::optional<CNetAddr> in LookupHost 2023-05-26 13:41:07 -03:00
node_eviction.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
p2p_transport_serialization.cpp Use only Span{} constructor for byte-like types where possible 2023-06-27 10:13:37 +02:00
parse_hd_keypath.cpp Switch hardened derivation marker to h in descriptors 2023-04-04 18:33:08 +02:00
parse_numbers.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
parse_script.cpp
parse_univalue.cpp Merge bitcoin/bitcoin#27256: refactor: rpc: Remove unnecessary uses of ParseNonRFCJSONValue() and rename it 2023-06-02 16:18:11 +01:00
partially_downloaded_block.cpp [fuzz] Assert that omitting missing transactions always fails block reconstruction 2023-01-23 17:29:41 +01:00
policy_estimator.cpp tx fees, policy: read stale fee estimates with a regtest-only option 2023-06-14 22:39:26 +01:00
policy_estimator_io.cpp tx fees, policy: read stale fee estimates with a regtest-only option 2023-06-14 22:39:26 +01:00
poolresource.cpp Add PoolResource fuzzer 2023-03-23 19:38:38 +01:00
pow.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
prevector.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
primitives_transaction.cpp
process_message.cpp fuzz: Change LIMIT_TO_MESSAGE_TYPE from a compile-time to a run-time setting 2023-05-26 17:14:23 +02:00
process_messages.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
protocol.cpp
psbt.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
random.cpp
rbf.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
rolling_bloom_filter.cpp
rpc.cpp test: Run fuzz tests on macOS 2023-06-22 13:54:17 +02:00
script.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
script_assets_test_minimizer.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
script_bitcoin_consensus.cpp
script_descriptor_cache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
script_flags.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
script_format.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
script_interpreter.cpp
script_ops.cpp
script_sigcache.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
script_sign.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
scriptnum_ops.cpp
secp256k1_ec_seckey_import_export_der.cpp
secp256k1_ecdsa_signature_parse_der_lax.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
signature_checker.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
signet.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
socks5.cpp net: Use steady clock in InterruptibleRecv 2023-04-04 12:33:49 +02:00
span.cpp
spanparsing.cpp
string.cpp Merge bitcoin/bitcoin#27576: kernel: Remove args, settings, chainparams, chainparamsbase from kernel library 2023-06-09 14:58:49 -04:00
strprintf.cpp
system.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
timedata.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
torcontrol.cpp
transaction.cpp fuzz: Avoid OOM in transaction fuzz target 2023-06-21 07:51:29 +02:00
tx_in.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
tx_out.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
tx_pool.cpp test: Add util to mine invalid blocks 2023-05-02 17:17:06 +02:00
txorphan.cpp Merge bitcoin/bitcoin#26551: p2p: Track orphans by who provided them 2023-01-26 10:36:18 +00:00
txrequest.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
util.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
util.h scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
utxo_snapshot.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
utxo_total_supply.cpp [fuzz] Only check duplicate coinbase script when block was valid 2023-06-03 15:37:11 +02:00
validation_load_mempool.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
versionbits.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00