
GPU-based Onion Hash generator
Scallion was a hobby project to learn OpenCL and RSA. We are not currently maintaining scallion. It has bitrotted in two important ways:
With enough attention and effort, it would be possible to overcome both of the challenges given above. We could implement support for the GPU ECDSA key generation algorithm to gain Tor v3 support. We could update OpenSSL and replace the math functions with a different library, or make our own managed code wrapper for the OpenSSL library. However, it would likely be better to add support for v3 onion addresses to a maintained project like vanitygen-plus.
Scallion lets you create vanity GPG keys and .onion addresses (for Tor's hidden services) using OpenCL.
Scallion runs on Mono (tested in Arch Linux) and .NET 3.5+ (tested on Windows 7 and Server 2008).
Scallion is currently in beta stage and under active development. Nevertheless, we feel that it is ready for use. Improvements are expected primarily in performance, user interface, and ease of installation, not in the overall algorithm used to generate keys.
Scallion is available under the MIT license. If you use code from this project in your own projects, we'd appreciate hearing about it at [email protected].
Here are some frequently asked questions and their answers:
Why generate GPG keys?
Scallion was used to find collisions for every 32bit key id in the Web of Trust's strong set demonstrating how insecure 32bit key ids are. There was/is a talk at DEFCON (video) and additional info can be found at https://evil32.com/.
What are valid characters?
Tor .onion addresses use Base32, consisting of all letters and the digits 2 through 7, inclusive. They are case-insensitive.
GPG fingerprints use hexadecimal, consisting of the digits 0-9 and the letters A-F.
Can you use Bitcoin ASICs (e.g. Jalapeno, KnC) to accelerate this process?
Sadly, no. While the process Scallion uses is conceptually similar (increment a nonce and check the hash), the details are different (SHA-1 vs double SHA-256 for Bitcoin). Furthermore, Bitcoin ASICs are as fast as they are because they are extremely tailored to Bitcoin mining applications. For example, here's the datasheet for the CoinCraft A-1, an ASIC that never came out, but is probably indicitive of the general approach. The microcontroller sends work in the form of the final 128-bits of a Bitcoin block, the hash midstate of the previous bits, a target difficulty, and the maximum nonce to try. The ASIC chooses the location to insert the nonce, and it chooses what blocks meet the hash. Scallion has to insert the nonce in a different location, and it checks for a pattern match rather than just "lower than XXXX".
How can you use multiple devices?
Run multiple Scallion instances. 😄 Scallion searches are probabilistic, so you won't be repeating work with the second device. True multi-device support wouldn't be too difficult, but it also wouldn't add much. I've run several scallion instances in tmux or screen with great success. You'll just need to manually abort all the jobs when one finds a pattern (or write a shell script to monitor the output file and kill them all when it sees results).
Just want the latest binary version? Grab it here.
Prerequisites
Get the latest mono for your linux distribution:
Install Common dependencies:
sudo apt-get update
sudo apt-get install libssl-dev mono-devel
AMD/OpenSource build
sudo apt-get install ocl-icd-opencl-dev
Nvidia build
sudo apt-get install nvidia-opencl-dev nvidia-opencl-icd
Finally
msbuild scallion.sln
Have the nvidia-docker container runtime
Build the container:
docker build -t scallion -f Dockerfile.nvidia .
Run:
docker run --runtime=nvidia -ti --rm scallion -l
Restarting Scallion during a search will not lose "progress". It is a probabilistic search and Scallion does not make "progress"
List devices
$ mono scallion/bin/Debug/scallion.exe -l
Generate a hash