CommutativeScheme

Inheritors

Functions

Link copied to clipboard
abstract fun encrypt(plaintext: ByteArray, key: SchemeKey): Pair<ByteArray, EncryptProof>
Link copied to clipboard
abstract fun generateKey(): SchemeKeyPair
Link copied to clipboard
abstract fun strip(ciphertext: ByteArray, key: SchemeKey): Pair<ByteArray, StripProof>
Link copied to clipboard
abstract fun verifyEncrypt(prev: ByteArray, next: ByteArray, proof: EncryptProof, pubKey: SchemeKey): Boolean

Verify that next was produced by applying the key corresponding to pubKey to prev. Initial implementations may return true unconditionally — the GSet membership check is the primary double-encode defence. A full ZK proof is a follow-up.

Link copied to clipboard
abstract fun verifyStrip(prev: ByteArray, next: ByteArray, proof: StripProof, pubKey: SchemeKey): Boolean