Daniel Cousens
b5c42303ff
crypto: use packages directly
2015-03-17 12:31:53 +11:00
Daniel Cousens
8d3686d046
remove deprecated functionality
2015-03-02 17:27:16 +11:00
Daniel Cousens
8aa4f9ecc9
ecdsa/ecpubkey: rectify #364 artifacts
2015-03-02 13:25:09 +11:00
Daniel Cousens
399803affa
use standardjs formatting
2015-02-24 12:45:38 +11:00
Daniel Cousens
59143a9c85
ecdsa: clarify why typeForce call is disabled until 2.0.0
2015-01-09 09:10:18 +11:00
Daniel Cousens
6938c8f8cc
ecdsa: add default checkSig, to be removed in 2.0.0
2015-01-06 15:12:34 +11:00
Daniel Cousens
e9778ae358
ecdsa: fixes edge case presented in #336
2015-01-04 12:46:37 +11:00
Daniel Cousens
4c61380fa5
ecdsa: add comment for Step A
2015-01-04 12:29:01 +11:00
Daniel Cousens
e42c497a3c
package: use typeforce
2014-12-23 15:08:20 +11:00
Daniel Cousens
7ef134436e
ecdsa/HDNode: use node crypto for Hmacs
2014-12-08 11:24:16 +11:00
Daniel Cousens
10630873eb
tests: add tests for ecdsa.verify
2014-10-11 13:47:32 +11:00
Daniel Cousens
35542e115d
types: enforce consistent type checking
2014-10-05 15:36:25 +11:00
Daniel Cousens
8297e1b0fc
ecdsa: add further (missing) annotations from 1.4.x
2014-07-30 15:10:38 +10:00
Daniel Cousens
804c542c40
ecdsa: add SEC annotations for verify
2014-07-30 15:04:45 +10:00
Daniel Cousens
be3ce88a3a
ecdsa: enforce positive integers
2014-07-29 23:45:25 +10:00
Daniel Cousens
04bcbadc77
transaction/ecdsa: remove unused imports
2014-07-29 02:06:17 +10:00
Daniel Cousens
ab55417d6d
ecdsa: fix interval comment
...
Actual range as per the RFC is [1, q - 1], the code adheres to this.
2014-06-26 01:50:52 +10:00
Daniel Cousens
08876fc065
ecdsa: ecurve 0.10.0
2014-06-26 00:52:33 +10:00
Daniel Cousens
776656df8b
ecdsa: adhere strictly to RFC6979
...
The previous impl. was in breach of the following section:
> Please note that when k is generated from T, the result of bits2int is
> compared to q, not reduced modulo q. If the value is not between 1 and
> q-1, the process loops.
> Performing a simple modular reduction would induce biases that would be
> detrimental to signature security.
2014-06-26 00:35:45 +10:00
Daniel Cousens
f42993297c
ecurve: upgrade to 0.9.0
2014-06-16 15:47:41 +10:00
Daniel Cousens
eb3d9a25f7
ecdsa: moved all signature encoding to ECSignature
2014-06-16 15:47:41 +10:00
Daniel Cousens
1a41ea8801
ecdsa: add more extensive tests for recoverPubKey
2014-06-15 00:40:21 +10:00
Daniel Cousens
402fa0d85d
ecdsa: amend recoverPubKey SEC comments
2014-06-15 00:40:21 +10:00
Daniel Cousens
4f8040f8d4
ecdsa: add invalid test fixtures for recoverPubKey
2014-06-15 00:40:21 +10:00
Daniel Cousens
4ce9015f3b
use ecurve instead of custom ec
2014-06-10 17:58:13 +10:00
Daniel Cousens
eb3a6bcb31
all: rename D to d as per SEC convention
2014-06-07 18:24:16 +10:00
Daniel Cousens
b10e96cbff
ecdsa: serializeSig should return a Buffer
2014-05-30 17:54:33 +10:00
Daniel Cousens
6cfa729dae
ecdsa: fix missing exceptions
2014-05-29 15:42:52 +10:00
Daniel Cousens
58fd12e66d
ecdsa: always use signature object
2014-05-24 16:25:38 +10:00
Daniel Cousens
bd1a08bfa1
ecdsa: use signum() over compareTo
2014-05-24 14:33:25 +10:00
Daniel Cousens
cd326921bc
bigi: upgrade to 1.1.0
2014-05-24 00:51:56 +10:00
Daniel Cousens
087ca551f5
ecdsa: fix indentation
2014-05-24 00:48:31 +10:00
Daniel Cousens
d05d661aea
ecdsa: use standard declarative notation for functions
2014-05-24 00:48:31 +10:00
Daniel Cousens
bcfd62fdb5
ecdsa: remove implicit ecparams
2014-05-24 00:48:31 +10:00
Daniel Cousens
2dec1375a1
ecdsa: use (r, s) values directly
2014-05-24 00:48:31 +10:00
Daniel Cousens
8d7408202f
ecdsa: consistent parameter ordering
2014-05-24 00:48:31 +10:00
Daniel Cousens
abe65b8d4a
ecdsa: use shamirs trick
2014-05-24 00:48:20 +10:00
Daniel Cousens
5ec9504ed6
ecdsa: opt for shiftRight, pow and square
...
In the given situations, these offer better readability, or in the case
of shiftRight, a substantial performance increase.
2014-05-22 12:33:47 +10:00
Daniel Cousens
7d89ff427c
ecdsa: comment cleanup
2014-05-22 12:33:47 +10:00
Daniel Cousens
0865f09d20
ec/dsa: extract P_OVER_FOUR as a curve specific constant
...
This actually resolves a possible bug if multiple ecparams were used
(aka different values for P_OVER_FOUR, but only the cached was used).
2014-05-22 12:33:47 +10:00
Daniel Cousens
d14b08efd1
ec/dsa: recovery param now used consistently
...
Also added an assertion rather than massaging the input.
2014-05-22 12:32:28 +10:00
Daniel Cousens
a3f691bf7c
ecdsa: parseSigCompact use Buffer API
...
parseSigCompact also now returns the correct recovert parameter without
the need to subtract the compression bit.
This makes it easier to use.
2014-05-18 17:52:49 +10:00
Daniel Cousens
f7c7265d64
ecdsa: parseSig now uses buffer API
2014-05-18 17:52:49 +10:00
Daniel Cousens
4c7108d561
ecdsa: add serializeSigCompact and tests
...
This also adds tests for all other ECDSA serialize/parsing functions.
The k, r, s and D values were sourced from test vectors on
https://bitcointalk.org/index.php?topic=285142.40 .
The compact signatures (aka, i values) were generated from bitcoinjslib, but they
are straight forward anyway.
2014-05-18 17:52:49 +10:00
Daniel Cousens
b208a6ab78
crypto/ecdsa: moves HmacSHA256 to crypto
2014-05-18 17:52:49 +10:00
Wei Lu
af1f121fd4
upgrade bigi & remove monkey patching
2014-05-03 10:04:54 +08:00
Daniel Cousens
89cf731ac7
Adds assertion messages
2014-04-26 02:37:48 +10:00
Daniel Cousens
c3e9d568c5
Adds RFC6979 test vectors and fixes ecdsa.sign/detGenK
2014-04-26 02:17:28 +10:00
ethers
1c8f135d9c
assertion message
2014-04-24 23:29:12 -07:00
Daniel Cousens
bc37e65014
Enforces Array input for deterministicGenerateK
2014-04-23 06:28:00 +10:00