pbies (OP)
|
 |
July 20, 2025, 11:27:10 PM |
|
Beside vanity address search,
can I create a valid address (without private key and public key) with a specific string?
I want to put everlasting address into blockchain by moving there some dust.
I mean python 3 here and maybe some brute-force method?
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
pooya87
Legendary
Offline
Activity: 3892
Merit: 11821
|
can I create a valid address (without private key and public key) with a specific string?
Yes. Do this (no brute force necessary): 1. Avoid invalid characters (0OIl) in the string you are using 2. Your string has to be small enough to not exceed the standard address length (160 bit hash when decoded) 3. Convert your string to bytes and pad it with zeros until it is 160 bits (20 bytes) 4. Encode the result using Base58check (feed the 160-bit result to the encoder as if you are feeding the RIPEMD160 hash of a public key, it should add the address version byte to it and compute and append the checksum as well) I want to put everlasting address into blockchain by moving there some dust.
Please don't, you would be creating an unspendable UTXO that will remain in the UTXO set forever. Use OP_RETURN if you want to insert an arbitrary message into the chain...
|
|
|
|
pbies (OP)
|
 |
July 21, 2025, 12:43:26 PM |
|
3. Convert your string to bytes and pad it with zeros until it is 160 bits (20 bytes) 4. Encode the result using Base58check (feed the 160-bit result to the encoder as if you are feeding the RIPEMD160 hash of a public key, it should add the address version byte to it and compute and append the checksum as well)
I need the result address to have the string, not the bytes before base58check encoding.
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
odolvlobo
Legendary
Offline
Activity: 4746
Merit: 3645
|
3. Convert your string to bytes and pad it with zeros until it is 160 bits (20 bytes) 4. Encode the result using Base58check (feed the 160-bit result to the encoder as if you are feeding the RIPEMD160 hash of a public key, it should add the address version byte to it and compute and append the checksum as well)
I need the result address to have the string, not the bytes before base58check encoding. An address cannot be an arbitrary string because the address itself is not stored in the block chain. Block chain explorers and wallets analyze a transaction to construct the address. As @pooya87 described, a legacy address is constructed from a 160-bit hash, plus a version and a checksum. The version and checksum are mostly out of your control. The best you can do is an address like 1BitcoinEaterAddressDontSendf59kuE. Also, segwit and taproot addresses have similar limitations.
|
Join an anti-signature campaign: Click ignore on the members of signature campaigns. PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
|
|
|
pbies (OP)
|
 |
July 21, 2025, 08:24:25 PM |
|
...
An address cannot be an arbitrary string because the address itself is not stored in the block chain
...
The best you can do is an address like 1BitcoinEaterAddressDontSendf59kuE.
...
You just given example of arbitrary string in blockchain as an address. Yes, that is what I want to do. My own string in address. I don't need pvk nor pubkey. Let's say I have "MyString" and I need to see it in address. Starting characters and ending can be any. So, for example, I base58decode_check("MyStringChecksum"), I am getting bytes, add some at the end for proper length and checksum, and at the end base58encode_check the bytes giving me what I want. I just don't know how to code that (mostly in Python 3). I know the theory, I need working example of conversion.
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
iceland2k14
Member

Offline
Activity: 70
Merit: 86
|
 |
July 22, 2025, 07:47:57 AM |
|
can I create a valid address (without private key and public key) with a specific string? I mean python 3 here and maybe some brute-force method?
I think you are simply looking for something like this. import secp256k1 as ice ice.create_burn_address('ADayWiLLcomeWheniceLandisGoingToSoLvebitCoinPuzzLe', 'X')
Result : ['1ADayWiLLcomeWheniceLandisXXVF7Q3', '1GoingToSoLvebitCoinPuzzLeXXxuijG'] If the String is bigger you will get a list of address output. Otherwise it will be just 1 address. Example ice.create_burn_address('iceLandxxxxxxBTC', 'Z') '1iceLandxxxxxxBTCZZZZZZZZZZae8Au3'
Is that what you want ?
|
|
|
|
pbies (OP)
|
 |
July 22, 2025, 02:06:55 PM |
|
can I create a valid address (without private key and public key) with a specific string? I mean python 3 here and maybe some brute-force method?
I think you are simply looking for something like this. import secp256k1 as ice ice.create_burn_address('ADayWiLLcomeWheniceLandisGoingToSoLvebitCoinPuzzLe', 'X')
Result : ['1ADayWiLLcomeWheniceLandisXXVF7Q3', '1GoingToSoLvebitCoinPuzzLeXXxuijG'] If the String is bigger you will get a list of address output. Otherwise it will be just 1 address. Example ice.create_burn_address('iceLandxxxxxxBTC', 'Z') '1iceLandxxxxxxBTCZZZZZZZZZZae8Au3'
Is that what you want ? Seems like yes, is there any python code to do that? This library does not provide this function...
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
pbies (OP)
|
 |
July 22, 2025, 08:52:11 PM |
|
# -*- coding: utf-8 -*- """
@author: iceland """ import secp256k1 as ice import timeit
#============================================================================== # For Operator Overloading Purpose. Like P + Q, Q * 20, P / 5 etc etc. class UpubData: def __init__(self, data): if len(data) != 65: raise ValueError("Data must be 65 bytes") self.data = data def __add__(self, other): if not isinstance(other, UpubData): return NotImplemented return UpubData(ice.point_addition(self.data, other.data)) def __sub__(self, other): if not isinstance(other, UpubData): return NotImplemented return UpubData(ice.point_subtraction(self.data, other.data))
def __neg__(self): return UpubData(ice.point_negation(self.data)) def __mul__(self, other): if isinstance(other, int): return UpubData(ice.point_multiplication(self.data, other)) return NotImplemented
def __rmul__(self, other): return self.__mul__(other)
def __truediv__(self, other): if isinstance(other, int): return UpubData(ice.point_division(self.data, other)) return NotImplemented def to_bytes(self): return self.data def __repr__(self): return f"UpubData({self.data})" def __str__(self): return f"{self.data.hex()}"
def upub(data): if isinstance(data, UpubData): return data return UpubData(data) #============================================================================== # Example. Q = (((P * 160 )-P) /77).to_bytes()
def fix_time(val): units = [("ms", 1e3), ("us", 1e6), ("ns", 1e9)] for unit, factor in units: if val >= 1 / factor: return f"{val * factor:.2f} {unit}"
def chk(mess, i, o): if i == o: print(f'{mess:<30} : PASS') else: print(f'{mess:<30} : FAIL')
def self_check(): pvk = 42866423864328564389740932742094 chk('P2PKH_C', ice.privatekey_to_address(0, True, pvk), '1EAKqa4DbqnxJ9uLUFrXTMSPd2k3fHzWgr') chk('P2PKH_U', ice.privatekey_to_address(0, False, pvk), '1SXCEWFyUp6q4x92iR6JANNDAu87MNmSz') chk('P2SH', ice.privatekey_to_address(1, True, pvk), '3BDxuSY3g7SM2Zg3k6pkYxCgvk2JbcCx3M') chk('Bech32', ice.privatekey_to_address(2, True, pvk), 'bc1qjpw34q9px0eaqmnut2vfxndkthlh5qs9gt969u') pvk = 33604 P = ice.scalar_multiplication(pvk) chk('Scalar_Multiplication', P.hex(), '0488de60bd8c187071fc486979f2c9696c3602c562fbba6922993ff665eae81b4f8adf94f4e2a50b05fe35aee42c146f6415e5cf524b6b1b5a8d17de8b741a5a21') chk('Point Negation', ice.point_negation(P).hex(), '0488de60bd8c187071fc486979f2c9696c3602c562fbba6922993ff665eae81b4f75206b0b1d5af4fa01ca511bd3eb909bea1a30adb494e4a572e821738be5a20e') chk('Point Doubling', ice.point_doubling(P).hex(), '04484200af427941631f87f4ca153635156ceb0306e7033874e06a784088be5e3563868c14b34af7bc6206bcdbd63dee7a7825e595f8c45b07746e1b87da3091fc') chk('Point Multiplication', ice.point_multiplication(P, 7).hex(), '048ea2016371a8e644f84252993527896b4c4d024a3e4e6c18246eb71b9c10363375be5a09dd9eaa819cdd50710309b5cc854aa910822be36cb28f88511132e4ce') print('[8/8] All check Passed...')
def op_check(): pvk = 0x437af32d9e723fb9cd0 Q = upub(ice.scalar_multiplication(pvk)) G = upub(ice.scalar_multiplication(1)) R = Q * 25 - G * 8 chk('Operator Check', R.to_bytes(), ice.scalar_multiplication(0x69701bf7479283925048)) def speed_check(mess, setup_code, test_code): timer = timeit.Timer(stmt=test_code, setup=setup_code) number, _ = timer.autorange() execution_times = timer.repeat(repeat=5, number=number) best_time = min(execution_times) time_per_loop = fix_time(best_time / number) print(f"{mess:<30} : {number} loops, best of 5: {time_per_loop} per loop")
#============================================================================== setup_code = """import secp256k1 as ice; pvk = 0xf5ef7150682150f4ce2c6f4807b349827dcdbd P = ice.scalar_multiplication(pvk)"""
test_code = """ ice.point_sequential_increment(3500000, P) """
self_check() op_check() speed_check("Point Sequential Increment", setup_code, test_code) speed_check("Point Addition", setup_code, """ice.point_addition(P, P)""")
Source: https://github.com/iceland2k14/secp256k1/blob/main/benchmark.pyAnd how it is supposed to answer the question?
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
NeuroticFish
Legendary
Offline
Activity: 4116
Merit: 6893
Looking for campaign manager? Contact icopress!
|
Beside vanity address search,
can I create a valid address (without private key and public key) with a specific string?
I want to put everlasting address into blockchain by moving there some dust.
I mean python 3 here and maybe some brute-force method?
You don't have to brute force anything, since you only build a valid (burn) address, no key. I've used a tool like that in the past, but I've accessed it as an online page where you wrote like "1Whatever" and it was creating an address starting with this. Maybe searching the net for creating a burn address for bitcoin would give you results. Or maybe you can check out what I've found via web search and I didn't check (I'm not familiar with python): * https://gist.github.com/dancodery/e26890a60cd676ca8ca3af8c247d0bb8* https://gist.github.com/spaceexpanse/b9b7ab1f88b85cc5b3e1509ec1c7441e
|
|
|
|
mcdouglasx
|
 |
July 22, 2025, 09:59:54 PM |
|
In a post from some time ago I shared this script, I think, but I couldn't find the link. You just have to respect the structure and not include characters that aren't in base58. I did it as a mini brute force to cover the bytes destined for the checksum so I could include more vanity characters.
|
▄▄█████████████████▄▄ ▄█████████████████████▄ ███▀▀█████▀▀░░▀▀███████ ███▄░░▀▀░░▄▄██▄░░██████ █████░░░████████░░█████ ████▌░▄░░█████▀░░██████ ███▌░▐█▌░░▀▀▀▀░░▄██████ ███░░▌██░░▄░░▄█████████ ███▌░▀▄▀░░█▄░░█████████ ████▄░░░▄███▄░░▀▀█▀▀███ ██████████████▄▄░░░▄███ ▀█████████████████████▀ ▀▀█████████████████▀▀ | Rainbet.com CRYPTO CASINO & SPORTSBOOK | | | █▄█▄█▄███████▄█▄█▄█ ███████████████████ ███████████████████ ███████████████████ █████▀█▀▀▄▄▄▀██████ █████▀▄▀████░██████ █████░██░█▀▄███████ ████▄▀▀▄▄▀███████ █████████▄▀▄███ █████████████████ ███████████████████ ███████████████████ ███████████████████ | | | |
▄█████████▄ █████████ ██ ▄▄█░▄░▄█▄░▄░█▄▄ ▀██░▐█████▌░██▀ ▄█▄░▀▀▀▀▀░▄█▄ ▀▀▀█▄▄░▄▄█▀▀▀ ▀█▀░▀█▀
| 10K WEEKLY RACE | | 100K MONTHLY RACE | | | ██
█████
| ███████▄█ ██████████▄ ████████████▄▄ ████▄███████████▄ ██████████████████▄ ░▄█████████████████▄ ▄███████████████████▄ █████████████████▀████ ██████████▀███████████ ▀█████████████████████ ░████████████████████▀ ░░▀█████████████████▀ ████▀▀██████████▀▀ | ████████ ██████████████ |
|
|
|
pbies (OP)
|
 |
July 22, 2025, 10:21:27 PM |
|
Seems like exactly what I am looking for. Will merit once I verify the script. In a post from some time ago I shared this script, I think, but I couldn't find the link. You just have to respect the structure and not include characters that aren't in base58. I did it as a mini brute force to cover the bytes destined for the checksum so I could include more vanity characters. What to put in goal/prefix variables? EDIT: it didn't found for me for few minutes (that's also too long). But this script works [ https://gist.github.com/dancodery/e26890a60cd676ca8ca3af8c247d0bb8 ]: #!/usr/bin/env python3
"""bitcoin-burn-address-generator.py: This script generates bitcoin coin burning addresses with a custom bitcoin address prefix. The symbols at the end of the burning btc address are made for checksum verification."""
__author__ = "Daniel Gockel" __website__ = "https://www.10xrecovery.org/"
import sys
from base58 import b58encode, b58decode from hashlib import sha256
base58_characters = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
bitcoin_address_prefix = "1XRecovery" # should start with 1..., Version prefix (hex) for Bitcoin Address is 0x00
if __name__ == "__main__": for char in bitcoin_address_prefix: if char not in base58_characters: sys.exit("Character '%s' is not a valid base58 character." % char)
address_length = len(bitcoin_address_prefix) if address_length < 34: bitcoin_address_prefix = bitcoin_address_prefix + ((34 - address_length) * "X") else: bitcoin_address_prefix = bitcoin_address_prefix[:34]
# bitcoin address will have 34 characters from now on
# decode address decoded_address = b58decode(bitcoin_address_prefix)[:-4] # cut 4 bytes for checksum at the end checksum = sha256(sha256(decoded_address).digest()).digest()[:4] print("Your Bitcoin burning address is: " + b58encode(decoded_address + checksum).decode("utf-8"))
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
iceland2k14
Member

Offline
Activity: 70
Merit: 86
|
Seems like yes, is there any python code to do that?
This library does not provide this function...
Why you said it. The library has already the wrapper defined for this purpose. You just need 2 lines of code in python3 for your purpose, nothing else. >>> import secp256k1 as ice >>> ice.create_burn_address('pbies', 'x') '1pbiesxxxxxxxxxxxxxxxxxxxxxyWyYH7' If you want to know the inside implementation of how it is done, then here is the defined function from the file secp256k1.py which is responsible. def create_burn_address(vanity = 'iceLand', filler = 'x'): # create_burn_address('ADayWiLLcomeWheniceLandisGoingToSoLvebitCoinPuzzLe', 'X') out = [] bs58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' for i in vanity: if i not in bs58: return "invalid char found in vanity --> : " + i vanity = [vanity[i:i+25] for i in range(0,len(vanity),25)] # For longer text make many address for t in vanity: s = t.ljust(30, filler) if t[0] == '1' else ('1'+t).ljust(30, filler) + '111' h = address_to_h160(s) out.append(hash_to_address(0, True, bytes.fromhex(h))) if len(out) == 1: return out[0] else: return out
|
|
|
|
mcdouglasx
|
 |
July 23, 2025, 08:02:41 AM |
|
Seems like exactly what I am looking for. Will merit once I verify the script. In a post from some time ago I shared this script, I think, but I couldn't find the link. You just have to respect the structure and not include characters that aren't in base58. I did it as a mini brute force to cover the bytes destined for the checksum so I could include more vanity characters. What to put in goal/prefix variables? EDIT: it didn't found for me for few minutes (that's also too long). goal = "1bitcointaLkforumburnLegacyaddress" prefix = "1BitcoinTALKforumBurnLegacyaddr" Basically, the prefix represents the minimum number of characters in the search target. And goal represents the ideal target. If it takes a while to find a string, your burnaddress probably covers too much space in the checksum, which will make it take longer to find the ideal checksum to complete your address. The normal thing to do is to leave a little space for the checksum by reducing the length of the prefix string to find it quickly.
|
▄▄█████████████████▄▄ ▄█████████████████████▄ ███▀▀█████▀▀░░▀▀███████ ███▄░░▀▀░░▄▄██▄░░██████ █████░░░████████░░█████ ████▌░▄░░█████▀░░██████ ███▌░▐█▌░░▀▀▀▀░░▄██████ ███░░▌██░░▄░░▄█████████ ███▌░▀▄▀░░█▄░░█████████ ████▄░░░▄███▄░░▀▀█▀▀███ ██████████████▄▄░░░▄███ ▀█████████████████████▀ ▀▀█████████████████▀▀ | Rainbet.com CRYPTO CASINO & SPORTSBOOK | | | █▄█▄█▄███████▄█▄█▄█ ███████████████████ ███████████████████ ███████████████████ █████▀█▀▀▄▄▄▀██████ █████▀▄▀████░██████ █████░██░█▀▄███████ ████▄▀▀▄▄▀███████ █████████▄▀▄███ █████████████████ ███████████████████ ███████████████████ ███████████████████ | | | |
▄█████████▄ █████████ ██ ▄▄█░▄░▄█▄░▄░█▄▄ ▀██░▐█████▌░██▀ ▄█▄░▀▀▀▀▀░▄█▄ ▀▀▀█▄▄░▄▄█▀▀▀ ▀█▀░▀█▀
| 10K WEEKLY RACE | | 100K MONTHLY RACE | | | ██
█████
| ███████▄█ ██████████▄ ████████████▄▄ ████▄███████████▄ ██████████████████▄ ░▄█████████████████▄ ▄███████████████████▄ █████████████████▀████ ██████████▀███████████ ▀█████████████████████ ░████████████████████▀ ░░▀█████████████████▀ ████▀▀██████████▀▀ | ████████ ██████████████ |
|
|
|
pbies (OP)
|
 |
July 23, 2025, 03:04:57 PM |
|
Seems like yes, is there any python code to do that?
This library does not provide this function...
Why you said it. The library has already the wrapper defined for this purpose. You just need 2 lines of code in python3 for your purpose, nothing else. >>> import secp256k1 as ice >>> ice.create_burn_address('pbies', 'x') '1pbiesxxxxxxxxxxxxxxxxxxxxxyWyYH7' If you want to know the inside implementation of how it is done, then here is the defined function from the file secp256k1.py which is responsible. def create_burn_address(vanity = 'iceLand', filler = 'x'): # create_burn_address('ADayWiLLcomeWheniceLandisGoingToSoLvebitCoinPuzzLe', 'X') out = [] bs58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' for i in vanity: if i not in bs58: return "invalid char found in vanity --> : " + i vanity = [vanity[i:i+25] for i in range(0,len(vanity),25)] # For longer text make many address for t in vanity: s = t.ljust(30, filler) if t[0] == '1' else ('1'+t).ljust(30, filler) + '111' h = address_to_h160(s) out.append(hash_to_address(0, True, bytes.fromhex(h))) if len(out) == 1: return out[0] else: return out I am getting: AttributeError: module 'secp256k1' has no attribute 'create_burn_address' Tried the same way you have posted here.
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
iceland2k14
Member

Offline
Activity: 70
Merit: 86
|
 |
July 24, 2025, 06:35:44 AM |
|
I am getting: AttributeError: module 'secp256k1' has no attribute 'create_burn_address' Tried the same way you have posted here. Steps: 1. Git clone or download this to any Folder in your pc. https://github.com/iceland2k14/secp256k12. cd to same folder and then run python commands or scripts you desire. That will work. The reason for failure is that you might have another library with the same name secp256k1 from some other repo.
|
|
|
|
pbies (OP)
|
 |
July 24, 2025, 11:17:23 PM |
|
I am getting: AttributeError: module 'secp256k1' has no attribute 'create_burn_address' Tried the same way you have posted here. Steps: 1. Git clone or download this to any Folder in your pc. https://github.com/iceland2k14/secp256k12. cd to same folder and then run python commands or scripts you desire. That will work. The reason for failure is that you might have another library with the same name secp256k1 from some other repo. Yep! It works! Thank you very much! #!/usr/bin/env python3
import secp256k1 as ice print(ice.create_burn_address('pbies', 'x'))
|
BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
|
|
|
|