Andrew Poelstra
a724d7296d
configure: add --enable-coverage to set options for coverage analysis
2016-11-28 03:29:01 +00:00
Andrew Poelstra
20b8877be1
Add exhaustive test for group functions on a low-order subgroup
...
We observe that when changing the b-value in the elliptic curve formula
`y^2 = x^3 + ax + b`, the group law is unchanged. Therefore our functions
for secp256k1 will be correct if and only if they are correct when applied
to the curve defined by `y^2 = x^3 + 4` defined over the same field. This
curve has a point P of order 199.
This commit adds a test which computes the subgroup generated by P and
exhaustively checks that addition of every pair of points gives the correct
result.
Unfortunately we cannot test const-time scalar multiplication by the same
mechanism. The reason is that these ecmult functions both compute a wNAF
representation of the scalar, and this representation is tied to the order
of the group.
Testing with the incomplete version of gej_add_ge (found in 5de4c5dff^)
shows that this detects the incompleteness when adding P - 106P, which
is exactly what we expected since 106 is a cube root of 1 mod 199.
2016-11-25 20:45:29 +00:00
Pieter Wuille
e06e878fd7
Remove Schnorr experiment
2016-11-17 18:55:06 -08:00
Cory Fields
00c5d2e142
fix auto-enabled static precompuatation
...
This was broken in aa0b1fd149
2016-09-07 12:16:15 -04:00
Pieter Wuille
65285a63ee
Merge #403 : configure: add flag to disable OpenSSL tests
...
a9b2a5d
configure: add flag to disable OpenSSL tests (Andrew Poelstra)
2016-07-06 12:08:16 +02:00
Andrew Poelstra
a9b2a5d850
configure: add flag to disable OpenSSL tests
...
OpenSSL messes up valgrind.
2016-07-06 08:25:33 +00:00
Pieter Wuille
24ad20f75b
Merge #399 : build: verify that the native compiler works for static precomp
...
aa0b1fd
build: verify that the native compiler works for static precomp (Cory Fields)
2016-06-29 11:11:46 +02:00
Cory Fields
aa0b1fd149
build: verify that the native compiler works for static precomp
2016-05-27 15:45:14 -04:00
Pieter Wuille
eee808d809
Test whether ECDH and Schnorr are enabled for JNI
2016-05-25 19:15:42 +02:00
Wladimir J. van der Laan
001f1763c7
ARM assembly implementation of field_10x26 inner
...
Rebased-by: Pieter Wuille <pieter.wuille@gmail.com>
2016-05-25 18:27:47 +02:00
GreenAddress
3093576aa4
JNI library
...
Squashed and rebased. Thanks to @theuni and @faizkhan00 for doing
the majority of work here! Also thanks to @btchip for help with debugging
and review.
2016-02-01 14:07:18 +01:00
Pieter Wuille
83221ecb00
Add experimental features to configure
2015-11-27 00:20:28 +01:00
Gregory Maxwell
118cd8210f
Use explicit symbol visibility.
...
The use of static makes this somewhat redundant currently, though if
we later have multiple compilation units it will be needed.
This also sets the dllexport needed for shared libraries on win32.
2015-09-25 05:42:20 +00:00
Pieter Wuille
85e3a2cc08
Merge pull request #112
...
2b4cf41
Use pkg-config always when possible, with failover to manual checks for libcrypto (Luke Dashjr)
2015-09-04 20:24:42 +02:00
Pieter Wuille
9f443be086
Move pubkey recovery code to separate module
2015-08-28 01:51:52 +02:00
Pieter Wuille
9d96e362a5
Merge pull request #280
...
ed5334a
Update configure.ac to make it build on OpenBSD (mlmikael)
2015-08-04 16:32:39 +02:00
Pieter Wuille
a5a66c70b6
Add support for custom EC-Schnorr-SHA256 signatures
2015-08-03 20:08:51 +02:00
Andrew Poelstra
0739bbb6f0
Add ECDH module which works by hashing the output of ecmult_const
2015-08-01 10:57:33 -05:00
mlmikael
ed5334a7fe
Update configure.ac to make it build on OpenBSD
...
This update is to make libsecp256k1 build on OpenBSD (more specifically OpenBSD 5.7 with Autotools 2.69).
Without the "AM_PROG_CC_C_O" line in configure.ac, ./autogen.sh crashes with "Makefile.am: C objects in subdir but `AM_PROG_CC_C_O' not in `configure.ac'\nautoreconf-2.69: automake failed with exit status: 1".
2015-07-19 16:07:46 +02:00
Pieter Wuille
a83bb48068
Make ecmult static precomputation default
2015-07-15 21:41:51 -04:00
Thomas Daede
fbecc38a89
Add ability to use a statically generated ecmult context.
...
This vastly shrinks the size of the context required for signing on devices with
memory-mapped Flash.
Tables are generated by the new gen_context tool into a header.
2015-07-13 18:00:03 -07:00
Pieter Wuille
4bc273bd9c
Merge pull request #222
...
7c3771d
Disable overlength-strings warnings. (evoskuil)
2015-02-24 02:37:58 -08:00
evoskuil
7c3771dd0f
Disable overlength-strings warnings.
2015-02-23 14:12:25 -08:00
Pieter Wuille
ae55e850c7
Use faster byteswapping and avoid alignment-increasing casts.
2015-02-23 04:58:58 -08:00
Luke Dashjr
2b4cf416e7
Use pkg-config always when possible, with failover to manual checks for libcrypto
2015-02-13 23:44:07 +00:00
Gregory Maxwell
f735446c4d
Convert the rest of the codebase to C89.
...
Update build system to enforce -std=c89 -pedantic.
2015-01-25 17:44:10 +00:00
Pieter Wuille
7277fd76e2
Remove GMP field implementation
2014-12-17 12:41:31 +01:00
Pieter Wuille
1ba4a60a51
Configure options reorganization
2014-12-13 15:04:28 +01:00
Pieter Wuille
3c0f246e7e
Merge pull request #157
...
5190079
build: use subdir-objects for automake (Cory Fields)
2014-12-12 15:48:28 +01:00
Pieter Wuille
808dd9b3f5
Merge pull request #156
...
8336040
build: disable benchmark by default (Cory Fields)
2014-12-12 15:46:50 +01:00
Cory Fields
28ade27da1
build: nuke bashisms
2014-12-11 21:24:35 -05:00
Cory Fields
5190079e31
build: use subdir-objects for automake
2014-12-11 20:18:54 -05:00
Cory Fields
8336040f79
build: disable benchmark by default
2014-12-11 20:09:22 -05:00
Pieter Wuille
5f5a31fe0a
Merge pull request #149
...
056ad31
Really compile with -O3 by default (Pieter Wuille)
2014-12-11 00:50:21 +01:00
Pieter Wuille
056ad31064
Really compile with -O3 by default
2014-12-09 11:48:34 +01:00
Pieter Wuille
74ad63a9e5
Merge pull request #146
...
c88e2b8
Compile with -O3 by default (Pieter Wuille)
2014-12-09 11:20:53 +01:00
Cory Fields
1f46b006b7
build: fix __builtin_expect detection for clang
...
Using AC_CHECK_DECL, the generated test tries to cast the function to void.
Clang doesn't allow that for builtins.
2014-12-08 22:35:02 -05:00
Pieter Wuille
c88e2b8cca
Compile with -O3 by default
2014-12-09 01:30:43 +01:00
Pieter Wuille
67935050e1
Convert YASM code into inline assembly
2014-12-04 13:54:01 +01:00
Pieter Wuille
c35ff1ea44
Convert lambda splitter to pure scalar code.
...
This enables the use of the endomorphism optimization without bignum.
2014-12-02 16:50:00 +01:00
Pieter Wuille
597128d389
Make num optional
2014-12-01 12:38:38 +01:00
Pieter Wuille
d1502eb459
Add secp256k1_scalar_inverse_var which delegates to GMP
2014-11-30 23:38:01 +01:00
Cory Fields
e2274c58e6
build: osx: attempt to work with homebrew keg-only packages
2014-11-24 11:49:22 -05:00
Gregory Maxwell
a099073a7e
Enable warnings.
...
Wno-unused-function is used for the moment because of the checking
functions which are currently only used by VERIFY but are not (yet?)
ifdefed out in normal builds.
2014-11-13 01:45:57 -08:00
kiwigb
6fac238f03
Use same build template as bitcoin. Add bitcoin_secp.m4.
2014-11-07 01:55:27 +13:00
kiwigb
db72c181bb
Add autoreconf warnings. Replace obsolete AC_TRY_COMPILE.
...
Remove redundant checks (already done by LT_INIT).
2014-11-06 22:20:05 +13:00
Pieter Wuille
1d52a8b155
Implementations for scalar without data-dependent branches.
2014-11-04 03:01:55 -08:00
Cory Fields
53628757f3
warnings: enable quiet builds
2014-11-03 23:29:24 -08:00
Pieter Wuille
520ba3c921
Remove OpenSSL bignum implementation
2014-10-31 02:10:13 -07:00
Pieter Wuille
3ed6dfae69
Only use the libcrypto part of OpenSSL
2014-09-01 19:45:51 +02:00