From 5b1fa3d5e810c7d4bb02cdb811e8f9b3e194f46a Mon Sep 17 00:00:00 2001 From: sowle Date: Sat, 5 Jun 2021 02:18:45 +0300 Subject: [PATCH] crypto: scalar_t::assign_mul --- src/crypto/crypto-sugar.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/crypto/crypto-sugar.h b/src/crypto/crypto-sugar.h index 43e69c42..30abccb9 100644 --- a/src/crypto/crypto-sugar.h +++ b/src/crypto/crypto-sugar.h @@ -315,6 +315,13 @@ namespace crypto return *this; } + // returns this = a * b + scalar_t& assign_mul(const scalar_t& a, const scalar_t& b) + { + sc_mul(m_s, a.m_s, b.m_s); + return *this; + } + /* I think it has bad symantic (operator-like), consider rename/reimplement -- sowle */