Skip to content

Instantly share code, notes, and snippets.

View IvanAnishchuk's full-sized avatar

Ivan Anishchuk IvanAnishchuk

View GitHub Profile
user@g94 ~/src/ghostsomething $ uv run gen.py
========================================
🔒 GHOST-TIP MINT KEY GENERATION UTILITY
========================================
--- [1] SECP256K1 IDENTITY KEYS ---
MINT_IDENTITY_PRIVKEY_HEX (Python .env) : 0x22d0660777583e8d539991fb0f3b3e93ee1a1137d245e70be103ec7c223e2d20
MINT_IDENTITY_PUBKEY (Frontend TS) : 0x03ffe59db59efa387524902c29a91e9a8a8102aba294b17269e111d3a66141b1ca
--- [2] BN254 BLS KEYS ---
@IvanAnishchuk
IvanAnishchuk / building-a-privacy-first-web3-wallet.ipynb
Created March 18, 2026 17:34
Building a Privacy-First Web3 Wallet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Ghost-Tip Protocol & Web3 dApp Wallet Master Plan This document serves as the self-contained engineering blueprint and R&D output for building a privacy-first Web3 dApp wallet. It details the implementation plan for the Ghost-Tip Protocol: a stateless, untraceable eCash system for creator micropayments on the EVM. This plan integrates the multiplicative blinding logic from the BM-BLS (Blind Multisignature based on BLS) paper, scaled down to a 1-of-1 signer configuration. The system operates strictly on 0.01 Sepolia ETH denominations, features a Python-based off-chain mint, and defines a completely stateless web dApp where the blinding factor and all secrets are deterministically derived.

  1. Cryptographic Foundation: BM-BLS on EVM (BN254) Ethereum’s native precompiles only support the BN254 (alt_bn128) curve. For the BLS blind signature, the protocol uses standard multiplicative blinding in \mathbb{Z}_q (where q is the order of the BN254 curve).

CRITICAL: Deterministic Derivation To ensure the dApp remains

Designing a stateless, recoverably-secure eCash protocol on Ethereum—routed through on-chain encrypted announcements—requires reconciling two different cryptographic domains: secp256k1 (for standard EVM wallets and stealth cryptography) and BN254 / alt_bn128 (for EVM-native Zero-Knowledge precompiles). By marrying the deterministic derivation of Chaumian eCash with the ERC-5564 Stealth Address standard, we can create a system where the client holds no brittle state. If a user loses their device, their entire wallet—including received off-chain eCash tokens—can be reconstructed simply from their seed phrase and on-chain event logs. Here is the detailed technical architecture and implementation plan for the protocol.

  1. Cryptographic Foundations & Curve Separation Because the EVM's native precompiles (0x06 for ecAdd, 0x07 for ecMul, and 0x08 for ecPairing) strictly operate on the BN254 curve, the eCash blind signatures must be constructed on BN254. However, the encrypted messaging and stealth address routing wi
@IvanAnishchuk
IvanAnishchuk / ecash-arch-v0.1.1.md
Created March 13, 2026 23:49
ecash-arch-v0.1.1.md

You are completely right, and I appreciate the reality check. It is a strict constant-factor reduction ($65N$ bytes instead of $97N$ bytes), not a change in the asymptotic complexity. The calldata size is still fundamentally $O(N)$ with respect to the number of tokens being redeemed. It's a neat trick for shaving off gas costs, but calling it a "massive elimination" overhypes a standard EVM optimization.

Let's strip out the marketing speak, ground the engineering claims in reality, and finalize this architecture.

Here is the complete, sober, and technically precise Master Document, incorporating the standard Stealth Address terminology, the encrypted delivery channel, and the correct mathematical constraints.


Native Android Privacy-Preserving Ethereum Wallet & Ghost-Tip Protocol Master Plan

@IvanAnishchuk
IvanAnishchuk / ecash-arch-v.0.1.0.md
Created March 13, 2026 21:16
eCash arch (v0.1.0)

Designing a stateless, recoverably-secure eCash protocol on Ethereum—routed through on-chain encrypted announcements—requires reconciling two different cryptographic domains: secp256k1 (for standard EVM wallets and stealth cryptography) and BN254 / alt_bn128 (for EVM-native Zero-Knowledge precompiles). By marrying the deterministic derivation of Chaumian eCash with the ERC-5564 Stealth Address standard, we can create a system where the client holds no brittle state. If a user loses their device, their entire wallet—including received off-chain eCash tokens—can be reconstructed simply from their seed phrase and on-chain event logs. Here is the detailed technical architecture and implementation plan for the protocol.

  1. Cryptographic Foundations & Curve Separation Because the EVM's native precompiles (0x06 for ecAdd, 0x07 for ecMul, and 0x08 for ecPairing) strictly operate on the BN254 curve, the eCash blind signatures must be constructed on BN254. However, the encrypted messaging and stealth address routing wi
@IvanAnishchuk
IvanAnishchuk / coverage_runserver.py
Created March 8, 2017 16:54
Auto-coverage runserver alternative for Django, killable by request
#!/usr/bin/env python2
# Not py3-compatible in this form
from __future__ import print_function
import signal
import sys
import thread
import coverage
from django.conf import settings
@IvanAnishchuk
IvanAnishchuk / traceback
Created July 8, 2016 12:25
DOT traceback
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
@IvanAnishchuk
IvanAnishchuk / nginx.conf
Created October 21, 2015 19:54 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4aysQE2pfdfr8+tQ6vNghn7mt/BEHZgk/C6ZP66FNO2I4Uzax+UpBkjtA2O2cQ5vfdgY8zaOXpiN1FUtswTume2Dn+DuA4wpJs5QeceXohj4IqjRUD/+fnmBDxXANgSnqJUL/YfAn4Q98kXFNhklHOVDzHr/Ov8+bufPVljiGQ9sD0GejRrEWQqbUbezfHrgG0sKkY69EBhVUT8hhQJ9EsKemJK6A8YHlhaOudzZfH93RNOA4Kfuuhyqyd18dCLpNpbbzZr1M9SD8B2n/311/10u1onA2IM06XwXyZSzVmO+cu7+FJI0kktOtWerc/3iyOs3rAE93B4OZoG7TwT/3 anishchuk.ia@gmail.com