🏷️Apply Code GET99 & Get Designer Case for ₹99. | Free Shipping above ₹299. (Except Mug Product).

Abric-language-kotlin _top_ [INSTANT →]

// build.gradle.kts dependencies implementation("fr.ens.abricot:abricot-core:0.5.0") implementation("fr.ens.abricot:backend-mpc:0.5.0")

Then write your first protocol:

// After receiving, subtract the incoming random receiveAll() val finalShares = parties.indices.map i -> val prev = (i - 1 + parties.size) % parties.size sub(newShares[i], randoms[prev]) 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]) // build

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")) 42) val b = secretInput(party("Bob")

The library typically consists of several layers:

val protocol = protocol val x = input(alice) val y = input(bob) val z = add(x, y) output(z, charlie)