Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
7 years ago
practicalswift
a720b928c8
Remove includes in .cpp files for things the corresponding .h file already included
7 years ago
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
7 years ago
Jack Grigg
63179d0283
Scope the ECDSA constant sizes to CPubKey / CKey classes
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
8 years ago
Jack Grigg
1ce9f0a952
Ensure that ECDSA constant sizes are correctly-sized
8 years ago
Jack Grigg
48abe78e51
Remove redundant `= 0` initialisations
8 years ago
Jack Grigg
17fa3913ef
Specify ECDSA constant sizes as constants
8 years ago
Jack Grigg
e181dbe748
Add comments
8 years ago
Jack Grigg
a3603ac6f0
Fix potential overflows in ECDSA DER parsers
8 years ago
Jeremy Rubin
30ac7688e3
Fix subscript[0] potential bugs in key.cpp
8 years ago
practicalswift
b51aaf1c42
Remove unused C++ code not covered by unit tests
8 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
Wladimir J. van der Laan
f4d1fc259b
wallet: Get rid of LockObject and UnlockObject calls in key.h
...
Replace these with vectors allocated from the secure allocator.
This avoids mlock syscall churn on stack pages, as well as makes
it possible to get rid of these functions.
Please review this commit and the previous one carefully that
no `sizeof(vectortype)` remains in the memcpys and memcmps usage
(ick!), and `.data()` or `&vec[x]` is used as appropriate instead of
&vec.
8 years ago
Pavel Janík
4731cab8fb
Do not shadow variables
8 years ago
Pieter Wuille
fa2637a3be
Always require OS randomness when generating secret keys
9 years ago
Jonas Schnelli
90604f16af
add bip32 pubkey serialization
...
CExtPubKey should be serializable like CPubKey
9 years ago
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
9 years ago
Pieter Wuille
48edf5746a
Update key.cpp to new secp256k1 API
9 years ago
Cory Fields
a574899671
chaincodes: abstract away more chaincode behavior
...
[squashme] replace struct CCainCode with a typedef uint256 ChainCode
10 years ago
Pieter Wuille
a56054be65
Update key.cpp to use new libsecp256k1
...
libsecp256k1's API changed, so update key.cpp to use it.
Libsecp256k1 now has explicit context objects, which makes it completely thread-safe.
In turn, keep an explicit context object in key.cpp, which is explicitly initialized
destroyed. This is not really pretty now, but it's more efficient than the static
initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of
its calls, libsecp256k1 wasn't actually needed).
This also brings in the new blinding support in libsecp256k1. By passing in a random
seed, temporary variables during the elliptic curve computations are altered, in such
a way that if an attacker does not know the blind, observing the internal operations
leaks less information about the keys used. This was implemented by Greg Maxwell.
10 years ago
Pieter Wuille
8cf1485f3b
Abstract chaincodes into CChainCode
...
# Conflicts:
# src/key.cpp
# src/key.h
10 years ago
Pieter Wuille
437ada3e55
Switch test case signing to RFC6979 extra entropy
...
Instead of manually tweaking the deterministic nonce post-generation,
pass the test case number in as extra entropy to RFC6979.
10 years ago
Cory Fields
16a58a8644
keys: remove libsecp256k1 verification until it's actually supported
...
This was added a while ago for testing purposes, but was never intended to be
used. Remove it until upstream libsecp256k1 decides that verification is
stable/ready.
10 years ago
Pieter Wuille
1a9576de9d
Use libsecp256k1's RFC6979 implementation
10 years ago
Wladimir J. van der Laan
734f85c4f0
Use arith_uint256 where necessary
...
Also add conversion from/to uint256 where needed.
10 years ago
Wladimir J. van der Laan
4f1524966a
Replace direct use of 0 with SetNull and IsNull
...
Replace x=0 with .SetNull(),
x==0 with IsNull(), x!=0 with !IsNull().
Replace uses of uint256(0) with uint256().
10 years ago
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
10 years ago
21E14
146c0a7c5a
Add RandAddSeedPerfmon to MakeNewKey
10 years ago
Pieter Wuille
830ee48b59
Update Bitcoin for libsecp256k1 API change
10 years ago
Pieter Wuille
4cdaa95a20
Resize after succesful result
10 years ago
Pieter Wuille
f321d6bfff
Add key generation/verification to ECC sanity check
10 years ago
Pieter Wuille
d0c41a7350
Add sanity check after key generation
...
Add a sanity check to prevent cosmic rays from flipping a bit in the
generated public key, or bugs in the elliptic curve code. This is
simply done by signing a (randomized) message, and verifying the
result.
10 years ago
Pieter Wuille
a53fd41485
Deterministic signing
10 years ago
Pieter Wuille
36fa4a78ac
Split up crypto/sha2
10 years ago
Pieter Wuille
dffb8f81b8
Use libsecp256k1 in key.cpp
10 years ago
Pieter Wuille
f4e0aefadc
Do signature-s negation inside the tests
...
To avoid the need for libsecp256k1 to expose such functionality.
10 years ago
Cory Fields
d2e74c55bd
boost: moveonly: split CPubKey and friends to new files
10 years ago
Cory Fields
78c228c6e5
boost: moveonly: move BIP32Hash to hash.h
10 years ago
Cory Fields
900078aeb4
boost: moveonly: create eccryptoverify.h|cpp and move helper functions there
...
Eventually (after 0.10) these files will hold the logic for crypto
verification routines, and CKey/CPubKey will call into them.
10 years ago
Michael Ford
2b173d3bcc
Update comments in keystore to be doxygen compatible
10 years ago
Michael Ford
ffd8eddab5
Update comments in key to be doxygen compatible
10 years ago
Cory Fields
50f71cd52e
boost: code movement only: split CECKey into separate files
10 years ago
Cory Fields
bdaec6abd3
boost: remove CPubKey dependency from CECKey. Follow-up of e405aa48
10 years ago
Cory Fields
e405aa48c7
boost: remove CPrivKey dependency from CECKey
...
This allows CECKey to be used without directly depending on the secure
allocators
10 years ago
Pieter Wuille
8138cbea3c
Add automatic script test generation, and actual checksig tests
10 years ago
ENikS
8d657a6517
Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false'
10 years ago
ENikS
c0f5d4aba5
Fixing Compiler Error C2466
10 years ago
Philip Kaufmann
001a53d742
add GetRandBytes() as wrapper for RAND_bytes()
...
- add a small wrapper in util around RAND_bytes() and replace with
GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
11 years ago
Pieter Wuille
fda3fed18a
libsecp256k1 integration
11 years ago