Skip to content

Commit

Permalink
chore: removes pedersen commit native pairs method (#3073)
Browse files Browse the repository at this point in the history
This method is no longer being used, we can bring it back if it is
deemed necessary.

Related to #3029 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
kevaundray authored Oct 26, 2023
1 parent 2e289a5 commit 69a34c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,5 @@ typename Curve::AffineElement pedersen_commitment_base<Curve>::commit_native(con
}
return result.normalize();
}

template <typename Curve>
typename Curve::AffineElement pedersen_commitment_base<Curve>::commit_native(
const std::vector<std::pair<Fq, GeneratorContext>>& 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<uint256_t>(scalar);
}
return result.normalize();
}
template class pedersen_commitment_base<curve::Grumpkin>;
} // namespace crypto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ template <typename Curve> class pedersen_commitment_base {
using GeneratorContext = typename crypto::GeneratorContext<Curve>;

static AffineElement commit_native(const std::vector<Fq>& inputs, GeneratorContext context = {});
static AffineElement commit_native(const std::vector<std::pair<Fq, GeneratorContext>>& input_pairs);
};

extern template class pedersen_commitment_base<curve::Grumpkin>;
Expand Down

0 comments on commit 69a34c7

Please sign in to comment.