2
3
I would like to calculate the segwit address of a public address.
First step:
take the compressed public address:
1L88S26C5oyjL1gkXsBeYwHHjvGvCcidr9
do a sha256 on that address:
151de228f6bec7635097f7813786830505d04bf56806f11eb056441fdc917d41
do a ripemd160:
9bbfb2424372d687cf35fd7d1e978f85a11157ca
encode with Base58:
usT1ggHqtEAcGd4ZysWqtxaaQmT
There is something wrong since every segwit address should start with "3". Can someone help me which step it is?
My source of how a segwit address is calculated is: How to get legacy address and private key from Segwit P2SH address? Quote:
You have the private key so you can just derive the address from there. Get the corresponding public key, hash it with SHA256 and then that result with RIPEMD160. Then perform Base58Check Encoding on it.
next to my answer below, see at the response here: https://bitcoin.stackexchange.com/questions/46455/verifying-a-bitcoin-trx-on-the-unix-cmd-line-with-openssl
– pebwindkraft – 2017-12-16T17:43:13.717