From ddef5a28c34c1888bf6424755b5d493a2f0e398f Mon Sep 17 00:00:00 2001 From: kevaundray Date: Thu, 26 Oct 2023 17:28:02 +0000 Subject: [PATCH] removes commit_native_pairs --- .../crypto/pedersen_commitment/pedersen.cpp | 13 ------------- .../crypto/pedersen_commitment/pedersen.hpp | 1 - 2 files changed, 14 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.cpp b/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.cpp index c1023c2a39e..691a64b998b 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.cpp +++ b/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.cpp @@ -29,18 +29,5 @@ typename Curve::AffineElement pedersen_commitment_base::commit_native(con } return result.normalize(); } - -template -typename Curve::AffineElement pedersen_commitment_base::commit_native( - const std::vector>& input_pairs) -{ - // (TODO @dbanks12 this method may be slow and can be optimised. Issue at .) - Element result = Group::point_at_infinity; - for (auto& [scalar, context] : input_pairs) { - Element point = context.generators->get(1, context.offset, context.domain_separator)[0]; - result += point * static_cast(scalar); - } - return result.normalize(); -} template class pedersen_commitment_base; } // namespace crypto diff --git a/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.hpp b/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.hpp index a3269c0c72e..a58f96ce741 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.hpp +++ b/barretenberg/cpp/src/barretenberg/crypto/pedersen_commitment/pedersen.hpp @@ -28,7 +28,6 @@ template class pedersen_commitment_base { using GeneratorContext = typename crypto::GeneratorContext; static AffineElement commit_native(const std::vector& inputs, GeneratorContext context = {}); - static AffineElement commit_native(const std::vector>& input_pairs); }; extern template class pedersen_commitment_base;