boringssl/crypto/fipsmodule/ec
David Benjamin d62fe6f3e8 Fold EC_KEY_copy into EC_KEY_dup.
EC_KEY_copy left unset fields alone, which meant it was possible to
create an EC_KEY with mismatched private key and group. Nothing was
using EC_KEY_copy anyway, and in keeping of us generally preferring
fresh objects over object reuse, remove it. EC_KEY_dup itself can also
be made simpler by using the very setters available.

Additionally, skip copying the method table. As of
https://boringssl-review.googlesource.com/16344, we no longer copy the
ex_data, so we probably shouldn't copy the method pointers either,
aligning with RSAPrivateKey_dup.

Update-Note: If I missed anything and someone uses EC_KEY_copy, it
   should be easy to port them to EC_KEY_dup.

Change-Id: Ibbdcea73345d91fa143fbe70a15bb527972693e8
Reviewed-on: https://boringssl-review.googlesource.com/26404
Reviewed-by: Steven Valdez <svaldez@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2018-03-07 21:17:02 +00:00
..
asm Merge Intel copyright notice into standard 2018-02-12 21:44:27 +00:00
ec_key.c Fold EC_KEY_copy into EC_KEY_dup. 2018-03-07 21:17:02 +00:00
ec_montgomery.c Add a function which folds BN_MONT_CTX_{new,set} together. 2018-02-02 20:23:25 +00:00
ec_test.cc Rename bn->top to bn->width. 2018-02-05 23:44:24 +00:00
ec.c Don't crash when failing to set affine coordinates when the generator is missing. 2018-02-07 23:08:17 +00:00
internal.h Add a tuned variable-time P-256 multiplication function. 2018-02-12 22:00:48 +00:00
oct.c Make BN_mod_*_quick constant-time. 2018-02-06 01:16:04 +00:00
p224-64.c Align various point_get_affine_coordinates implementations. 2018-01-08 20:03:42 +00:00
p256-x86_64_test.cc Add a function which folds BN_MONT_CTX_{new,set} together. 2018-02-02 20:23:25 +00:00
p256-x86_64_tests.txt
p256-x86_64-table.h
p256-x86_64.c Merge Intel copyright notice into standard 2018-02-12 21:44:27 +00:00
p256-x86_64.h Merge Intel copyright notice into standard 2018-02-12 21:44:27 +00:00
simple.c Make BN_mod_*_quick constant-time. 2018-02-06 01:16:04 +00:00
util.c ec/p256.c: fiat-crypto field arithmetic (64, 32) 2017-12-11 17:55:46 +00:00
wnaf.c Remove redundant length-check in |ec_wNAF_mul|. 2018-02-21 17:03:14 +00:00