┌─────────────────────────────────────────────┐ │ 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.

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

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).