Skip to content

Instantly share code, notes, and snippets.

@asn-d6
asn-d6 / gist:1cdd43931aeff0be9a1f7ce65f4fb626
Created May 4, 2020 14:22
Equihash parameters & requirements
$ python3 equihash_params.py
Equihash<125,4>:
Memory requirements: 536 MB
Solution size: 72 bytes
Time requirements: 167772160 calls to H()
Verification cost: 16 calls to H()
Equihash<144,5>:
Memory requirements: 536 MB
Solution size: 120 bytes
Time requirements: 100663296 calls to H()
# Boxes that attacker has in her botnet
ATTACKER_BOXES = [5, 50, 100, 200, 300, 400, 500, 1000]
# Successful high-effort PoW the attacker produces per second
ATTACKER_SUCCESSES_PER_SEC = [1, 5, 10, 20, 30, 50]
print("Expected Time (in seconds) Per Successful High-Effort PoW\n")
print("\tSucceses\t\t1\t\t5\t\t10\t\t20\t\t30\t\t50\n")
for n_attacker_boxes in ATTACKER_BOXES:
print("\t%d\t\t\t" % n_attacker_boxes, end="")
for attacker_success_per_sec in ATTACKER_SUCCESSES_PER_SEC:
Normal situation
blabla.onion Tor Tor Browser
<user asks for blabla.onion>
<--- SOCKS CONNECT to blabla.onion ---
<Tor fetches descriptor>
@asn-d6
asn-d6 / gist:bf5f4da3d6f9fd1e66e630a7b234ddd0
Created August 28, 2019 09:54
full unencrypted v3 desc (concat and splitted)
hs-descriptor 3
descriptor-lifetime 180
descriptor-signing-key-cert
-----BEGIN ED25519 CERT-----
AQgABqRnARJOPIQQUBTcdHepFHerAPuv0UucpTBBFRpDysiHNwmZAQAgBADI3nM8
stVGnGGuzA4/81qRBS5asA8oUrLwH/MDpJ6QSRePrioaMbGwrgu999FasMbYpEWM
VJ2VKC3FfU1OtQZlm8kgeEvptCbgVzqD0KQ5A8YKpkiZB40ONEL/6eIyBAE=
-----END ED25519 CERT-----
revision-counter 1012307846
superencrypted
@asn-d6
asn-d6 / tests_all_day.sh
Created June 14, 2018 13:13
run unittests with mutated local time
#!/bin/bash
# debian: run 'service systemd-timesyncd stop' and 'service ntp stop' as root before
# iterate over hours
for h in $(seq 0 23);
do
# iterate over minutes:
for m in $(seq 0 10 59);
do echo "date --set 'tomorrow $h:$m'";
# set the date