aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
Commit message (Collapse)AuthorAgeFilesLines
* really s/Doge/Dis/g this timeTomo Ueda2021-09-021-1/+1
|
* Trivial: Fix Magic Numbers in key and pubkey - fixes #1968geekwisdom2021-07-251-4/+4
|
* Introduce basic Dogecoin brandingRoss Nicoll2019-03-251-1/+1
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* wallet: Get rid of LockObject and UnlockObject calls in key.hWladimir J. van der Laan2016-10-191-20/+14
| | | | | | | | | | | | 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.
* Do not shadow variablesPavel Janík2016-09-271-3/+3
|
* Always require OS randomness when generating secret keysPieter Wuille2016-05-291-2/+1
|
* add bip32 pubkey serializationJonas Schnelli2016-04-141-3/+3
| | | | CExtPubKey should be serializable like CPubKey
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Update key.cpp to new secp256k1 APIPieter Wuille2015-11-131-24/+131
|
* Merge pull request #6034Wladimir J. van der Laan2015-05-061-7/+7
|\ | | | | | | | | a574899 chaincodes: abstract away more chaincode behavior [squashme] replace struct CCainCode with a typedef uint256 ChainCode (Cory Fields) 8cf1485 Abstract chaincodes into CChainCode (Pieter Wuille)
| * chaincodes: abstract away more chaincode behaviorCory Fields2015-05-061-7/+7
| | | | | | | | [squashme] replace struct CCainCode with a typedef uint256 ChainCode
| * Abstract chaincodes into CChainCodePieter Wuille2015-05-021-5/+5
| | | | | | | | | | | | # Conflicts: # src/key.cpp # src/key.h
* | Update key.cpp to use new libsecp256k1Pieter Wuille2015-05-041-22/+37
|/ | | | | | | | | | | | | | | 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.
* Switch test case signing to RFC6979 extra entropyPieter Wuille2015-03-271-14/+4
| | | | | Instead of manually tweaking the deterministic nonce post-generation, pass the test case number in as extra entropy to RFC6979.
* keys: remove libsecp256k1 verification until it's actually supportedCory Fields2015-03-021-2/+0
| | | | | | 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.
* Use libsecp256k1's RFC6979 implementationPieter Wuille2015-01-061-24/+21
|
* Use arith_uint256 where necessaryWladimir J. van der Laan2015-01-051-1/+2
| | | | Also add conversion from/to uint256 where needed.
* Replace direct use of 0 with SetNull and IsNullWladimir J. van der Laan2015-01-051-2/+2
| | | | | | Replace x=0 with .SetNull(), x==0 with IsNull(), x!=0 with !IsNull(). Replace uses of uint256(0) with uint256().
* Merge pull request #5508Pieter Wuille2015-01-041-0/+1
|\ | | | | | | 146c0a7 Add RandAddSeedPerfmon to MakeNewKey (21E14)
| * Add RandAddSeedPerfmon to MakeNewKey21E142014-12-181-0/+1
| |
* | Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
|/ | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Update Bitcoin for libsecp256k1 API changePieter Wuille2014-12-111-2/+2
|
* Merge pull request #5227Wladimir J. van der Laan2014-12-011-12/+20
|\ | | | | | | | | | | | | | | | | 4cdaa95 Resize after succesful result (Pieter Wuille) 9d8604f Header define style cleanups (Pieter Wuille) a53fd41 Deterministic signing (Pieter Wuille) 3060e36 Add the RFC6979 PRNG (Pieter Wuille) a8f5087 Add HMAC-SHA256 (Pieter Wuille) 36fa4a7 Split up crypto/sha2 (Pieter Wuille)
| * Resize after succesful resultPieter Wuille2014-11-281-2/+3
| |
| * Deterministic signingPieter Wuille2014-11-201-11/+18
| |
| * Split up crypto/sha2Pieter Wuille2014-11-201-1/+1
| |
* | Add key generation/verification to ECC sanity checkPieter Wuille2014-11-231-1/+9
| |
* | Add sanity check after key generationPieter Wuille2014-11-231-4/+15
|/ | | | | | | 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.
* Use libsecp256k1 in key.cppPieter Wuille2014-11-181-65/+6
|
* Do signature-s negation inside the testsPieter Wuille2014-11-101-2/+2
| | | | To avoid the need for libsecp256k1 to expose such functionality.
* boost: moveonly: split CPubKey and friends to new filesCory Fields2014-10-311-117/+1
|
* boost: moveonly: move BIP32Hash to hash.hCory Fields2014-10-311-12/+0
|
* boost: moveonly: create eccryptoverify.h|cpp and move helper functions thereCory Fields2014-10-311-51/+2
| | | | | Eventually (after 0.10) these files will hold the logic for crypto verification routines, and CKey/CPubKey will call into them.
* Update comments in keystore to be doxygen compatibleMichael Ford2014-10-281-1/+1
|
* Update comments in key to be doxygen compatibleMichael Ford2014-10-281-4/+4
|
* boost: code movement only: split CECKey into separate filesCory Fields2014-10-271-330/+3
|
* boost: remove CPubKey dependency from CECKey. Follow-up of e405aa48Cory Fields2014-10-271-21/+28
|
* boost: remove CPrivKey dependency from CECKeyCory Fields2014-10-151-15/+18
| | | | | This allows CECKey to be used without directly depending on the secure allocators
* Add automatic script test generation, and actual checksig testsPieter Wuille2014-09-261-4/+4
|
* Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false'ENikS2014-09-061-4/+4
|
* Fixing Compiler Error C2466ENikS2014-09-011-1/+1
|
* add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann2014-07-091-6/+4
| | | | | | - 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
* libsecp256k1 integrationPieter Wuille2014-07-011-11/+119
|
* ensure clean and consistent "namespace" usagePhilip Kaufmann2014-06-261-2/+1
| | | | | | - remove some missplaced ; - ensure end of a namespace is clearly visible - use same formatting when using namespace
* Move crypto implementations to src/crypto/Pieter Wuille2014-06-211-1/+1
|
* Add a built-in SHA256/SHA512 implementation.Pieter Wuille2014-06-211-11/+8
| | | | This also moves the HMAC-SHA512 implementation to sha2.cpp.
* key.cpp: fail with a friendlier message on missing ssl EC supportAndrew Poelstra2014-06-031-0/+12
| | | | | | | | | | | | | | | | | | | | | Previously if bitcoind is linked with an OpenSSL which is compiled without EC support, this is seen as an assertion failure "pKey != NULL" at key.cpp:134, which occurs after several seconds. It is an esoteric piece of knowledge to interpret this as "oops, I linked with the wrong OpenSSL", and because of the delay it may not even be noticed. The new output is : OpenSSL appears to lack support for elliptic curve cryptography. For more information, visit https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries : Initialization sanity check failed. Bitcoin Core is shutting down. which occurs immediately after attempted startup. This also blocks in an InitSanityCheck() function which currently only checks for EC support but should eventually do more. See #4081.
* remove CPubKey::VerifyCompact( ) which is never usedKamil Domanski2014-05-201-15/+0
|
* Also switch the (unused) verification code to low-s instead of even-s.Pieter Wuille2014-03-101-21/+51
| | | | | | | | a81cd968 introduced a malleability breaker for signatures (using an even value for S). In e0e14e43 this was changed to the lower of two potential values, rather than the even one. Only the signing code was changed though, the (for now unused) verification code wasn't adapted.