Christopher Jeffrey
2a696b5b6f
root-certs: ensure JSON parses properly.
10 years ago
Christopher Jeffrey
59ac7079b1
paypro: convert root certs to json.
10 years ago
Christopher Jeffrey
3a3c546310
root-certs: move function out of root certs file.
10 years ago
Christopher Jeffrey
5145272575
paypro: handle concatenated pems in pem parser.
10 years ago
Christopher Jeffrey
8593ad461e
paypro: pem parsing - rename variables.
10 years ago
Christopher Jeffrey
6e329b15bb
paypro: add a full PEM parsing function.
10 years ago
Christopher Jeffrey
9dbe45ad03
paypro: account for PEM metadata as per rfc1424.
10 years ago
Christopher Jeffrey
18c38ae67a
paypro: add returnTrust to sign(). minor improvements.
11 years ago
Christopher Jeffrey
f34b98d253
paypro: allow users to return verification properties via PayPro.verify.
11 years ago
Christopher Jeffrey
f98ebe69d8
paypro: move validity and issuer validation into common.
11 years ago
Christopher Jeffrey
a39aeeb446
paypro: move tbs parsing into common.
11 years ago
Christopher Jeffrey
882ce9d809
paypro: debugging and sigAlg/pubKey formats.
11 years ago
Christopher Jeffrey
6828f560da
paypro: fix root certs.
11 years ago
Ryan X. Charles
9f9e2f1d41
k should be 32 bytes, not 8 bytes
This is a bug with security implications. It is much easier to guess the value
of k within a 64 byte range. This would lead to compromised private keys.
The cryptography interface of bitcore is extremely poor. I recommend:
* Get rid of the C++ code, since it makes everything more difficult with little benefit
* Refactor all crypto, and have easily auditable bignum, point, ecdsa, and key classes
* Then actually audit the crypto
11 years ago
Christopher Jeffrey
124d1a2fc3
paypro: expose RootCerts on PayPro.
11 years ago
Ryan X. Charles
f87da3b5ba
add support for signing messages in compressed format
...this is the standard way to sign messages in bitcoin-qt. Note that the
format of a compressed signature, for messages, is quite distinct from DER
format, which is used in transactions. This commit also adds support for
recovering the public key from a signature, which is necessary for this. The
code for public key recover is taken from bitcoinjs-lib.
11 years ago
Christopher Jeffrey
8a84092be9
root-certs: use hasOwnProperty check instead of __proto__=null.
11 years ago
Christopher Jeffrey
dd165ecf63
paypro: root certs - do not inherit from Object.
11 years ago
Christopher Jeffrey
5b4c4f3894
paypro: get root cert names.
11 years ago
Christopher Jeffrey
0020e289d8
paypro: allow identification of root certs.
11 years ago
Christopher Jeffrey
11c977ba70
fix: typo - s/Payment/PaymentACK/
11 years ago
Christopher Jeffrey
017f044b53
paypro: fix browser signatures with KJUR. move pem/der functions to common.
11 years ago
Christopher Jeffrey
604ac04f47
paypro: split up paypro into node/browser/common.
11 years ago
Christopher Jeffrey
cec71a51fd
paypro: add isTrusted function to RootCerts.
11 years ago
Christopher Jeffrey
85d5e69fc1
paypro: move root certs to common.
11 years ago
Ryan X. Charles
bfe5877ee7
require SecureRandom and Point ... woops
11 years ago
Ryan X. Charles
57a55d0863
expose signature internal functions
"sign" and "genk" ... and add some signature tests
11 years ago
Ryan X. Charles
5f6d02f5de
add proper DER signature support to Key
both creating DER signature from the r and s values, and parsing a DER
signature into the r, s, and other properties.
11 years ago
Linus Unnebäck
3da6fe899f
cleanup after removal of soop
Removed some unnecessary parenthesise that hung around after the merge
of #417
11 years ago
Ryan X. Charles
af1d754bd8
make bignum interface backwards compatible
- fix cmp, mul, div, add, mod, sub functions to take numbers and strings
- fix Point class to use common folder correctly
11 years ago
Manuel Araoz
87b818badf
remove soop exports
11 years ago
Manuel Araoz
6e346d067c
remove soop imports
11 years ago
Ryan X. Charles
ca67786a77
ran js-beautify on all bitcore source
js-beautify -s 2 -r *.js
...did not run on bundles, only on source.
11 years ago
Ryan X. Charles
80ccaa8396
rename "rand" to more explanatory "getRandomSeed"
11 years ago
Ryan X. Charles
af9fdff3a9
use SJCL AES to get ECIES working in the browser
11 years ago
Ryan X. Charles
ba692aaa20
add new SecureRandom class that does the right thing
Generating random numbers properly depends on the platform. The new
getRandomBuffer method does the right thing on the right platform. It will
sometimes fail due to insufficient entropy. The getPseudoRandomBuffer class is
also provided that will never fail, but it is not cryptographically secure and
should not be used for keys.
11 years ago