summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_lcl.h
AgeCommit message (Collapse)Author
2018-01-09Update copyright years on all files merged since Jan 1st 2018Richard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5038)
2018-01-07ec/ecp_nistz256.c: improve ECDSA sign by 30-40%.Andy Polyakov
This is based on RT#3810, which added dedicated modular inversion. ECDSA verify results improves as well, but not as much. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5001)
2017-08-30e_os.h removal from other headers and source files.Pauli
Removed e_os.h from all bar three headers (apps/apps.h crypto/bio/bio_lcl.h and ssl/ssl_locl.h). Added e_os.h into the files that need it now. Directly reference internal/nelem.h when required. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4188)
2017-06-20Modify Sun copyright to follow OpenSSL styleRich Salz
Approved by Oracle. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/3585)
2017-05-30Make Ed25519 consistent with X25519Dr. Stephen Henson
Rename and change ED25519_keypair_from_seed to ED25519_public_from_private to be consistent with X25519 API. Modidy ED25519_sign to take separate public key argument instead of requiring it to follow the private key. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3503)
2017-05-30Add Ed25519 algorithm.Dr. Stephen Henson
Reinstate Ed25519 algorithm to curv25519.c this is largely just a copy of the code from BoringSSL with some adjustments so it compiles under OpenSSL. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3503)
2016-11-17Add support for reference counting using C11 atomicsKurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1500
2016-08-29Remove comment tags from structs (coding style)Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-29Use uppercase name for PCT_ enumRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-13Remove old EC based X25519 code.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Constify EC_KEY_*_oct2priv() input bufferFdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1300)
2016-05-17Copyright consolidation 05/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-08Include e_os.h from ec_lcl.hRichard Levitte
The EC code recently started using REF_PRINT_COUNT and REF_ASSERT_ISNT. Those are defined in e_os.h. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-08Convert CRYPTO_LOCK_EC_* to new multi-threading APIAlessandro Ghedini
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-02Handle KDF internally.Dr. Stephen Henson
Handle KDF in ECDH_compute_key instead of requiring each implementation support it. This modifies the compute_key method: now it allocates and populates a buffer containing the shared secret. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-01Replace overrides.Dr. Stephen Henson
Instead of overriding a default operation move default operation to a separate function which is then explicitly included in any EC_METHOD that uses it. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-28Add no signing flag.Dr. Stephen Henson
Add a flag to EC_METHOD for curves which do not support signing. New function EC_KEY_can_sign() returns 1 is key can be used for signing. Return an explicit error is an attempt is made to sign with no signing curves. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-28Add new EC_METHOD for X25519.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-28Add group_order_bits to EC_METHOD.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-28Add custom_data field for EC_POINT, EC_KEY.Dr. Stephen Henson
In some cases the EC_POINT and EC_KEY BIGNUM components are suboptimal or inappropriate. Add an "custom_data" field which curves can populate with a custom structure to suit their needs. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-28EC_METHOD customisation operations.Dr. Stephen Henson
Extend EC_METHOD to permit additional customisation of private key and ECDH operations. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-13Call single parent free_comp routine.Rich Salz
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-13Fix nistp512 typos, should be nistp521Viktor Dukhovni
Note, this now compiles, but fails tests, so further remediation is required. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-13Add CRYPTO_EX_DATA; remove EC_EXTRA_DATARich Salz
Add CRYPTO_EX_DATA add EndC_KEY_[gs]et_method, From Roumen Petrov. Had to add various exdata calls to init/copy/free the exdata. Had to remove const from some EC functions because exdata isn't const-correct. :( Also remove EC_EXTRA_DATA and use a union to hold the possible pre-computed values and an enum to tell which value is in the union. (Rich Salz) Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-12-16Constify EC_KEY in ECDH_compute_key.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09Top level ECDSA sign/verify redirection.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09extend EC_KEY_METHOD for signing supportDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09move ECDSA_SIG definitionDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09Add set methods.Dr. Stephen Henson
Add set_group, set_public and set_private methods. An EC_KEY_METHOD can use these to perform any appropriate operation when the key components are set, such as caching data in some more convenient ENGINE specific format or returning an error if the parameters are invalid or the operation is not supported. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09EC_KEY_METHOD copy supportDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09EC_KEY_METHOD init and finish supportDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09Add compute key support to EC_KEY_METHODDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09EC_KEY_METHOD keygen support.Dr. Stephen Henson
Add keygen to EC_KEY_METHOD. Redirect EC_KEY_generate_key through method and set the current EC key generation function as the default. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09Support for EC_KEY_METHOD.Dr. Stephen Henson
Add EC_KEY_METHOD. This is part of the EC revision and will make EC behave more like other algorithms. Specifically: EC_KEY_METHOD is part of EC_KEY. It is part of ENGINE. Default or key specific implementations can be provided to redirect some or all operations. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-26fix copy paste error in ec_GF2m function prototypesBilly Brumley
RT#3858 Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Re-align some comments after running the reformat script.Matt Caswell
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-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix strange formatting by indentMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22indent has problems with comments that are on the right hand side of a line.Matt Caswell
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-30mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-08Implement internally opaque bn access from ecMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-09-12Reserve option to use BN_mod_exp_mont_consttime in ECDSA.Andy Polyakov
Submitted by Shay Gueron, Intel Corp. RT: 3149 Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-06-03Corrected OPENSSL_NO_EC_NISTP_64_GCC_128 usage in ec_lcl.h. PR#3370Libor Krystek
2013-07-15Make `safe' (EC)DSA nonces the default.Adam Langley
This change updates 8a99cb29 to make the generation of (EC)DSA nonces using the message digest the default. It also reverts the changes to (EC)DSA_METHOD structure. In addition to making it the default, removing the flag from EC_KEY means that FIPS modules will no longer have an ABI mismatch.
2013-06-13Add secure DSA nonce flag.Adam Langley
This change adds the option to calculate (EC)DSA nonces by hashing the message and private key along with entropy to avoid leaking the private key if the PRNG fails.
2011-10-19Fix warnings.Bodo Möller
Also, use the common Configure mechanism for enabling/disabling the 64-bit ECC code.
2011-10-18Improve optional 64-bit NIST-P224 implementation, and add NIST-P256 andBodo Möller
NIST-P521. (Now -DEC_NISTP_64_GCC_128 enables all three of these; -DEC_NISTP224_64_GCC_128 no longer works.) Submitted by: Google Inc.
2011-04-23Add PRNG security strength checking.Dr. Stephen Henson
2011-02-14Reorganise ECC code for inclusion in FIPS module.Dr. Stephen Henson
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.