Abric-language-kotlin
// Locally refresh: new_share = old_share + random_share - random_share_from_prev val newShares = parties.indices.map i -> add(oldShares[i], randoms[i])
Write protocols like this:
The name "Abricot" often appears in academic contexts related to , secret sharing , and verifiable secret sharing (VSS). The abricot-language-kotlin repository specifically provides a Kotlin-based frontend for writing cryptographic protocols that can later be compiled or interpreted for different backends (e.g., arithmetic circuits, Boolean circuits, or actual networking code). abric-language-kotlin
Then write your first protocol:
output(finalShares, parties)
// Not actual syntax but representative of Abricot style val secretSharing = protocol val s = secretInput(dealer, "secret") val shares = split(s, 3, 5) // 3-out-of-5 sharing send(shares[0] to alice) send(shares[1] to bob) // ...
import fr.ens.abricot.* fun main() val protocol = protocol val a = secretInput(party("Alice"), 42) val b = secretInput(party("Bob"), 117) val c = add(a, b) val result = reveal(c) output(result, party("Charlie")) // Locally refresh: new_share = old_share + random_share
val multiply = protocol val x = input(alice) val y = input(bob) val product = mul(x, y) // This might generate Beaver triple multiplication output(product, alice, bob)