aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
AgeCommit message (Collapse)Author
2014-06-03key.cpp: fail with a friendlier message on missing ssl EC supportAndrew Poelstra
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.
2014-05-20remove CPubKey::VerifyCompact( ) which is never usedKamil Domanski
2014-03-10Also switch the (unused) verification code to low-s instead of even-s.Pieter Wuille
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.
2014-02-25Document that CPubKey.IsValid() is consensus criticalPeter Todd
2013-11-10Cleanup code using forward declarations.Brandon Dahler
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.
2013-10-28fix wrong memcmp() usage in CKey::operator==Philip Kaufmann
- 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
2013-08-28improve wallet load time by removing duplicated calls to EC_KEY_check_key ↵patrick s
and adding a hash for vchPubKey/vchPrivKey entries in wallet.dat backwards compatible with previous wallet.dat format
2013-07-15BIP32 derivation implementationPieter Wuille
2013-05-30Make signature cache store CPubKeysPieter Wuille
2013-05-30CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille
2013-05-30Make CPubKey statically allocatedPieter Wuille
2012-12-18Split off hash.h from util.hPieter Wuille
2012-10-20Compact serialization for scriptsPieter Wuille
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.
2012-09-15update comment, secure_allocator is defined in allocators.hWladimir J. van der Laan
2012-05-24Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille
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.
2012-05-24Encapsulate public keys in CPubKeyPieter Wuille
2012-05-22Merge branch 'optimize'Gavin Andresen
2012-05-18Update License in File HeadersFordy
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.
2012-05-17Refactor: move code from key.h to key.cppGavin Andresen
2012-04-17Fix tests after recent refactorsPieter Wuille
2012-04-17Further reduce header dependenciesPieter Wuille
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.
2012-04-15Fix misc. minor sign-comparison warningsJeff Garzik
2012-03-26Begin doxygen-compatible commentsPieter Wuille
2012-02-19Merge pull request #864 from sipa/fix_856Pieter Wuille
Make compressed pubkeys require client >=0.5.99
2012-02-19Fix #650: CKey::SetSecret BIGNUM leakPieter Wuille
2012-02-18Make compressed pubkeys require 0.6.0Pieter Wuille
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-01-26Full checking of all loaded keysPieter Wuille
2012-01-09Compact signatures with compressed pubkeysPieter Wuille
2012-01-09Compressed pubkeysPieter Wuille
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.
2011-12-19Code cleanup: use ECDSA_size() instead of fixed 10,000 byte sig buffer, and ↵Gavin Andresen
explicity init static var
2011-12-17Add GetSecret() and GetKeys() to CKeyStorePieter Wuille
2011-11-07Some extra commentsPieter Wuille
2011-09-27Compact signatures and key recoveryPieter Wuille
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.
2011-08-11Merge pull request #458 from TheBlueMatt/copyrightGavin Andresen
Unify copyright notices.
2011-08-09Unify copyright notices.Matt Corallo
To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
2011-08-08Add missing includes to key.hVegard Nossum
2011-07-17Use CBitcoinAddress instead of string/uint160Pieter Wuille
Instead of conversion functions between pubkey/uint160/address in base58.h, have a fully fledged class CBitcoinAddress (CAddress was already taken) to represent addresses.
2011-07-13Do not use obsolete CPrivKey for passing keys aroundPieter Wuille
2011-07-08Prepare codebase for Encrypted Keys.Pieter Wuille
2011-05-15make bitcoin include files more modularWladimir J. van der Laan
2011-04-23directory re-organization (keeps the old build system)Jaromil
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