G2Accumulator

scalus.cardano.onchain.plutus.crypto.accumulator.G2Accumulator
object G2Accumulator

On-chain bilinear accumulator with the accumulator value on G2.

The setup (CRS) uses G1 powers of tau. The accumulator and membership proofs are G2 points. Verification uses pairings to check polynomial relationships.

This variant is cheaper on-chain because the G1 commitment (multi-scalar multiplication on G1) is less expensive than G2 operations.

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def verifyMembership(setup: List[G1Element], acc: G2Element, subset: List[BigInt], proof: G2Element): Boolean

Verify membership of a subset in the accumulated set.

Verify membership of a subset in the accumulated set.

Checks the pairing equation: e(g1, acc) == e(getG1Commitment(setup, subset), proof)

Value parameters

acc

the accumulator value (G2 point)

proof

the membership proof (G2 point)

setup

G1 powers of tau: [τ⁰·G1, τ¹·G1, ...]

subset

elements to prove membership for

Attributes

Returns

true if the subset is in the accumulated set

def verifyNonMembership(setup: List[G1Element], g2: G2Element, acc: G2Element, disjointSet: List[BigInt], proof: (G1Element, G2Element)): Boolean

Verify non-membership of a disjoint set against the accumulated set.

Verify non-membership of a disjoint set against the accumulated set.

Checks the pairing equation: e(proof._1, acc) · e(getG1Commitment(setup, disjointSet), proof._2) == e(g1, g2)

Value parameters

acc

the accumulator value (G2 point)

disjointSet

elements to prove non-membership for

g2

the G2 generator point

proof

the non-membership proof (G1, G2) from extended GCD

setup

G1 powers of tau

Attributes

Returns

true if the disjoint set has no elements in common with the accumulated set

Concrete fields

lazy val sirDeps: List[SIRModuleWithDeps]
lazy val sirModule: Module