Skip to content

Instantly share code, notes, and snippets.

View IvanAnishchuk's full-sized avatar

Ivan Anishchuk IvanAnishchuk

View GitHub Profile

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
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>