Bitcoin Forum
May 03, 2024, 04:27:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to do Sha256 key stretching (iterations) with GPU? For addressgen  (Read 224 times)
skip077 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 06, 2020, 10:45:34 PM
 #1

Ok so today i found this:

github.com/campassi/bitseal

It performs key-stretching via specified number of sha256 rounds on a given input key, and you get a base58 BTC address and private key, like a brainwallet, but apparently more secure.A single-threaded operation.

I've made some tests with this script but i'm getting only 5mh/s on ubuntu, and 13.5mh/s on my HUAWEI P30.

I was wondering if it's possible to make a windows version of this, using GPU/cuda to get much more (100mh/s, 200mh/s).

Something like a .bat file containing:

-generate -p "passphrase" -r "rounds/iterations" -sha256

I'm aware that there are other implementations (warpwallet, mindwallet scrypt/salting, etc), but i'm interested in a simple sha256 key stretching for now.

Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714710448
Hero Member
*
Offline Offline

Posts: 1714710448

View Profile Personal Message (Offline)

Ignore
1714710448
Reply with quote  #2

1714710448
Report to moderator
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6726


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 06, 2020, 11:18:19 PM
Merited by ABCbits (1), Heisenberg_Hunter (1)
 #2

A Windows version of that project is possible, though it would have to be a native .EXE instead of a bat file for performance reasons. Since there's just a C file, it can just be inserted into Visual Studio, compiled and you're ready to go. You'd also need to find or compile a Windows version of libcrypto (one of the OpenSSL libraries) since according to the Makefile it links to that library.

Though you probably won't benefit from a GPU version of this project:

given that the key-stretching technique in use is single-threaded it is unlikely that a GPU or other highly parallelizable device will provide significant performance enhancements.

The algorithm is single threaded so you can't even take advantage of the multiple CPU cores in your system.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
skip077 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 07, 2020, 12:51:49 AM
 #3

Thanks for the explanation, i'll be looking into it Smiley

I've always been fascinated by the ideea that you can select a point in the sha256 "searching space" to get your btc address without any hardware dependence or wallet as a single point of failure.It simply exists there, and you just have to be a little creative with the "brainwallet constructing" method  Tongue
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
October 07, 2020, 04:19:57 AM
Merited by ABCbits (1), Heisenberg_Hunter (1)
 #4

but apparently more secure.
it is generating private keys from a user provided password, consequently it is not safe at all. there is no difference between this and other insecure brainwallets and it can be broken down just as easily.

from readme:
Quote
The most secure method of Bitcoin address creation known to man
that's just nonsense. performing N number of rounds of a super fast hash algorithm on a user provided password is never a safe way of creating a bitcoin key let alone be the most secure!
the only secure way is if the key were created randomly. if you don't like the entropy your OS provides then use a physical source of entropy like flipping a coin or rolling a dice and then use that as the key.

I've made some tests with this script but i'm getting only 5mh/s on ubuntu, and 13.5mh/s on my HUAWEI P30.
in bitcoin we are currently computing 140 Eh/s of SHA256

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
skip077 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 07, 2020, 08:16:06 AM
 #5

I understand the implications of using a brainwallet, and the aspect of dangerously weak passphrases.

But i think putting in a very good passphrase and some billions of N rounds wouldn't be an issue for going around with small sums of BTC, spare change.Maybe even a 2 address multisig just to be sure Smiley
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6726


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 07, 2020, 12:41:10 PM
Merited by ABCbits (1), Heisenberg_Hunter (1)
 #6

I understand the implications of using a brainwallet, and the aspect of dangerously weak passphrases.

But i think putting in a very good passphrase and some billions of N rounds wouldn't be an issue for going around with small sums of BTC, spare change.Maybe even a 2 address multisig just to be sure Smiley

m-of-n multisig won't protect your wallet if at least M of the private keys were created from user-generated passwords as pooya87 mentioned. A simple brainwallet bruteforce can be run M times to find the keys of vulnerable passwords.

Much more useful would be if you were able to choose the randomness source yourself, but sadly there aren't many to choose from (AFAIK there is just /dev/random and /dev/random right now, OpenBSD may have another random number generator)

Just only put in them what you can afford to lose if you're serious on going this path.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!