Partial implementation of NI-DKG — threshold cryptography on Ethereum using ZK proofs.
This project is a first aproach on the partial implementation on the paper mentioned on the repo. The project has been more about to understand the usage of cryptografic primitives and understand the pros and cons they offer in cooperation to ennhance security but looking what we lose. The challenge was to use ia to reach the coding barrier (solidity, circom, javascript) with a suficient rigor prompting and test to obtain the main sstructure. An understand the flow of the infrastructure. Solidity interaction with nodes, javascript events anc information, and the circuits necesary to generate zk proofs with groth16.
Complete NI-DKG coordinator with phase management, time windows, and abort logic Fisher-Yates participant selection on-chain Even if the implementation was made with the exact number of nodes. For future plans the node selector has to attempt at keeping diverse localization, geopolitics, intstituions. Future work benchmarc for more nodes 20,30,40...
Shamir Secret Sharing splits a key across n nodes so any t can reconstruct it but a malicious dealer could distribute bad shares. Feldman commitments fix this: each node publishes elliptic curve points that let anyone verify their share is consistent, without revealing it. To remove the dealer entirely, each node contributes their own polynomial that is the DKG part. The shared public key is the sum. The private key is never assembled. ElGamal encryption protects shares in transit between nodes. Chaum-Pedersen proofs ensure each partial decryption was computed honestly. Lagrange interpolation combines t valid partials on-chain to recover the plaintext. Each step closes the trust assumption left open by the previous one. but even for 5nodes Feldman circom could not compile , and it culdnt be modified withou compromissing its security. So it was passed has a true for demonstration purposes. Possible work on finding algortihms like grot16 for optimizing zk proofs . BabyJubjub elliptic curve library in pure Solidity — point addition, scalar multiplication, modular inverse Feldman commitment aggregation and share commitment derivation on-chain Threshold signing — Each participating node detects the encrypted ciphertext, computes its partial decryption using its Shamir share, and submits a Chaum-Pedersen zero-knowledge proof. This proof demonstrates that the node used the correct share — consistent with its published Feldman commitment — without revealing the share value. The smart contract verifies each proof on-chain using BabyJubjub arithmetic before accepting it.
ElGamal encryption of the transfer amount in JavaScript Chaum-Pedersen DLEQ proof generation in JavaScript with challenge hash matching Solidity exactly On-chain Chaum-Pedersen verification using BabyJubjub arithmetic On-chain Lagrange interpolation for threshold reconstruction Amount commitment verification Five independent node daemon processes running autonomously, event-driven via blockchain polling Protected vault contract with re-entrancy protection What is mocked:
The Groth16 circuit verification for Phase 4 Feldman contributions. The circuit is written in Circom and compiles to R1CS. The trusted setup runs with snarkjs. The generated Solidity verifier contract exists. But the real proof generation is not yet wired into the node daemons — a MockVerifier that always returns true stands in its place.

