Posts

Understanding Hardware Wallets

Image
Introduction In the world of cryptocurrency, managing multiple accounts securely and conveniently is paramount. Hardware wallets, such as the Ledger , SafePal and others, achieve this by utilizing a single seed phrase to manage multiple accounts. This is made possible through a concept called hierarchical deterministic (HD) wallets. In this article, we will explore the mechanics of path derivation and touch on the extent of security if the connected computer or browser wallet is compromised. Path Derivation: The Core of HD Wallets Path derivation is a method used in HD wallets to generate multiple key pairs from a single seed phrase. Each account in an HD wallet is derived from a master private key using a specific derivation path. This allows for the creation of a structured tree of key pairs, enabling a single seed phrase to manage numerous accounts. How Does It Work? When you initialize your hardware wallet, a seed phrase (12, 18, or 24 words) is generated. This seed phra

Exploring SNARK Interoperability in Rust and Go

Image
SNARKs represent a groundbreaking cryptographic tool that enables the verification of computations without revealing the inputs or the intermediate steps. SNARK is deeply rooted in mathematical principles, leveraging concepts like hashes, and curve operations, which are language-agnostic. While many discussions around SNARK implementations often revolve around Rust due to its popularity in the cryptographic community, it's important to note that SNARKs can be implemented and utilized in various programming languages, including Go. In this article, we'll explore SNARK interoperability, demonstrating how proofs can be generated and validated in both Go and Rust. SNARK in Go: gnark One prominent library for implementing SNARKs in Go is gnark . Gnark is a powerful library designed specifically for Go that facilitates the creation and verification of zero-knowledge proofs using the zk-SNARK protocol. It supports various proving schemes, with Groth16 and Plonk being o

Exploring Zero-Knowledge Friendly Hash Functions

Image
Hash functions are crucial tools in the world of blockchain and cryptography, helping to keep data secure and intact. Recently, as zero-knowledge proofs have become more popular, there's been a need for hash functions that fit these complex systems better. This article will look at how traditional hash functions work, their role in blockchain technology, and why they're so important for security. We'll also explore why these traditional functions aren't always the best fit for zero-knowledge proofs and introduce some new hash functions—RESCUE, Poseidon, and Poseidon2—that are designed to work well in these scenarios. What is a Hash Function? A hash function is a mathematical algorithm that converts input data of any size into a fixed-size string of bytes, typically a hash, which appears random. Hash functions are fundamental in various applications, including data integrity verification, password storage, and digital signatures. They are crucial for ensuring that d

Choosing the right SNARK Backend

Image
Building on our previous discussions from "[SNARKs 101](https://deeprnd.medium.com/snarks-101-40189a12eabc)", today we delve deeper into the backend systems of SNARKs, which play a pivotal role in the practical application of these technologies. Conceptually, in the backend, the verifier challenges the prover. However, this interaction is cleverly abstracted away using cryptographic methods, resulting in a static proof where the verifier never directly interacts with the prover. Here, the prover claims to know a satisfying assignment to the circuit. This part of the SNARK system is what you typically encounter in literature, encompassing names like Groth16, Marlin, PlonK, and others, each referring to different backends of the probabilistic proof system. In this piece, we'll examine various SNARK constructions and their appropriate setups, considering factors such as trusted setups versus transparent setups. As we continue our series, we will explore how choosing the r

Zero-Knowledge Proofs in Rust and Bellman

Image
In an era where data privacy is paramount, Zero-Knowledge Proofs (ZKPs) stand out as a beacon of hope. They are cryptographic protocols enabling one party to prove to another that a statement is true, without revealing any information apart from the fact that the statement is indeed true. One such application of ZKPs is through SNARKs , a variant offering efficiency and succinctness. The Role of Zero-Knowledge Proofs in Modern Cryptography Zero-Knowledge Proofs, particularly SNARKs, are revolutionizing the way we think about privacy and security in the digital age. They allow the verification of complex operations, like the validity of a transaction or the correctness of a computational task, without revealing any underlying data. This is particularly crucial in scenarios where sensitive information needs to be validated without exposing it – a situation common in blockchain technology, secure voting systems, and, as we'll explore, even in seemingly simp

Understanding Pedersen and Kate Commitments

Image
Cryptographic commitments play a pivotal role in ensuring the integrity and security of digital transactions and communications. Among the myriad of commitment schemes available, Pedersen and Kate commitments stand out for their unique properties and applications. This article delves into the intricacies of both, drawing insights from a previous discussion on Kate commitments Kate Polynomial Commitments . What are Pedersen Commitments? Pedersen commitments are renowned for their simplicity and elegance in cryptographic circles. At its core, a Pedersen commitment allows one to commit to a chosen value while keeping it hidden, with the ability to reveal the committed value later. The magic lies in its two-fold assurance: it's both hiding (the value cannot be guessed) and binding (the committer can't change the value once committed). The Mechanism Select Parameters : Choose a large prime number p and a generator g of a group of order q (where q is also a large prime

Zero-Knowledge Proofs with Circom and Noir

Image
Zero-knowledge proofs (ZKPs) are a powerful cryptographic tool that allow you to prove that something is true without revealing any additional information. ZKPs are finding a wide range of applications in blockchain, including privacy-preserving transactions, scaling solutions, and decentralized gaming. In the previous article, we've discussed about some of the fundamentals behind SNARKs and STARKs , so make sure to read those if you want more details behind the tech. ZKP Languages One of the most important components of a ZKP is the circuit. A circuit is a mathematical representation of the computation that is being performed by the ZKP. Circuits are typically written in a specialized language, such as Circom or Noir. Circom is a circuit description language that is developed by the Zcash project. It is a powerful and flexible language that allows users to write circuits for a wide range of applications. However, Circom can be difficult to learn and use, and it requires a