Matt Caswell
a7232276fe
Remove some unneccessary use of constant time code in curve448
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:31 +00:00
Matt Caswell
434149c744
Fix a travis failure in the curve448 code
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:31 +00:00
Matt Caswell
2abe3cad23
Remove the curve448 vector code
...
We removed various platform specific optimisation files in an earlier
commit. The vector code was related to that and therefore is no longer
required. It may be resurrected at a later point if we reintroduce the
opimtisations.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:31 +00:00
Matt Caswell
53ef3252fa
More style fixes for the curve448 code
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:31 +00:00
Matt Caswell
9fd3c858b4
Remove a strict aliasing issue with pre-computed curve448 constants
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
68b20c0065
More style fixes to Curve448 code based on review feedback
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
04ebd4e17e
Some style fixes
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
e411822318
Formatting tweak based on review feedback
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
756b5af71c
Use NLIMBS where appropriate to simplify the code
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
8855a9a110
Remove cplusplus guards in internal headers
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
f918504f91
Remove the curve448 specific constant time implementation
...
Instead we should use the standard OpenSSL constant time routines.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
7114a5a17a
Use the NLIMBS macro rather than try and calculate the number of limbs
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
bd74eae1be
Rename a function to avoid a clash
...
We already have a constant_time_select() function so, to avoid
confusion/clashing we shouldn't have a second one.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
7e492f3372
Remove curve448 architecture specific files
...
Remove all architecture specific files except for the reference arch_32
version. These files provide archicture specific performance optimisation.
However they have not been integrated yet. In order to avoid review issues
they are removed for now. They may be reintroduced at a later time.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
0cdcdacc33
Fix AppVeyor failure in eddsa.c
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
dd03fd7e3a
Fix travis failure in f_impl.c
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
06d72c2c64
Fix a typo in a comment
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
f53c77648c
Update Curve448 copyright for 2018
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
bce3108161
Code tidy up
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
7d9e120fea
Fixes for compilation using clang
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
2c9def25b1
Move curve448_test.c to be a full internal test
...
This ensures that this test is run as part of the test suite
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
52a9587c78
Fix build errors for Curve448 code on Windows (VC-WIN32 and VC-WIN64A)
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
575d5afcf8
Remove some gcc/clang specific attributes we don't support
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
db90b274a1
Remove duplicated 448 in the names of various things
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
001a093419
Merge f_field.h into field.h
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
b47758dbd0
Merge f_arithmetic.c into f_generic.c
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
aeeef83cb5
Remove references to libdecaf
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
35b7c85a22
Remove some unneeded code
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
8d55f844b0
Manual formatting tweaks to Curve448 code
...
Following running openssl-format-source there were a lot of manual tweaks
that were requried.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
205fd63881
Run util/openssl-format-source on the Curve448 code
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
1308e022e1
Update the imported curve448 code to use OpenSSL copyright headers
...
Some files talk about the MIT license. This code was contributed under
CLA and was relicensed to the OpenSSL licence when imported.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
22bcc9cb7f
Fix the ED448 key lengths
...
Unlike X448 the key lengths for ED448 are 57 bytes (as opposed to 56)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
ff489fb472
Integrate Curve448 into the build system
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
094c071cbf
Convert to C90 from C99
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
bb6e60adc5
Rename the decaf files to curve448 files
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
c4148792cf
Remove portable_endian.h
...
It is no longer used
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
2799d38540
Remove the old shake256 implementation
...
We have fully converted curve448 to use the OpenSSL shake256 implementation
so we can now remove the old one.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
a242839f75
Convert Curve448 internals to use OpenSSL shake256
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
c255e98ed2
Use OpenSSL shake256
...
Convert the curve448 test to use the OpenSSL implementation of shake256.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
6ea71cbabe
Add tests for Ed448ph
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
4ea41daa07
Add Ed448 tests
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
6207b13983
Remove inclusion of header files that we can't rely on due to portability
...
Some non-portable includes are left because they are already suitably
guarded.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
ca42a316a8
Remove DECAF_NOINLINE
...
OpenSSL does not have this concept
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
91f2e94c00
Remove DECAF_NONNULL
...
OpenSSL does not currently have this concept. It only provides compiler
warnings so just remove it.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
09ffbc94f2
Remove all instances of DECAF_API_VIS
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:30 +00:00
Matt Caswell
9455aab4fe
Replace DECAF_WARN_UNUSED with __owur
...
Most of these were in point_448.h. While I was at it I spotted some unused
declarations, so I deleted those too.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:29 +00:00
Matt Caswell
aacf29b8aa
Replace DECAF_INLINE with ossl_inline
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:29 +00:00
Matt Caswell
88ba7e71e0
Remove some vestiges of the old decaf template approach
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:29 +00:00
Matt Caswell
e777257746
Rename decaf_448_* to curve448_*
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:29 +00:00
Matt Caswell
46b4183155
Remove some more unneeded code
...
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105 )
2018-02-20 12:59:29 +00:00