I vote for: #85, #100, #43, #49, #50
|
|
|
69 - bestcoin_59 Thanks for the raffle:)
|
|
|
After some discussion with some other members, I have expanded the flags on the collectibles tracker by having a dedicated page for them: https://collectible.money/flaggedThis will list out scams, compromised, and lost/stolen items in a single place - hopefully, this also helps with search engine visibility so that someone who does come across a lost/stolen item has a higher chance of figuring it out. Previously, seeing a flag required you to visit the exact pages affected by that item/series - you had to know what you were looking for, which isn't great for people trying to get an overview of lost/stolen items or determine if the one they have is one of them by checking a list. As always, if you have any more items that should be marked as lost/stolen, drop me a PM or email and I'll take care of it. Hello, What a great idea. Would mind adding my stolen item? Thanks in advance:)
|
|
|
Just wondering; can someone explains why this # entropy from secrets import choice entropy = "" for _ in range(128): entropy += choice(['0','1']) print (entropy)
is bad...if it is...And why the code given by the others members are better (if they are). Thanks:)
|
|
|
12 wordsfrom secrets import token_hex, choice from hashlib import sha256, sha3_256, blake2b from ecdsa import SECP256k1, SigningKey
def read_wordlist(file_path): try: with open(file_path, "r") as bip39_wordlist_file: return bip39_wordlist_file.read().split('\n') except FileNotFoundError: print("Error: bip39_wordlist.txt not found.") exit(1)
def entropy_words(wordlist): random_words = [choice(wordlist) for _ in range(12)] phrase = ' '.join(random_words) hash_algorithms = [sha256, sha3_256, blake2b] chosen_hash = choice(hash_algorithms) salt = token_hex(16) phrase_hash = chosen_hash((phrase + salt).encode()).hexdigest() entropy_bits = bin(int(phrase_hash, 16))[2:].zfill(256) return entropy_bits
def random_point(): sk = SigningKey.generate(curve=SECP256k1) vk = sk.verifying_key point = vk.to_string().hex() hash_algorithms = [sha256, sha3_256, blake2b] chosen_hash = choice(hash_algorithms) salt = token_hex(16) point_hash = chosen_hash((point + salt).encode()).hexdigest() entropy_bits = bin(int(point_hash, 16))[2:].zfill(256) return entropy_bits
def generate_entropy(): entropy_sources = [ bin(int(token_hex(32), 16))[2:], entropy_words(bip39_wordlist), random_point() ] entropy = ''.join(entropy_sources) while len(entropy) < 256: entropy_sources = [ bin(int(token_hex(32), 16))[2:], entropy_words(bip39_wordlist), random_point() ] entropy += ''.join(entropy_sources) return entropy[-256:]
def checksum(entropy): hash_algorithms = [sha256, sha3_256, blake2b] chosen_hash = choice(hash_algorithms) salt = token_hex(16) sha256_hex = chosen_hash((bytes.fromhex(hex(int(entropy, 2))[2:].zfill(64)) + salt.encode())).hexdigest() sha256_bin = bin(int(sha256_hex, 16))[2:].zfill(256) return sha256_bin[0:8]
def generate_mnemonic(entropy, checksum, wordlist): final = entropy + checksum num_of_words = 12 word_length = len(final) // num_of_words res = [final[idx:idx + word_length] for idx in range(0, len(final), word_length)] mnemonic = [wordlist[int(binary_place, 2) % len(wordlist)] for binary_place in res] return mnemonic
def entropy_percentage(entropy): num_ones = entropy.count('1') return (num_ones / 256) * 100
bip39_wordlist = read_wordlist("bip39_wordlist.txt") entropy = generate_entropy() checksum = checksum(entropy) mnemonic = generate_mnemonic(entropy, checksum, bip39_wordlist) entropy_percentage = entropy_percentage(entropy)
print('---------') print('ENTROPY: ') print('---------') print(entropy)
print('\n-------------') print('BIP39 PHRASE: ') print('-------------') for w in range(0, len(mnemonic)): print(str(w+1) + ': ' + mnemonic[w])
print('\n-------------------') print('ENTROPY PERCENTAGE:') print('-------------------') print(f'{entropy_percentage:.2f}%')
Still, it looks as if given an entropy, the mnemonic generated doesn't match the one provided by Ian Coleman on his website...
|
|
|
It’s true, now the three of them combine.
Ok:)
|
|
|
Interesting code. You assume you have a better entropy source when you randomly choose one from three random entropy source. But is it really the case? Moreover, i don't get: choice(entropy_sources)
if you don't store the result of the function. Do you mean: entropy_sources=choice(entropy_sources)
Cheers
|
|
|
Hello, Thanks for the experimentation. Although it may not be a huge improvement, i think it might be more natural to replace: # entropy entropy = bin(int(token_hex(16), 16))[2:] while len(entropy) != 128: entropy = bin(int(token_hex(16), 16))[2:]
with # entropy entropy = "" for i in range(128): entropy += bin(int(token_hex(1), 16))[-1]
Cheers
|
|
|
winners: Lot 1 0.003BTC Lot 2 0.003BTC
Lot 3 .0035
@TaxAttorneyCPA unfortunately i could not follow the auction live, but why are there 2 bids in a row from you, was one of them deleted by another bidder? I thought i might have won since the bids placed after mine are illegals, and does not respect the rules.
|
|
|
69 - bestcoin_59
Thanks for the raffle.
|
|
|
|