Commit Graph

249 Commits

Author SHA1 Message Date
Neil Booth b878c010da Minikey: minimum length 20
On second thoughts there seems little reason to accept text
of length <= 20 for minikeys.
2016-01-21 08:11:50 +09:00
Neil Booth f7859c041e Support Casascius minikeys 2016-01-19 22:00:16 +09:00
ThomasV 0d52911561 define constants for tx output types 2016-01-14 17:15:50 +01:00
ThomasV da8fce1914 if available, use relayfee from server instead of hard coded value 2016-01-14 16:06:22 +01:00
ThomasV 86a0103a7f increase min_relay_tx_fee, and make dust_threshold a function 2015-11-12 14:31:17 +01:00
ThomasV d68042e76e enforece low S value in signatures (per BIP62) 2015-10-05 09:15:22 +02:00
ThomasV f583fcfedb do not import dns on android 2015-08-18 12:15:56 +02:00
Roman Zeyde abc7429b0f bitcoin: remove multiple imports 2015-08-09 19:35:02 +03:00
ThomasV 471cab6089 do not base64encode signatures in requests 2015-07-14 16:37:04 +02:00
ThomasV f3c4a55e77 add dnssec verification to payment requests 2015-07-07 08:59:03 +02:00
ThomasV 15f592f022 trezor multisig: build xpub from pubkey 2015-07-05 23:29:36 +02:00
ThomasV 7933ac4324 reformatting 2015-07-04 12:07:33 +02:00
ThomasV 0c37009cdb fix is_address (forgot p2sh) 2015-07-02 08:53:17 +02:00
ThomasV cf5328b143 do not accet testnet addresses in bitcoin.is_address 2015-07-02 08:48:48 +02:00
Roman Zeyde 6bb9ee0cf7 bitcoin: remove dead code 2015-06-13 08:34:56 +03:00
Neil Booth 03e53a5e01 Create a constant for 100000000 and use it
Use same name as is in bitcoind.
Note that one of the constants in text.py had the wrong number
of zeroes previously...
2015-06-01 14:53:36 +09:00
ukurokawa e708c446a8 Dust threshold should be 546 2015-04-11 11:41:02 -04:00
K 41127db32d Let wallet recovery use 64 byte hex strings and 24 word seeds.
1. Allow wallet recovery from 64 byte hex strings.
2. Allow use of 24 word legacy seeds created from 64 byte hex strings.
2015-03-19 08:20:32 -07:00
ThomasV 46c290e30d use base43 in order to send transactions by QR code 2015-02-26 13:59:29 +01:00
ThomasV 059d381ba8 backport padding fix to AES module 2015-02-03 08:01:01 +01:00
ThomasV 16c72d286c try to import all python dependencies from the main script 2015-01-26 14:14:16 +01:00
ThomasV 906e0ecd14 rename SEED_PREFIX constant 2015-01-21 23:43:26 +01:00
ThomasV da968b60e4 drop support for multiple accounts (bip44) in standard wallets 2015-01-05 00:33:10 +01:00
ThomasV 63c7a27d7e add InvalidPassword exception 2014-12-03 22:35:05 +01:00
ThomasV bde0ca3ea1 set default fee to 0.5mBTC/kb 2014-09-15 07:35:05 +02:00
ThomasV cef75e9e7b new seed_version: remove whitespaces only between CJK characters 2014-09-13 19:31:05 +02:00
ThomasV 93d073457c add spanish wordlist and remove accents 2014-09-11 14:20:10 +02:00
ThomasV 6361abaf4d extended seed prefix 2014-09-09 11:51:45 +02:00
ThomasV cc71dfea86 check all bytes in strip_pkcs7_padding 2014-09-01 15:37:38 +02:00
ThomasV de1123e4a0 ecies: update description in comment 2014-09-01 15:20:52 +02:00
ThomasV a97375dbb4 ecies: use the same KDF to derive aes init vector and aes and hmac keys. 2014-09-01 14:57:08 +02:00
ThomasV eed37c41b5 ecies: don't drop sign of ephemeral key 2014-09-01 13:15:15 +02:00
ThomasV 2c51b0aa14 update mnemonic imports 2014-08-29 12:27:10 +02:00
ThomasV 4dcdcbc068 move mnemonic to separate class and use slush's wordlist. new commands: make_seed and check_seed 2014-08-28 15:37:42 +02:00
ThomasV ef74ae57ff fix tests 2014-08-25 15:32:21 +02:00
ThomasV bf3f67c043 do not expose mnemonic_to_seed 2014-08-13 15:43:54 +02:00
Chris Glass 9baaaef746 Made use of fewer constants 2014-06-27 16:15:04 +02:00
Chris Glass 0ac02bf040 Made all bip32 primitives testnet compatible. 2014-06-27 15:44:43 +02:00
ThomasV 54973062bd restore from xprv 2014-06-25 16:45:55 +02:00
Chris Glass 413945435a Added private/public key tests
Including converting from a private key to a public key, and
deriving the primary address from a private key.
2014-06-25 08:27:45 +02:00
Chris Glass 73c33820db Moved bitcoin.py tests to their own file
This allows standard python testing tools to discover and run them.
2014-06-25 07:35:49 +02:00
ThomasV 31226b8a34 add pbkdf2 dependency 2014-06-05 16:19:13 +02:00
ThomasV 1045b537aa unit test for aes 2014-06-03 13:15:41 +02:00
ThomasV 30b608c6fb move tests to unittest format 2014-06-03 09:34:59 +02:00
ThomasV 650ef92c5f class MyVerifyingKey, with constructor to submit to python-ecdsa 2014-05-30 21:24:23 +02:00
ThomasV 501bb92584 Remove Bitcoin address from serialized encryption format. Enable encrypt commands, fix ser_to_point() and add some tests 2014-05-28 12:20:04 +02:00
Lucas Ryan a3d02525e2 in ecies encryption, mac headers+ciphertext instead of just ciphertext 2014-05-27 11:37:37 -07:00
Lucas Ryan 93f61f1717 replaced jackjack encryption with corrected ecies implementation 2014-05-27 10:55:51 -07:00
ThomasV c76da17262 utf8 encoding for seed encryption 2014-05-04 20:31:05 +02:00
ThomasV c9fc6275ab move private key methods from wallet to accounts 2014-05-04 19:43:15 +02:00
ThomasV 84052bcdb2 fix bug with has_seed 2014-04-30 15:44:46 +02:00
ThomasV 582fb76e9e new class: Imported_Wallet 2014-04-29 21:04:16 +02:00
ThomasV 23df7394df is_new_seed: encode utf8 2014-04-29 19:30:31 +02:00
ThomasV 41f9da1559 fix #655 2014-04-20 10:42:13 +02:00
Drak d082ed3cb5 Lower minimum tx fee in line with Bitcoin 0.9
Since Bitcoin Core 0.9 the minimum relay tx fee was lowered to `0.00001`.
2014-04-14 21:20:42 +01:00
ThomasV c24482c21a check seed in gui. fixes #622 2014-04-05 10:34:51 +02:00
ThomasV 9fccf9c287 helper functions for bip32 derivations 2014-04-01 19:10:13 +02:00
ThomasV 9663600d5d update bip32 derivations, using xpriv and xpub serialization format 2014-03-31 12:16:15 +02:00
ThomasV 91ba04c4d7 update bip32 derivations, using xpriv and xpub serialization format 2014-03-31 12:12:29 +02:00
ThomasV 328432f5f4 update bip32 derivations, using xpriv and xpub serialization format 2014-03-31 12:00:57 +02:00
ThomasV cef7bbf294 add get_public_key method to EC_KEY class 2014-03-04 16:33:25 +01:00
ThomasV da6f292dd5 encrypt/decrypt messages in gui 2014-03-03 10:39:10 +01:00
ThomasV fc9d2b6ee9 remove redundant function 2014-02-03 13:50:01 +01:00
ThomasV c90bc6aa26 bip39 2014-02-01 11:23:29 +01:00
ThomasV 631c967df9 new commands: encrypt and decrypt messages 2014-01-30 14:43:46 +01:00
ThomasV ae3cb372c8 add ECDSA asymmetric encryption 2014-01-30 11:42:55 +01:00
ThomasV 9218175301 enable bip32 2014-01-29 17:12:08 +01:00
William Yager 4e1d6da805 Cleaned up/commented BIP 0032 key derivation. 2014-01-04 15:24:38 -06:00
Juho Östman 27b08a8ea2 Allow password to have non-ASCII characters 2013-11-18 23:31:45 +02:00
Bryan Stitt 225d8b83a3 don't use bare except 2013-11-09 21:23:57 -08:00
Bryan Stitt f0eb0eccde replace BaseException with Exception 2013-11-09 20:21:02 -08:00
ThomasV 31aaae8ed2 seed v6 2013-10-26 16:40:05 +02:00
thomasv 37888fc6a5 upgrade message for ecdsa 2013-10-07 11:39:19 +02:00
ThomasV f14d055ad8 choose_tx_from account, and use deterministic signatures (issue #323) 2013-10-05 21:15:48 +02:00
thomasv b08bc514db sign/verify: do unicode conversion only for messages sent by the gui 2013-09-15 17:49:23 +02:00
thomasv 2c6534c1ba sign unicode messages 2013-09-15 17:33:27 +02:00
Fredrick 16902cc3ca Bugfix: Allow signing messages over 252 characters 2013-09-10 17:31:01 -04:00
thomasv 5514d3bd74 fix address_from_perivate_key 2013-09-09 14:12:37 +02:00
thomasv afac84e231 move transaction code and fix issue #280 2013-09-04 16:46:27 +02:00
ThomasV 0cef6c2454 fix bug with signatures 2013-08-17 23:01:16 +02:00
ThomasV 81b84fd5ef fixes for signrawtransaction 2013-08-17 18:40:59 +02:00
ThomasV 6bb8af5822 include master public key in bip32 metadata 2013-08-17 17:08:43 +02:00
ThomasV 799c6571f5 simplify: public_key_from_private_key 2013-08-17 11:09:19 +02:00
ThomasV 4869d05841 don't pass addresses to tx.sign(), pass keypairs instead 2013-08-17 10:56:23 +02:00
ThomasV e91e02f2ce simplify tx.sign() 2013-08-16 22:05:31 +02:00
ThomasV 70445da940 wallet.num_accounts and account_id method 2013-08-16 13:26:48 +02:00
ThomasV 177c43acbe fix is_complete in tx.sign() 2013-08-16 12:52:39 +02:00
ThomasV c019428b02 fix for non-p2sh addresses 2013-08-16 12:27:26 +02:00
ThomasV 419c778fa3 fix tx signing 2013-08-16 12:17:29 +02:00
ThomasV 7dc69bbc56 create_accounts for 2of3 2013-08-15 17:23:55 +02:00
ThomasV c9a473c225 2of3 accounts 2013-08-15 15:27:03 +02:00
ThomasV 19553a056d bip32 2013-08-07 22:54:21 +02:00
thomasv 9ce90932ba update BIP32 to its final spec 2013-07-19 16:17:11 +02:00
Marku 253d1d50c3 fix BIP32Sequence::get_pubkey not using mpk parameter 2013-06-02 19:26:45 -03:00
thomasv e89331d138 handle multiple accounts with separation 2013-04-06 18:44:31 +02:00
ecdsa fc7122008a implement MIN_RELAY_TX_FEE 2013-03-24 11:25:17 +01:00
thomasv a5168cc09f more accurate computation of transaction fees. 2013-03-23 12:36:37 +01:00
ecdsa f0671a9ada fix tx.get_value() 2013-03-16 22:04:28 +01:00
ecdsa f07591eb5b Revert "fix tx.get_value bug with pruned transactions"
This reverts commit 8a74be39de.
2013-03-16 21:38:10 +01:00
ecdsa 8a74be39de fix tx.get_value bug with pruned transactions 2013-03-16 21:22:03 +01:00
ecdsa b955c9ffa1 more bip32 related fixes 2013-03-13 18:51:05 +01:00
ecdsa 2f31ca779d fix bip32 get_private_key 2013-03-13 18:20:05 +01:00
ecdsa c19e0f0b3f bip32 fixes 2013-03-13 18:03:41 +01:00
ecdsa 1d3be5fb0b fix: number of arguments 2013-03-13 17:52:54 +01:00
thomasv 10bfcb918b replace 'ElectrumKeyID' with more general 'KeyID' field in transactions 2013-03-12 17:54:26 +01:00
thomasv c9302bcd56 add 2 of 3 sequences 2013-03-11 19:04:46 +01:00
ecdsa 4019102264 rename sequence, fix bip32 2013-03-04 07:43:01 +01:00
thomasv 0f22b5e566 fix: missing parameter 2013-03-03 11:00:27 +01:00
thomasv 5846f725d6 simplify Sequence class 2013-03-03 10:56:48 +01:00
thomasv 60cefeafca method get_private_keys for sequence 2013-03-03 10:43:08 +01:00
thomasv 27b8b21f9e mangle (for_change, index) everywhere 2013-03-03 10:24:30 +01:00
ecdsa 736e1253f2 add class BIP32Sequence 2013-03-02 23:31:40 +01:00
thomasv e84d087a64 accounts 2013-03-02 11:23:08 +01:00
thomasv f72c8ee5d2 move is_valid from wallet class to bitcoin.py 2013-03-01 14:27:56 +01:00
thomasv 95dc97b39b rename 'addresses' command as 'listadresses'. use json syntax. 2013-03-01 11:21:10 +01:00
thomasv ea96b79997 use json format 2013-02-27 18:11:45 +01:00
thomasv 9afe0d8aaf fix: input_info missing in transaction 2013-02-26 18:18:36 +01:00
thomasv 2e9c2c1f96 return python objects from commands, and display them as json 2013-02-26 17:57:48 +01:00
thomasv 96d459ab88 use dumpprivkeys to efficiently dump private keys 2013-02-26 16:03:04 +01:00
thomasv 42a10164ea make most commands available in the console 2013-02-26 13:56:48 +01:00
thomasv 4916aefe98 documentation for offline wallets, release notes 2013-02-25 10:14:20 +01:00
thomasv 8b8e2fd67b rename inpust_info -> input_info 2013-02-25 09:34:47 +01:00
ThomasV b8a71ff00c offline wallets sign transactions using KeyID 2013-02-25 09:05:45 +01:00
thomasv 64ad3fc28c use serialized format in signtx 2013-02-24 21:31:11 +01:00
thomasv 5da3cab24b move seed generation function to bitcoin.py 2013-02-24 10:16:14 +01:00
ThomasV a0455725bd fix is_complete: count number of valid signatures 2013-02-23 17:36:32 +01:00
ThomasV 8cf97fdb52 minor fix 2013-02-23 17:20:22 +01:00
ThomasV 811d05a1c2 move methods into Transaction class 2013-02-23 17:18:22 +01:00
ThomasV 641177404d remove p2sh test; not needed anymore 2013-02-23 16:42:48 +01:00
thomasv 04a5739979 simplification: tx_for_sig 2013-02-23 15:15:16 +01:00
thomasv bd8dbbf79b check if multisig transaction is complete, add is_complete to json output 2013-02-23 15:11:41 +01:00
thomasv a56220f050 multisig: raise exception if no signature can be added 2013-02-23 14:42:31 +01:00
thomasv 03e2160503 create separate class for deterministic key generation. add pubkeys to validateaddress 2013-02-23 11:35:46 +01:00
thomasv 94fbad2965 remove debugging messages 2013-02-23 10:00:33 +01:00
thomasv f0b255acba store transactions in serialized form 2013-02-22 19:22:22 +01:00
thomasv 5d6496f1f9 move crypto from wallet class to bitcoin.py 2013-02-22 16:17:46 +01:00
thomasv 40b397dc0f signrawtransaction: parse redeemScript 2013-02-22 13:40:42 +01:00
thomasv c400583443 bugfix: for_sig != -1 2013-02-21 16:51:02 +01:00
thomasv 0863f09a06 add dumpprivkey command; finalize private_keys parameter for signrawtransaction 2013-02-21 16:26:26 +01:00
thomasv aa166dd9f0 fix p2sh test 2013-02-21 15:36:38 +01:00
thomasv f4df5ed9c7 fix the p2sh test 2013-02-21 15:35:20 +01:00
thomasv ea7718fc59 create Transaction class 2013-02-21 14:18:12 +01:00
thomasv 972ba397d1 support for multisig functions 2013-02-20 13:10:32 +01:00
thomasv e1504ba80b basic functions and tests for multisig transactions and bip 32 2013-01-30 20:13:31 +01:00
thomasv e7e169888d support for compressed keys 2013-01-05 11:50:49 +01:00
ThomasV faa002f53c fix: below or equal in var_int encoding 2012-10-26 22:51:33 +02:00
ThomasV 4038c0273f fix: var_int encoding 2012-10-26 22:49:06 +02:00
ThomasV b018e0ae53 simple payment verification: check targets, use block headers file. 2012-10-24 21:45:45 +02:00
thomasv 5717b43661 separate bitcoin related functions from wallet.py 2012-10-19 14:55:01 +02:00