Bitcoin Forum
June 19, 2024, 08:40:11 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Electrum / Re: Adding a seed phrase to your wallet on Electrum? on: June 05, 2024, 05:22:00 PM
Thank you.

Yes, i created my own Private, public key and seed phrase on my own with my own script.

But the option of just importing the seed phrase and Electrum makes it bech32 works for me.

I know Electrum is open-source but you would rely on the community to find something fishy in the code, you yourself won't go on each update and read the whole code of Electrum. That's why i wanted to create my own private key. Also, when using Electrum wallet to create your key, you are trusting their Entropy, which it can be VERY secure and everything. But i feel safer trusting my own entropy.
2  Bitcoin / Electrum / Adding a seed phrase to your wallet on Electrum? on: June 05, 2024, 04:45:50 PM
Hi, i have created my own private key, public key and seed phrase.

But i can't see the option to add a seed phrase to my private key.
When i created my wallet it asks you to set a type of address and the private key, i created a bech32 address with the private key successfully.

Is there a way to add my seed phrase to that private key?

If i start a new wallet and use the seed phrase i have instead, can i make it bech32?
3  Bitcoin / Bitcoin Discussion / Re: Mempool Observer Topic on: April 20, 2024, 01:17:08 AM
Yes, a bit worrisome if some entities get together to keep Bitcoin fees high for a period of time. Expensive, but possible.
4  Bitcoin / Bitcoin Discussion / Re: Mempool Observer Topic on: April 20, 2024, 01:01:54 AM

[/quote]

alot of people wanted to get their UTXO in block 840,000 so paid stupid fee's to outbid competition, not everyone could get in so some are getting their tx added in later blocks so expect the fee's to be high, out of stupid milestone notoriety hopes

we will see this wave of idiocy of 840k notoriety bidding war die down and then go back to the idiocy of the newest junk/scam spam of runes that replaced the brc ordinals scam spam
[/quote]

Thank you, i didn't understand why fees went up.
5  Economy / Service Discussion / Re: Best and cheap Non-KYC P2P for Bitcoin? on: March 23, 2024, 04:54:24 PM
I tried THORswap, they charge you $20 fee. So much for their advertisement of having native BTC.

If you're using Ethereum, then you're being charged Ethereum transaction fees (which are pretty high). You're going to get that high of a fee regardless of what smart contract you're going to use.


ETH? I was using Native Rune for Native BTC and the fee was $20 i also tried with BNB USDT on THORswap and the same thing.
6  Economy / Service Discussion / Re: Best and cheap Non-KYC P2P for Bitcoin? on: March 21, 2024, 09:10:14 PM
I tried THORswap, they charge you $20 fee. So much for their advertisement of having native BTC.

I tried recently on Localcoinswap they ended up charging $4. That's not P2P, they have a direct swap.
That's what i like about Localcoinswap, that you don't have to find someone that is offering the exact amount you want to buy (Most of them start at $200 minimum), you don't have to trust that they will send you the BTC and in many P2P cases they charge a premium.
7  Economy / Service Discussion / Re: Best and cheap Non-KYC P2P for Bitcoin? on: March 19, 2024, 05:38:18 PM
Thanks, i'll check them out.

Yes, i want some that allow stable coins for buying BTC, i have seen many that charge you a premium like %4 above BTC price, sometimes the minimum quantity to buy is too high and then the website itself charge you a high BTC fee to transfer to your BTC address.

Agoradesk seems good
8  Bitcoin / Development & Technical Discussion / I made my own code to Create your own Bitcoin address (Python) on: March 19, 2024, 02:34:27 AM
So, i haven't found many places online that provides you a way to create your own address.
We have https://www.bitaddress.org (They also have an offline use method) But it doesn't create a bech32 address (Which provides cheaper fees) and i'm not sure they allow you to generate a seed-phrase.

One of the reason as to why i wanted full control on my Bitcoin keys creation is because is hard to verify that non-custodial wallets really don't know your private keys. You would need to use a packet sniffer like Wireshark at the moment that you use your seed phrase to access your wallet to see what packets are sent to the wallet provider, and even then, it's hard to know what information is shared to them.
Of course, you might have to interact with a wallet software the moment you want to withdraw your coins, but creating your own valid address can be useful as paper wallet till then.

Another problem i wanted to address is "Entropy". One of the reasons they warn you to not create your own address is because your entropy method might be weak and could be hacked.

Now, i'm no expert at Bitcoin nor Python, so one of the purposes of sharing my code is also to hear feedback on vulnerabilities or inefficiencies it might have.
To execute this code i used Spyder with anaconda interpreter (Downloaded needed libraries through anaconda)

1) Create your own entropy

import hashlib
import os

def generate_entropy_from_input(user_input):
    salt = os.urandom(16)  # Generate a random salt
    encoded_input = user_input.encode('utf-8')
    sha512_hash = hashlib.sha512(salt + encoded_input).digest()  # Use a stronger hashing algorithm
    entropy = sha512_hash[:16]  # Adjust the length of entropy as per your requirements
    return entropy.hex()

user_variable = "test" #Choose your input here for entropy #IMPORTANT: erase your input after running the program
entropy_code = generate_entropy_from_input(user_variable)
print("Entropy Code:", entropy_code)


On the line "user_variable = "test" #Choose your input here for entropy #IMPORTANT: erase your input after running the program"
We can erase test and input whatever we want in there, you can roll your face over your keyboard, type a book story in different languages,etc and make sure it makes no sense in the end so no one can guess your entropy.

On top of that, i added random salting so each time you run this code, the entropy result code will be different even if the entropy is the same (This is to safe guard in case someone ends up saving the code file with the last entropy input they have used)

Now, when we ran that code, it gave us a result in hex that we can use on the next step.

2) Create your own Bitcoin address

import hashlib
import bip32utils
from mnemonic import Mnemonic
import bech32
import base58

# Input your entropy code
entropy_code = ""  # IMPORTANT: After running the program, erase your code
# Convert the entropy code to bytes
entropy = bytes.fromhex(entropy_code)

# Generate a BIP39 mnemonic phrase
mnemonic = Mnemonic("english")
words = mnemonic.to_mnemonic(entropy)  # 12-word phrase

# Derive a seed from the mnemonic phrase
seed = mnemonic.to_seed(words)

# Derive a master key from the seed
master_key = hashlib.pbkdf2_hmac('sha512', seed, b'mnemonic', 2048)

# Derive the private key from the master key
private_key = master_key[:32]

# Convert private key to WIF format
extended_private_key = b'\x80' + private_key + b'\x01'
checksum = hashlib.sha256(hashlib.sha256(extended_private_key).digest()).digest()[:4]
wif_private_key = base58.b58encode(extended_private_key + checksum).decode()

# Hash the private key
hashed_private_key = hashlib.sha256(private_key).digest()

# Apply RIPEMD-160 hash
ripemd160_hash = hashlib.new('ripemd160')
ripemd160_hash.update(hashed_private_key)
hashed_ripemd160 = ripemd160_hash.digest()

# Add a version byte
version_byte = b'\x00'
extended_hashed_ripemd160 = version_byte + hashed_ripemd160

# Calculate the checksum
checksum = hashlib.sha256(hashlib.sha256(extended_hashed_ripemd160).digest()).digest()[:4]

# Append the checksum
address_bytes = extended_hashed_ripemd160 + checksum

# Determine the appropriate values for hrp, witver, and witprog based on the address type
hrp = "bc"  # Human-readable part for Bitcoin mainnet addresses
witver = 0  # Witness version (0 for Pay-to-Witness-Public-Key-Hash addresses)
witprog = hashed_ripemd160  # Use the hashed RIPEMD-160 instead of address_bytes

# Generate the Bech32 public key
bech32_public_key = bech32.encode(hrp, witver, hashed_ripemd160)

# Print the Bitcoin private key (WIF format), checksum, Bech32 address, and Bech32 public key
print("Bitcoin Private Key (WIF format):", wif_private_key)
print("Bitcoin Private Key (Hexadecimal):", private_key.hex())
print("Checksum:", checksum.hex())
print("BIP39 Mnemonic Phrase:", words)
print("Bech32 Public Key:", bech32_public_key)
print("If your public key ends with a P, try to generate a new one")


Here, all you need to change is the entropy code required at the start, which is the entropy code we got when we ran the first code.

Your seed phrase will be generated from the words pool of "BIP39" which is the standard used for many wallets out there. I was tempted to create seed phrase with numbers and other languages, since that would make them less common, but some wallets require to import a seed phrase that uses BIP39

You can see what the results will be by checking all the "Print" output at the end.
Remember you might need to download the libraries onto your pc first. And this code should be ran with your Internet off

I hope this can be useful to someone and don't hesitate to tell me if my code has some issues or vulnerabilities

And, can you show me a modification to my code to create a Taproot address?

9  Economy / Service Discussion / Best and cheap Non-KYC P2P for Bitcoin? on: March 19, 2024, 01:57:37 AM
Hi,

So, it's been surprising and ironic how hard is to buy one of the first cryptocurrencies and the most known native "Bitcoin" with low fees and non-KYC

If you have a bech32 or taproot address, the transactions fees should be pretty cheap, they should be what you can see on https://mempool.space (Right now, low priority is around $1.80)
But many start at $4 if you are lucky and CEX go crazy to $15 or more

The best i could find non-kyc and the lowest fee has been https://localcoinswap.com when i tried it was $2.50 in March 2024 and you can buy directly on the website with USDT for example, it also allows you to designate the destination address, so you don't need to do a withdraw from the website after buying. They also have a P2P marketplace but people usually charge a premium over BTC price.

Also, it would be nice to find a P2P marketplace non-kyc that allows you to buy with a coin that the website controls. For example: We know that Bisq has their own coin that allows you to hold for lower fees when you use it, but you can't buy BTC with Bisq coin. If it did, you wouldn't need to trust the seller or use annoying P2P payment methods like Paypal, Zelle,etc. (I know Bisq doesn't do this because they want to be %100 decentralized and using Bisq would give them some power and centralized risks for the users).

Do you know any other Non-KYC marketplaces with low BTC fees?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!