Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumata888 committed Nov 18, 2024
1 parent 14b5eac commit 0cfe0d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ template <typename TestType> class stdlib_biggroup : public testing::Test {
if (uint256_t(scalar).get_bit(0)) {
scalar -= fr(1); // make sure to add skew
}

element_ct P = element_ct::from_witness(&builder, input);
scalar_ct x = scalar_ct::from_witness(&builder, scalar);

Expand Down Expand Up @@ -761,7 +760,6 @@ template <typename TestType> class stdlib_biggroup : public testing::Test {
OriginTag(/*parent_index=*/0, /*child_index=*/i, /*is_submitted=*/false));
tag_union = OriginTag(tag_union, circuit_scalars[i].get_origin_tag());
}

element_ct result_point =
element_ct::batch_mul(circuit_points, circuit_scalars, /*max_num_bits=*/0, /*with_edgecases=*/true);

Expand Down Expand Up @@ -855,7 +853,6 @@ template <typename TestType> class stdlib_biggroup : public testing::Test {

std::vector<element_ct> circuit_points;
std::vector<scalar_ct> circuit_scalars;

OriginTag tag_union{};
for (size_t i = 0; i < num_points; ++i) {
circuit_points.push_back(element_ct::from_witness(&builder, points[i]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ element<C, Fq, Fr, G> element<C, Fq, Fr, G>::batch_mul(const std::vector<element
for (size_t i = 0; i < scalars.size(); i++) {
// If batch_mul actually performs batch multiplication on the points and scalars, subprocedures can do
// operations like addition or subtraction of points, which can trigger OriginTag security mechanisms even
// though the final result satisfies the secureity logic
// though the final result satisfies the security logic
// For example result = submitted_in_round_0 *challenge_from_round_0 +submitted_in_round_1 *
// challenge_in_round_1 will trigger it, because the addition of submitted_in_round_0 to submitted_in_round_1 is
// dangerous by itself. To avoid this, we remove the tags, merge them separately and set the result
Expand Down

0 comments on commit 0cfe0d3

Please sign in to comment.