Skip to content

Instantly share code, notes, and snippets.

@cyborch
Created August 2, 2019 10:15
Show Gist options
  • Save cyborch/9c47d71caa462be772baa28ee59be647 to your computer and use it in GitHub Desktop.
Save cyborch/9c47d71caa462be772baa28ee59be647 to your computer and use it in GitHub Desktop.
Verifier service for cryptographic accumulator
fun main() {
val app = Javalin.create().start(7000)
app.post("/verify") { ctx ->
val body = ctx.bodyAsClass(VerifyBody::class.java)
ctx.json(RSAAccumulator.verifyMembership(BigInteger(body.commitment), body.proof))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment