Commit Graph

38 Commits

Author SHA1 Message Date
Esteban Ordano
e154c205b3 Leaner package distribution 2014-10-26 18:42:03 -03:00
Christopher Jeffrey
2a696b5b6f root-certs: ensure JSON parses properly. 2014-09-10 10:20:11 -07:00
Christopher Jeffrey
59ac7079b1 paypro: convert root certs to json. 2014-09-09 17:52:13 -07:00
Christopher Jeffrey
3a3c546310 root-certs: move function out of root certs file. 2014-09-09 17:15:13 -07:00
Christopher Jeffrey
5145272575 paypro: handle concatenated pems in pem parser. 2014-09-05 17:56:13 -07:00
Christopher Jeffrey
8593ad461e paypro: pem parsing - rename variables. 2014-09-05 17:52:14 -07:00
Christopher Jeffrey
6e329b15bb paypro: add a full PEM parsing function. 2014-09-05 17:52:14 -07:00
Christopher Jeffrey
9dbe45ad03 paypro: account for PEM metadata as per rfc1424. 2014-09-05 17:52:14 -07:00
Christopher Jeffrey
18c38ae67a paypro: add returnTrust to sign(). minor improvements. 2014-08-28 18:58:58 -07:00
Christopher Jeffrey
f34b98d253 paypro: allow users to return verification properties via PayPro.verify. 2014-08-28 17:50:57 -07:00
Christopher Jeffrey
f98ebe69d8 paypro: move validity and issuer validation into common. 2014-08-28 17:37:06 -07:00
Christopher Jeffrey
a39aeeb446 paypro: move tbs parsing into common. 2014-08-28 17:13:02 -07:00
Christopher Jeffrey
882ce9d809 paypro: debugging and sigAlg/pubKey formats. 2014-08-22 17:10:41 -07:00
Christopher Jeffrey
6828f560da paypro: fix root certs. 2014-08-21 16:02:53 -07:00
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
2014-08-10 21:25:52 -04:00
Manuel Aráoz
7d03056e09 Merge pull request #459 from ryanxcharles/feature/message-signing
add support for signing messages in compressed format
2014-08-06 10:56:07 -03:00
Christopher Jeffrey
124d1a2fc3 paypro: expose RootCerts on PayPro. 2014-07-29 10:58:35 -07:00
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.
2014-07-25 14:07:03 -07:00
Christopher Jeffrey
8a84092be9 root-certs: use hasOwnProperty check instead of __proto__=null. 2014-07-25 10:53:21 -07:00
Christopher Jeffrey
dd165ecf63 paypro: root certs - do not inherit from Object. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey
5b4c4f3894 paypro: get root cert names. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey
0020e289d8 paypro: allow identification of root certs. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey
11c977ba70 fix: typo - s/Payment/PaymentACK/ 2014-07-23 15:02:19 -07:00
Christopher Jeffrey
017f044b53 paypro: fix browser signatures with KJUR. move pem/der functions to common. 2014-07-21 19:52:43 -07:00
Christopher Jeffrey
604ac04f47 paypro: split up paypro into node/browser/common. 2014-07-21 18:15:52 -07:00
Christopher Jeffrey
cec71a51fd paypro: add isTrusted function to RootCerts. 2014-07-21 14:56:48 -07:00
Christopher Jeffrey
85d5e69fc1 paypro: move root certs to common. 2014-07-21 14:56:48 -07:00
Ryan X. Charles
bfe5877ee7 require SecureRandom and Point ... woops 2014-07-17 16:30:22 -07:00
Ryan X. Charles
57a55d0863 expose signature internal functions
"sign" and "genk" ... and add some signature tests
2014-07-17 15:24:19 -07:00
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.
2014-07-17 13:09:35 -07:00
Linus Unnebäck
3da6fe899f cleanup after removal of soop
Removed some unnecessary parenthesise that hung around after the merge
of #417
2014-07-12 12:14:56 +02:00
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
2014-07-10 18:14:13 -07:00
Manuel Araoz
87b818badf remove soop exports 2014-07-10 16:08:42 -03:00
Manuel Araoz
6e346d067c remove soop imports 2014-07-10 12:39:09 -03:00
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.
2014-06-23 10:57:02 -07:00
Ryan X. Charles
80ccaa8396 rename "rand" to more explanatory "getRandomSeed" 2014-06-05 16:41:47 -07:00
Ryan X. Charles
af9fdff3a9 use SJCL AES to get ECIES working in the browser 2014-06-03 19:03:50 -07:00
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.
2014-04-22 22:18:59 -03:00