You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Kevin F d6c903702d Fix readme 3 months ago
onioncompressor initial commit 1 year ago
tests initial commit 1 year ago
.gitignore initial commit 1 year ago
.travis.yml initial commit 1 year ago
CHANGELOG.md initial commit 1 year ago
LICENSE initial commit 1 year ago
Makefile initial commit 1 year ago
README.md Fix readme 3 months ago
requirements.in initial commit 1 year ago
requirements.txt initial commit 1 year ago
run_tests.sh initial commit 1 year ago
setup.py initial commit 1 year ago

README.md

OnionCompressor

Per v3 Tor onion spec: https://github.com/torproject/torspec/blob/main/rend-spec-v3.txt

This small module 'compresses' v3 onions by decoding the base32, removing the non-security related checksum, and removing the version number.

The resulting bytes is actually a valid ed25519 public key, but you probably shouldn't use it for anything but normal Tor onion uses.

It can also uncompress the bytes back to the human friendly format.

The compressed result is about 50% smaller.

Usage

compressed: bytes = onioncompressor.compress('duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion')

uncompressed: str: = onioncompressor.decompress(compressed)