Abric-language-kotlin Extra Quality Link

Abricot introduces Secret<T> as a type that cannot be observed by the runtime unless explicitly declassified or reconstructed via MPC. This enables automatic tracking of information flow.

// Locally refresh: new_share = old_share + random_share - random_share_from_prev val newShares = parties.indices.map i -> add(oldShares[i], randoms[i])

┌─────────────────────────────────────────────┐ │ High-level DSL (Kotlin) │ │ protocol input(...) output(...) ... │ └─────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────┐ │ Intermediate Representation │ │ (IR) – Linearized sequence of gates │ └─────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────┐ │ Analysis Modules │ │ - Information flow │ │ - Leakage detection │ │ - Complexity estimation │ └─────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────┐ │ Code Generation Backends │ │ - MP-SPDZ │ │ - SCALE-MAMBA (for ZK) │ │ - Custom networking stubs (Kotlin/Netty) │ └─────────────────────────────────────────────┘ | Feature | Abricot (Kotlin) | Circom (ZK-SNARKs) | MP-SPDZ high-level | |------------------------|------------------|--------------------|--------------------| | Host language | Kotlin (JVM) | Custom language | Python-like script | | Type system | Full Kotlin types + Secret | Static, signal-based | Dynamic | | Reusable sub-protocols | Yes (functions) | Yes (templates) | Yes (functions) | | Automatic malicious security | Partially via ZK insertion | No (must specify constraints) | Via compiler flags | | IDE support | Full (IntelliJ) | Limited | Limited | | Compilation target | MPC, ZK, simulation | R1CS + witness | Various MPC engines | 5. Example: Proactive Secret Sharing in Abricot One of the classic use cases for Abricot is proactive secret sharing — where shares are refreshed periodically to maintain security against mobile adversaries. abric-language-kotlin

Then write your first protocol:

// 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) // ... Abricot introduces Secret&lt;T&gt; as a type that cannot

1. What is Abricot? Abricot (not to be confused with the fruit "abricot" meaning apricot in French) is a research-oriented embedded DSL written in Kotlin. Its primary goal is to allow cryptographers and protocol designers to describe, analyze, and generate implementations of secure multiparty computation (MPC) protocols and zero-knowledge proofs (ZKPs) at a high level of abstraction.

val proactiveRefresh = protocol val parties = listOf(p1, p2, p3) val oldShares = inputShares(parties) // Each party generates a random blinding share val randoms = parties.map randomShare() "secret") val shares = split(s

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