lachesis / scallion

GPU-based Onion Hash generator
Other
1.25k stars 164 forks source link

Scallion runs forever never generating a GPG key with prefixes of length 10 or longer. #125

Closed dustydecapod closed 4 years ago

dustydecapod commented 6 years ago

Running scallion --gpg 0123456789 on a GTX 1060, I'm getting about 2.5GH/s. Predicted runtime is 00:03:47

12 hours later, no key has been produced. I've restarted this process numerous times and let it run for hours, to no avail.

This is not a problem with lengths of 9 or less.

showengineer commented 6 years ago

Welcome to the world of cryptography.

Scallion is nothing more then a program that is brute forcing. Just guessing and checking. That predicted time is something you can completely ignore, because the program won't stop until it finds a good hash/pk. It might take a second, it might take 1000 years, you simply never know. The longer your length gets, the longer it will probably take. Every character you add squares that time. So instead of 2^9 = 512, it will become 2^10 =1024 (just an example, not the actual time to create the hash).

So, it's normal that it takes so much time.

lachesis commented 4 years ago

Well it's almost 2 years later, but works for me:

$ sudo docker build -t scallion -f Dockerfile.nvidia .
(go get a cup of coffee, sorry)
$ sudo docker run --runtime=nvidia -ti --rm scallion --gpg 0123456789
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
Cooking up some delicious scallions...
Using kernel optimized from file kernel.cl (Optimized4)
Using work group size 32
Compiling kernel... done.
Testing SHA1 hash...
CPU SHA-1: d3486ae9136e7856bc42212385ea797094475802
GPU SHA-1: d3486ae9136e7856bc42212385ea797094475802
Looks good!
LoopIteration:23146  HashCount:388325.44MH  Speed:2683.3MH/s  Runtime:00:02:24  Predicted:00:03:24  Found new key! Found 1 unique keys.
<XmlMatchOutput>
  <GeneratedDate>2019-12-21T23:23:20.355506Z</GeneratedDate>
  <Hash>0123456789b1ab103b9aa2327312f315974f6b7c</Hash>
  <PrivateKey>-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: Scallion

lQHZBF3+qWEBBADRN+dAC6Gp+s8gX6Soa31hgKBGTN35/M86+EXcQNGx2Ry/Bc9ABLmrl39KEweAZk
uQIkPZEW8RSxUKFeTrlTx1suc88WCERTHAzvvXTnNbE0AOmUxr8R8wjXBH0p9Mw+x70Le9h+/3FQyl
QsGoYqRmgyD+KenxfBhqjNqODe4IUQAguLMSqwAD/iLgC05UIYoRZW9lYsU/mMOmh3LgVbohnTMgU9
C0dcuJewgc763noskhGCN1dyFFlF/m8gBumK2jud8WvF4pxG33gnviByiwRgR2rLzLmpSi2m1Db+ac
hloY7AYL8XsZ4aD/SeCe65Yw5mzR7bnJxwOHZieyDNQIPmqWARVY/eFfAgD1oOTpsM5fp0z0JVzvUB
ACfdp5TZbokJoIlpgf/mXEvWFmzkTnqm9EvqzZ1jcbbQhF6NRvOcqhU4Wqfb7KZCbNAgDaDW+rm8l1
GjRmyFS+C30odP7cSBMENjkctT5AiLtCRaoCtwczbNRF+zakzXpGOBJ2o4MQpPfQ5UDuEELmcz+VAf
9HXiOm4vIcX+v5ZNggs4HYqkstG70x1YuqycJuXQs5UHH++KsmxKWiyzN6D5ICUjTo3Oycto2ZGQrs
8Hytx51Hoy+0GVNjYWxsaW9uIFVJRCAocmVwbGFjZSBtZSk======
-----END PGP PRIVATE KEY BLOCK-----
</PrivateKey>
  <PublicModulusBytes>0TfnQAuhqfrPIF+kqGt9YYCgRkzd+fzPOvhF3EDRsdkcvwXPQAS5q5d/ShMHgGZLkCJD2RFvEUsVChXk65U8dbLnPPFghEUxwM77105zWxNADplMa/EfMI1wR9KfTMPse9C3vYfv9xUMpULBqGKkZoMg/inp8XwYaozajg3uCFE=</PublicModulusBytes>
  <PublicExponentBytes>uLMSqw==</PublicExponentBytes>
</XmlMatchOutput>
init: 346ms / 1 (346ms, 2.89/s)
generate key: 5325ms / 379 (14.05ms, 71.17/s)
cpu precompute: 17ms / 379 (0.04ms, 22294.12/s)
total without init: 144877ms / 1 (144877ms, 0.01/s)
set buffers: 78ms / 23146 (0ms, 296743.59/s)
write buffers: 465ms / 23146 (0.02ms, 49776.34/s)
read results: 142303ms / 23146 (6.15ms, 162.65/s)
check results: 180ms / 23146 (0.01ms, 128588.89/s)

2680.38 million hashes per second

Stopping the GPU and shutting down...

If this is happening to you, check your hardware with a shorter hash.