0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-20 12:12:41 -05:00
Commit graph

33 commits

Author SHA1 Message Date
Pieter Wuille
cf7b2b4647 Fix ECDSA message hashes to 32 bytes 2014-12-09 12:50:47 +01:00
Pieter Wuille
4285a98722 Move lambda-splitting code to scalar.
It's not really an operation on group elements.
2014-11-30 23:38:01 +01:00
Pieter Wuille
f24041d6aa Switch all EC/ECDSA logic from num to scalar 2014-11-30 23:38:01 +01:00
Pieter Wuille
bbe67d8b29 Make secp256k1_eckey_pubkey_serialize fail for infinity 2014-11-18 12:37:38 +01:00
Gregory Maxwell
71712b27e5 Switch to C89 comments in prep for making the whole codebase C89 compatible.
This should be whitespace/comment only changes and should produce the same
object code.
2014-11-15 07:33:07 -08:00
Gregory Maxwell
8563713a4f Add non-null and unused-result warnings for the external API.
GCC (and clang) supports extensions to annotate functions so that their
 results must be used and so that their arguments can't be statically
 provable to be null. If a caller violates these requirements they
 get a warning, so this helps them write correct code.

I deployed this in libopus a couple years ago with good success, and
 the implementation here is basically copied straight from that.

One consideration is that the non-null annotation teaches the optimizer
 and will actually compile out runtime non-nullness checks as dead-code.
 Since this is usually not whats wanted, the non-null annotations are
 disabled when compiling the library itself.

The commit also removes some dead inclusions of assert.h and introduces
 compatibility macros for restrict and inline in preparation for some
 portability improvements.
2014-11-12 12:23:09 -08:00
Pieter Wuille
501d58f098 Get rid of {num,scalar,ecdsa_sig}_{init,free} 2014-11-03 01:31:04 -08:00
Pieter Wuille
eca6cdb123 Switch scalar to use get/set 32-byte arrays 2014-10-29 00:40:56 -07:00
Pieter Wuille
a9f5c8b875 Introduce secp256k1_scalar_t for future constant-time mod order operations 2014-10-28 04:33:23 -07:00
Pieter Wuille
eb74c36bd2 Abstract out tweak logic to secp256k1_eckey_* functions 2014-10-27 03:27:55 -07:00
Pieter Wuille
ffffc87855 Use internal secp256k1_eckey_ prefix for functions in eckey 2014-10-27 03:01:51 -07:00
Pieter Wuille
e2f71f1efe Move non-ECDSA operations from ecdsa to eckey 2014-10-27 02:58:09 -07:00
Pieter Wuille
ae6bc76e32 [API CHANGE] Use secp256k1_ec_ prefix for non-ECDSA key operations 2014-10-27 02:51:58 -07:00
Pieter Wuille
949c1ebb5e Split up ecmult and ecmult_gen entirely 2014-10-26 03:42:24 -07:00
Pieter Wuille
04e34d18c3 Split up signing and verification initialization 2014-09-13 17:14:17 +02:00
Pieter Wuille
1c7fa133a6 Add VERIFY_CHECK/DEBUG_CHECK and use CHECK macros more 2014-08-26 01:23:51 +02:00
Gregory Maxwell
2f6c801911
Try to not leave secret data on the stack or heap.
This makes a basic effort and has not been audited.
Doesn't appear to have a measurable performance impact on bench.

It also adds a secp256k1_num_free to secp256k1_ecdsa_pubkey_create.
2014-08-14 07:06:36 -07:00
Pieter Wuille
0592d117da Introduce CHECK() for tests that works with NDEBUG. 2014-06-16 01:30:17 +02:00
William Swanson
ba8fc0e28f Check signature nonces for validity
The documentation implies that this check is happening, so make it so.
Without this check, passing an invalid nonce will trigger an internal assertion.
2014-04-24 14:18:44 -07:00
Pieter Wuille
11ab562203 Move implementations from impl/*.h to *_impl.h 2014-03-12 18:40:02 +01:00
Pieter Wuille
350ade2ab4 Tweak fixes & variable name improvement 2013-07-14 20:49:37 +02:00
Pieter Wuille
86d3cce2a9 Add support for multiplicative tweaking 2013-07-14 17:58:23 +02:00
Pieter Wuille
b0be6aba91 Invert buggy logic in secp256k1_ecdsa_seckey_verify 2013-07-13 01:31:41 +02:00
Pieter Wuille
561b0e1044 Private/public key tweaking 2013-05-27 01:18:48 +02:00
Pieter Wuille
0a433ea23c MIT License 2013-05-09 15:24:32 +02:00
Pieter Wuille
da3038c757 Privkey import/export 2013-05-05 05:12:43 +02:00
Pieter Wuille
50eb498ece Compact signatures/pubkey recovery 2013-05-05 02:46:07 +02:00
Pieter Wuille
764332d05d Make pubkeys, set_xo, ... ge instead of gej 2013-05-05 01:18:23 +02:00
Pieter Wuille
42cccdaf55 More public implementations 2013-05-05 01:02:05 +02:00
Pieter Wuille
7823916781 Add signing to public interface 2013-05-05 00:21:03 +02:00
Pieter Wuille
d06e61cbb5 Builtin random 2013-04-20 23:57:20 +02:00
Pieter Wuille
7a4b7691b6 Reorganize source tree: no .c for non-objects 2013-04-05 02:09:37 +02:00
Pieter Wuille
eb0be8eec6 Final step in converting to C 2013-04-01 07:52:58 +02:00
Renamed from src/secp256k1.cpp (Browse further)