Skip to content

Instantly share code, notes, and snippets.

Self-Custody 101: From Private Keys to BIP39

This section summarizes years of innovation by some of the world's best cryptographers in just a few lines, so it inevitably involves some simplifications.

To spend coins associated with a specific Bitcoin address, you need the corresponding private key. This private key is used to create a unique digital signature for the transaction. Bitcoin network nodes then verify this signature using your public key (from which your address is derived) to confirm you are the rightful owner of the funds.

What are Private and Public Keys?

  • In Bitcoin, your private key is essentially a very large, secret number.
  • Your public key is mathematically derived from your private key using a specific elliptic curve algorithm called secp256k1. This process is designed to be easy in one direction (private key to public key) but practically impossible to reverse (public key back to private key). Think of it like a mathematical one-way street. The secp256k1 curve w

How Private Is Too Private?

As society moves deeper into the digital era, privacy is no longer a luxury—it’s an essential safeguard. Systems like Wasabi Wallet, designed to provide strong privacy guarantees, have become indispensable in protecting individuals from surveillance, censorship, and authoritarian overreach. Yet, these same systems challenge traditional legal frameworks, which have been slow to adapt to a world where privacy, by design, makes user data untraceable. This presents a critical question: how should lawmakers evolve to support the growing need for privacy while addressing societal concerns?

The Benefits of Strong Privacy Systems in a Global Context

Examples of data breaches are never hard to find, exposing sensitive information to anyone willing to pay for it. At the time of writing, Fidelity has just reported a breach: Watcher.Guru. Fidelity, a respected institution in a serious industry, has nonetheless proven unable to sa

@turbolay
turbolay / Wasabi_Blockchain_Sync.md
Created August 5, 2023 18:24
Overview of the new blockchain synchronization process that will be released in Wasabi Wallet v2.0.4

Blockchain Synchronization in Wasabi Wallet

BIP 157-8 Background

Blockchain synchronization within the context of BIP157-8 entails testing every key derived in the wallet (minimum gap limit of clean keys + all used keys) against every filter of the blockchain, in order. Throughout this process, blocks containing a transaction relevant to the wallet will see their associated filters match against one of the keys. Subsequently, the block will be downloaded, its transactions processed, and the wallet state updated with the discovered information.

If a block doesn’t contain a relevant transaction for the wallet, each key will still have a probability of approximately 1/700,000 to match against its associated filter (a false positive). Given that a Wasabi’s wallets can have many derived keys, this probability can become frustrating in standard scenarios, leading to extended waiting times filled with false positives. The user experience suffers as a result: imagine knowing that you didn’t make any transactio

Open Channels privately w/ WabiSabi

BTC++ Austin 2023

On-chain operations are not private by default

Bitcoin is not private at the protocol level. Every on-chain transaction reveals information about the sender and receiver to various entities, and in some cases, even to any observer of the blockchain. Similarly, Lightning channels opening and closing suffer from such leakage as they are settled on-chain.

Let’s break down what happens when you receive coins from different entities:

#load "common.fsx"
open System
open Common
let args = Environment.GetCommandLineArgs()
let walletname = args[2]
let getCoins (walletName: string) =
walletName
@turbolay
turbolay / Bitcionary.md
Created February 12, 2023 12:02
Bitcionary est un lexique pour aider les francais a comprendre le Bitcoin et les articles en anglais en parlant

Transaction/TX

Envoi de monnaie entre 2 parties, transaction.
TX est un sigle signifiant littéralement Transaction.

Payment

paiement, cas particulier de Transaction où celui qui envoie paye celui qui recoit, souvent pour un service ou produit, avec une somme convenue entre les deux parties.

Input

entrée dans une Transaction, qui peut posséder un ou plusieurs Inputs

Exemple: 2 billets de 50€ payés a la babysitter sont les Inputs du Payment pour la babysitter.

Current send UX

Something is clear from the discussions around [VDG] New Privacy Suggestions #9251: there is currently an issue in the send workflow, users are not really guided to know how much they can actually send to a given address to protect their privacy. They also have close to no idea how much their privacy would be hurt by sending a given amount to a given address because everything is computed under the hood (only the "other people or companies could know about this" in the TX details)

Privacy suggestions PR #9251

I loved the concept of privacy suggestions, I think this is a must have to tackle the issues aforementioned. Imho it also makes Coin Control much less important, because the Automatic Coin Selector would be less of a black box. This is something we should really want to achieve because it’s improving trust toward this feature of which users are currently afraid.

In the closed [#9251](https://github.com/zkSNACKs/WalletWasabi/p

from concurrent.futures import ThreadPoolExecutor, as_completed
from symbol import global_stmt
import timeit
import requests
import random
import string
import subprocess
import statistics
sample_size = 2

Wasabi filters downloading and processing improvements

What is currently implemented

Filters are asked routinely to Wasabi Synchronizer, sequently from first hash of the Network (hardcoded) or last hash written in the file system. They are stored in the SmartHeaderChain, a LinkedList that will contains all the filters. To avoid RAM usage, this list has a max size and is saved to the file system through IndexStore.

What we want to do

  • Begin to process filters whenever we download one (don’t wait until all are downloaded)
  • Be able to ask and process filters starting at wallet creation height without having all filter history

What we need to do

API must give ServerTipHash along with ServerTipHeight + the hash of block ServerTipHeight - 101 to protect ourselves in case of reorgs