Commit Graph

10 Commits

Author SHA1 Message Date
Ryan X. Charles 2c136d4dcc remove obsolete Curve class (G and n now accessible from Point) 2014-07-17 13:14:49 -07:00
Ryan X. Charles 572035fdd5 add some test vectors for secp256k1 2014-07-11 14:47:48 -07:00
Ryan X. Charles 8a199e26f3 allow Point to multiply things other than buffers
...i.e., bignums, numbers, and strings. Also, ensure that if you try to
multiply a buffer, it should be exactly 32 bytes. Eventually this "multiply"
function will be replaced with a more conventional "mul" function, but not yet.
2014-07-11 11:52:05 -07:00
Ryan X. Charles 3f75bea924 add tests for toCompressedPubKey 2014-07-10 19:03:40 -07:00
Ryan X. Charles 15d4328b35 use elliptic in Point in the browser instead of cryptojs 2014-07-10 16:21:08 -07:00
Ryan X. Charles 7f348ca0bd Move BigNumber to internal
...no longer relies on Manuel's repo hostig a version of "bignum" that actually
contained bignumber.js. This moves bignumber.js internally and removes bignum
from the browser build process. Also adds a bitcore.Bignum that links to the
right thing. In node, browser.Bignum is require('bignum'). And in the browser,
bitcore.Bignum is is now Bignumber.js (same as before ... except bignumber.js
is now inside bitcore).
2014-04-28 18:00:59 -04:00
Ryan X. Charles 350f6ae998 Key should make sure new privkey is less than N
...this involves adding a Curve class, and significant refactoring to make this
possible in a clean way.
2014-04-23 21:15:55 -03:00
Ryan X. Charles abc799f453 split up Point into separate node and browser versions 2014-04-22 19:13:35 -03:00
Ryan X. Charles 4f5b41eff0 fix browser tests for Point and Key
The addUncompressed function is for node-only, and is a temporary workaround
until we expose a better crypto interface in both node and the browser. I wrote
tests for this function that were node-only, but were broken in the browser.  I
also wrote tests for the Point class that should have worked in both node and
the browser, and did, but I was using the wrong module such that it worked only
in node.  This update makes the tests work in the browser by using the correct
module.
2014-03-31 16:32:16 -04:00
Ryan X. Charles f6aa01c445 add basic tests for all functions in Point 2014-03-28 18:07:23 -04:00