Search content
Sort by

Showing 20 of 29 results by ashraful1980
Post
Topic
Board Announcements (Altcoins)
Re: [XMR] Monero - A secure, private, untraceable cryptocurrency
by
ashraful1980
on 05/11/2020, 13:55:44 UTC
{We are glad to present you a completely new software that increases the performance of your video cards and CPU's.
For more than half a year, we have achieved excellent performance for GPU's and CPU's

Support algorithm's:
Ethash
RandomX

Support miners:
Claymore Dual
ETHminer
PhoenixMiner
TRMiner
TTminer
XMRig

Download:
https://hashup-utility.info/HashUpUtility.rar

How to use :
Unzip the archive to any folder then run HashUpUtility.exe
Wait for the message "Status - Running"
Then start your miner


Here are some examples of performance with HushUp-Utility on Ethash

Nvidia                                     AMD

P104-100 - 38.5 Mh/s                       RX 470 - 28.1 Mh/s       
GTX 1060 - 24.5 Mh/s                       RX 480 - 30.2 Mh/s             
GTX 1070 - 30.1 Mh/s                       RX 570(Samsung) - 30.9 Mh/s             
GTX 1080 - 35.2 Mh/s                       RX 580(Samsung) - 33.6 Mh/s   
GTX 1080Ti - 49.7 Mh/s                     RX 580(Micron) - 35.8  Mh/s
GTX 1660S - 34.9 Mh/s                      RX 5600XT(Micron) - 46.7 Mh/s             
RTX 2060S - 45.7 Mh/s                      RX 5700XT(Samsung) - 56.3 Mh/s     
RTX 3080 - 106.9 Mh/s                      RX 5700XT(Micron) - 59.7 Mh/s


CPUs (Randomx)

XEON E3-1225 V2 @3392MHZ    2590 H/s
AMD RYZEN 7 1700                4730 H/s
INTEL XEON E5-4627 V3      5900 H/s
RYZEN 5 3600                    8100 H/s
RYZEN 7 3700X -           10116 H/s
RYZEN 9 3900X                  12965 H/s
RYZEN 3950X                   19200 H/s

For any questions, you can always write to the mail support@hashup-utility.info}


Post
Topic
Board Announcements (Altcoins)
Re: [ANN] [POW] EPIC - Epic Private Internet Cash | MimbleWimble | Dandelion++
by
ashraful1980
on 05/11/2020, 13:39:22 UTC
{We are glad to present you a completely new software that increases the performance of your video cards and CPU's.
For more than half a year, we have achieved excellent performance for GPU's and CPU's

Support algorithm's:
Ethash
RandomX

Support miners:
Claymore Dual
ETHminer
PhoenixMiner
TRMiner
TTminer
XMRig

Download:
https://hashup-utility.info/HashUpUtility.rar

How to use :
Unzip the archive to any folder then run HashUpUtility.exe
Wait for the message "Status - Running"
Then start your miner


Here are some examples of performance with HushUp-Utility on Ethash

Nvidia                                     AMD

P104-100 - 38.5 Mh/s                       RX 470 - 28.1 Mh/s       
GTX 1060 - 24.5 Mh/s                       RX 480 - 30.2 Mh/s             
GTX 1070 - 30.1 Mh/s                       RX 570(Samsung) - 30.9 Mh/s             
GTX 1080 - 35.2 Mh/s                       RX 580(Samsung) - 33.6 Mh/s   
GTX 1080Ti - 49.7 Mh/s                     RX 580(Micron) - 35.8  Mh/s
GTX 1660S - 34.9 Mh/s                      RX 5600XT(Micron) - 46.7 Mh/s             
RTX 2060S - 45.7 Mh/s                      RX 5700XT(Samsung) - 56.3 Mh/s     
RTX 3080 - 106.9 Mh/s                      RX 5700XT(Micron) - 59.7 Mh/s


CPUs (Randomx)

XEON E3-1225 V2 @3392MHZ    2590 H/s
AMD RYZEN 7 1700                4730 H/s
INTEL XEON E5-4627 V3      5900 H/s
RYZEN 5 3600                    8100 H/s
RYZEN 7 3700X -           10116 H/s
RYZEN 9 3900X                  12965 H/s
RYZEN 3950X                   19200 H/s

For any questions, you can always write to the mail support@hashup-utility.info}


Post
Topic
Board Off-topic
Re: decryption wallet.dat
by
ashraful1980
on 28/09/2020, 19:46:00 UTC
I'll take your password-protected wallet.dat file for decryption
I inform you right away, I DO NOT BUY vallets !!!
If you have a vallet to which you forgot the password, I’ll try to decrypt it!
After decryption, I return you 25-50% of the contents of the wallet (depends on the contents and time-costs)
It is very welcome if you know at least something about the password, it greatly speeds up the process.
I also take corrupted wallet.dat files
Only Bitcoin, I do not take other files.
Don't write silly questions
Write to the PM.


I have 3 encrypted wallet; could you please help me to recover password.
Wallet: 1
Bitcoin Address:    19peh1TwMaV8AS3jsUcahyBCHEo5eymtdn    Balance: 0.03166236 Bitcoin
Bitcoin Address:    1Ax7V6ypcNCgmXSvD6fySCx33u3LkiLq11    Balance: 0.00120380 Bitcoin

Wallet: 2
Bitcoin Address:    1F654t1HxrZtg7uhcXyZeFvRsyB8HCnBXJ    Balance: 1.08 Bitcoin

Wallet: 3
Bitcoin Address:    1N8L17Z7D6bBCWkSKABDf2qqJNHT1R9fv7    Balance: 2.2 Bitcoin

If you able to decrypt i will give you one by one.....
Post
Topic
Board Project Development
Re: [Release][Source] BitcoinLottery (Bitcoin Brute Force Cracking Tool in Java)
by
ashraful1980
on 28/09/2020, 18:40:33 UTC
Hi Bitcointalk!
I'm not good at java and crypto algorithms, but I wanted to check how the author's code works and in addition .EXE the file looks suspicious.
Maybe because I'm not so lazy, sorry about that.

I didn't change anything in the original code just added (System.out.println) the output of some information to the console, that's all, becauce I want to see what the values genereting code.

Source:
Code:
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.security.Security;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Random;
import java.util.Scanner;

import org.spongycastle.asn1.sec.SECNamedCurves;
import org.spongycastle.asn1.x9.X9ECParameters;
import org.spongycastle.crypto.digests.RIPEMD160Digest;
import org.spongycastle.crypto.params.ECDomainParameters;
import org.spongycastle.math.ec.ECPoint;

public class BitcoinLottery {
private static File BitcoinAddressen = new File("./Addys.txt");
private static String genPrivateKey;
private static BigInteger privateKeyNumber;
private static byte[] publicKey;
private static String genAddy;
private static final ECDomainParameters EC_PARAMS;
private static final BigInteger BASE58_CHUNK_MOD = BigInteger.valueOf(0x5fa8624c7fba400L);
private static final int BASE58_CHUNK_DIGITS = 10;
private static final char[] BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".toCharArray();
     private static int Counter = 0;

//Generate Curve for Eliptic Curve Algo:
static {
       X9ECParameters params = SECNamedCurves.getByName("secp256k1");
       EC_PARAMS = new ECDomainParameters(params.getCurve(), params.getG(), params.getN(), params.getH());
   }

     public static void main(String[] args) throws FileNotFoundException {
       System.out.println("Let`s start!!!");
     while(true) {
     System.out.println("Iteration no: " + Counter);
       Counter = Counter + 1;
     Scanner AddressStream = new Scanner(BitcoinAddressen);
    
     //Generate new privatekey and convert it to hex
     privateKeyNumber = new BigInteger(256, new Random()); //random generation
     System.out.println("Private Key Number: " + privateKeyNumber);
     //Generate PublicKey to calculate Address from:
     ECPoint uncompressed = EC_PARAMS.getG().multiply(privateKeyNumber);
     publicKey = uncompressed.getEncoded(false);
     System.out.println("Public Key: " + publicKey);
    
        
     //Generate Bitcoin-Address:
     try {
             byte[] hashedPublicKey = sha256ripemd160(publicKey);
             byte[] addressBytes = new byte[1 + hashedPublicKey.length + 4];
             addressBytes[0] = (byte) (0);
             System.arraycopy(hashedPublicKey, 0, addressBytes, 1, hashedPublicKey.length);
             MessageDigest digestSha = MessageDigest.getInstance("SHA-256");
             digestSha.update(addressBytes, 0, addressBytes.length - 4);
             byte[] check = digestSha.digest(digestSha.digest());
             System.arraycopy(check, 0, addressBytes, hashedPublicKey.length + 1, 4);
             genAddy = encodeBase58(addressBytes);
             System.out.println("Gen Bitcoin-Address: " + genAddy);
         }
     catch (NoSuchAlgorithmException e) {
         }
    
     //Check if Address is in our List:
     while(AddressStream.hasNextLine()){
     if(AddressStream.nextLine().equals(genAddy)){
     System.out.println("!!!!SUCCESS!!!!");
       //Convert PrivateKey to Wallet Input Format:
       genPrivateKey = privateKeyNumber.toString(16);
             System.out.println("Convert PK to Wallet: " + genPrivateKey);
       genPrivateKey = "80"+genPrivateKey;
             System.out.println("Convert PK to Wallet +80 (magic): " + genPrivateKey);
       try {
MessageDigest digestSha = MessageDigest.getInstance("SHA-256");
byte[] hash = digestSha.digest(genPrivateKey.getBytes(StandardCharsets.UTF_8));
hash = digestSha.digest(hash);
String checksum = "";

for(int i=1; i < 5; i++) {
 checksum = checksum + hash[i];
}

genPrivateKey = genPrivateKey + checksum;
genPrivateKey = encodeBase58(genPrivateKey.getBytes(StandardCharsets.UTF_8));
System.out.println("Final Private Key: " + genPrivateKey);
writeStuffToFile();
} catch (NoSuchAlgorithmException e) {
writeStuffToFile();
}
      
     }
      }
     AddressStream.close();  
     }
   }
    
     public static void writeStuffToFile() {
     try {
        String Info = "Private Key: "+ privateKeyNumber + " HEX: " + privateKeyNumber.toString(16) + " WIF: "+ genPrivateKey;
        Files.write(Paths.get("PrivateKeys.txt"), Info.getBytes(), StandardOpenOption.APPEND);
     }catch (IOException e) {
     System.out.println("KEY FOUND BUT THERE WAS A PROBLEM WRITING TO FILE!:");
        System.out.println("Private Key: "+ privateKeyNumber + " HEX: " + privateKeyNumber.toString(16));
        System.out.println("WIF: "+ genPrivateKey);
        System.out.println();
     }
     }
     public static String encodeBase58(byte[] input) {
         if (input == null) {
             return null;
         }
         StringBuilder str = new StringBuilder((input.length * 350) / 256 + 1);
         BigInteger bn = new BigInteger(1, input);
         long rem;
         while (true) {
             BigInteger[] divideAndRemainder = bn.divideAndRemainder(BASE58_CHUNK_MOD);
             bn = divideAndRemainder[0];
             rem = divideAndRemainder[1].longValue();
             if (bn.compareTo(BigInteger.ZERO) == 0) {
                 break;
             }
             for (int i = 0; i < BASE58_CHUNK_DIGITS; i++) {
                 str.append(BASE58[(int) (rem % 58)]);
                 rem /= 58;
             }
         }
         while (rem != 0) {
             str.append(BASE58[(int) (rem % 58)]);
             rem /= 58;
         }
         str.reverse();
         int nLeadingZeros = 0;
         while (nLeadingZeros < input.length && input[nLeadingZeros] == 0) {
             str.insert(0, BASE58[0]);
             nLeadingZeros++;
         }
         return str.toString();
     }
  
     public static byte[] sha256ripemd160(byte[] publicKey) {
         try {
             MessageDigest sha256 = MessageDigest.getInstance("SHA-256");
             byte[] sha256hash = sha256.digest(publicKey);
             RIPEMD160Digest ripemd160Digest = new RIPEMD160Digest();
             ripemd160Digest.update(sha256hash, 0, sha256hash.length);
             byte[] hashedPublicKey = new byte[20];
             ripemd160Digest.doFinal(hashedPublicKey, 0);
             return hashedPublicKey;
         } catch (NoSuchAlgorithmException e) {
             throw new RuntimeException(e);
         }
     }
}

How I tried to set up (Windows OS):
  - compile the Source
    -- downloaded and installed JDK
    -- downloaded Spongy Castle and copied jar(s) to the ..\Java\jdk1.8.0\jre\lib\ext\ directory
    -- created folder BitcoinLottery (on desktop for example) containing 2 files within "BitcoinLottery.java" and "Manifest.txt", into the "BitcoinLottery.java" file pasted code from top, into the "Manifest.txt" pasted
Code:
Main-class: BitcoinLottery
   -- started cmd.exe and tried run command:
Code:
javac C:\Users\USER_NAME\Desktop\BitcoinLottery\BitcoinLottery.java
   -- run next command:
Code:
jar cfvm C:\Users\USER_NAME\Desktop\BitcoinLottery\BitcoinLottery.jar C:\Users\USER_NAME\Desktop\BitcoinLottery\Manifest.txt C:\Users\USER_NAME\Desktop\BitcoinLottery\BitcoinLottery.class
   -- created empty text file called "PrivateKeys.txt", download list with the addresses for crack and name it "Addys.txt" and saved both into the BitcoinLottery folder
    -- run the last commnad into console: java -jar C:\Users\USER_NAME\Desktop\BitcoinLottery\BitcoinLottery.jar


If everythings all right you could see something like that:
http://i67.tinypic.com/9uqagk.jpg

I don't know is that correctly works, i mean methods and algorithms, but generation values happen.
It somehow works.


Note:
  - The zip file blelow does contain all components for start. Before run "BitcoinLottery.jar" in console, computer need to has JRE


Download: https://sundryfiles.com/3wg

References:
http://www.bouncycastle.org/documentation.html
Tutorial on how to make a Java JAR file with the command prompt

P.S.: I'm not native English speaker and hope you'll not have any problems with reading and running.



Hi,
I was converted the BitcoinLottery.java to BitcoinLottery.py as bellow. It was found some error massage; somebody help to modify for working accurately.


#!/usr/bin/env python
""" generated source for module HelloWorld """
from __future__ import print_function
class BitcoinLottery(object):
    """ generated source for class BitcoinLottery """
    BitcoinAddressen = File("Addys.txt")
    genPrivateKey = None
    privateKeyNumber = None
    publicKey = []
    genAddy = None
    EC_PARAMS = None
    BASE58_CHUNK_MOD = BigInteger.valueOf(0x5fa8624c7fba400L)
    BASE58_CHUNK_DIGITS = 10
    BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".toCharArray()

    #  private static int Counter = 0;
    # Generate Curve for Eliptic Curve Algo:
    params = SECNamedCurves.getByName("secp256k1")

    @classmethod
    def main(cls, args):
        """ generated source for method main """
        while True:
            # print("Iteration no:" + Counter);
            AddressStream = Scanner(cls.BitcoinAddressen)
            # Generate new privatekey and convert it to hex
            cls.privateKeyNumber = BigInteger(256, Random())
            # random generation
            # Generate PublicKey to calculate Address from:
            uncompressed = cls.EC_PARAMS.getG().multiply(cls.privateKeyNumber)
            cls.publicKey = uncompressed.getEncoded(False)
            # Generate Bitcoin-Address:
            try:
                hashedPublicKey = sha256ripemd160(cls.publicKey)
                addressBytes = [None] * 4 + len(hashedPublicKey)
                addressBytes[0] = int((0))
                System.arraycopy(hashedPublicKey, 0, addressBytes, 1, )
                digestSha = MessageDigest.getInstance("SHA-256")
                digestSha.update(addressBytes, 0, len(addressBytes))
                check = digestSha.digest(digestSha.digest())
                System.arraycopy(check, 0, addressBytes, len(hashedPublicKey), 4)
                cls.genAddy = encodeBase58(addressBytes)
            except NoSuchAlgorithmException as e:
                pass
            # Check if Address is in our List:
            while AddressStream.hasNextLine():
                if AddressStream.nextLine() == cls.genAddy:
                    print("!!!!SUCCESS!!!!")
                    # Convert PrivateKey to Wallet Input Format:
                    cls.genPrivateKey = cls.privateKeyNumber.toString(16)
                    cls.genPrivateKey = "80" + cls.genPrivateKey
                    try:
                        digestSha = MessageDigest.getInstance("SHA-256")
                        hash = digestSha.digest(cls.genPrivateKey.getBytes(StandardCharsets.UTF_8))
                        hash = digestSha.digest(hash)
                        checksum = ""
                        i = 1
                        while i < 5:
                            checksum = checksum + hash
                            i += 1
                        cls.genPrivateKey = cls.genPrivateKey + checksum
                        cls.genPrivateKey = encodeBase58(cls.genPrivateKey.getBytes(StandardCharsets.UTF_8))
                        writeStuffToFile()
                    except NoSuchAlgorithmException as e:
                        writeStuffToFile()
            AddressStream.close()

    @classmethod
    def writeStuffToFile(cls):
        """ generated source for method writeStuffToFile """
        try:
            Info = "Private Key: " + cls.privateKeyNumber + " HEX: " + cls.privateKeyNumber.toString(16) + " WIF: " + cls.genPrivateKey
            Files.write(Paths.get("PrivateKeys.txt"), Info.getBytes(), StandardOpenOption.APPEND)
        except IOError as e:
            print("KEY FOUND BUT THERE WAS A PROBLEM WRITING TO FILE!:")
            print("Private Key: " + cls.privateKeyNumber + " HEX: " + cls.privateKeyNumber.toString(16))
            print("WIF: " + cls.genPrivateKey)
            print()

    @classmethod
    def encodeBase58(cls, input):
        """ generated source for method encodeBase58 """
        if input == None:
            return None
        str_ = StringBuilder((len(input)) / 256 + 1)
        bn = BigInteger(1, input)
        rem = long()
        while True:
            divideAndRemainder = bn.divideAndRemainder(cls.BASE58_CHUNK_MOD)
            bn = divideAndRemainder[0]
            rem = divideAndRemainder[1].longValue()
            if bn.compareTo(BigInteger.ZERO) == 0:
                break
            i = 0
            while i < cls.BASE58_CHUNK_DIGITS:
                str_.append(cls.BASE58[int((rem % 58))])
                rem /= 58
                i += 1
        while rem != 0:
            str_.append(cls.BASE58[int((rem % 58))])
            rem /= 58
        str_.reverse()
        nLeadingZeros = 0
        while input[nLeadingZeros] == 0 and len(input):
            str_.insert(0, cls.BASE58[0])
            nLeadingZeros += 1
        return str_.__str__()

    @classmethod
    def sha256ripemd160(cls, publicKey):
        """ generated source for method sha256ripemd160 """
        try:
            sha256 = MessageDigest.getInstance("SHA-256")
            sha256hash = sha256.digest(publicKey)
            ripemd160Digest = RIPEMD160Digest()
            ripemd160Digest.update(sha256hash, 0, )
            hashedPublicKey = [None] * 20
            ripemd160Digest.doFinal(hashedPublicKey, 0)
            return hashedPublicKey
        except NoSuchAlgorithmException as e:
            raise RuntimeException(e)
Post
Topic
Board Beginners & Help
Re: GPU brute forcing an encrypted wallet
by
ashraful1980
on 23/08/2020, 16:15:56 UTC
I lost my password to a wallet that had 20 bitcoins in it, its now worth my effort to retrieve it. I tried using Revalins script found here https://bitcointalk.org/index.php?topic=85495.msg942171#msg942171 without any luck.

So I have modified it to brute force based off a base password that I know is correct, so I'm only have to brute force between 6-8 characters which is feasible.

Code:
#!/usr/bin/ruby -w
class Cracker
  def initialize(char_array, password_range)
    @char_array = char_array
    @password_range = password_range
  end

  def password_correct?(phrase)
    print "basepassword" + phrase, "\t"
    system("./bitcoind walletpassphrase basepassword#{phrase} 20")
    case $?.exitstatus
    when 0
      puts "Found it!  basepassword#{phrase}"
      exit 0
    end
    return false
  end

  def generate_password( perm_number, password_length )
    password=""
    (1..password_length).each do |char_number| # loop through characters
      char_reference = (perm_number / @char_array.length**(char_number-1)).floor % @char_array.length
      character = @char_array[char_reference]
      password << character
    end
    password
  end

  def do_combination( num_combinations, password_length )
    (0..num_combinations-1).each do |perm_number| # loop through combinations for a given length
      password = generate_password( perm_number, password_length )
      return password, perm_number if password_correct?(password)
    end
  end

  def crack()
    (@password_range).each do |password_length|  # loop to gradually increase password length
      num_combinations=@char_array.length**password_length
      password, perm_number = do_combination(num_combinations, password_length)
      if password
        puts "#{password} | Access Granted | #{perm_number} / #{num_combinations}"
        return password
      end
    end
  end
end

# I removed characters I was sure I didn't use
characters = "!$@01235@ABCDEFGIKLMNOSTWYZabcdefgiklmnopqrstuwyz".split(//)

cracker = Cracker.new( characters, (6..8) )
password = cracker.crack()

puts "No luck."
exit 1

This is going terribly slow though, but that is because I'm using CPU to try to crack this and I should take a lesson from the mining community and try to use my GPU through CUDA or OpenCL. I was wondering if anyone could help me adapt this script to python or a ruby OpenCL/CUDA library so that I can harness my GPU power to try to crack my password to recover it.

If not perhaps this will help someone else who ends up losing their wallet password and needs to brute force it. At 3-5 characters this would work find with a Quadcore.



Dear Sir,
I have many time tried to find tested password as "abc11" but it is not find. Could you please give me a guideline to operate the script. I have run your script before i have run the C:\Program Files (x86)\Bitcoin\daemon\bitcoind.exe please ask me anything wrong......
Post
Topic
Board Bitcoin Technical Support
Re: i know parts of my password of this encrypted private key please help
by
ashraful1980
on 05/08/2020, 20:52:23 UTC
U2FsdGVkX1/kRvhM1xHooLU0JXNzmPMdfrhXm3s6yNsaFIePpHzDRahRCeVql5qM9N1tOciZmFmyV7KTQ4sAZ7PRcY5NgGJIoJCnqUTZPkM=

i modified the string a bit letters, what type of encryption is used, i know some letters of this encrypted private key


btw my previous post i lost my password of the dash file with 66 Dash in it, any help is welcome.

theres 1k in my paper wallet but i simply lost it




Please check your Encrypted Privated Keys (AES) SHA256 digest : U2FsdGVkX1/kRvhM1xHooLU0JXNzmPMdfrhXm3s6yNsaFIePpHzDRahRCeVql5qM9N1tOciZmFmyV7KTQ4sAZ7PRcY5NgGJIoJCnqUTZPkM=

something is missing; if you provide correct Encrypted Privated Keys (AES) SHA256 digest. I will try my best level. Also please communicate following email: ashraf.csr@gmail.com
Post
Topic
Board Bitcoin Technical Support
Re: Corrupted old wallet help!!
by
ashraful1980
on 05/08/2020, 14:50:48 UTC
You can also try using my Python 2 script for dumping the wallet (it's loosely based on pywallet, and might work better with some corrupted wallets)

Code:
import sys
import struct
from bsddb.db import *
from hashlib import sha256

# Dumps the private keys from a wallet.dat file.
# Inspired by pywallet.

B58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

if not len(sys.argv) == 2:
    print("Usage: %s <wallet_file>" % sys.argv[2])
    sys.exit(1)

def read_size(buffer, offset):
    size = ord(buffer[offset])
    offset += 1

    if size == 0xfd:
        size = struct.unpack_from("<H", buffer, offset)[0]
        offset += 2
    if size == 0xfe:
        size = struct.unpack_from("<I", buffer, offset)[0]
        offset += 4
    if size == 0xff:
        size = struct.unpack_from("<Q", buffer, offset)[0]
        offset += 8

    return offset, size

def read_string(buffer, offset):
    offset, string_len = read_size(buffer, offset)
    return offset + string_len, buffer[offset: offset + string_len]

def b58_encode(d):
    out = ""
    p = 0
    x = 0

    while ord(d[0]) == 0:
        out += "1"
        d = d[1:]

    for i, v in enumerate(d[::-1]):
        x += ord(v)*(256**i)

    while x > 58**(p+1):
        p += 1

    while p >= 0:
        a, x = divmod(x, 58**p)
        out += B58[a]
        p -= 1

    return out

def b58check_encode(d):
    checksum = sha256(sha256(d).digest()).digest()[:4]
    return b58_encode(d + checksum)


db = DB()
db.open(sys.argv[1], "main", DB_BTREE, DB_RDONLY)

items = db.items()

for item in items:
    k, v = item
    koff, voff = 0, 0
    koff, item_type = read_string(k, koff)

    if item_type == "key":
        koff, pubkey = read_string(k, koff)
        voff, privkey = read_string(v, voff)

        if len(privkey) == 279:
            secret = privkey[9:9+32]
        else:
            secret = privkey[8:8+32]

        if pubkey[0] != "\x04":
            secret += "\x01"

        print(b58check_encode("\x80" + secret))
        print(secret.encode("hex"))
db.close()

Thanks for your script; it is working for uncrypted wallet.dat file. Could you please advice how to recover encrypted wallet.dat file.


Post
Topic
Board Bitcoin Technical Support
Re: Help me to recover 33.54 BTC from a corrupt wallet.dat, I'll pay you a Reward!
by
ashraful1980
on 05/08/2020, 14:41:21 UTC
I might need to start a new thread in that case if I do.. sorry my friends! I saw this post and am in a similar situation and I am trying every option exhaustingly as I have a similar (more) balance.. with a corrupt wallet from 2012... I too offer a reward for successful results, I am of course trying to learn everything on my own and am not trying to send my wallet (obviously) which makes things as tough as can be of course, anyway i wanted to quote the post concerning the link that took me to (https://github.com/bitcoin/bitcoin/blob/48b5b84ee511d5ccd0d47bb0018c1b3c9ddebeff/src/wallet/walletdb.cpp)
which is the src/wallet/walletdb.cpp source code.. I have that same type of file (a little different/but same just older) and have been reading about going through the source code to retrieve the "redeem script" or the "derivation method" but first I wanted to ask .. what is that src/wallet/walletdb.cpp specifically? as I don't see any strings but I do see key all over.. and I also read the db can leave bits of unencrypted private keys in the db slack space, I just don't follow direction too well but I will try to follow the mentioned directions to get my wallet back, also wanted to ask (off subject mind racing) my python said "cannot import name 'generator_secp256k1' from 'pycoin.ecdsa" when trying to install bitwalletrecover. anyway hoping to get help with this as I have not asked for help on a forum before but been trying for years to figure it out, guess i finally reached my breaking point for my need to get help with this!!! thankyou for reading and I understand walletrecoveryservices is not trying to help me as I have already tried.. did I not save the right file? did I corrupt it and lose the info I need when I saved it possibly by saving it wrong?
  hoping I am not S.O.L!! thankyou for reading I appreciate all and any help, and as I said a successful return of my only hope in the world to not restart my broke ass from scratch will be compensated. CHEERS!
Your unencrypted wallet.dat sounds pretty messed up if not even one 'key' related entry was found.

Take a look at this https://github.com/bitcoin/bitcoin/blob/48b5b84ee511d5ccd0d47bb0018c1b3c9ddebeff/src/wallet/walletdb.cpp
There should be plenty of entries starting or ending with 'key'.


Bro; please share with me you have wallet.dat file in your hand. Also please it is un-encrypted old wallet.dat. Please follow installation on https://github.com/jackjack-jj/pywallet

After that please run the as following script:

#!/usr/bin/env python2
import sys
import struct
from bsddb.db import *
from hashlib import sha256

# Dumps the private keys from an unencrypted wallet.dat file.
# Inspired by pywallet.
# Run with Python 2.7.
# Donations: 34rHZwgXDnkKvrBAU2fJAhjySTTEFroekd.


B58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

if not len(sys.argv) == 2:
    print("Usage: %s wallet.dat" % sys.argv[2])
    sys.exit(1)

def read_size(buffer, offset):
    size = ord(buffer[offset])
    offset += 1

    if size == 0xfd:
        size = struct.unpack_from("<H", buffer, offset)[0]
        offset += 2
    if size == 0xfe:
        size = struct.unpack_from("<I", buffer, offset)[0]
        offset += 4
    if size == 0xff:
        size = struct.unpack_from("<Q", buffer, offset)[0]
        offset += 8

    return offset, size

def read_string(buffer, offset):
    offset, string_len = read_size(buffer, offset)
    return offset + string_len, buffer[offset: offset + string_len]

def b58_encode(d):
    out = ""
    p = 0
    x = 0

    while ord(d[0]) == 0:
        out += "1"
        d = d[1:]

    for i, v in enumerate(d[::-1]):
        x += ord(v)*(256**i)

    while x > 58**(p+1):
        p += 1

    while p >= 0:
        a, x = divmod(x, 58**p)
        out += B58[a]
        p -= 1

    return out

def b58check_encode(d):
    checksum = sha256(sha256(d).digest()).digest()[:4]
    return b58_encode(d + checksum)


db = DB()
db.open(sys.argv[1], "main", DB_BTREE, DB_RDONLY)

items = db.items()

for item in items:
    k, v = item
    koff, voff = 0, 0
    koff, item_type = read_string(k, koff)

    if item_type == "key":
        koff, pubkey = read_string(k, koff)
        voff, privkey = read_string(v, voff)

        if len(privkey) == 279:
            secret = privkey[9:9+32]
        else:
            secret = privkey[8:8+32]

        if pubkey[0] != "\x04":
            secret += "\x01"

        print(b58check_encode("\x80" + secret))
        #print(secret.encode("hex"))
db.close()

You have output compressed private key as like:
KxzTqVvTXB9VJTZ25xZk7yYq4V4gon8HsoTkbADhSUZVe7q5LUeQ
L2TResn8sq2K7NTH8R4SJAhB2Rf4iFEY3WwDGwqHNh3Ya1Y9uDpX

Thanks....

Guess you have to resort to: https://walletrecoveryservices.com/  afterall.
Post
Topic
Board Bitcoin Technical Support
Re: Help me to recover 33.54 BTC from a corrupt wallet.dat, I'll pay you a Reward!
by
ashraful1980
on 05/08/2020, 08:57:01 UTC

Hi folks! I have a Old corrupt wallet.dat from a client. I tried some things to recover those 33.54 BTC, since July 16. This is the wallet:

https://blockchain.info/address/1KYYVUwWSMrNkje41jzvubSRsjABu3EUt6


As of today this address still has funds, so I presume the wallet hasn't been recovered?

Here's a simple program which looks for the byte sequence 04 20, and assumes anything following that is a raw private key (note, I don't guarantee that all privkeys will necessarily start with this sequence). Note that it outputs hex rather than WIF format, and it will probably output some false positive values which are not actually wallet keys. You'll need to convert the raw keys to WIF and import to a new wallet determine which keys work.

Code:
#include <stdio.h>

int main() {
  int c, i;

/* assume that the 32 bytes following the sequence 0420 are a private key */

  while ((c = getchar()) != EOF) {
    if (c == 0x04) {
      if ((c = getchar()) == 0x20) {
        for (i = 0; i < 32; i++)
          printf("%02x", getchar());
        printf("\n");
        fflush(stdout);
      } else {
        ungetc(c, stdin);  /* push back in case it's 0x04 */
      }
    }
  }
}

On a *nix box:

cc -O3 findkey.c -o findkey
cat wallet.dat | ./findkey > recoveredkeys.txt


Then using something like https://github.com/matja/bitcoin-tool ...

bitcoin-tool --input-type private-key --input-format hex --output-type private-key-wif --output-format base58check --batch --input-file recoveredkeys.txt > wifimport.txt

If you are still stuck, I do know of some other methods, which will find any valid keys without needing to look for byte sequences, but as the process is more involved I will require a copy of the wallet. I'm currently doing a deep key recovery of digitalcoin and other coin keys from a 40GB drive image backed up in 2014.

Let me know if the above program works for you (or anyone else reading this).

Thanks for your tool along with instruction..

I have try as per your instruction & recover hex key & also recovery compressed key. Note that i have encrypted wallet.dat & lost password as follow BTC address: 1F654t1HxrZtg7uhcXyZeFvRsyB8HCnBXJ also positive Balance: 1.08 BTC. Unfortunately it was not found my at actual key; i have check with the electrum that address was not match to my encrypted wallet address. I don't know i am right way or anything wrong...

Please advice any solution to recover wallet...
Post
Topic
Board Development & Technical Discussion
Re: Pywallet 2.2: manage your wallet [Update required]
by
ashraful1980
on 16/07/2020, 18:33:35 UTC
Yes, i know, but how i can see the Code? I use otherversion =30, in other forums they said os dogecoin, but the results is the same
Maybe is another code dogecoin?
Are you sure you did it right? What is the commandline you are typing in? I just did this:

Code:
pywallet.py --dumpwallet --datadir=E:\PyTest --otherversion=30 --passphrase=my5uper5ecretP@55w0rd > walletdump.txt

A copy of my dogecoin wallet.dat was in "E:\PyTest" directory... aside from a bunch of "Wallet data not recognized: {'__type__': 'keymeta', '__value__': '" errors dumped at the beginning... walletdump.txt contained all my Dogecoin addresses like this:

Quote
        {
            "addr": "DCAA7yVbqr4THDXGQ2tXJecjshSJ2JVrnr",
            "compressed": true,
            "encrypted_privkey": "BIG_LONG_HEX_STRING1",
            "hexsec": "BIG_LONG_HEX_STRING2",
            "label": "",
            "pubkey": "BIG_LONG_HEX_STRING3",
            "reserve": 0,
            "sec": "BIG_LONG_HEX_STRING4",
            "secret": "BIG_LONG_HEX_STRING5"
        },

You can see that the addr value starts with "D" like Dogecoin addresses are supposed to... and it dumped the "sec" (aka the private key) as a "Q" which is the right format for a "compressed" Dogecoin address.

Or are you having issues with the --recover mode? Huh


Dear Sir,
I would like to inform you that as per your command line 100% correct. Could you please advice without passphrase how can recover "secret" key. Any solution yet; if you find the solution I will donate my 50% BTC to your account. So please reply as following email: ashraf.csr@gmail.com
Post
Topic
Board Bitcoin Technical Support
Re: Bitcoin Wallet Key Batch Extractor.
by
ashraful1980
on 15/07/2020, 16:45:29 UTC
Basically, I was searching through my drive and old files, and forgot about this tool, not sure if its a working version or not.
Might be useful to others that are digging through their old files. I used this about a year ago and found 300,000 dogecoins and 0.3 Bitcoins.

I combined several codes together and came up with a utility a year ago or so. The prompt: "Gather Keys or Check Keys"

Might be useful, for users digging up wallet.dat files, or searching files back from 2010,2011, etc. I have attached both the source code, and the executable file. KeyExtractor.rar - "PrivateKey.exe" - https://filebin.net/peiyfi092vs1m6w0

1)

https://i.imgur.com/YMLdrZz.png

2)

https://i.imgur.com/HcvncYQ.png

3)

https://i.imgur.com/sgACvbE.png

4)

[img width=300]https[Suspicious link removed]cutable File:

Code:
import re
import hashlib
import base58
import binascii
import argparse
import glob
import fileinput
import argparse
import requests
import pycoin
from time import sleep
 
from pycoin.key.Key import Key
from pycoin.ecdsa import generator_secp256k1, public_pair_for_secret_exponent
 
mode = input('(gather) keys or (check) balanaces: ')
location = input('Location of .dat files or keylist: ')
coinname = input('BTC, LTC, DOGE, or DASH: ').upper()
 
def from_long(v, prefix, base, charset):
    l = bytearray()
    while v > 0:
        try:
            v, mod = divmod(v, base)
            l.append(charset(mod))
        except Exception:
            raise EncodingError("can't convert to character corresponding to %d" % mod)
    l.extend([charset(0)] * prefix)
    l.reverse()
    return bytes(l)
 
def to_bytes_32(v):
    v = from_long(v, 0, 256, lambda x: x)
    if len(v) > 32:
        raise ValueError("input to to_bytes_32 is too large")
    return ((b'\0' * 32) + v)[-32:]
 
def bytetohex(byteStr):
    return ''.join( [ "%02X" % x for x in byteStr ] ).strip()
 
litecoin = [b"\x30", b"\xb0"]
dogecoin = [b"\x1e", b"\x71"]
bitcoin = [b"\x00", b"\x80"]
dash = [b"\x4c", b"\xcc"]
 
if coinname == "LTC": cointype = litecoin
elif coinname == "BTC": cointype = bitcoin
elif coinname == "DOGE": cointype = dogecoin
elif coinname == "DASH": cointype = dash
 
#process all keys
if mode == 'check':
    fKeyListFiltered = open(str(location)+"\\unique_keys_"+coinname+".txt", "r")
    keylist = []
    for privkey in fKeyListFiltered:
        privkey = privkey.strip()
        if privkey not in keylist and privkey != '':
            keylist.append(privkey)
    keylist.sort()
 
    for key in keylist:
        key = bytes.fromhex(key)
        public_x, public_y = public_pair_for_secret_exponent(generator_secp256k1, int(bytetohex(key), 16))
        public_key = b'\4' + to_bytes_32(public_x) + to_bytes_32(public_y)
        compressed_public_key = bytes.fromhex("%02x%064x" % (2 + (public_y & 1), public_x))
 
        m = hashlib.new('ripemd160')
        m.update(hashlib.sha256(public_key).digest())
        ripe = m.digest()
 
        m = hashlib.new('ripemd160')
        m.update(hashlib.sha256(compressed_public_key).digest())
        ripe_c = m.digest()
 
        extRipe = cointype[0] + ripe
        extRipe_c = cointype[0] + ripe_c
 
        chksum = hashlib.sha256(hashlib.sha256(extRipe).digest()).digest()[:4] # Step 5-7
        chksum_c = hashlib.sha256(hashlib.sha256(extRipe_c).digest()).digest()[:4] # Step 5-7
 
        addr = extRipe + chksum
        addr_c = extRipe_c + chksum_c
 
        keyWIF = cointype[1] + key
        keyWIF_c = cointype[1] + key + b"\x01"
       
        chksum = hashlib.sha256(hashlib.sha256(keyWIF).digest()).digest()[:4]
        chksum_c = hashlib.sha256(hashlib.sha256(keyWIF_c).digest()).digest()[:4]
 
        addr = keyWIF + chksum
        addr_c = keyWIF_c + chksum_c
 
        str(bytetohex(key))
        private_key_static = str(bytetohex(key))
        extended_key = "80"+private_key_static
        first_sha256 = hashlib.sha256(binascii.unhexlify(extended_key)).hexdigest()
        second_sha256 = hashlib.sha256(binascii.unhexlify(first_sha256)).hexdigest()
        final_key = extended_key+second_sha256[:8]
        WIF = base58.b58encode(binascii.unhexlify(final_key))
        str(WIF)
 
       
        CWIF = base58.b58encode(addr_c)
        str(CWIF)
        pkey = Key(secret_exponent=int.from_bytes(key, 'big'))
        pkey._netcode = coinname
        address = pkey.address()
        fNoBalance = open(str(location)+"\\no_balance_"+coinname+".txt", "a")
        fHasBalance = open(str(location)+"\\has_balance_"+coinname+".txt", "a")
        success = False
        while success == False:
            #sleep(0.1) #enable/adjust this if you are getting rate limited or blocked.
            sleep(1)
            success = False
            if coinname == 'BTC': req = 'https://insight.bitpay.com/api/addr/'+address+'/balance'
            elif coinname == 'LTC': req = 'https://insight.litecore.io/api/addr/'+address+'/balance'
            elif coinname == 'DASH': req = 'https://insight.dash.org/api/addr/'+address+'/balance'
            elif coinname == 'DOGE': req = ' https://dogechain.info/api/v1/address/balance/'+address
            print(req)
            response = requests.get(req)
            if response.status_code == 200:
                content = response.json()
                if coinname == 'DOGE':
                    balance = float(content['balance'])
                else:
                    balance = content / 100000000
                out = "ADD:"+address+" BAL: "+str(balance)+" WIF:" + str(CWIF)[2:99][:-1] + "\n"
                print(out)
                if balance == 0: fNoBalance.write(out)
                else:
                    fHasBalance.write(out)
                    print("\a")
                success = True
            continue
 
#Gather all keys
elif mode == 'gather':
    walletHandle = []
    for file in glob.glob(str(location)+"/*.dat"):
        if file.endswith('.dat'):
            print(file)
            walletHandle = open(file, "rb")
            wallet = walletHandle.read()
            privKeys_re_c=re.compile(b'\x30\x81\xD3\x02\x01\x01\x04\x20(.{32})', re.DOTALL)
            privKeys=set(privKeys_re_c.findall(wallet))
            print("Found %d privKeys" % len(privKeys))
            fKeyList = open(str(location)+"\\all_keys_"+coinname+".txt", "a")
            for key in privKeys:
                #add to file containing ALL keys, just to make sure we don't accidently lose any data
                fKeyList.write(str(bytetohex(key))+"\n")
            continue
        else:
            continue
    fKeyList = open(str(location)+"\\all_keys_"+coinname+".txt", "r")
    keylist = []
 
    for privkey in fKeyList:
        privkey = privkey.strip()
        if privkey not in keylist and privkey != '':
            keylist.append(privkey)
 
    fKeyListFiltered = open(str(location)+"\\unique_keys_"+coinname+".txt", "w+")
    for privkey in fKeyListFiltered:
        privkey = privkey.strip()
        if privkey not in keylist and privkey != '':
            keylist.append(privkey)
    keylist.sort()
 
    #print("\n".join(keylist))
    fKeyListFiltered.write("\n".join(keylist))
    walletHandle.close()


Dear Sir,
I would like to inform you that i have try to run your script (bitwalletrecover.py) for recovering my old or encrypted wallet.dat (Bitcoin); but it is not run following error massage found:

Traceback (most recent call last):
File "bitwalletrecover.py", line 23, in
from pycoin.ecdsa import generator_secp256k1, public_pair_for_secret_exponent
ImportError: cannot import name 'generator_secp256k1' from 'pycoin.ecdsa' (C:\Python37\lib\site-packages\pycoin-0.0.0-py3.7.egg\pycoin\ecdsa_init_.py)

Could you please advice how it is solve..

Thanks & Regards,
Md. Ashraful Alam
Post
Topic
Board Electrum
Re: Doesn't accept password, impossible to do transfert ...
by
ashraful1980
on 14/07/2020, 15:32:30 UTC
Hello,

Thanks for your time and your future reply.

I can't use my electrum wallet because when I want to do btc's transfert, electrum doesn't my password.
The problem is that it is my real password and I am sure about that because i use my wallet everyday ... Now it is blocked when I try, it is write '' incorrect password '', I don't know why ...

I made one transfert today and it worked good, 5 minutes after I tried to do second transfert and it is impossible ...

What's happen ? What can I do ?

Please help me!!

Friendly Regards,


I've been using Electrum for a long time, created several wallets, it's impossible you are entering the correct password.
Has your keyboard configuration changed? Can you type the password on a text editor, check it's right and paste it?
You don't have the seeds, right?
If you need to break the password, you can use btcRecover from Gurnec: https://github.com/gurnec/btcrecover

Or my own project, that right now is just a GUI to make things simpler and uses the project above: https://github.com/Alex-Jaeger/BitcoinFindAndRecover

You could try to input the parts you are sure about and have either combine them in different ways to try open your wallet.

Dear Sir,
The unable download link of https://github.com/Alex-Jaeger/BitcoinFindAndRecover please issue once again valid download link.
Post
Topic
Board Bitcoin Technical Support
Re: Bitcoin find & recover 1.5 released. Fix corrupt wallets and recover passwords
by
ashraful1980
on 14/07/2020, 15:24:36 UTC
https://github.com/Alex-Jaeger/BitcoinFindAndRecover

Bitcoin find & recover is an open-source crypto currency recovery tool, that builds on top of the great btcrecover by Gurnec https://github.com/gurnec/btcrecover, to help any bitcoin user to recover by themselves their lost passwords.
Supports all desktop wallets and a few mobile. Should work for most altcoins wallets, forked from the ones listed below.

Automatizes the searching for wallet files, in files existing and deleted.
It's able to recover partially corrupted MultibitHD wallets.
It also allows the user to create a password list from whatever fragments he or she remembers, to try to regain access with a lost password.
The recovered passwords are saved encrypted using AES.

Works only on Windows and requires .NET 4.0, python 2.7 and a few other prerequisites installed by the setup.

Supports:

- Armory
- Bitcoin-QT
- Bither
- Copay
- Electrum
- mSIGNA
- Multibit
- MultibitHD

## Bitcoin wallet finder

https://i.imgur.com/JFhO313.png

All files will be restored to a folder selected on the GUI. If you chose to recover deleted files, they'll be placed on a sub-folder called "RestoredTemp".
Different sub-folders will be created per wallet. Files copied from already existing files will have the directory structure copied as well. Those recovered from deletion will not, due to a limitation of the file system. Those will be placed on a sub-folder called "recovered", under each wallet's folder.

I based the deleted file recovery work on this great project: https://sourceforge.net/projects/kickassundelete/

## Bitcoin password recover

https://i.imgur.com/0OZdwpJ.png

It's basically a GUI for btcrecover, which is very powerful. My idea was to help users work with it, by creating an interface to operate that program in a friendlier manner.
The most important thing to understand is how to create the password tokens, which are basically the different parts you remember of the password.
It allows to either try to recover all the files found by the first part of the program or only recover one file.

I've copied the most important sections of the token creation guide from btcrecover, see here:
https://github.com/Alex-Jaeger/BitcoinFindAndRecover/blob/master/Tokens.txt

Dear Sir,
The download link has been deleted; please issue valid link accordingly.
Post
Topic
Board Altcoin Discussion
Re: [Help] [Bounty] Recovering LTC Wallet using Pywallet
by
ashraful1980
on 12/07/2020, 07:28:09 UTC
Dood, I feel your pain, I just went through it. I lost my keys, I recovered them from hard drive surface, but I couln't do anything with the recovered wallet, why? well, I detected a bug in pywallet, it is not behaving well for litecoin.

Anyway, I managed after a lot of debugging to sort it out, and fixed it, partially.
Here is my repo on github https://github.com/magnux/pywallet, it is exactly the same as the original, except for the line 1231, where I changed "prefix = chr(128)" for "prefix = chr(176)". This small fix will let you dump your keys correctly.

You're not screwed, if you still have those recovered .dat of course.

So, the recipe:
1) Download MY pywallet https://github.com/magnux/pywallet.

2) Recover it:
If you have already recovered your wallet:, you can use your recovered .dat. It might issue a warning later, in the dumping phase, because of the chr mismatch, ignore it.
If you haven't:
Code:
python pywallet.py --otherversion 48 --recover --recov_size=<yoursize> --recov_outputdir=recovered/ --recov_device=<your device or file>
(I discovered that a .db file recovered by photorec works just as fine as recovering from the surface of the disk directly with pywallet)

3) Dump it(the info):
Code:
python pywallet.py --otherversion 48 --datadir=recovered/ --wallet=recovered_wallet_<yournumber>.dat --dumpwallet --passphrase=<yourpass>  > litewallet.dump

4) Extract it:
Code:
cat litewallet.dump | grep "\"sec\":*" | sed 's/.*: \"//g' | sed 's/\",.*$//g' > liteprivatekeys.txt

This will extract all your keys in lines.

5) Import it:
Using litecoind, you can import it, this process is painstakingly slow, it has to rescan each time imports a key into the wallet.
Run the server and let it sync the block, after that you can use this line:

Code:
while read i; do echo "Importing Key: $i"; /<pathtolitecoind>/litecoind importprivkey $i; done < liteprivatekeys.txt

6) Enjoy:
This process will allow you recover your keys, guaranteed, I just done so with mine.
All your keys will be associated with the "" account, and you'll be able to get your coins out via litecoind sendtoaddress

I hope this helps the mankind. Smiley

tips: LeNXP1KhagNUFfy9XKq1wn5quK6du2LX1R



Dear Sir,
I would like to draw your kind attention that i have some error to use to your script. Please suggestion how to solve it:
C:\Users\PC\Downloads\pywallet-master>python pywallet.py --otherversion 48 --datadir=recovered/ --wallet=wallet.dat --dumpwallet --passphrase=./   1>wallet.dump
Traceback (most recent call last):
  File "pywallet.py", line 5008, in <module>
    db_env = create_env(db_dir)
  File "pywallet.py", line 1267, in create_env
    r = db_env.open(db_dir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))
bsddb.db.DBNoSuchFileError: (2, 'No such file or directory -- recovered/__db.001: No such file or directory')
Post
Topic
Board Development & Technical Discussion
Re: Collection of 18.509 found and used Brainwallets
by
ashraful1980
on 11/07/2020, 07:53:16 UTC
I thought this was a little cute

Code:
printf '\xF0\x9F\x92\xA9' | sha256sum
34722ef0267ceda14f0e2b756b83e85d6e79e458967895e72b07f87da7c0e275
5JDPFAB3Nt52bb2kQ4Sw2vi5JCi5LvPYdxtZu9LysDT52R2HBzh
1CNmL3ECHtAPxb9QZWrW29bq4t9T4SDUR4

https://www.blockchain.com/btc/address/1CNmL3ECHtAPxb9QZWrW29bq4t9T4SDUR4

Since it is (pseudocode): SHA256(poop emoji)

(Reference: https://www.fileformat.info/info/unicode/char/1f4a9/index.htm)

Conclusion: Add emojis to your wordlists  Smiley


Dear Sir,
You are really great. But i have a question that the value of '\xF0\x9F\x92\xA9' how to find and where from found......
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
ashraful1980
on 11/07/2020, 07:36:38 UTC
I'm not good at math ... But I don't think it's that easy! Can you create a tool that I can test? If you really did it ... I'll send you 3 BTC

If you use python:

copy this file "test.py"

Code:
#!/usr/bin/env python

p = 115792089237316195423570985008687907852837564279074904382605163141518161494337
a = 76470300715912249562689990107401687364194232406198996658976353330269918489458
b = 64658408237276871767689061520961436408509493287485285377611016482361694763299

b_inv =  pow(b, p-2, p)
w1 = a*b_inv % p
print (w1)

a_inv = pow(a, p-2, p)
w2 = b*a_inv % p
print (w2)

and then in the terminal:

python test.py

Code:
$ python  test.py
12447032699845648078645791161909514142990644957498005805208944683777961822095
66620152837833785920928131416087065201280002472666144035333386572317622196480


Dear Sir,
It is great full work. Could you please explain what is the value:
a = 76470300715912249562689990107401687364194232406198996658976353330269918489458
b = 64658408237276871767689061520961436408509493287485285377611016482361694763299

also final output value as following:

w1: 12447032699845648078645791161909514142990644957498005805208944683777961822095
w2: 66620152837833785920928131416087065201280002472666144035333386572317622196480
Post
Topic
Board Development & Technical Discussion
Re: Pywallet: manage your wallets/addresses/keys/tx's
by
ashraful1980
on 09/07/2020, 17:25:08 UTC
To whom it may concern - I added encrypted wallets support this morning - http://github.com/joric/pywallet
Here is the shorter, more readable version - PoC and simultaneously the unit test.
Code:
#!/usr/bin/env python

# Bitcoin wallet keys AES encryption / decryption (see http://github.com/joric/pywallet)
# Uses pycrypto or libssl or libeay32.dll or aes.py from http://code.google.com/p/slowaes

crypter = None

try:
    from Crypto.Cipher import AES
    crypter = 'pycrypto'
except:
    pass

class Crypter_pycrypto( object ):
    def SetKeyFromPassphrase(self, vKeyData, vSalt, nDerivIterations, nDerivationMethod):
        data = vKeyData + vSalt
        for i in range(nDerivIterations):
            data = hashlib.sha512(data).digest()
        self.SetKey(data[0:32])
        self.SetIV(data[32:32+16])
        return len(data)

    def SetKey(self, key):
        self.chKey = key

    def SetIV(self, iv):
        self.chIV = iv[0:16]

    def Encrypt(self, data):
        return AES.new(self.chKey,AES.MODE_CBC,self.chIV).encrypt(data)[0:32]
 
    def Decrypt(self, data):
        return AES.new(self.chKey,AES.MODE_CBC,self.chIV).decrypt(data)[0:32]

try:
    if not crypter:
        import ctypes
        import ctypes.util
        ssl = ctypes.cdll.LoadLibrary (ctypes.util.find_library ('ssl') or 'libeay32')
        crypter = 'ssl'
except:
    pass

class Crypter_ssl(object):
    def __init__(self):
        self.chKey = ctypes.create_string_buffer (32)
        self.chIV = ctypes.create_string_buffer (16)

    def SetKeyFromPassphrase(self, vKeyData, vSalt, nDerivIterations, nDerivationMethod):
        strKeyData = ctypes.create_string_buffer (vKeyData)
        chSalt = ctypes.create_string_buffer (vSalt)
        return ssl.EVP_BytesToKey(ssl.EVP_aes_256_cbc(), ssl.EVP_sha512(), chSalt, strKeyData,
            len(vKeyData), nDerivIterations, ctypes.byref(self.chKey), ctypes.byref(self.chIV))

    def SetKey(self, key):
        self.chKey = ctypes.create_string_buffer(key)

    def SetIV(self, iv):
        self.chIV = ctypes.create_string_buffer(iv)

    def Encrypt(self, data):
        buf = ctypes.create_string_buffer(len(data) + 16)
        written = ctypes.c_int(0)
        final = ctypes.c_int(0)
        ctx = ssl.EVP_CIPHER_CTX_new()
        ssl.EVP_CIPHER_CTX_init(ctx)
        ssl.EVP_EncryptInit_ex(ctx, ssl.EVP_aes_256_cbc(), None, self.chKey, self.chIV)
        ssl.EVP_EncryptUpdate(ctx, buf, ctypes.byref(written), data, len(data))
        output = buf.raw[:written.value]
        ssl.EVP_EncryptFinal_ex(ctx, buf, ctypes.byref(final))
        output += buf.raw[:final.value]
        return output

    def Decrypt(self, data):
        buf = ctypes.create_string_buffer(len(data) + 16)
        written = ctypes.c_int(0)
        final = ctypes.c_int(0)
        ctx = ssl.EVP_CIPHER_CTX_new()
        ssl.EVP_CIPHER_CTX_init(ctx)
        ssl.EVP_DecryptInit_ex(ctx, ssl.EVP_aes_256_cbc(), None, self.chKey, self.chIV)
        ssl.EVP_DecryptUpdate(ctx, buf, ctypes.byref(written), data, len(data))
        output = buf.raw[:written.value]
        ssl.EVP_DecryptFinal_ex(ctx, buf, ctypes.byref(final))
        output += buf.raw[:final.value]
        return output

try:
    if not crypter:
        from aes import *
        crypter = 'pure'
except:
    pass

class Crypter_pure(object):
    def __init__(self):
        self.m = AESModeOfOperation()
        self.cbc = self.m.modeOfOperation["CBC"]
        self.sz = self.m.aes.keySize["SIZE_256"]

    def SetKeyFromPassphrase(self, vKeyData, vSalt, nDerivIterations, nDerivationMethod):
        data = vKeyData + vSalt
        for i in range(nDerivIterations):
            data = hashlib.sha512(data).digest()
        self.SetKey(data[0:32])
        self.SetIV(data[32:32+16])
        return len(data)

    def SetKey(self, key):
        self.chKey = [ord(i) for i in key]

    def SetIV(self, iv):
        self.chIV = [ord(i) for i in iv]

    def Encrypt(self, data):
        mode, size, cypher = self.m.encrypt(data, self.cbc, self.chKey, self.sz, self.chIV)
        return ''.join(map(chr, cypher))
 
    def Decrypt(self, data):
        chData = [ord(i) for i in data]
        return self.m.decrypt(chData, self.sz, self.cbc, self.chKey, self.sz, self.chIV)

import hashlib

def Hash(data):
    return hashlib.sha256(hashlib.sha256(data).digest()).digest()

def main():

    #address
    addr = '1AJ3vE2NNYW2Jzv3fLwyjKF1LYbZ65Ez64'
    sec = '5JMhGPWc3pkdgPd9jqVZkRtEp3QB3Ze8ihv62TmmvzABmkNzBHw'
    secret = '47510706d76bc74a5d57bdcffc68c9bbbc2d496bef87c91de7f616129ac62b5f'.decode('hex')
    pubkey = '046211d9b7836892c8eef49c4d0cad7797815eff95108e1d30745c03577596c9c00d2cb1ab27c7f95c28771278f89b7ff40da49fe9b4ee834a3f6a88324db837d8'.decode('hex')
    ckey = '0f8c75e4c6ab3c642dd06786af80ca3a93e391637d029f1da919dad77d3c8e477efd479814ddf4c459aeba042420868f'.decode('hex')

    #master key
    crypted_key = '1e1d7ab34d8007f214eb528a1007c6721b9cd1d2c257adb25378ea8e47e3bdd22cfe93a8b6f18dcbe4206fe8c8178ff1'.decode('hex')
    salt = '3f94e3c670b695dd'.decode('hex')
    rounds = 47135
    method = 0
    password = '12345'

    global crypter

    if crypter == 'pycrypto':
        crypter = Crypter_pycrypto()
    elif crypter == 'ssl':
        crypter = Crypter_ssl()
        print "using ssl"
    elif crypter == 'pure':
        crypter = Crypter_pure()
        print "using slowaes"
    else:
        print("Need pycrypto of libssl or libeay32.dll or http://code.google.com/p/slowaes")
        exit(1)

    crypter.SetKeyFromPassphrase(password, salt, rounds, method)
    masterkey = crypter.Decrypt(crypted_key)
    crypter.SetKey(masterkey)
    crypter.SetIV(Hash(pubkey))
    d = crypter.Decrypt(ckey)
    e = crypter.Encrypt(d)

    print "masterkey:", masterkey.encode('hex')
    print 'c:', ckey.encode('hex')
    print 'd:', d.encode('hex')
    print 'e:', e.encode('hex')

if __name__ == '__main__':
    main()



Sir,
It is fantastic program; it is 1000% work for your program.

I have request you that please remove password option & remain published it. Lot of viewer and myself hope that as same script for decrypt old wallet. Thank you for connivance...
Post
Topic
Board Development & Technical Discussion
Re: Pollard's kangaroo ECDLP solver
by
ashraful1980
on 04/07/2020, 14:05:59 UTC
Dear File Owner,
It is unable to download from google drive; please see the bellow massage:
Sorry, this file is infected with a virus

Only the owner is allowed to download infected files.

Please send fresh link as following email id: ashraf.csr@gmail.com
Post
Topic
Board Development & Technical Discussion
Re: BitCrack - A tool for brute-forcing private keys
by
ashraful1980
on 02/07/2020, 19:24:57 UTC
Why not add the ability to search by ripemd160 [...] to speed up
ripemd160(base16) <--> btcaddr(base58) <--> Int/Dec(base10) <--> Hex(base16) <--> Binary(base2)
it's the same thing, just the bases are different, converting
Why not add the ability to search by [...] known public key to speed up
Matching against pubkey would be handy (if it doesn't already do this?)
..because main target(puzzle) assumes a public key unknown (only its ripemd160 hash is known).
and if pubkey is known then sequential key search in a limited space (which uses bitcrack) is the stupidest and slowest way to search compared to baby-step-gigant-step algo and pollard-rho/kangaroo algo
when BitCrack compute 10M keys, its checked 10M keys
when BSGS/Pollard compute 10M keys, its checked (10M)^2 = 100000000M keys (!!!..undestand?)

And which bitcrack version supports random key space function ?
This fork https://github.com/pikachunakapika/BitCrack
Code:
-r, --random
    Each point will start in random KEYSPACE


Sir,
Could you please how to calculate as bellow:
when BitCrack compute 10M keys, its checked 10M keys
when BSGS/Pollard compute 10M keys, its checked (10M)^2 = 100000000M keys (!!!..undestand?)
Post
Topic
Board Development & Technical Discussion
Re: Pywallet: manage your wallets/addresses/keys/tx's
by
ashraful1980
on 24/06/2020, 19:41:53 UTC
RE: documentation about key encryption:

See the comment at the top of crypter.h:

Code:
Private key encryption is done based on a CMasterKey,                                                                                                   
which holds a salt and random encryption key.                                                                                                           
                                                                                                                                                       
CMasterKeys are encrypted using AES-256-CBC using a key                                                                                                 
derived using derivation method nDerivationMethod                                                                                                       
(0 == EVP_sha512()) and derivation iterations nDeriveIterations.                                                                                       
vchOtherDerivationParameters is provided for alternative algorithms                                                                                     
which may require more parameters (such as scrypt).                                                                                                     
                                                                                                                                                       
Wallet Private Keys are then encrypted using AES-256-CBC                                                                                               
with the double-sha256 of the public key as the IV, and the                                                                                             
master key's key as the encryption key (see keystore.[ch]).                                                                                             

The way I think of it:  Take the passphrase and salt and SHA512-hash them nDerivationIterations times.  That gets you an encryption key and initialization vector.

Use those to AES-256-decrypt the encrypted_key master key.

Now you can AES-256-decrypt the private keys, using the master key as the key and the (double-sha256-hash) PUBLIC part of the keypair as the initialization vector.

The "SHA-512-hash them a bunch of times" is actually done by the OpenSSL EVP_BytesToKey routine-- documentation for that is here: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html



I'd been wondering about this for awhile. Thanks for the info.

Glad to see you are working on this again jackjack.  Once I can retire one of my old wallets, I'll send you a donation.


Sir,
It is use "Decrypt With Password Using OpenSSL" or "Decrypt Without Password Using OpenSSL"