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/ecdh | |
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/ecdh')
-rw-r--r-- | src/lib/pubkey/ecdh/ecdh.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp index 4989fa0a5..adadb2703 100644 --- a/src/lib/pubkey/ecdh/ecdh.cpp +++ b/src/lib/pubkey/ecdh/ecdh.cpp @@ -39,9 +39,8 @@ class ECDH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF PointGFp input_point = m_group.get_cofactor() * m_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_l_times_priv, m_group.get_order(), m_rng, m_ws); + const PointGFp S = m_group.blinded_var_point_multiply( + input_point, m_l_times_priv, m_rng, m_ws); if(S.on_the_curve() == false) throw Internal_Error("ECDH agreed value was not on the curve"); |