neobytes/src
Pieter Wuille a81cd96805 Only create signatures with even S, and verification mode to check.
To fix a minor malleability found by Sergio Lerner (reported here:
https://bitcointalk.org/index.php?topic=8392.msg1245898#msg1245898)

The problem is that if (R,S) is a valid ECDSA signature for a given
message and public key, (R,-S) is also valid. Modulo N (the order
of the secp256k1 curve), this means that both (R,S) and (R,N-S) are
valid. Given that N is odd, S and N-S have a different lowest bit.
We solve the problem by forcing signatures to have an even S value,
excluding one of the alternatives.

This commit just changes the signing code to always produce even S
values, and adds a verification mode to check it. This code is not
enabled anywhere yet. Existing tests in key_tests.cpp verify that
the produced signatures are still valid.
2013-08-16 00:17:50 +02:00
..
json
leveldb Merge commit 'adae78ea9940f4d44382967d1296e7db0b54a4de' into leveldb-squashed 2013-07-01 08:36:32 -07:00
obj
obj-test
qt remove a newline from a string in init.cpp 2013-08-06 10:28:52 +02:00
test Only create signatures with even S, and verification mode to check. 2013-08-16 00:17:50 +02:00
addrman.cpp Split off hash.h from util.h 2012-12-18 21:39:29 +01:00
addrman.h
alert.cpp Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
alert.h -alertnotify=<cmd> 2013-03-19 15:16:30 -04:00
allocators.h Make signature cache store CPubKeys 2013-05-30 05:20:23 +02:00
base58.h Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
bignum.h Use a uint256 for bnChainWork 2013-04-12 12:17:28 +02:00
bitcoind.cpp exclude CreatePidFile() function on WIN32 as it is unused 2013-07-24 09:30:09 +02:00
bitcoinrpc.cpp Merge pull request #2776 from jgarzik/keypoolsize 2013-08-14 22:01:22 -07:00
bitcoinrpc.h RPC: add getbestblockhash, to return tip of best chain 2013-07-03 11:02:29 -04:00
bloom.cpp main.h->core.h include dependency improvements. 2013-06-24 10:41:16 -04:00
bloom.h Add nFlags to CBloomFilter to make filter updating optional. 2013-01-16 14:34:06 -05:00
chainparams.cpp Add missing 0x prefix in chainparams.cpp 2013-08-12 18:28:23 +04:00
chainparams.h Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
checkpoints.cpp Don't use checkpoints and accept nonstd txn on -regtest 2013-07-23 18:02:26 +02:00
checkpoints.h Replace repeated GetBoolArg() calls with Checkpoint::fEnabled variable 2013-05-24 11:10:53 -04:00
checkqueue.h Port Thread* methods to boost::thread_group 2013-04-03 19:57:13 -04:00
clientversion.h Prepare for 0.9 merge window 2013-05-30 04:43:51 +02:00
compat.h cleanup compat.h Windows stuff 2013-07-24 16:24:38 +02:00
core.cpp Move core implementations to core.cpp 2013-06-25 10:33:29 +02:00
core.h Move core implementations to core.cpp 2013-06-25 10:33:29 +02:00
crypter.cpp remove windows.h from crypter.cpp includes 2013-07-24 22:35:44 +02:00
crypter.h CSecret/CKey -> CKey/CPubKey split/refactor 2013-05-30 05:20:21 +02:00
db.cpp Bugfix: Move boost/version include from db.cpp to walletdb.cpp where BOOST_VERSION is used 2013-07-15 22:16:42 +00:00
db.h Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
hash.cpp Add MurmurHash3 implementation to hash.h/add hash.cpp. 2013-01-16 12:48:01 -05:00
hash.h Make CPubKey statically allocated 2013-05-30 05:18:42 +02:00
init.cpp Merge pull request #2658 from TheBlueMatt/forkalert 2013-08-12 23:33:40 -07:00
init.h let user select wallet file with -wallet=foo.dat 2013-07-04 17:19:36 +02:00
key.cpp Only create signatures with even S, and verification mode to check. 2013-08-16 00:17:50 +02:00
key.h Make signature cache store CPubKeys 2013-05-30 05:20:23 +02:00
keystore.cpp CSecret/CKey -> CKey/CPubKey split/refactor 2013-05-30 05:20:21 +02:00
keystore.h CSecret/CKey -> CKey/CPubKey split/refactor 2013-05-30 05:20:21 +02:00
leveldb.cpp Reduce number of open LevelDB files to 64 2013-04-24 00:10:23 +02:00
leveldb.h Deal with LevelDB errors 2013-01-30 04:30:02 +01:00
limitedmap.h Add a limitedmap class similar to mruset 2013-04-01 11:56:22 -04:00
main.cpp Merge pull request #2658 from TheBlueMatt/forkalert 2013-08-12 23:33:40 -07:00
main.h Simplify storage of orphan transactions 2013-08-02 16:10:25 +10:00
makefile.linux-mingw Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
makefile.mingw Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
makefile.osx Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
makefile.unix Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
miner.cpp Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
miner.h Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
mruset.h
net.cpp Remove #define loop from util.h 2013-07-31 14:06:44 +10:00
net.h Removed the main.h include from net.cpp. 2013-06-06 00:04:33 -07:00
netbase.cpp fix !O_NONBLOCK where ~O_NONBLOCK was meant 2013-04-27 15:37:26 +02:00
netbase.h
noui.cpp Improve block database load error reporting 2013-02-17 23:25:42 +01:00
protocol.cpp Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
protocol.h Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
rpcblockchain.cpp RPC: add getbestblockhash, to return tip of best chain 2013-07-03 11:02:29 -04:00
rpcdump.cpp Add dumpwallet and importwallet RPCs 2013-06-22 17:30:56 +02:00
rpcmining.cpp Move internal miner/block creation to separate miner.cpp module. 2013-07-31 09:43:35 -04:00
rpcnet.cpp Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
rpcrawtransaction.cpp main.h->core.h include dependency improvements. 2013-06-24 10:41:16 -04:00
rpcwallet.cpp Merge pull request #2776 from jgarzik/keypoolsize 2013-08-14 22:01:22 -07:00
script.cpp Only create signatures with even S, and verification mode to check. 2013-08-16 00:17:50 +02:00
script.h Only create signatures with even S, and verification mode to check. 2013-08-16 00:17:50 +02:00
serialize.h Use per-message send buffer, rather than per connection 2013-03-29 23:56:26 +01:00
sync.cpp
sync.h Added comments to sync.h to make it easier to understand the macros 2013-06-25 16:54:58 -07:00
threadsafety.h o Added threadsafety.h - a set of macros using the -Wthread-safety 2012-11-11 00:53:00 -03:00
txdb.cpp Introduce a CChainParameters singleton class and regtest mode. 2013-06-19 16:28:52 +02:00
txdb.h Merge pull request #2221 from sipa/perfo 2013-02-22 09:01:30 -08:00
ui_interface.h Have Qt poll for shutdown requested, the QT way. 2013-04-03 19:58:47 -04:00
uint256.h Specified base_uint component size 2013-05-07 20:03:17 -05:00
util.cpp Merge pull request #2855 from Diapolo/guard_CreatePidFile 2013-08-05 01:05:59 -07:00
util.h Merge pull request #2855 from Diapolo/guard_CreatePidFile 2013-08-05 01:05:59 -07:00
version.cpp Fix build date for from-tarball builds 2013-06-29 14:16:50 +02:00
version.h Bump PROTOCOL_VERSION for filter messages. 2013-01-16 12:48:02 -05:00
wallet.cpp Merge pull request #2776 from jgarzik/keypoolsize 2013-08-14 22:01:22 -07:00
wallet.h Merge pull request #2776 from jgarzik/keypoolsize 2013-08-14 22:01:22 -07:00
walletdb.cpp Remove #define loop from util.h 2013-07-31 14:06:44 +10:00
walletdb.h Refactor keytime/metadata and wallet encryption bugfix 2013-06-20 01:31:18 +02:00