diff options
author | Jack Lloyd <[email protected]> | 2018-03-08 07:21:43 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-08 07:36:02 -0500 |
commit | 300cc7e5523396bae65f61485406a0bf392d8320 (patch) | |
tree | bd68ed9f7d5a6902247c9101544431b1e42dc75b /src/lib/pubkey/ecies | |
parent | 34aa3778a0f426fb7487c62049570d504e447c2f (diff) |
Add mixed (J+A) point addition, new scalar mul for base points
Adds PointGFp::force_affine(), ::add_affine(), and ::is_affine()
Use a (very simple) technique for base point precomputations.
Stick with fixed window for variable point inputs.
Scalar blinding is now always enabled
Diffstat (limited to 'src/lib/pubkey/ecies')
-rw-r--r-- | src/lib/pubkey/ecies/ecies.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/pubkey/ecies/ecies.cpp b/src/lib/pubkey/ecies/ecies.cpp index 1120a850a..06d5cfeee 100644 --- a/src/lib/pubkey/ecies/ecies.cpp +++ b/src/lib/pubkey/ecies/ecies.cpp @@ -71,9 +71,8 @@ class ECIES_ECDH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF PointGFp input_point = group.OS2ECP(w, w_len); input_point.randomize_repr(m_rng); - PointGFp_Blinded_Multiplier blinder(input_point, m_ws); - - const PointGFp S = blinder.mul(m_key.private_value(), group.get_order(), m_rng, m_ws); + const PointGFp S = group.blinded_var_point_multiply( + input_point, m_key.private_value(), m_rng, m_ws); if(S.on_the_curve() == false) throw Internal_Error("ECDH agreed value was not on the curve"); |