Proof of concept implementation of ECP-SAP paper. Benchmarks stealth address parsing speed against BaseSAP (DKSAP) across BN254 and BLS12-377 curves.
Stealth addresses let you receive crypto without linking transactions to your public identity. The receiver scans announcements to find payments meant for them. This project implements and benchmarks different scanning approaches:
- bn254/ - dual-key stealth addresses on BN254 (pairing-based, original paper approach)
- bn254-singlekey/ - single-key variant with view tags and experiment runner
- bn254-keychange/ - key-change variant
- bls12-377/ - same protocol on BLS12-377 curve
- plot/ - benchmark results and plotting script
git clone https://github.com/dzmbs/ecp-sap.git
cd ecp-sap
# run any variant
go run ./bn254
go run ./bn254-singlekey
go run ./bls12-377
go run ./bn254-keychangeYou can change the number of public keys to scan through in config/config.go:
const RunNumber = 5000The plot/ directory has pre-computed experiment results for 5k-80k public keys. To visualize:
pip install matplotlib numpy
python plot/plot.pyScanning speed (ms) across different announcement counts:
| Protocol | 5k | 10k | 20k | 40k | 80k |
|---|---|---|---|---|---|
| DKSAP | 2362 | 4694 | 9393 | 18797 | 37558 |
| DKSAP + view tag | 308 | 614 | 1225 | 2450 | 4885 |
| ECPDKSAP + view tag | 296 | 588 | 1182 | 2355 | 4685 |
| ECPSKSAP + view tag | 3411 | 6813 | 13624 | 27272 | 54435 |
The pairing-based dual-key approach (ECPDKSAP) matches DKSAP+view_tag performance while providing stronger privacy guarantees.