Unlock the Potential of Blind Computing – Developer SDK Update






Tech Updates

We are excited to introduce Version 0.2.1 of the Nillion SDK! This update marks our second release since unveiling the Nillion SDK developer preview at Scaling Ethereum just last month. Our engineering team has been working hard to refine the SDK based on valuable community feedback and the evolving needs of our developers.

What’s New in V0.2.1?

In this release, we’ve implemented significant language features and network improvements that elevate the development experience and broaden the utility of the Nillion Network.

First, we added left shift (<<) and right shift with truncation (>>), alongside probabilistic truncation (trunc_pr) for integers. These operations provide an efficient way to manage the number of precision bits p, reducing computational overhead and enhancing performance. This unlocks multiple powerful use cases such as emulating fixed-point operations critical in machine learning applications.

Let’s take a look at a few examples of each one of these updates to the Nada language:

Left & Right Shift Truncation

Here my_int1 is shifted left by the value specified in amount and the result (new_int) is output. Note: right shift (>>) can be used analogously in Nada programs.

def nada_main():
    party1 = Party(name="Party1")
    my_int1 = SecretInteger(Input(name="my_int1", party=party1))
    amount = PublicUnsignedInteger(Input(name="amount", party=party1))

    new_int = my_int1 << amount

    return [Output(new_int, "my_output", party1)]

Probabilistic Truncation

Here my_int1 is being truncated by amount bits and the result (new_int) is outputted. Right shift (>>) is similar to this, the only difference being that it is deterministic. The probabilistic truncation on the other hand might output the expected or the expected + 1 value in difference instances of the program.

def nada_main():
    party1 = Party(name="Party1")
    my_int1 = SecretInteger(Input(name="my_int1", party=party1))
    amount = PublicUnsignedInteger(Input(name="amount", party=party1))

    new_int = my_int1.trunc_pr(amount)

    return [Output(new_int, "my_output", party1)]

Private Equality

Building on the theme of privacy, we’ve also introduced a private equality feature. This allows developers to compare two secret integers without revealing their values, returning a secret boolean as the result. This capability is crucial for applications requiring high levels of security and data confidentiality.

def nada_main():
    party1 = Party(name="Party1")
    party2 = Party(name="Party2")
    A = SecretInteger(Input(name="A", party=party1))
    B = SecretInteger(Input(name="D", party=party2))

    result = ((A * B) == (B + A))

    return [Output(result, "my_output", party1)]

Network Storage Enhancement

Having seen the demand for large secrets to be stored in the network from teams in the recent EthGlobal hackathon we’ve boosted the storage capacity of secretBlobs from 100KB to an impressive 1MB. This upgrade facilitates the development of more complex applications that require handling large data sets securely.

MIR Bug Fix and State Machine Refactor

Our team found and fixed a bug impacting how the intermediate representation of Nada programs works – enabling the execution of much larger programs. Additionally, a key refactor in our core state machines now allows them to operate on two fields simultaneously (Z_q and Z_{2^k}), effectively halving the round complexity for many basic circuits.

Key Changes To Python Client

The user_id() and party_id() Nillion Python Client methods have been deprecated and replaced with attributes. This change reduces the overhead of method calls for accessing these properties and keeps the Nillion Python Client consistent with the Nillion JavaScript Client, which has  user_id and party_id attributes. Check out user_id and party_id in the Python Client Reference.

Start Building With the Nillion SDK

If you’re a developer interested in building for the future of high value data you can get started by checking out our developer docs or joining our community of builders in the #developers-sdk channel on Discord.

Show off what you can build and enter for a chance to win up to 500 USDC by solving our latest bounties on Bountycaster.

About Nillion

Nillion is humanity’s first Blind Computer. It is powered by a decentralized network of nodes that enables “Blind Computation” through the coordination and orchestration of privacy enhancing technologies (PETs) such as multi-party computation (MPC), fully homomorphic encryption (FHE) and zero-knowledge proofs (ZKP). Nillion believes Blind Computation will become the internet’s base layer for all private data as PETs continue to mature. Nillion has attracted a notable initial cohort of Blind Computation builders across AI, DeFi, medical data, custody, wallets, global identity, messaging, and more.

The Nillion development company, Nilogy, was incubated by CoinList’s seed program. Nilogy’s Founding CTO was the Founding Engineer of Uber (Conrad Whelan), the Chief Strategy Officer was the Founding CMO of Hedera Hashgraph (Andrew Masanto), the Chief Business Officer is the Founder of Indiegogo (Slava Rubin), the General Counsel was the Associate General Counsel of Coinbase (Lindsay Danas Cohen), along with builders hailing from Consensys, LayerZero, Polygon and Google.

Learn more by visiting the Nillion website or following us on Twitter, Telegram or Discord.