ZkSystem

interface ZkSystem

Interface representing a Zero-Knowledge Proof system that can generate and verify proofs for identity documents according to the ISO/IEC 18013-5 standard.

Properties

Link copied to clipboard
abstract val name: String

The unique name identifying this ZK system implementation.

Link copied to clipboard

A list of all ZkSystemSpecs supported by this ZK system. Each spec describes the parameters and configuration for a supported circuit or proof scheme.

Functions

Link copied to clipboard
abstract fun generateProof(zkSystemSpec: ZkSystemSpec, encodedDocument: ByteString, encodedSessionTranscript: ByteString, timestamp: Instant = Clock.System.now()): ZkDocument

Generates a zero-knowledge proof for a given document using the specified zkSystemSpec and session context.

Link copied to clipboard
abstract fun getMatchingSystemSpec(zkSystemSpecs: List<ZkSystemSpec>, mdocRequest: MdocRequest): ZkSystemSpec?

Searches through the provided zkSystemSpecs and returns the first one that is compatible with the given document.

Link copied to clipboard
abstract fun verifyProof(zkDocument: ZkDocument, zkSystemSpec: ZkSystemSpec, encodedSessionTranscript: ByteString)

Verifies a zero-knowledge proof in the given zkDocument using the provided session context.