Rich Salz
8fdc3734c0
free NULL cleanup.
...
This gets EC_GROUP_clear_free EC_GROUP_free, EC_KEY_free,
EC_POINT_clear_free, EC_POINT_free
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-03-25 18:35:24 -04:00
Rich Salz
6f91b017bb
Live code cleanup: remove #if 1 stuff
...
For code bracketed by "#if 1" then remove the alternate
"#else .. #endif" lines.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-02-06 10:54:20 -05:00
Matt Caswell
50e735f9e5
Re-align some comments after running the reformat script.
...
This should be a one off operation (subsequent invokation of the
script should not move them)
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:20:10 +00:00
Matt Caswell
0f113f3ee4
Run util/openssl-format-source -v -c .
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:20:09 +00:00
Matt Caswell
c80fd6b215
Further comment changes for reformat (master)
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:19:59 +00:00
Tim Hudson
1d97c84351
mark all block comments that need format preserving so that
...
indent will not alter them when reformatting comments
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-30 22:10:26 +00:00
Matt Caswell
5784a52145
Implement internally opaque bn access from ec
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08 21:40:47 +00:00
Dr. Stephen Henson
73e45b2dd1
remove OPENSSL_FIPSAPI
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08 13:25:38 +00:00
Matt Caswell
e04d426bf9
Fix free of garbage pointer. PR#3595
...
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-11-12 20:26:31 +00:00
Dr. Stephen Henson
84b08eee4b
Reorganise ECC code for inclusion in FIPS module.
...
Move compression, point2oct and oct2point functions into separate files.
Add a flags field to EC_METHOD.
Add a flag EC_FLAGS_DEFAULT_OCT to use the default compession and oct
functions (all existing methods do this). This removes dependencies from
EC_METHOD while keeping original functionality.
2011-02-14 16:52:12 +00:00
Bodo Möller
c94f7f657b
ECC library bugfixes.
...
Submitted by: Emilia Kasper (Google)
2010-08-26 12:11:01 +00:00
Andy Polyakov
194274cb68
ec_mult.c: fix C4334 win64 compiler warning.
2009-05-02 11:18:44 +00:00
Ben Laurie
57a6ac7c4f
Check scalar->d before we use it (in BN_num_bits()). (Coverity ID 129)
2008-12-27 02:15:16 +00:00
Bodo Möller
19f6c524bf
Fix crypto/ec/ec_mult.c to work properly with scalars of value 0
2007-05-22 09:47:43 +00:00
Nils Larsch
eeb821f707
fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end()
2006-03-14 22:48:41 +00:00
Nils Larsch
9dd8405341
ecc api cleanup; summary:
...
- hide the EC_KEY structure definition in ec_lcl.c + add
some functions to use/access the EC_KEY fields
- change the way how method specific data (ecdsa/ecdh) is
attached to a EC_KEY
- add ECDSA_sign_ex and ECDSA_do_sign_ex functions with
additional parameters for pre-computed values
- rebuild libeay.num from 0.9.7
2005-05-16 10:11:04 +00:00
Nils Larsch
ff22e913a3
- use BN_set_negative and BN_is_negative instead of BN_set_sign
...
and BN_get_sign
- implement BN_set_negative as a function
- always use "#define BN_is_zero(a) ((a)->top == 0)"
2005-04-22 20:02:44 +00:00
Richard Levitte
513c01a591
Make sure EC_window_bits_for_scalar_size() returns a size_t
2003-05-21 08:40:06 +00:00
Bodo Möller
ba729265a8
Allow EC_GROUP objects to share precomputation for improved memory
...
efficiency (EC_PRE_COMP objects are now constant once completed).
Extend 'extra_data' API to support arbitrarily many slots (although we
need only one at the moment).
Modify EC internal 'extra_data' API: EC_GROUP_[clear_]free_extra_data
now frees only a single slot (the previous functions are available as
EC_GROUP_[clear_]free_all_extra_data).
Submitted by: Nils Larsch
Reviewed by: Bodo Moeller
2003-02-12 18:30:16 +00:00
Richard Levitte
28f573a28d
Make sure memcpy() is properly declared by including string.h.
2003-02-10 11:14:35 +00:00
Bodo Möller
65b254e8c0
remove debugging leftovers
2003-02-08 15:56:05 +00:00
Bodo Möller
82871eaa17
comment
2003-02-07 11:54:57 +00:00
Bodo Möller
37c660ff9b
implement fast point multiplication with precomputation
...
Submitted by: Nils Larsch
Reviewed by: Bodo Moeller
2003-02-06 19:25:12 +00:00
Bodo Möller
b53e44e572
implement and use new macros BN_get_sign(), BN_set_sign()
...
Submitted by: Nils Larsch
2002-11-04 13:17:22 +00:00
Bodo Möller
35b73a1f20
Rename implementations of method functions so that they match
...
the new method names where _GF... suffixes have been removed.
Revert changes to ..._{get/set}_Jprojective_coordinates_...:
The current implementation for ECC over binary fields does not use
projective coordinates, and if it did, it would not use Jacobian
projective coordinates; so it's OK to use the ..._GFp prefix for all
this.
Add author attributions to some files so that it doesn't look
as if Sun wrote all of this :-)
2002-08-02 14:28:37 +00:00
Bodo Möller
7793f30e09
add support for elliptic curves over binary fields
...
Submitted by: Duglas Stebila <douglas.stebila@sun.com>,
Sheueling Chang <sheueling.chang@sun.com>
(CHANGES entries by Bodo Moeller)
2002-08-02 13:42:24 +00:00
Bodo Möller
2c8d0dccfc
improve wNAF generation
2002-05-05 23:45:09 +00:00
Bodo Möller
f916052eab
remove disabled code
2002-04-14 13:28:17 +00:00
Bodo Möller
d009bcbfb6
bugfix: allocate sufficiently large buffer
...
Submitted by: Nils Larsch
2002-02-20 11:59:42 +00:00
Richard Levitte
b77fcddb6b
Apply a small patch from Oscar Jacobsson <oscar@jacobsson.org> that
...
makes things more compilable with VC++.
2002-01-26 04:50:41 +00:00
Bodo Möller
c05940edc7
comment
2001-11-22 11:08:38 +00:00
Bodo Möller
e71adb85c5
avoid stupid compiler warning
2001-11-16 11:37:36 +00:00
Bodo Möller
b19941ab05
comment
2001-11-16 06:22:21 +00:00
Bodo Möller
c78515f55e
comments etc.
2001-11-15 22:35:41 +00:00
Bodo Möller
3ba1f11147
Improve EC efficiency.
2001-11-15 22:32:11 +00:00
Bodo Möller
56a106115f
comment change
2001-07-10 11:28:53 +00:00
Bodo Möller
e3a4f8b84c
Precomputation will not necessarily be LIm-Lee precomputation.
2001-07-10 10:04:05 +00:00
Bodo Möller
413a4a0461
Fix warnings.
2001-04-03 14:03:47 +00:00
Bodo Möller
26fbabf3d1
Increase boundaries in EC_window_bits_for_scalar_size table.
2001-03-20 11:16:12 +00:00
Bodo Möller
37cdcb4d8a
Table for window sizes.
2001-03-19 22:38:24 +00:00
Bodo Möller
194dd04699
Rename function EC_GROUP_precompute to EC_GROUP_precompute_mult,
...
which indicate its purpose more clearly.
2001-03-12 07:26:23 +00:00
Bodo Möller
3837491174
Add functions EC_POINT_mul and EC_GROUP_precompute.
...
The latter does nothing for now, but its existence means
that applications can request precomputation when appropriate.
2001-03-11 12:27:24 +00:00
Bodo Möller
86a921af06
handle negative scalars correctly when doing point multiplication
2001-03-11 08:44:50 +00:00
Bodo Möller
6f8f443170
comment and error code update
2001-03-10 23:37:52 +00:00
Bodo Möller
48fe4d6233
More EC stuff, including EC_POINTs_mul() for simultaneous scalar
...
multiplication of an arbitrary number of points.
2001-03-10 23:18:35 +00:00
Bodo Möller
38e3c5815c
Add yet another (still empty) source code file that I forgot.
2001-03-05 20:31:49 +00:00
Bodo Möller
65e8167079
Move ec.h to ec2.h because it is not compatible with what we will use.
...
Add EC vaporware: change relevant Makefiles and add some empty source
files.
"make update".
2001-03-05 20:13:37 +00:00