aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4779Wladimir J. van der Laan2014-09-011-1/+1
|\ | | | | | | 093303a add missing header end comments (Philip Kaufmann)
| * add missing header end commentsPhilip Kaufmann2014-08-281-1/+1
| | | | | | | | | | | | - ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
* | Fix a few "Uninitialized scalar field" warningsWladimir J. van der Laan2014-08-281-1/+1
|/ | | | | | Fix a few warnings reported by Coverity. None of these is critical, but making sure that class fields are initialized can avoid heisenbugs.
* key.cpp: fail with a friendlier message on missing ssl EC supportAndrew Poelstra2014-06-031-0/+3
| | | | | | | | | | | | | | | | | | | | | 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-4/+0
|
* Also switch the (unused) verification code to low-s instead of even-s.Pieter Wuille2014-03-101-0/+3
| | | | | | | | 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.
* Document that CPubKey.IsValid() is consensus criticalPeter Todd2014-02-251-1/+3
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-3/+5
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* fix wrong memcmp() usage in CKey::operator==Philip Kaufmann2013-10-281-3/+4
| | | | | | - add a check for CKey::size() of a and b (size can be 0 or 32) - change the fixed value in memcmp() to use a.size() instead - fixes #3090
* improve wallet load time by removing duplicated calls to EC_KEY_check_key ↵patrick s2013-08-281-0/+3
| | | | | | and adding a hash for vchPubKey/vchPrivKey entries in wallet.dat backwards compatible with previous wallet.dat format
* BIP32 derivation implementationPieter Wuille2013-07-151-0/+46
|
* Make signature cache store CPubKeysPieter Wuille2013-05-301-4/+3
|
* CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille2013-05-301-92/+131
|
* Make CPubKey statically allocatedPieter Wuille2013-05-301-14/+71
|
* Split off hash.h from util.hPieter Wuille2012-12-181-1/+1
|
* Compact serialization for scriptsPieter Wuille2012-10-201-2/+1
| | | | | | | | | | | Special serializers for script which detect common cases and encode them much more efficiently. 3 special cases are defined: * Pay to pubkey hash (encoded as 21 bytes) * Pay to script hash (encoded as 21 bytes) * Pay to pubkey starting with 0x02, 0x03 or 0x04 (encoded as 33 bytes) Other scripts up to 121 bytes require 1 byte + script length. Above that, scripts up to 16505 bytes require 2 bytes + script length.
* update comment, secure_allocator is defined in allocators.hWladimir J. van der Laan2012-09-151-1/+1
|
* Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille2012-05-241-2/+23
| | | | | | | | | | | | | | | | | This introduces internal types: * CKeyID: reference (hash160) of a key * CScriptID: reference (hash160) of a script * CTxDestination: a boost::variant of the former two CBitcoinAddress is retrofitted to be a Base58 encoding of a CTxDestination. This allows all internal code to only use the internal types, and only have RPC and GUI depend on the base58 code. Furthermore, the header dependencies are a lot saner now. base58.h is at the top (right below rpc and gui) instead of at the bottom. For the rest: wallet -> script -> keystore -> key. Only keystore still requires a forward declaration of CScript. Solving that would require splitting script into two layers.
* Encapsulate public keys in CPubKeyPieter Wuille2012-05-241-2/+37
|
* Merge branch 'optimize'Gavin Andresen2012-05-221-245/+23
|\
| * Refactor: move code from key.h to key.cppGavin Andresen2012-05-171-245/+23
| |
* | Update License in File HeadersFordy2012-05-181-1/+1
|/ | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* Fix tests after recent refactorsPieter Wuille2012-04-171-1/+1
|
* Further reduce header dependenciesPieter Wuille2012-04-171-1/+1
| | | | | | | This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious.
* Fix misc. minor sign-comparison warningsJeff Garzik2012-04-151-2/+2
|
* Begin doxygen-compatible commentsPieter Wuille2012-03-261-0/+1
|
* Merge pull request #864 from sipa/fix_856Pieter Wuille2012-02-191-1/+1
|\ | | | | Make compressed pubkeys require client >=0.5.99
| * Make compressed pubkeys require 0.6.0Pieter Wuille2012-02-181-1/+1
| |
* | Fix #650: CKey::SetSecret BIGNUM leakPieter Wuille2012-02-191-1/+4
|/
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Full checking of all loaded keysPieter Wuille2012-01-261-0/+12
|
* Compact signatures with compressed pubkeysPieter Wuille2012-01-091-3/+11
|
* Compressed pubkeysPieter Wuille2012-01-091-4/+30
| | | | | | | | | | This patch enabled compressed pubkeys when -compressedpubkeys is passed. These are 33 bytes instead of 65, and require only marginally more CPU power when verifying. Compressed pubkeys have a different corresponding address, so it is determined at generation. When -compressedpubkeys is given, all newly generated addresses will use a compressed key, while older/other addresses keep using normal keys. Unpatched clients will relay and verify these transactions.
* Code cleanup: use ECDSA_size() instead of fixed 10,000 byte sig buffer, and ↵Gavin Andresen2011-12-191-6/+7
| | | | explicity init static var
* Add GetSecret() and GetKeys() to CKeyStorePieter Wuille2011-12-171-117/+2
|
* Some extra commentsPieter Wuille2011-11-071-1/+15
|
* Compact signatures and key recoveryPieter Wuille2011-09-271-0/+140
| | | | | Introduce a new type of signatures that are only 65 bytes long, and allow reconstruction of the public key that was used to create the signature.
* Merge pull request #458 from TheBlueMatt/copyrightGavin Andresen2011-08-111-0/+1
|\ | | | | Unify copyright notices.
| * Unify copyright notices.Matt Corallo2011-08-091-0/+1
| | | | | | | | | | | | To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
* | Add missing includes to key.hVegard Nossum2011-08-081-0/+7
|/
* Use CBitcoinAddress instead of string/uint160Pieter Wuille2011-07-171-0/+5
| | | | | | Instead of conversion functions between pubkey/uint160/address in base58.h, have a fully fledged class CBitcoinAddress (CAddress was already taken) to represent addresses.
* Do not use obsolete CPrivKey for passing keys aroundPieter Wuille2011-07-131-16/+0
|
* Prepare codebase for Encrypted Keys.Pieter Wuille2011-07-081-2/+68
|
* make bitcoin include files more modularWladimir J. van der Laan2011-05-151-8/+15
|
* directory re-organization (keeps the old build system)Jaromil2011-04-231-0/+168
there is no internal modification of any file in this commit files are moved into directories according to established standards in sourcecode distribution; these directories contain: src - Files that are used in constructing the executable binaries, but are not installed. doc - Files in HTML and text format that document usage, quirks of the implementation, and contributor checklists. locale - Files that contain human language translation of strings used in the program contrib - Files contributed from distributions or other third party implementing scripts and auxiliary programs