Search content
Sort by

Showing 2 of 2 results by NASIR shaikh
Post
Topic
Board Wallet software
Re: deprecated wallet: mSIGNA - how to access private keys?
by
NASIR shaikh
on 04/01/2025, 23:44:30 UTC
I may not have made that clear in OP: But I can still access my wallet in mSIGNA.
Yeah, I get that. My point of importing the seed phrase again was to ensure your wallet is indeed just a single signature wallet derived from that seed phrase and not some more complex multi-sig set up which we would never be able to recover using just one seed phrase.

My guess it's only about finding the right derivation path.
Having read through the .pdf again, I'm not so sure:

Quote
NOTE: mSIGNA™ always uses pay-­‐to-­‐script-­‐hash addresses, which begin with the character 3 in Bitcoin, even for 1 of 1 accounts.

There is no mention that they use nested segwit addresses, which is the type of address every other wallet will try to recover when given a seed phrase and a P2SH address type. The sentence above I've just quoted suggests they may use some strange custom 1-of-1 script, in which case you will never find it by just playing with the derivation path. You will need to find the exact script being used.

Does mSIGMA have the option to import transactions from elsewhere? That would be the easiest way forward - create an unsigned transaction elsewhere, import it to mSIGMA for signing, and then export it for broadcast. If not, then I think the easiest option is going to be to spin up your own node and get mSIGMA to connect to it. Otherwise you will need to comb through the entire source code to figure out exactly the script type and derivation path which is being used.

Alternatively - have you spend from any of these addresses in the past? If so, we can view the script for them on the blockchain.
Post
Topic
Board Project Development
Re: 50 usdt bounty for a PEM public key to usdt address convertor
by
NASIR shaikh
on 04/01/2025, 20:18:58 UTC
*** EDIT:  bounty has closed.  Hal won it. ***

I've tried to make one but I've failed, so I start an other bounty.

dirtyfilthy has made a C program which exports a wallet's private key to a openssl readable PEM format.


So given a usdt address such as :

Usdt=
Try doing tail -c 65 after the base64 -d. Your pubkey has ASN.1 cruft.


I can run :

bc_key $btc ~/.bitcoin/wallet.dat |
openssl ec -pubout

Which gives me a public key :

-----BEGIN PUBLIC KEY-----
MIH1MIGuBgcqhkjOPQIBMIGiAgEBMCwGByqGSM49AQECIQD/////////////////
///////////////////+///8LzAGBAEABAEHBEEEeb5mfvncu6xVoGKVzocLBwKb
/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIh
AP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABJJ6TBhmiWm4
Y1ACBVJVn0oyG9Ay5IzEZq8cPyrs1PERl963YQh5UrGOT0NodynfHswkz8bUpaJW
FsowR/l9wXc=
-----END PUBLIC KEY-----


Now I need a program that reads this public key, and ouputs the corresponding bitcoin address.

Such a program exists in the bitcoin code.  I think it's the function "PubKeyToAddress" in base58.h.

I want to implement this function in bash, using only openssl et standard filters.

As I understand it, I have to do the following steps :

- computes the sha256 of the key ;
- computes the rmd160 of this hash ;
- add a byte at the begin for the version number (?) ;
- add four bytes at the end for the check sum ;
- encode the result in base58 ;




I've tried using blockexplorer.com/q/hashtoaddress for the last three steps.  This gave me this code :


wget -O - -q http://blockexplorer.com/q/hashtoaddress/$(
grep -v 'PUBLIC KEY' <<<"
-----BEGIN PUBLIC KEY-----
MIH1MIGuBgcqhkjOPQIBMIGiAgEBMCwGByqGSM49AQECIQD/////////////////
///////////////////+///8LzAGBAEABAEHBEEEeb5mfvncu6xVoGKVzocLBwKb
/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIh
AP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABJJ6TBhmiWm4
Y1ACBVJVn0oyG9Ay5IzEZq8cPyrs1PERl963YQh5UrGOT0NodynfHswkz8bUpaJW
FsowR/l9wXc=
-----END PUBLIC KEY-----" |
base64 -d |
openssl dgst -sha256 |
cut -d\  -f2 |
xxd -r -p |
openssl dgst -rmd160 |
cut -d\  -f2
)


But it just doesn't give me the correct bitcoin address.

50 BTC for whoever fixes that.