bitcoin/src
Jonas Schnelli 695141bf7a
Merge #15512: Add ChaCha20 encryption option (XOR)
2dfe27517 Add ChaCha20 bench (Jonas Schnelli)
2bc2b8b49 Add ChaCha20 encryption option (XOR) (Jonas Schnelli)

Pull request description:

  The current ChaCha20 implementation does not support message encryption (it can only output the keystream which is sufficient for the RNG).

  This PR adds the actual XORing of the `plaintext` with the `keystream` in order to return the desired `ciphertext`.

  Required for v2 message transport protocol.

ACKs for commit 2dfe27:
  jnewbery:
    Looks good. utACK 2dfe275171.
  jnewbery:
    utACK 2dfe275171
  sipa:
    utACK 2dfe275171
  ryanofsky:
    utACK 2dfe275171. Changes since last review are just renaming the Crypt method, adding comments, and simplifying the benchmark.

Tree-SHA512: 84bb234da2ca9fdc44bc29a786d9dd215520f81245270c1aef801ef66b6091b7793e2eb38ad6dbb084925245065c5dce9e5582f2d0fa220ab3e182d43412d5b5
2019-05-10 09:26:23 +02:00
..
bench Merge #15512: Add ChaCha20 encryption option (XOR) 2019-05-10 09:26:23 +02:00
compat Document assumptions about C++ compiler 2019-03-05 11:19:32 +01:00
config
consensus Separate reason for premature spends (coinbase/locktime) 2019-05-02 15:30:58 -04:00
crypto Merge #15512: Add ChaCha20 encryption option (XOR) 2019-05-10 09:26:23 +02:00
index scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
interfaces scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
leveldb Pull leveldb subtree 2019-01-26 12:45:48 -05:00
node [build] Move AnalyzePSBT from psbt.cpp to node/psbt.cpp 2019-04-09 17:53:08 -04:00
obj
obj-test
policy scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
primitives Merge #14039: Disallow extended encoding for non-witness transactions 2019-04-25 14:15:43 -04:00
qt Merge #15452: Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-05-09 18:54:43 +02:00
rpc Merge #15452: Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-05-09 18:54:43 +02:00
script Merge #15452: Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-05-09 18:54:43 +02:00
secp256k1
support windows: Set _WIN32_WINNT to 0x0601 (Windows 7) 2019-01-23 16:28:27 +08:00
test Merge #15512: Add ChaCha20 encryption option (XOR) 2019-05-10 09:26:23 +02:00
univalue
util Merge #15650: Handle the result of posix_fallocate system call 2019-05-02 08:43:57 -04:00
wallet Merge #15452: Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-05-09 18:54:43 +02:00
zmq RPCHelpMan: Pass through Result and Examples 2019-01-25 14:16:07 -05:00
.clang-format
addrdb.cpp banman: pass the banfile path in 2019-01-16 13:54:18 -05:00
addrdb.h banman: Add, use CBanEntry ctor that takes ban reason 2019-01-16 13:54:18 -05:00
addrman.cpp [addrman] Improve collision logging and address nits 2019-03-01 16:15:50 -05:00
addrman.h [addrman] Ensure collisions eventually get resolved 2019-02-27 16:53:44 -05:00
amount.h Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
arith_uint256.cpp
arith_uint256.h Use std::numeric_limits<UNSIGNED>::max()) instead of (UNSIGNED)-1 2018-12-04 19:55:04 +02:00
attributes.h
banman.cpp Allow connections from misbehavior banned peers. 2019-01-22 21:10:48 +00:00
banman.h Allow connections from misbehavior banned peers. 2019-01-22 21:10:48 +00:00
base58.cpp
base58.h
bech32.cpp
bech32.h
bitcoin-cli-res.rc
bitcoin-cli.cpp Merge #15564: cli: remove duplicate wallet fields from -getinfo 2019-03-11 10:28:42 -04:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
bitcoin-wallet-res.rc [tools] Add wallet inspection and modification tool 2019-01-30 16:26:52 -05:00
bitcoin-wallet.cpp util: Add SetupHelpOptions() 2019-02-06 14:16:43 -05:00
bitcoind-res.rc
bitcoind.cpp threads: introduce util/threadnames, refactor thread naming 2019-04-29 13:42:25 -04:00
blockencodings.cpp CorruptionPossible -> BLOCK_MUTATED 2019-05-02 15:14:12 -04:00
blockencodings.h disallow oversized CBlockHeaderAndShortTxIDs 2018-11-13 12:41:41 -08:00
blockfilter.cpp init: Add CLI option to enable block filter index. 2019-04-06 12:10:55 -07:00
blockfilter.h init: Add CLI option to enable block filter index. 2019-04-06 12:10:55 -07:00
bloom.cpp
bloom.h
chain.cpp refactor: combine Chain::findFirstBlockWithTime/findFirstBlockWithTimeAndHeight 2019-03-27 18:29:48 -04:00
chain.h refactor: combine Chain::findFirstBlockWithTime/findFirstBlockWithTimeAndHeight 2019-03-27 18:29:48 -04:00
chainparams.cpp Update assumevalid, minimumchainwork, and getchaintxstats to height 563378. 2019-02-17 03:38:08 +00:00
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkqueue.h
clientversion.cpp
clientversion.h
coins.cpp
coins.h Merge #15267: doc: explain AcceptToMemoryPoolWorker's coins_to_uncache 2019-04-26 13:09:30 -04:00
compat.h windows: Set _WIN32_WINNT to 0x0601 (Windows 7) 2019-01-23 16:28:27 +08:00
compressor.cpp
compressor.h
core_io.h Move PSBT decoding functions from core_io to psbt.cpp 2019-03-26 17:38:00 -07:00
core_memusage.h
core_read.cpp Move PSBT decoding functions from core_io to psbt.cpp 2019-03-26 17:38:00 -07:00
core_write.cpp
cuckoocache.h
dbwrapper.cpp Replace deprecated Boost Filesystem function 2019-04-30 10:05:54 +03:00
dbwrapper.h
dummywallet.cpp Bugfix: dummywallet: Add -ignorepartialspends to list of ignored wallet options 2019-04-28 04:42:38 +00:00
flatfile.cpp Style cleanup. 2019-02-22 17:38:45 -08:00
flatfile.h Style cleanup. 2019-02-22 17:38:45 -08:00
fs.cpp Avoid redefine warning 2019-04-10 12:16:52 +01:00
fs.h Replace deprecated Boost Filesystem function 2019-04-30 10:05:54 +03:00
hash.cpp
hash.h Merge #13258: uint256: Remove unnecessary crypto/common.h dependency 2018-11-30 18:48:58 +01:00
httprpc.cpp
httprpc.h
httpserver.cpp threads: introduce util/threadnames, refactor thread naming 2019-04-29 13:42:25 -04:00
httpserver.h [build] Add several util units 2019-04-09 17:53:08 -04:00
indirectmap.h
init.cpp Merge #15890: Doc: remove text about txes always relayed from -whitelist 2019-05-08 15:59:42 -04:00
init.h
key_io.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
key_io.h
key.cpp Fix assertion in CKey::SignCompact 2019-01-31 15:00:56 +00:00
key.h
keystore.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
keystore.h
limitedmap.h
logging.cpp threads: prefix log messages with thread names 2019-04-29 13:49:15 -04:00
logging.h threads: prefix log messages with thread names 2019-04-29 13:49:15 -04:00
Makefile.am Merge #15849: Thread names in logs and deadlock debug tools 2019-04-30 15:26:01 -04:00
Makefile.bench.include Merge #15512: Add ChaCha20 encryption option (XOR) 2019-05-10 09:26:23 +02:00
Makefile.leveldb.include build: Remove WINVER pre define in Makefile.leveldb.inlcude 2019-01-26 09:28:48 +08:00
Makefile.qt.include GUI: Move QRImageWidget to its own file-pair 2019-05-02 12:18:18 +00:00
Makefile.qttest.include scripted-diff: Rename test_bitcoin to test/setup_common 2019-04-11 10:12:36 -04:00
Makefile.test.include tests: add threadutil tests 2019-04-29 13:43:01 -04:00
memusage.h
merkleblock.cpp Replace use of BEGIN and END macros on uint256 2019-01-10 01:58:33 +01:00
merkleblock.h
miner.cpp scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
miner.h [rpc] mining: Omit uninitialized currentblockweight, currentblocktx 2019-02-12 11:34:57 -05:00
net_processing.cpp Merge #15948: refactor: rename chainActive 2019-05-07 11:51:30 -04:00
net_processing.h banman: create and split out banman 2019-01-16 13:54:18 -05:00
net.cpp net: Remove unused unsanitized user agent string CNode::strSubVer 2019-03-23 11:32:40 -04:00
net.h Merge #15654: net: Remove unused unsanitized user agent string CNode::strSubVer 2019-04-04 16:45:23 -04:00
netaddress.cpp docs: Improve netaddress comments 2019-04-10 11:48:47 -04:00
netaddress.h docs: Improve netaddress comments 2019-04-10 11:48:47 -04:00
netbase.cpp Drop defunct Windows compat fixes 2019-01-24 15:58:49 -08:00
netbase.h
netmessagemaker.h
noui.cpp
noui.h Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
optional.h Remove 'boost::optional'-related gcc warnings 2019-01-30 22:44:28 +02:00
outputtype.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
outputtype.h
pow.cpp
pow.h
prevector.h Merge #14266: refactor: Lift prevector default vals to the member declaration 2019-05-06 15:32:24 -04:00
protocol.cpp
protocol.h Use C++11 default member initializers 2019-01-05 16:16:37 +01:00
psbt.cpp Silence GCC 7 warning "control reaches end of non-void function" (-Wreturn-type) in psbt.cpp 2019-05-02 15:08:22 +02:00
psbt.h [build] Move AnalyzePSBT from psbt.cpp to node/psbt.cpp 2019-04-09 17:53:08 -04:00
pubkey.cpp
pubkey.h
random.cpp Add ChaCha20 encryption option (XOR) 2019-05-03 20:31:18 +02:00
random.h Add ChaCha20 encryption option (XOR) 2019-05-03 20:31:18 +02:00
rest.cpp scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
reverse_iterator.h
reverselock.h
scheduler.cpp Switch all RNG code to the built-in PRNG. 2019-01-16 16:34:56 -08:00
scheduler.h trivial: correct parameter name in comments 2019-02-10 17:17:32 -05:00
serialize.h serialize: Serialization support for big-endian 32-bit ints. 2019-04-06 12:03:21 -07:00
shutdown.cpp
shutdown.h
span.h
streams.h Trivial: Doxygenize existing CBufferedFile and VectorReader comments 2019-01-25 12:32:37 -08:00
sync.cpp threads: add thread names to deadlock debugging message 2019-04-29 13:51:59 -04:00
sync.h Add WITH_LOCK macro: run code while locking a mutex 2019-04-20 08:13:34 -04:00
threadinterrupt.cpp
threadinterrupt.h Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
threadsafety.h
timedata.cpp
timedata.h
tinyformat.h
torcontrol.cpp Drop IsLimited in favor of IsReachable 2019-01-13 22:50:36 -08:00
torcontrol.h
txdb.cpp
txdb.h init: Add CLI option to enable block filter index. 2019-04-06 12:10:55 -07:00
txmempool.cpp Merge #15323: rpc: Expose g_is_mempool_loaded via getmempoolinfo 2019-05-01 10:06:15 -04:00
txmempool.h scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
ui_interface.cpp Merge #15699: Remove no-op CClientUIInterface::[signal_name]_disconnect. Disconnect BlockNotifyGenesisWait and RPCNotifyBlockChange properly. 2019-04-23 13:03:41 -04:00
ui_interface.h Merge #15699: Remove no-op CClientUIInterface::[signal_name]_disconnect. Disconnect BlockNotifyGenesisWait and RPCNotifyBlockChange properly. 2019-04-23 13:03:41 -04:00
uint256.cpp util: Make ToLower and ToUpper take a char 2019-01-10 02:51:14 +01:00
uint256.h
undo.h
validation.cpp Merge #15971: validation: Add compile-time checking for negative locking requirement in LimitValidationInterfaceQueue 2019-05-08 09:19:41 -04:00
validation.h Merge #15971: validation: Add compile-time checking for negative locking requirement in LimitValidationInterfaceQueue 2019-05-08 09:19:41 -04:00
validationinterface.cpp [wallet] Schedule tx rebroadcasts in wallet 2019-04-09 10:38:13 -04:00
validationinterface.h [cleanup] Remove unused CReserveKey 2019-04-10 11:44:40 -04:00
version.h
versionbits.cpp
versionbits.h
versionbitsinfo.cpp
versionbitsinfo.h
walletinitinterface.h
warnings.cpp
warnings.h