Skip to content

Commit

Permalink
Merge pull request ethereum#3167 from ethereum/akzg-tp
Browse files Browse the repository at this point in the history
Add `compute_kzg_proof` as a public method
  • Loading branch information
djrtwo authored Jan 1, 2023
2 parents 4f77493 + 4c573ff commit 280f6e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions specs/eip4844/polynomial-commitments.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ def verify_kzg_proof_impl(polynomial_kzg: KZGCommitment,
```python
def compute_kzg_proof(polynomial: Polynomial, z: BLSFieldElement) -> KZGProof:
"""
Compute KZG proof at point `z` with `polynomial` being in evaluation form
Do this by computing the quotient polynomial in evaluation form: q(x) = (p(x) - p(z)) / (x - z)
Compute KZG proof at point `z` with `polynomial` being in evaluation form.
Do this by computing the quotient polynomial in evaluation form: q(x) = (p(x) - p(z)) / (x - z).
Public method.
"""
y = evaluate_polynomial_in_evaluation_form(polynomial, z)
polynomial_shifted = [BLSFieldElement((int(p) - int(y)) % BLS_MODULUS) for p in polynomial]
Expand Down

0 comments on commit 280f6e0

Please sign in to comment.