N1PC - Yellow paper
  • Abstract
  • Introduction
    • Background
    • Objective
  • Technical Overview
    • Blockchain Architecture
    • Consensus Mechanism
  • Privacy Mechanisms
    • Zero-Knowledge Proofs
    • Anonymity and Security Features
  • Network and Protocol
    • Node Operation
    • Validator Participation
  • Development and Future Directions
    • Roadmap
    • Contributing
  • Application and Use Cases
  • Conclusion
  • References
Powered by GitBook
On this page
  1. Privacy Mechanisms

Zero-Knowledge Proofs

Zero-Knowledge Proofs (ZKPs) are a groundbreaking cryptographic method that allows one party (the prover) to prove to another party (the verifier) that a statement is true, without conveying any information apart from the fact that the statement is indeed true. This characteristic makes ZKPs an ideal privacy-enhancing technology for blockchain applications, where the need to verify transactions conflicts with the desire to protect users' privacy.

Integration in N1PC

N1PC integrates a custom Zero-Knowledge Proof (ZKP) library designed to enhance transaction privacy without compromising on security or scalability. The implementation focuses on enabling transactions that are verifiable by network participants while keeping the transaction contents hidden, thereby ensuring the privacy of transaction details such as sender, receiver, and amount transferred.

Types of ZKPs Utilized

N1PC employs two primary types of ZKPs: zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) and zk-STARKs (Zero-Knowledge Scalable Transparent Arguments of Knowledge). Each serves a unique purpose within the ecosystem:

  • zk-SNARKs: Known for their efficiency and the small size of the proofs, zk-SNARKs are used in N1PC to facilitate fast verification of transactions. However, they require a trusted setup phase, which can introduce potential security concerns.

    zk-SNARK:{(P,V,CRS)∣P knows w:C(w,x)=0}\text{zk-SNARK} : \{ (P, V, \text{CRS}) \mid P \text{ knows } w : C(w, x) = 0 \} zk-SNARK:{(P,V,CRS)∣P knows w:C(w,x)=0}

    PPP proves they know a witness for which the circuit CCC outputs 0, given public inputs xxx, with the help of a common reference string (CRS).

  • zk-STARKs: As an alternative to zk-SNARKs, zk-STARKs offer scalability and transparency advantages. They do not require a trusted setup, making them more secure against certain types of cryptographic attacks. The trade-off is a larger proof size and more computational intensity compared to zk-SNARKs. zk-STARKs remove the need for a trusted setup (CRS). The representation of a zk-STARK is similar but emphasizes scalability and transparency:

    zk-STARK:{(P,V)∣P knows w:C(w,x)=0}\text{zk-STARK} : \{ (P, V) \mid P \text{ knows } w : C(w, x) = 0 \} zk-STARK:{(P,V)∣P knows w:C(w,x)=0}

    Here, the absence of CRS highlights the transparent setup. CCC represents a computation or verification process executed within the blockchain network, www is the private information, and xxx are public inputs.

Mathematical Foundations

The ZKP implementation in N1PC is grounded in complex mathematical concepts, including elliptic curve cryptography and polynomial commitment schemes. These foundations provide the security and privacy guarantees essential for the functioning of ZKPs. Specifically, the construction of zk-SNARKs and zk-STARKs involves the generation of cryptographic proofs that certain computations were performed correctly, without revealing the inputs or the computation itself.

Let TTT represent a transaction, and let PPP and VVV denote the prover (sender) and the verifier (network), respectively. The Zero-Knowledge Proof for TTT can be defined as:

ZKP(T):P→V such that V learns nothing about T except that it’s valid.ZKP(T):P→V\ such\ that\ V\ learns\ nothing\ about\ T\ except\ that\ it’s\ valid.ZKP(T):P→V such that V learns nothing about T except that it’s valid.

Assuming xxx is the transaction amount, and kkk is a secret key derived from the transaction participants' public-private key pairs, the encrypted amount EEE could be represented as:

E(x,k)=Encryptk(x)E(x, k) = \text{Encrypt}_k(x) E(x,k)=Encryptk​(x)

The decryption to retrieve xxx would be:

D(E,k)=Decryptk(E)D(E, k) = \text{Decrypt}_k(E) D(E,k)=Decryptk​(E)

Ensuring Privacy and Security

The integration of ZKPs into N1PC significantly enhances the privacy and security of transactions on the blockchain. Users can engage in financial transactions, vote, or perform other actions with the assurance that their privacy is safeguarded. Meanwhile, the network maintains its integrity through the verifiability of transactions:

  • Transaction Privacy: By concealing the details of transactions, users can enjoy a high degree of privacy, crucial for sensitive financial dealings or any application where user anonymity is desired.

  • Network Integrity and Security: Despite the obfuscation of transaction details, ZKPs allow the network to verify the legitimacy of transactions, ensuring that only valid transactions are confirmed and added to the blockchain.

Challenges and Solutions

While ZKPs offer significant advantages, they also present challenges, particularly in terms of computational resources and the complexity of proof generation. N1PC addresses these challenges through optimizations in the ZKP library, leveraging advancements in cryptographic research to reduce the computational load and improve the efficiency of proof generation and verification processes.

TX-ZKP:{(P,V)∣P can prove a valid transaction without revealing details}\text{TX-ZKP} : \{ (P, V) \mid P \text{ can prove a valid transaction without revealing details} \} TX-ZKP:{(P,V)∣P can prove a valid transaction without revealing details}

Conclusion

The adoption of Zero-Knowledge Proofs within the N1PC blockchain represents a pivotal advancement in reconciling the seemingly conflicting goals of privacy and transparency in digital transactions. Through meticulous integration of ZKPs, N1PC establishes a new paradigm for privacy-focused blockchains, offering users unparalleled privacy protections without compromising the security and integrity of the network.

PreviousConsensus MechanismNextAnonymity and Security Features

Last updated 1 year ago