Search content
Sort by

Showing 7 of 7 results by Yuri Samato
Post
Topic
Board Development & Technical Discussion
Re: Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 09/09/2024, 11:56:21 UTC

Even practically, generating a quantum-resistant Bitcoin address is feasible, though it requires significant effort. Quantum resistance involves using cryptographic methods that can withstand the capabilities of quantum computers. This typically requires employing advanced algorithms like hash-based signatures (e.g., XMSS) or lattice-based cryptography, which are not yet standard in current Bitcoin implementations. Developing and integrating these methods into Bitcoin's existing infrastructure involves complex technical challenges and rigorous testing to ensure they provide the same level of security and functionality as traditional cryptographic methods
Post
Topic
Board Development & Technical Discussion
Re: Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 09/09/2024, 11:05:16 UTC


1. That means you're suggesting people to install library not needed (pqcrypto) to run code you shared.
2. You say "Revealing part of the private key each time can make the system more secure as it limits the exposure of the full key".
3. Since we need to find different library which implement XMSS or implement by yourself, that means code you shared is useless.
4. Can you give us link to the ogs-python library?
5. Based on everything you said, you're not being helpful and could give confusion to beginner. So IMO nobody should make a donation to you.
[/quote]



  1. Regarding the pqcrypto library: You’re right. it wasn’t necessary for the code I shared. I included it thinking some might want to explore quantum-safe libraries, but it’s not required to run the script.


2. About revealing parts of the private key: I realize I didn’t explain this well. In XMSS, the key exposure is managed carefully, and it's secure if used correctly. The way it works is different from how we typically think about traditional keys, but it’s safe in this context.


3. On finding an XMSS library: The code was more of an educational example to show how you could build a quantum-resistant-like address, but I understand that it’s not practical without the right library.

4. Link to oqs-python: Sure, You can check out the oqs-python library .

https://github.com/open-quantum-safe/liboqs-python


5. Regarding donations: the goal here was more to explore and share what I’ve been learning
Post
Topic
Board Development & Technical Discussion
Re: Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 09/09/2024, 10:31:24 UTC


[/quote]
To be fair, I can't find this useful, so I'm not gonna donate. The safety of traditional Bitcoin address generation is already very high and we aren't under the threat of quantum attack. If anyone thinks they are vulnerable to quantum attack, they have to ask themselves, what will happen to all the created Bitcoin addresses? For example, Satoshi's addresses? Someone will hack it with a quantum computer and one million Bitcoin will be stolen? That's not going to happen. When the time comes and we will be under the threat of a quantum attack, there will be a Bitcoin Hard Fork and the new model of Bitcoin will be quantum attack resistant.
To my mind, right now, your code will only be useful for those who are studying programming.
[/quote]


quantum computers are closer than we think. With advancements happening quickly, it's only a matter of time before they become a reality. Once that happens, the current cryptographic methods, like those used in bitcoin could be vulnerable
Post
Topic
Board Development & Technical Discussion
Re: Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 09/09/2024, 10:21:28 UTC
1- Install Dependencies

Use Python's hashlib for hashing. Install additional libraries with:

pip install pqcrypto

Why bother mentioning install pqcrypto when your shared code never use that library?

you are right, I mentioned pqcrypto in the introduction but didn’t actually use it in the code. The idea was to suggest a quantum-safe library in case anyone wanted to expand the script or experiment with post-quantum cryptography. In this particular example, though, I only used hashlib and didn’t directly incorporate pqcrypto


4 - Signing Transactions

Use the private key to reveal specific parts of the key to sign transactions securely.

Do you imply that you need to reveal specific part of the public key? I can't imagine it's secure to be used many times.



I see how that could be confusing. what I meant is that in certain quantum-resistant algorithms like XMSS, you use different parts of the private key for each signature, which prevents it from being reused. Revealing part of the private key each time can make the system more secure as it limits the exposure of the full key, but it must be carefully managed to avoid compromising security.


Full Script for Generating a Quantum-Resistant-Like Address


this script demonstrates how to generate a quantum-resistant-like address using the XMSS (eXtended Merkle Signature Scheme). It illustrates key generation and address creation with quantum-safe principles, but it does not produce a standard Bitcoin address.



import hashlib
from xmss import XMSS

--snip--

How should we install this xmss library? I searched that library on https://pypi.org/search/?q=xmss, but there's no relevant result.


the specific xmss library I mentioned is not available on PyPI. sorry for the confusion. I shouldve clarified that you would need to use an XMSS implementation from either a cryptographic library that supports post-quantum algorithms (like oqs-python) or implement your own. I’ll update the post to reference a more accessible option for quantum-safe key generation


To my mind, right now, your code will only be useful for those who are studying programming.

IMO OP's code is too vague to be helpful for those who learn programming.
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 08/09/2024, 18:14:07 UTC
⭐ Merited by vapourminer (1)
Traditional Bitcoin addresses rely on elliptic curve cryptography, vulnerable to quantum attacks like Shor’s algorithm. To mitigate this, we use quantum-safe algorithms such as hash-based cryptography.


~snip~

If you find this useful, consider donating to support. Thanks!

bc1qv0nf3rp6ww5l4fck6rgrpqt4r0ler4pce63vs9

To be fair, I can't find this useful, so I'm not gonna donate. The safety of traditional Bitcoin address generation is already very high and we aren't under the threat of quantum attack. If anyone thinks they are vulnerable to quantum attack, they have to ask themselves, what will happen to all the created Bitcoin addresses? For example, Satoshi's addresses? Someone will hack it with a quantum computer and one million Bitcoin will be stolen? That's not going to happen. When the time comes and we will be under the threat of a quantum attack, there will be a Bitcoin Hard Fork and the new model of Bitcoin will be quantum attack resistant.
To my mind, right now, your code will only be useful for those who are studying programming.

I understand your point. Right now, traditional Bitcoin address generation is secure and quantum attacks aren't an immediate threat. My aim with this script is to explore and learn about quantum-resistant techniques in advance. While it might not be needed today, understanding these concepts now helps us prepare for future developments in cryptography. Thanks for sharing your perspective!
Post
Topic
Board Development & Technical Discussion
Re: Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 08/09/2024, 17:43:07 UTC
Full Script for Generating a Quantum-Resistant-Like Address


this script demonstrates how to generate a quantum-resistant-like address using the XMSS (eXtended Merkle Signature Scheme). It illustrates key generation and address creation with quantum-safe principles, but it does not produce a standard Bitcoin address.



import hashlib
from xmss import XMSS

# Initialize XMSS
def initialize_xmss():
    xmss = XMSS()
    return xmss

# Generate keys
def generate_keys(xmss):
    public_key, private_key = xmss.generate_keypair()
    return public_key, private_key

# Create a quantum-resistant-like address
def public_key_to_address(pub_key):
    sha256_pub_key = hashlib.sha256(pub_key).digest()
    ripemd160 = hashlib.new('ripemd160')
    ripemd160.update(sha256_pub_key)
    return ripemd160.hexdigest()

# Main function
def main():
    xmss = initialize_xmss()
    public_key, private_key = generate_keys(xmss)
   
    # Create a quantum-resistant-like address
    address = public_key_to_address(public_key)
   
    print(f'Quantum-Resistant-Like Address: {address}')

if __name__ == '__main__':
    main()
Post
Topic
Board Development & Technical Discussion
Topic OP
Quantum-Resistant Bitcoin Address Generator
by
Yuri Samato
on 08/09/2024, 17:24:58 UTC
Traditional Bitcoin addresses rely on elliptic curve cryptography, vulnerable to quantum attacks like Shor’s algorithm. To mitigate this, we use quantum-safe algorithms such as hash-based cryptography.


Steps to Create a Quantum-Resistant Address

1- Install Dependencies

Use Python's hashlib for hashing. Install additional libraries with:

pip install pqcrypto

2- Generate Quantum-Resistant Private/Public Key

Use Python to generate two sets of random private keys and their public key hashes:

import os, hashlib

def generate_private_key():
    priv_key_0 = [os.urandom(32) for _ in range(256)]
    priv_key_1 = [os.urandom(32) for _ in range(256)]
    return priv_key_0, priv_key_1

def generate_public_key(priv_key_0, priv_key_1):
    pub_key_0 = [hashlib.sha256(x).digest() for x in priv_key_0]
    pub_key_1 = [hashlib.sha256(x).digest() for x in priv_key_1]
    return pub_key_0, pub_key_1

3- Create Hash-Based Bitcoin-Like Address

Hash the public key with SHA-256 and RIPEMD-160 to generate an address:

def public_key_to_address(pub_key_0, pub_key_1):
    concatenated_pub_key = b''.join(pub_key_0 + pub_key_1)
    sha256_pub_key = hashlib.sha256(concatenated_pub_key).digest()
    ripemd160 = hashlib.new('ripemd160')
    ripemd160.update(sha256_pub_key)
    return ripemd160.hexdigest()

4 - Signing Transactions

Use the private key to reveal specific parts of the key to sign transactions securely.



If you find this useful, consider donating to support. Thanks!

bc1qv0nf3rp6ww5l4fck6rgrpqt4r0ler4pce63vs9