CryptoAccumulator (crypto_accumulator v0.1.0)
A cryptographic accumulator implementation based on the RSA accumulator scheme
It allows to add new elements to the accumulator and verify if a given element is part of the accumulator
The size of membership proofs is 800 bytes A unique nonce is generated for each generated proof
Summary
Functions
Add a new element to the accumulator
Export the accumulator's public information
Generate a new secret key
Get a membership proof for a given element
Generate a new accumulator
Verify a membership proof for a given element and its nonce
Functions
add_element(acc, value)
Add a new element to the accumulator
export(acc)
Export the accumulator's public information
generate_key()
Generate a new secret key
get_membership_proof(acc, value)
@spec get_membership_proof(accumulator :: reference(), value :: binary()) :: {:ok, proof :: binary(), nonce :: binary()} | {:error, binary()}
Get a membership proof for a given element
It returns the membership proof and the associated nonce
new(sk)
Generate a new accumulator
verify_membership_proof(acc, proof, nonce)
@spec verify_membership_proof( accumulator :: reference(), proof :: binary(), nonce :: binary() ) :: {:ok, boolean()} | {:error, binary()}
Verify a membership proof for a given element and its nonce