Skip to content

Instantly share code, notes, and snippets.

@cyborch
Created August 2, 2019 11:29
Show Gist options
  • Save cyborch/bd33d7d0171c0485efb6746b6ac613eb to your computer and use it in GitHub Desktop.
Save cyborch/bd33d7d0171c0485efb6746b6ac613eb to your computer and use it in GitHub Desktop.
Verify membership of a set in an RSA accumulator
fun verifyMembership(A: BigInteger, x: BigInteger, proof: BigInteger): Boolean {
return proof.modPow(x, n) == A
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment