Dave Kerr
b000377fd5
upgrade test dependencies
2018-02-19 16:25:56 -05:00
Daniel Cousens
f1ab151c31
tests: use safe-buffers throughout
2017-05-23 18:39:53 +10:00
Daniel Cousens
4d6928a68b
tests: fix shadowed/unused variable warnings
2017-04-18 14:34:54 +10:00
Daniel Cousens
7cdabef954
ecdsa: remove unused functions
2016-10-06 21:40:42 +11:00
Daniel Cousens
87cb018466
rm message module
2016-10-06 21:40:42 +11:00
Daniel Cousens
ccfaaf0b6f
ecdsa: remove curve parameter
2015-09-05 14:27:53 +10:00
Daniel Cousens
2d75b7e7ff
standard: remove padded Blocks
2015-09-05 14:10:32 +10:00
Daniel Cousens
8934de591c
use baddress/bcrypto/bscript for ambuigities
2015-08-20 13:55:13 +10:00
Daniel Cousens
b5ff9db8fd
fixtures: ECDSA signatures should be DER encoded if possible
2015-06-23 16:11:34 +10:00
Daniel Cousens
5b95fd6ae3
fixtures: ECDSA, fixtures were mixed decimal/hex
2015-06-23 16:11:34 +10:00
Daniel Cousens
ec9cea0cf1
tests: use strictEqual always
2015-05-07 11:29:20 +10:00
Daniel Cousens
4c030be343
ecdsa: remove unused verifyRaw
2015-04-28 16:51:20 +10:00
Daniel Cousens
8d3686d046
remove deprecated functionality
2015-03-02 17:27:16 +11:00
Daniel Cousens
0bba21546f
various: more standard-format artifact fixes
2015-03-02 13:50:49 +11:00
Daniel Cousens
399803affa
use standardjs formatting
2015-02-24 12:45:38 +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
a492969ab2
tests: ecdsa test cleanup
2015-01-05 12:42:09 +11:00
Daniel Cousens
0e5c7b2a5a
tests: add bip32JPs RFC6979 test vectors and tests
2015-01-05 12:31:28 +11:00
Daniel Cousens
1e7f537f38
tests: adds ecdsa test enforcing valid signature callback
2015-01-05 11:15:11 +11:00
Daniel Cousens
e9778ae358
ecdsa: fixes edge case presented in #336
2015-01-04 12:46:37 +11:00
Daniel Cousens
10630873eb
tests: add tests for ecdsa.verify
2014-10-11 13:47:32 +11:00
Daniel Cousens
bdb0fe8020
ecdsa: adds test for detGenK loop
2014-06-26 02:45:02 +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
1f0a54fb41
ECSignature: rename parsing functions to parse*
2014-06-17 00:26:16 +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
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
f20ffec8b3
tests: always use for, it testing style
2014-06-07 19:46:06 +10:00
Daniel Cousens
eb3a6bcb31
all: rename D to d as per SEC convention
2014-06-07 18:24:16 +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
37d5147cac
ecdsa: add invalid tests for verifyRaw
2014-05-24 14:33:25 +10:00
Daniel Cousens
b2351f9026
tests: use JSON fixtures exclusively
2014-05-24 00:52:24 +10:00
Daniel Cousens
bcfd62fdb5
ecdsa: remove implicit ecparams
2014-05-24 00:48:31 +10:00
Daniel Cousens
ab2ca395ac
ecdsa: remove ECKey dependency in tests
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
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
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
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
6b5990c6e2
message: support alternate networks
2014-05-18 17:51:36 +10:00
Daniel Cousens
10fe4474d1
ECKey: remove *Buffer/*Hex functions
...
An ECKey is a composition of a private key (D), a public key (Q) and its
compression flag.
These functions gave the impression of serialization of this
composition, when really they only serialized `D`.
They have therefore been removed in favour of always using a sane
serialization format (WIF) that matches the needed behaviour.
If a user needs the previous functionality, simply use `privKey.D.*`
instead of `privKey.*`, as BigInteger supports `*Buffer/*Hex` functions
as expected.
2014-05-18 17:50:10 +10:00
Daniel Cousens
6c0eebe94b
tests: use filepaths directly
...
After a long IRC discussion, it was decided that the use of direct
filepaths instead of the module is a more pure form of testing ,
although it may provide less overall coverage than the mixed integration
style imports used previously.
This will need to be remedied by further integration testing in
/test/integration.
2014-05-13 18:05:56 +10:00
Daniel Cousens
7a740c2e7b
tests: forces consistent import syntax
2014-05-13 16:46:08 +10:00
Wei Lu
af1f121fd4
upgrade bigi & remove monkey patching
2014-05-03 10:04:54 +08:00
Daniel Cousens
c3e9d568c5
Adds RFC6979 test vectors and fixes ecdsa.sign/detGenK
2014-04-26 02:17:28 +10:00
Daniel Cousens
d8883e8d32
Adds BI.toPaddedBuffer and toBuffer
2014-04-24 07:22:23 +10:00
Daniel Cousens
bc37e65014
Enforces Array input for deterministicGenerateK
2014-04-23 06:28:00 +10:00