Bitcoin Forum
October 02, 2022, 03:50:44 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to generate an address starting with 3 (instead of 1) ?  (Read 3360 times)
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1000



View Profile
December 10, 2013, 08:41:12 AM
 #1

I noticed there are also valid Bitcoin addresses that start with 3 instead of 1.

According to this List of address prefixes such an address is called a "Bitcoin script hash" rather than a "Bitcoin pubkey hash". But they seem to act like normal addresses nonetheless.
Examples: 3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX or 3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk

How do I generate these addresses? Or actually: how do I generate a private key whose corresponding public addres starts with a 3?

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1664725844
Hero Member
*
Offline Offline

Posts: 1664725844

View Profile Personal Message (Offline)

Ignore
1664725844
Reply with quote  #2

1664725844
Report to moderator
1664725844
Hero Member
*
Offline Offline

Posts: 1664725844

View Profile Personal Message (Offline)

Ignore
1664725844
Reply with quote  #2

1664725844
Report to moderator
1664725844
Hero Member
*
Offline Offline

Posts: 1664725844

View Profile Personal Message (Offline)

Ignore
1664725844
Reply with quote  #2

1664725844
Report to moderator
coastermonger
Sr. Member
****
Offline Offline

Activity: 367
Merit: 250

Find me at Bitrated


View Profile
December 10, 2013, 08:47:32 AM
 #2

Addresses that start with a 3 are a script hash, rather than a public key hash.  https://en.bitcoin.it/wiki/List_of_address_prefixes

Bitrated user: Rees.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1007

Reverse engineer from time to time


View Profile
December 10, 2013, 08:48:23 AM
 #3

I believe that is https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki P2SH, you can generate those with vanitygen I think.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
empoweoqwj
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
December 10, 2013, 09:07:27 AM
 #4

from https://en.bitcoin.it/wiki/Vanitygen

"While all "normal" bitcoin addresses start with a "1" (one) (except multi-signature addresses that start with "3")"
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1000



View Profile
December 10, 2013, 09:34:46 AM
 #5

Thanks. Not sure if I fully understand this. I managed to create some addresses starting with 3 using Vanitygen, for example:

Address: 3KUAyfRbc3oB7pdhrDtvSnKWwjgDrDVp92
Privkey: 5TxoTCCeTLwXDGSmWtezzBSmDde2zqAkNkboVh8KE3HXrpdAxKL

But I can't seem to send payments to 3KUAyfRbc3oB7pdhrDtvSnKWwjgDrDVp92. And if I import this private key in my wallet, it actually seems to correspond with a different address: 1JnA47wA49Uo2ewGj8EL29xaoDPWFY7bpM.

Can I have an address that starts with a 3 (whether that be a multisig or script address or whatever) so that I can receive and spend coins, similar to a normal 1-address? Or are these 3-address really for entirely different purposes.


In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
empoweoqwj
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
December 11, 2013, 12:46:14 AM
 #6

Thanks. Not sure if I fully understand this. I managed to create some addresses starting with 3 using Vanitygen, for example:

Address: 3KUAyfRbc3oB7pdhrDtvSnKWwjgDrDVp92
Privkey: 5TxoTCCeTLwXDGSmWtezzBSmDde2zqAkNkboVh8KE3HXrpdAxKL

But I can't seem to send payments to 3KUAyfRbc3oB7pdhrDtvSnKWwjgDrDVp92. And if I import this private key in my wallet, it actually seems to correspond with a different address: 1JnA47wA49Uo2ewGj8EL29xaoDPWFY7bpM.

Can I have an address that starts with a 3 (whether that be a multisig or script address or whatever) so that I can receive and spend coins, similar to a normal 1-address? Or are these 3-address really for entirely different purposes.



As vanityGen says, the ones that start with "3" are for multi-sig purposes so no, you can't send one if you are using a single sig.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 4606
Merit: 10069


View Profile
December 11, 2013, 02:24:06 AM
 #7

In Bitcoin-Qt, open the debug console and enter:
Code:
createmultisig 1 '["full public key or address in your wallet"]'

It'll give you a "multisig" P2SH address starting with 3 (but requiring only one signature). If you have the private key for the given public key, you'll be able to spend transactions sent to this address, but only using the raw transactions API currently. (You probably want to use addmultisigaddress instead of createmultisig if you're actually going to use the address.)

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1014


View Profile
December 11, 2013, 01:22:12 PM
 #8

Can the reference client spend from those addresses too?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1000



View Profile
December 11, 2013, 11:57:30 PM
 #9

As vanityGen says, the ones that start with "3" are for multi-sig purposes so no, you can't send one if you are using a single sig.
Hmmm, I guess I don't understand what you mean. Somehow I always thought multi-sig meant depending on multiple signatures, i.e. multiple people have to sign it. So I assumed this related to transactions, e.g. if there are multiple input addresses owned by different people, who all have to sign before the tx can be sent.

Apparently I'm misinformed about this, but I can't really figure out what "multi-sig" means in the context of a single address, rather than a transaction?

The thing is, I want other people to be able to send money to this 3-address. But I guess that ain't possible? Or at least not by letting them create a normal tx from their wallet to my 3-address, without jumping through hoops? (if I have to jump through some technical hoops to spend it, that's OK)

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
empoweoqwj
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
December 12, 2013, 01:17:22 AM
 #10

As vanityGen says, the ones that start with "3" are for multi-sig purposes so no, you can't send one if you are using a single sig.
Hmmm, I guess I don't understand what you mean. Somehow I always thought multi-sig meant depending on multiple signatures, i.e. multiple people have to sign it. So I assumed this related to transactions, e.g. if there are multiple input addresses owned by different people, who all have to sign before the tx can be sent.

Apparently I'm misinformed about this, but I can't really figure out what "multi-sig" means in the context of a single address, rather than a transaction?

The thing is, I want other people to be able to send money to this 3-address. But I guess that ain't possible? Or at least not by letting them create a normal tx from their wallet to my 3-address, without jumping through hoops? (if I have to jump through some technical hoops to spend it, that's OK)

Can I just ask why this desperate need to have addresses starting with 3? Is it your lucky number or something ?  Smiley
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1000



View Profile
December 12, 2013, 08:23:03 AM
 #11

Can I just ask why this desperate need to have addresses starting with 3? Is it your lucky number or something ?  Smiley
Something like that, yeah. It's supposed to be a donation address for a music band whose name starts with a 3 Grin

That, and also curiosity. You know, this deep need to fully understand everything related to Bitcoin Smiley

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
empoweoqwj
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
December 12, 2013, 02:07:22 PM
 #12

Can I just ask why this desperate need to have addresses starting with 3? Is it your lucky number or something ?  Smiley
Something like that, yeah. It's supposed to be a donation address for a music band whose name starts with a 3 Grin

That, and also curiosity. You know, this deep need to fully understand everything related to Bitcoin Smiley

Thanks for the explanation. Bit more from the Bitcoin Wiki:

---------
Multi-signature addresses

Addresses can be created that require a combination of multiple private keys. Since these take advantage of newer features, they begin with the newer prefix of 3 instead of the older 1. These can be thought of as the equivalent of writing a check to two parties - "pay to the order of somebody AND somebody else" - where both parties must endorse the check in order to receive the funds.
The actual requirement (number of private keys needed, their corresponding public keys, etc.) that must be satisfied to spend the funds is decided in advance by the person generating this type of address, and once an address is created, the requirement cannot be changed without generating a new address.
What's in an address

Most Bitcoin addresses are 34 characters. They consist of random digits and uppercase and lowercase letters, with the exception that the uppercase letter "O", uppercase letter "I", lowercase letter "l", and the number "0" are never used to prevent visual ambiguity.
Some Bitcoin addresses can be shorter than 34 characters (as few as 27 in theory) and still be valid. A significant percentage of Bitcoin addresses are only 33 characters, and some addresses may be even shorter. Every Bitcoin address stands for a number - somewhat like an account number. These shorter addresses are valid simply because they stand for numbers that happen to start with zeroes, and when the zeroes are omitted, the encoded address gets shorter.
Several of the characters inside a Bitcoin address are used as a checksum so that typographical errors can be automatically found and rejected. The checksum also allows Bitcoin software to confirm that a 33-character (or shorter) address is in fact valid and isn't simply an address with a missing character.
-----------

Just thought of a cool idea. Why not name a band using a bitcoin address? Be a bit "random" but a vanity address could reduce that. Then you could self-publish your work and nobody would have to ask how to buy it Smiley
genjix
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1050


View Profile
December 12, 2013, 02:49:50 PM
 #13

http://sx.dyne.org/multisig.html
bittyfree
Full Member
***
Offline Offline

Activity: 126
Merit: 100

I like nuts


View Profile
May 04, 2015, 05:03:57 PM
 #14

I used oclvanitygen from https://bitcointalk.org/index.php?topic=25804.0
But when I try to generate an address with 3, it says it is an invalid prefix etc
Can I generate these addresses somewhere online or directly through some application/programme? I dont really know how multisig works, but will I be able to use this address like normal through the Bitcoin Client?

altcoinex
Sr. Member
****
Offline Offline

Activity: 293
Merit: 250


Director - www.cubeform.io


View Profile WWW
May 06, 2015, 12:05:53 PM
 #15

I used oclvanitygen from https://bitcointalk.org/index.php?topic=25804.0
But when I try to generate an address with 3, it says it is an invalid prefix etc
Can I generate these addresses somewhere online or directly through some application/programme? I dont really know how multisig works, but will I be able to use this address like normal through the Bitcoin Client?

Please understand the risk and danger of doing things you don't understand with these technologies. It will be your own fault if you lose money doing so.
It very much seems like you haven't read anyone in this threads posts, as they all directly answer your questions that your asking after they had posted...

First, Read and understand what multisig is, and how it works:
http://bitcoin.stackexchange.com/questions/3718/what-are-multi-signature-transactions
https://en.bitcoin.it/wiki/Multisignature (This link includes an easy brief example for generating a multisig address with bitcoin-cli)

Then as far as generating it, you can easily generate one from the official bitcoin-cli command line. In regards to 'can I use this address like normal', the answer is yes and no, but mostly No. Yes it can send and receive funds, but no it will not work by default inside your core graphical client wallet, it requires command line knowledge/use or a specific client. This kind of thing can be tricky for someone who doesn't understand whats happening though, so you should really bother to understand this stuff before going any further.



                                     ╓╢╬╣╣╖
                                   ┌║██████║∩
                                   ]█████████
                                    ╜██████╝`
                                      ╙╜╜╜`
                                   ╓╥@@@@@@╥╓
         ╓╖@@╖,                 ,@║██████████╢@,                 ,╓@@╖╓
       ╓╢██████╢.              ╓╢███████████████╖               ║╢█████║╓
       ║█████████    ,,╓╓,,   ┌║█████████████████┐   ,,╓╓,,    ]█████████
       └╢██████║` ╓╢║██████╢║∩``╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙`»╢╢██████╢║╖  ║███████╜
         "╜╜╜╜` ╖╢█████████╣╜                      └╢██████████@ `╜╜╜╜╜
               ║██████████╜                          ╙╢██████████
              ┌█████████╜                              ╙╢█████████
              └███████╨`                                 ╜████████
               ║████╨╜                                    `╢█████
                ╙╢╣╜                                        └╢█╜
                ,,                                            ,,
             ╓@║██┐                                          ┌██║@╓
            ╢██████                                          ]█████H
           ╢███████∩                                        ┌████████
  ╓@@@@╓   █████████                                        ║████████`  ╓@@@@╖
╓╢██████║. █████████∩                                      ┌█████████ ,║███████╖
██████████ └█████████                                      ██████████ ]█████████
`║██████╜`  └╢████████                                    ┌███████╣╜   ╙██████╨`
  `╙╜╜╙`      `╙╨╢████                                    █████╝╜`       `╙╜╜`
                      ]@╓                              ╓╖H
                      ███╢║@╓,                    ,╓@╢╢███`
                      ████████╢@╖╓.           ╓╖@║████████`
                      ]███████████╢║@╓,  ,╓@╢╢████████████
                       ╙╢█████████████╨` ╜██████████████╜
                         ╙╝╢███████║╜`    `╜║████████╝╜`
                     ,╓@@@╓  `²╙``             `╙²`  ╓@@@╖,
                    ║╢█████╢H                      ╓╢██████H
                    █████████                      █████████`
                    ╙╢██████╜                      ╙╢██████╜
                      └╨╩╝┘                          └╨╩╝╜
WINFLOW.
██
██
██
██
██
██
██
██
██
██
██
██
██
..
██
██
██
██
██
██
██
██
██
██
██
██
██
.
virtualx
Hero Member
*****
Offline Offline

Activity: 672
Merit: 507


LOTEO


View Profile
May 06, 2015, 09:17:33 PM
 #16

I used oclvanitygen from https://bitcointalk.org/index.php?topic=25804.0
But when I try to generate an address with 3, it says it is an invalid prefix etc
Can I generate these addresses somewhere online or directly through some application/programme? I dont really know how multisig works, but will I be able to use this address like normal through the Bitcoin Client?

Please understand the risk and danger of doing things you don't understand with these technologies. It will be your own fault if you lose money doing so.
It very much seems like you haven't read anyone in this threads posts, as they all directly answer your questions that your asking after they had posted...

First, Read and understand what multisig is, and how it works:
http://bitcoin.stackexchange.com/questions/3718/what-are-multi-signature-transactions
https://en.bitcoin.it/wiki/Multisignature (This link includes an easy brief example for generating a multisig address with bitcoin-cli)

Then as far as generating it, you can easily generate one from the official bitcoin-cli command line. In regards to 'can I use this address like normal', the answer is yes and no, but mostly No. Yes it can send and receive funds, but no it will not work by default inside your core graphical client wallet, it requires command line knowledge/use or a specific client. This kind of thing can be tricky for someone who doesn't understand whats happening though, so you should really bother to understand this stuff before going any further.


Most bitcoin wallets do not support multisignature. Armory supports multisignature but probably only partially.  I do not recommend generating multisignature online  because you do not know if the server is trustable. Command line is the best for this feature.

...loteo...
DIGITAL ERA LOTTERY


r

▄▄███████████▄▄
▄███████████████████▄
▄███████████████████████▄
▄██████████████████████████▄
▄██  ███████▌ ▐██████████████▄
▐██▌ ▐█▀  ▀█    ▐█▀   ▀██▀  ▀██▌
▐██  █▌ █▌ ██  ██▌ ██▌ █▌ █▌ ██▌
▐█▌ ▐█ ▐█ ▐█▌ ▐██  ▄▄▄██ ▐█ ▐██▌
▐█  ██▄  ▄██    █▄    ██▄  ▄███▌
▀████████████████████████████▀
▀██████████████████████████▀
▀███████████████████████▀
▀███████████████████▀
▀▀███████████▀▀
r

RPLAY NOWR
BE A MOON VISITOR!
[/center]
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!