Bitcoin Forum
August 25, 2024, 03:02:58 PM *
News: All versions of Windows are affected by a critical security bug; make sure you update.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Litecoin brainwallet  (Read 51 times)
pbies (OP)
Full Member
***
Offline Offline

Activity: 283
Merit: 128



View Profile
June 02, 2023, 09:09:17 AM
 #1

What is the way to compute WIF and public address for Litecoin brainwallet? (Convert brainwallet to these?)

Can I do that in Python or Javascript?

What is the simplest way to do that?

For Bitcoin it is SHA256 and Base58Check, but I don't know for Litecoin...

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
June 02, 2023, 01:29:30 PM
Merited by Apocollapse (1), pbies (1)
 #2

Take a look at this Python library: python-litecoin-utils.

https://github.com/karask/python-litecoin-utils/blob/9e395f1281e3c84c5ff4644acb47be99e6205022/litecoinutils/keys.py#L177-L185
Code:
 """Returns key in WIFC or WIF string

        |  Pseudocode:
        |      network_prefix = (1 byte version number)
        |      data = network_prefix + (32 bytes number/key) [ + 0x01 if compressed ]
        |      data_hash = SHA-256( SHA-256( data ) )
        |      checksum = (first 4 bytes of data_hash)
        |      wif = Base58CheckEncode( data + checksum )
        """

Litecoin does seems also uses SHA256 and Base58Check. The only difference is in the version byte code. You can also refer to that about how to extract the public key and the address, just take a peek at the code since it is also available.

If you'd like to do that on JavaScript, I'm sure there is also a library for it, just search around about it.
pbies (OP)
Full Member
***
Offline Offline

Activity: 283
Merit: 128



View Profile
June 02, 2023, 03:41:08 PM
 #3

Take a look at this Python library: python-litecoin-utils.

...

Thank you very much!

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
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!