aboutsummaryrefslogtreecommitdiff
path: root/src/test/key_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace test data with Dogecoin valuesRoss Nicoll2018-09-191-16/+15
| | | | | | | | | | | | | | | | | | | Replace test data with Dogecoin equivalents in the folowing tests: * base58 * bip32 * keys * miner * pow Replace RPC and deterministic signatures in unit tests with Dogecoin values. While conventionally I'd use an alternative implementation for these, as RFC 6979 compliant signature generation isn't terribly common, and there's no reason to suspect we've modified this code, I'm going to assert that it's good enough to test that the code doesn't provide different values. Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are replaced by the Dogecoin PoW tests.
* Refactoring: Removed using namespace <xxx> from bench/ and test/ source files.Karl-Johan Alm2017-01-021-13/+11
|
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Merge pull request #5227Wladimir J. van der Laan2014-12-011-0/+23
|\ | | | | | | | | | | | | | | | | 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)
| * Deterministic signingPieter Wuille2014-11-201-0/+23
| |
* | Add sanity check after key generationPieter Wuille2014-11-231-0/+20
|/ | | | | | | 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.
* Typo in testLuke2014-10-131-1/+1
|
* Move CScript class and dependencies to script/scriptjtimon2014-09-081-1/+1
|
* Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes)jtimon2014-09-081-1/+1
|
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-0/+4
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-5/+7
| | | | | | | | | 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.
* CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille2013-05-301-51/+45
|
* Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille2012-05-241-10/+17
| | | | | | | | | | | | | | | | | 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.
* CBitcoinSecret::SetString() now calls IsValid() to make sure it was passed ↵Chris Moore2012-04-121-5/+7
| | | | something with the correct version.
* Unit tests for EC key routinesPieter Wuille2012-01-091-0/+138
This tests: * creation of keys from base58-encoded strings * extracting public keys and addresses * compressed public keys * compact signatures and key recovery