Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: COBRAS on October 29, 2021, 07:54:17 PM



Title: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: COBRAS on October 29, 2021, 07:54:17 PM
I thant download all r,s,z from 1 bitcoin address, how do this ?

Any scrypt for this task ?


Regards.


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: BlackHatCoiner on October 29, 2021, 08:02:47 PM
These values aren't connected directly with an address. They construct the signature of a signed message. (Such as a signed transaction)

The signature is consisted of [r, s] and z is the hash of the message we want to sign. The s is created if you combine the message hash (z) and the private key (d). I doubt there's a script to get those if you just give the address, but there must be one if you enter the signature, the public key and the message.


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: COBRAS on October 29, 2021, 08:24:12 PM
These values aren't connected directly with an address. They construct the signature of a signed message. (Such as a signed transaction)

The signature is consisted of [r, s] and z is the hash of the message we want to sign. The s is created if you combine the message hash (z) and the private key (d). I doubt there's a script to get those if you just give the address, but there must be one if you enter the signature, the public key and the message.

Ok, how to get all r,s only ?


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: a.a on October 29, 2021, 08:32:48 PM
Download the Blockchain


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: pooya87 on October 30, 2021, 04:02:30 AM
Go nutzz:
Code:
var rng = new Random();
while (true)
{
    byte[] zb = new byte[32];
    byte[] key = new byte[32];
    rng.NextBytes(zb);
    rng.NextBytes(key);
    var (r, s) = Sign(zb, key);
    DoSomething(r, s, zb, key);
}


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: COBRAS on October 30, 2021, 04:06:01 AM
Go nutzz:
Code:
var rng = new Random();
while (true)
{
    byte[] zb = new byte[32];
    rng.NextBytes(zb);
    var (r, s) = Sign(zb);
    DoSomething(r, s, zb);
}

I need a pubkey additionaly and this will be only monkey tests if youse random generator and not a real data...

I think need use a DER decoder... no more idea now... I continue search ...


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: pooya87 on October 30, 2021, 04:20:45 AM
I need a pubkey additionaly and this will be only monkey tests if youse random generator and not a real data...
I forget the key, added to the pseudocode. And the result you get from this pseudocode IS real data! Just as real and random as data you would have gotten from blockchain but acquired a lot faster.


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: COBRAS on October 30, 2021, 05:11:47 AM
I need a pubkey additionaly and this will be only monkey tests if youse random generator and not a real data...
I forget the key, added to the pseudocode. And the result you get from this pseudocode IS real data! Just as real and random as data you would have gotten from blockchain but acquired a lot faster.

Check PM


Title: Re: ASAP how to get bulk r,s,z from bitcoin signatures ?
Post by: superkatchu on October 30, 2021, 10:47:21 AM
Oh man. Don't waste your time. There is a whole paper about trying to crack wallets by using the lattice attack. They tried most transactions already... . Try something new.
If you want to try anyways: best way is to modify bitcoin core  so it saves all transactions r,s,z to a file. I have those modifications but won't give them away for free.

Here is the paper (very nice read and Nadia Heninge is really impressive woman):
https://eprint.iacr.org/2019/023.pdf

Video to the paper:
https://www.youtube.com/watch?v=6ssTlSSIJQE

Edit: Sorry, I did not read your OP completely. For only one address just check on blockchain.com (or similar blockchain browser) and get the values. You can easily automate it with something like beautifulsoup for python...
I can create such script but again not for free :).

Edit2: Ahh I forgot. Best method for particular address is to use electrum server api. It's very easy. I have the code.