Skip to content

Commit

Permalink
Update bls12-381 version to 0.3.30
Browse files Browse the repository at this point in the history
  • Loading branch information
azuchi committed Jan 11, 2024
1 parent 2d6f2c7 commit e01a95a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions kzg.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"
spec.add_dependency 'bls12-381', '>= 0.2.2'
spec.add_dependency 'bls12-381', '~> 0.3.0'

# For more information and examples about making a new gem, checkout our
# guide at: https://bundler.io/guides/creating_gem.html
Expand Down
4 changes: 2 additions & 2 deletions lib/kzg/setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def valid_proof?(commit_point, proof, x, y)
)
rhs = BLS.pairing(proof, g2_points[1] - xg2, with_final_exp: false)
exp = (lhs * rhs).final_exponentiate
exp == BLS::Fq12::ONE
exp == BLS::Fp12::ONE
end

# Check a proof for a KZG commitment for an evaluation f(x) = y
Expand Down Expand Up @@ -77,7 +77,7 @@ def valid_multi_proof?(commit_point, proof, x, y)
.inject(&:+)
rhs = BLS.pairing(proof, z_commit, with_final_exp: false)
exp = (lhs * rhs).final_exponentiate
exp == BLS::Fq12::ONE
exp == BLS::Fp12::ONE
end
end
end

0 comments on commit e01a95a

Please sign in to comment.