encryption – Mnemonic Seed Phrase Generation For Private Key Truncation

The below code block is capable of generating a mnemonic seed phrase. If I want to generate a mnemonic seed for a private key, is it then correctly understood that I should input the private key as entropy factor, and how can I reverse engineer the private key knowing the mnemonic seed?

package main
    
    import (
        "fmt"
        "github.com/brianium/mnemonic"
        "github.com/brianium/mnemonic/entropy"
    )
    
    func main() {
        // generate some entropy from a hex string
        ent, _ := entropy.FromHex("8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0")
        
        // generate a Mnemonic in Japanese with the generated entropy
        jp, _ := mnemonic.New(ent, mnemonic.Japanese)
    
        // print the Mnemonic as a sentence
        fmt.Println(jp.Sentence())
    }

When importing a wallet from private key or seed phrase, how do you guess the correct address format

I am building a bitcoin wallet, i can derive addresses using the derivation paths. how do i determine the derivation path for the seed when importing it.

bitcoin core – How can I use my pass phrase from 2009 to recover my wallet?

I believe the only possible answer for this time (assuming you mean 2009, no wallets existed before then with recovery mnemonics) is that the wallet was blockchain.info. Different to now, at the time it used a “recovery mnemonic”, which was an encoding of your password rather than the keys in your wallet. Unfortunately if this is the case you need to also know either the ‘wallet identifier’ (looks like fbb4b1dd-1b30-4cc2-b745-b586e4f3cb57), or the original wallet.json.aes file.

security – Does mnemonic phrase contain everything in my wallet including future keys?

I am confused about something important …

Most wallets allow wallet recovery using “Mnemonic phrase”, but (in general) with this phrase, do I get access to all my data ? E.g future generated addresses that will hold my bitcoins ?

Another way to ask: is this the only thing I need to store or do I also need to export my actual wallet/keys when I generate a new address or receive new coins ?

I know each wallet works differently but I think this would be a general question.
If it matters, I noticed the Mnemonic feature on Electrum and Coinomi wallets.

Edit: how can Coinomi give me access to different coins using same mnemonic phrase ? Does this mean that it is more like a password to my data (data stored by them) and if their wallet service becomes unavailable I don’t really have access to any of my different coins ?

python – Exercism: determine if a word or phrase is an isogram

The task:

Determine if a word or phrase is an isogram.
An isogram (also known as a “nonpattern word”) is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.

Examples of isograms:

  • lumberjacks
  • background
  • downstream
  • six-year-old

The word isograms, however, is not an isogram, because the s repeats.

Even though I’m aware that questions about isograms have already been posted, in this variation of the problem spaces and hyphens are allowed to appear multiple times so that you can not use a solution such as len(string) == len(set(string))

What bothers me about my solution is hardcoding bounds of ascii character ranges and using collections library for such a small problem. I’m wondering if there is a better way to do it.

Here is my code:

from collections import Counter

ASCII_LOWER_BOUND = 97
ASCII_UPPER_BOUND = 123

def is_isogram(string):
    char_counts = Counter(string.lower())
    return all(
        char_counts(char) == 1 
        for char in char_counts 
        if ord(char) in range(ASCII_LOWER_BOUND, ASCII_UPPER_BOUND + 1)
        )

And a test suite provided by exercism:

import unittest

from isogram import is_isogram

# Tests adapted from `problem-specifications//canonical-data.json` @ v1.7.0


class IsogramTest(unittest.TestCase):
    def test_empty_string(self):
        self.assertIs(is_isogram(""), True)

    def test_isogram_with_only_lower_case_characters(self):
        self.assertIs(is_isogram("isogram"), True)

    def test_word_with_one_duplicated_character(self):
        self.assertIs(is_isogram("eleven"), False)

    def test_word_with_one_duplicated_character_from_the_end_of_the_alphabet(self):
        self.assertIs(is_isogram("zzyzx"), False)

    def test_longest_reported_english_isogram(self):
        self.assertIs(is_isogram("subdermatoglyphic"), True)

    def test_word_with_duplicated_character_in_mixed_case(self):
        self.assertIs(is_isogram("Alphabet"), False)

    def test_word_with_duplicated_character_in_mixed_case_lowercase_first(self):
        self.assertIs(is_isogram("alphAbet"), False)

    def test_hypothetical_isogrammic_word_with_hyphen(self):
        self.assertIs(is_isogram("thumbscrew-japingly"), True)

    def test_hypothetical_word_with_duplicated_character_following_hyphen(self):
        self.assertIs(is_isogram("thumbscrew-jappingly"), False)

    def test_isogram_with_duplicated_hyphen(self):
        self.assertIs(is_isogram("six-year-old"), True)

    def test_made_up_name_that_is_an_isogram(self):
        self.assertIs(is_isogram("Emily Jung Schwartzkopf"), True)

    def test_duplicated_character_in_the_middle(self):
        self.assertIs(is_isogram("accentor"), False)

    def test_same_first_and_last_characters(self):
        self.assertIs(is_isogram("angola"), False)


if __name__ == "__main__":
    unittest.main()
```

dnd 5e – Are there any official rules for the exact meaning of the phrase “when the target willingly moves” in Booming Blade?

The Booming Blade cantrip’s secondary effect states that “(the target) becomes sheathed in booming energy until the start of your next turn. If the target willingly moves before then, it immediately takes 1d8 thunder damage, and the spell ends”. We can deduce, then:

  • That the damage does not trigger when the target is dragged or pushed around via physical means (grappling, shoving, scenario effects, etc.)
  • That the damage does not trigger when the target is dragged or pushed around via magical means (Gust, Eldritch Blast with Grasp of Hadar, Graviturgist’s Gravity Well, etc.)

This seems pretty clear. However, what happens when the following cases arise?

  • The target is ordered to move via the use of Command (assuming they don’t know yet that the thunderous aura is damaging).
  • The target is forced to move via the use of Compulsion.
  • The target is invited to move via the use of Suggestion.
  • The target is Turned.
  • The target is Frightened and forced to run via Dissonant Whispers.
  • The target has a Geas that prohibits them from ending a turn next to an enemy if they can avoid it.
  • The target is threatened into leaving the area or else. This one seems “willingly”, but are they truly willing if they are panicking because you are telling them you will cut their heads off if they don’t run?

This tweet seems to suggest that forcing people to move via mind control spells doesn’t count as willing. However, after the release of the 2019 Sage Advice Compendium, Jeremy Crawford’s Twitter rulings are no longer considered official, so I was looking for something more solid to make a RAW judgement of this interaction.

Is a ‘seed phrase’ independent of the type of wallet?

I have had a few things happen on my PC and for the moment can’t directly call up my bitcoin in its old wallet. There are files from various wallets sitting in my home directory but before I try to get a wallet program to retrieve from them, will find a piece of paper where I wrote a seed phrase.

The question is, can this seed phrase be entered into any wallet, whether it is Armory, Electrum, Wasabi, Bither to get the bitcoin back, or must I be careful to install exactly the same wallet which gave me the seed phrase in the first place?

Do right-wingers really think the phrase “Black Lives Matter” actually means “ONLY Black Lives Matter” or do they only pretend to think that?

i assume they take thingsat face value, kinda¬† makes you wonder why theres a need to distinguish the race andask the questions “well how is it thats making a distinction based on color?” “why would they do that?” “whats the motive behind making a distinction based on color?” sounds kind of racist dont ya think?

Generate multiple public bitcoin receiving addresses (HD wallet) from seed phrase in nodejs

I want to generate a new receiving address for my bitcoin wallet for each new user. Bitcoin transferred to all these address should be received in my bitcoin wallet. I don’t want to expose my private key or seed on the server.I found that this is how HD wallets work so I tried this.

const bip39 = require('bip39')
const bitcoin = require('bitcoinjs-lib')   //ver 3.0.2

let phrase = 'width humor wheat sad obscure outer ancient grab edit labor record express devote humble recipe occur refuse tooth original fluid learn scheme fuel assault';
let seedBuffer = bip39.mnemonicToSeedSync(phrase)
// <Buffer 85 19 18 81 cf 0e cc f7 9c 5d 61 ......

let masterNode = bitcoin.HDNode.fromSeedBuffer(seedBuffer)
// Deriving the first account based on BIP44
let account0 = masterNode.derivePath("m/44'/0'/0'")

let xpubString = account0.neutered().toBase58()
console.log(xpubString)
let address0FromXpub = bitcoin.HDNode.fromBase58(xpubString)


let address0 = address0FromXpub.derivePath("0/0").keyPair.getAddress()
let address1 = address0FromXpub.derivePath("0/1").keyPair.getAddress()
let address2 = address0FromXpub.derivePath("0/2").keyPair.getAddress()
let address3 = address0FromXpub.derivePath("0/3").keyPair.getAddress()
// address0.toBase58()
console.log("address0",address0)
console.log("address1",address1)
console.log("address2",address2)
console.log("address3",address3)

but I tried sending bitcoin to the generated address and didn’t received any? If anyone could help.

language barrier – Planning to travel to South Korea for voice surgery, do you know of any good phrase cards?

So, once this COVID-19 situation dies down, I’m hoping to travel to South Korea to get voice surgery. Now, I remember hearing of these laminated cards that you could use to point to a phrase or something in order to help communicate. Do you know what these are called? (I called it a phrase card in the title of this post, but since NOTHING is coming up when I look for Korean phrase cards, I’m thinking it might be called something else). It might look something like this (but include a bit more information):

A picture of a page including phrases in English and Korean. On this particular page, it is a picture of phrases to use at restaurants and at the airport