Matias Alejo Garcia
95988dd7d3
first 2 sighash cash vector passing
7 years ago
Braydon Fuller
514fc8d326
crypto: switch to Node.js sha512
The sha512 library has not been updated in quite some time. This switches to
use Node.js crypto for sha512 that will use crypto-browserify, and more
recently maintained sha.js for the browser build.
9 years ago
Kirill Fomichev
3579305b5e
Fix K generator in ECDSA
9 years ago
Ed Bosher
c5a107961c
Set s mid point as hex rather than decimal (bn.js default)
9 years ago
Braydon Fuller
41a4e6e19f
Update for crypto-browserify.
9 years ago
Braydon Fuller
07a02ec86b
Fix issue with crypto library browser ripemd160 support.
10 years ago
Ryan X. Charles
c1087c2827
fix web worker issues
bitcore should be able to run inside a web worker. There were two minor issues
preventing bitcore from running inside a web worker. The first was that lodash
was outdated, and that version of lodash had a problem with web workers. The
second was that the wrong version of ripemd160 was being called, because
global.window does not exist inside a web worker (global.self does instead). A
better way to check if you are in a browser is with process.browser.
9 years ago
Braydon Fuller
55afeb3eaf
Use Node.js crypto ripemd160 hash if available.
10 years ago
Esteban Ordano
4280b993e0
Add CLTV (BIP65) support
10 years ago
mruddy
9b727afc71
fix signature hasDefinedHashtype method to be closer to the Bitcoin Core function IsDefinedHashtypeSignature
10 years ago
mruddy
02cad1645a
fix root cause for bitcore.Transaction.sighash.sign not setting nhashtype.
added unit tests.
fixed an existing lint in a file that i touched.
10 years ago
Braydon Fuller
a03e6b9385
Add base option for BN.fromString
10 years ago
Braydon Fuller
a5cd5a1407
Added support for uncompressed public keys to Signature.fromCompact
10 years ago
Trevin Hofmann
59a9e40f13
Properly capitalize BufferUtil everywhere
Right out of CONTRIBUTING.md
https://github.com/bitpay/bitcore/blob/master/CONTRIBUTING.md#g6---naming-utility-namespaces
10 years ago
Esteban Ordano
605be801af
Add Signature subclass for Transaction Signatures
10 years ago
Esteban Ordano
0bcfec9f2f
Point: Return the curve point instead of instantiating each time
10 years ago
Esteban Ordano
73a973359b
Fix invocations to binary operations called on numbers
10 years ago
Esteban Ordano
6b05f20397
Add the new operator when BN was used without it
10 years ago
Esteban Ordano
9b2ba6f2a2
Drop prototypal inheritance for bn
10 years ago
Braydon Fuller
d2a2be7a93
Upgraded bn.js to fix public key calculation problem, restored crypto/point.js, and added additional tests.
10 years ago
Braydon Fuller
bc4e62ecd4
Fixed public key calculation by returning the elliptic ec.curve.g
10 years ago
bip32JP
95bfb18849
Fix the error loop.
I added a similar badrs function to python-ecdsa and compared the results.
The 1 badrs (aka forcing it to loop once) gave me a different value. It turns out you missed one of the `v = hmac_k(v)` steps during the loop.
Adding one extra `v = hmac_k(v)` in each loop makes it match up with python-ecdsa perfectly (I even tried up to badrs = 30 and it was fine.
10 years ago
Manuel Araoz
225ade6c7a
return comment to deterministicK
10 years ago
Manuel Araoz
aa6ecfd79b
hash 100% coverage
10 years ago
Manuel Araoz
686bc091ba
remove dead code
10 years ago
Manuel Araoz
6c518f1f45
refactoring interpreter
10 years ago
Manuel Araoz
370f69df88
refactor BN and ECDSA
10 years ago
Manuel Araoz
3dd86446e0
add Interpreter docs and refactor a bit
10 years ago
Manuel Araoz
3eba0bc546
address review comments
10 years ago
Manuel Araoz
4fcc048311
script interpreting working
10 years ago
Manuel Araoz
ddd11e908c
all script_valid tests passing!
10 years ago
Manuel Araoz
0ddec23c02
fix some more tests
10 years ago
Manuel Araoz
cf48899a3a
make creation methods class methods
10 years ago
Manuel Araoz
c888c3baa7
adding some signature methods for script interpreting
10 years ago
Manuel Araoz
3de71f8558
refactors and fixes for script interpreter
10 years ago
Esteban Ordano
de4d2884c7
Modify Transaction to use Multisig
* Allow `Script#add` to add a Script causing concatenation of opcodes
* Add `Script#equals` to compare scripts
* Add `Script#fromAddress`
* Drop `_payTo` methods
* Add `Script.buildP2SHMultisigIn`
Greatly simplifying the internal transaction object
10 years ago
Braydon Fuller
e4cf84519d
BN: Remove toJSON and fromJSON methods from BN, as they are equivalent to toString and fromString
10 years ago
Esteban Ordano
5c974a8ef2
Refactor transaction to match new API
* Refactor transaction into a different subfolder
* Added a lot of tests for sighash and transaction serialization (from
reddit's and Ryan X. Charles' `fullnode`)
* Drop "only" from sighash tests and consolidate logs
10 years ago
Braydon Fuller
c86f6d68a9
ECDSA: Remove console.log
10 years ago
Esteban Ordano
4e9e89cdbf
Move license notes to LICENSE
10 years ago
Esteban Ordano
736bcd6bd4
Backport changes to ecdsa from fullnode
10 years ago
Braydon Fuller
9a76bf30ff
Crypto/Point: Added test coverage and documentation, and refactored validation
10 years ago
Esteban Ordano
a2a51ecc0c
Fix style: move each static function to an appropiate namespace
10 years ago
Manuel Araoz
1f3d7d9872
move Signature to crypto/
10 years ago
Braydon Fuller
2a2dc8196d
Crypto: Update ECDSA with to use PrivateKey and PublicKey
10 years ago
Braydon Fuller
8c4301cb0a
Tests: Updated tests to run from sub-directories and fixed crypto and encoding related missing updates.
10 years ago
Braydon Fuller
85ce140aeb
Keys: Renamed Privkey to PrivateKey and Pubkey to PublicKey
10 years ago
Braydon Fuller
23c1ed3599
Keys: Refactored to use Pubkey and Privkey and removed Keypair
10 years ago
Manuel Araoz
e0340213fe
remove KDF
10 years ago
Manuel Araoz
5440baad83
fix tests for random
10 years ago