Site icon On DarkNet – Dark Web News and Analysis

Scallion: a GPU-based Onion hash generator

Scallion

Scallion can help us use OpenCL to create GPG keys and .onion addresses for Tor hidden services. Scallion is developed and run on the Mono software platform, and has been successfully tested on the Arch Linux platform. The tool runs on .NET 3.5+ (tested on Windows 7 and Windows Server 2008 platforms).

Scallion is still in the testing stage and is under active development, but it can be used normally now. Our development is currently focused on improvements in performance, user interface, and installation difficulty, rather than in key generation and related algorithms.

Tool dependency

1. Install and configure OpenCL and related drivers.

2. OpenSSL, under the Windows environment, already contains pre-built x64 DLL.

3. Under the Windows platform, V C ++ Redistributable 2008 is required .

Tool download

The latest version of the source code compression package: [ click me to download ]

Build under Linux

Dependent component

For your own Linux distribution, get the latest version of Mono: [ Portal ]

Use the following commands to install common dependent components:

sudo apt-get update

sudo apt-get install libssl-dev mono-devel

AMD / OpenSource build command:

sudo apt-get install ocl-icd-opencl-dev

Nvidia build command:

sudo apt-get install nvidia-opencl-dev nvidia-opencl-icd

Finally, run the following command:

msbuild scallion.sln

Docker Linux configuration (Nvidia GPU)

1. Obtain the nvidia-docker container runtime environment: [ click me to get ].

2. Run the following command to build the container:

docker build -t scallion -f Dockerfile.nvidia

3. Run the following command:

docker run --runtime=nvidia -ti --rm scallion -l

Build under Windows

1. Open "scallion.sln" in VS

2. Build a solution

Tool use

Enumerate devices:

$ mono scallion/bin/Debug/scallion.exe -l

Generate a hash:

$ mono scallion/bin/Debug/scallion.exe -d 0 prefix Cooking up some delicious scallions... Using kernel optimized from file kernel.cl (Optimized4) Using work group size 128 Compiling kernel... done. Testing SHA1 hash... CPU SHA-1: d3486ae9136e7856bc42212385ea797094475802 GPU SHA-1: d3486ae9136e7856bc42212385ea797094475802 Looks good! LoopIteration:40  HashCount:671.09MH  Speed:9.5MH/s  Runtime:00:01:10  Predicted:00:00:56  Found new key! Found 1 unique keys. <XmlMatchOutput>   <GeneratedDate>2014-08-05T07:14:50.329955Z</GeneratedDate>   <Hash>prefix64kxpwmzdz.onion</Hash>   <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ytes>   <PublicExponentBytes>B/ZPZw==</PublicExponentBytes> </XmlMatchOutput> init: 491ms / 1 (491ms, 2.04/s) generate key: 1193ms / 6 (198.83ms, 5.03/s) cpu precompute: 10ms / 6 (1.67ms, 600/s) total without init: 70640ms / 1 (70640ms, 0.01/s) set buffers: 0ms / 40 (0ms, 0/s) write buffers: 3ms / 40 (0.08ms, 13333.33/s) read results: 67442ms / 40 (1686.05ms, 0.59/s) check results: 185ms / 40 (4.63ms, 216.22/s) 9.50 million hashes per second Stopping the GPU and shutting down...

Multi-mode hash

Scallion supports searching for single or multi-mode hashes through primitive regular expression statements, and currently only supports character types (such as [absd]). The "." Character represents any character, the Onion address length is fixed at 16 characters, and the GPG fingerprint is 40 characters. You can use "$" to find a prefix or suffix match, such as DEAD $. In addition, you can also use pipe statements (such as pattern1 | pattern2) to find multi-mode hashes. Of course, the speed of this search mode is definitely not optimistic.

Sample query

mono scallion.exe prefix[234567] mono scallion.exe -c prefix scallion hashes mono scallion.exe -c "prefix|scallion|hashes" mono scallion.exe .........badbeef mono scallion.exe --gpg badbeef$ # 生成GPG密钥 mono scallion.exe "suffixa$|suffixb$|prefixa|prefixb|a.suffix$|a.test.$"

Scallion working mechanism

1. Use OpenSSL and CPU to generate RSA key

2. Send the key to the GPU

3. Increase the public index of the key

4. Hash the key

5. If the generated hash does not partially conflict, return to the third step

6. If the generated key fails the PKCS # 1 v2.1 and sanity check, return to the third step

7. Generate a brand new key

Speed ​​/ Performance

The initial RSA key generation is done on the CPU, and the SHA1 hash calculation is done on the GPU. Given below is a calculation speed table for common GPUs:

GPU modelspeed
Intel i7-2620M9.9 MH / s
Intel i5-5200U118 MH / s
NVIDIA GT 52038.7 MH / s
NVIDIA Quadro K2000M90 MH / s
NVIDIA GTS 250128 MH / s
NVIDIA GTS 450144 MH / s
NVIDIA GTX 670480 MH / s
NVIDIA GTX 9702350 MH / s
NVIDIA GTX 9803260 MH / s
NVIDIA GTX 1050 (M)1400 MH / s
NVIDIA GTX 10704140 MH / s
NVIDIA GTX 1070 TI5100 MH / s
NVIDIA GTX TITAN X4412 MH / s
NVIDIA GTX 10805760 MH / s
NVIDIA Tesla V10011646 MH / s
AMD A8-7600 APU120 MH / s
AMD Radeon HD5770520 MH / s
AMD Radeon HD6850600 MH / s
AMD Radeon RX 460840 MH / s
AMD Radeon RX 470957 MH / s
AMD Radeon R9 380X2058 MH / s
AMD FirePro W91002566 MH / s
AMD Radeon RX 4802700 MH / s
AMD Radeon RX 5803180 MH / s
AMD Radeon R9 Nano3325 MH / s
AMD Vega Frontier Edition7119 MH / s

MH / s = million hashes / second

Screenshot of tool running

project address

Scallion: [ GitHub Portal ]

Exit mobile version