Author

Topic: A Script To Generate BIP-85 Child Seeds? (Read 160 times)

copper member
Activity: 821
Merit: 1992
October 01, 2023, 10:06:59 AM
#15
Quote
I was thinking about this for a very specific project, not for passwords overall.
This sounds like an XY problem. In general, the problems you have, should guide you to the solutions. Which means, if you say "I need X, but I really want it to do Y", then maybe your "Y" will require something completely different in the end? Some video about passwords: https://www.youtube.com/watch?v=qgpsIBLvrGY

As you can see, each next step is reached by analyzing weaknesses of the previous solution. Which means, you should first reveal, what do you really want, if you want to get a solution, that is good enough for your specific problem.
full member
Activity: 128
Merit: 190
October 01, 2023, 03:32:39 AM
#14
Interesting decision from your part.

My Mac mini is old enough, thus, I didn't turn it on for a quite lengthy period, but despite of that, I recollect that there  are plenty of  good password managers for OS X that have build-in password generators.

Why don't use one of them?

I do.  I use 1Password.

I was thinking about this for a very specific project, not for passwords overall.
hero member
Activity: 714
Merit: 1298
October 01, 2023, 01:29:46 AM
#13
I'm not responsible for damage or theft (if any happen)  to your fund caused by code.

I made it clear in the original post that this isn't for Bitcoin.  I'll be using it on a Mac as a password generator (using passphrases instead of passwords, actually).

Interesting decision from your part.

My Mac mini is old enough, thus, I didn't turn it on for a quite lengthy period, but despite of that, I recollect that there  are plenty of  good password managers for OS X that have build-in password generators.

Why don't use one of them?
full member
Activity: 128
Merit: 190
September 29, 2023, 02:31:08 PM
#12
I'm not responsible for damage or theft (if any happen)  to your fund caused by code.

I made it clear in the original post that this isn't for Bitcoin.  I'll be using it on a Mac as a password generator (using passphrases instead of passwords, actually).
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
September 29, 2023, 10:18:41 AM
#11
There are a few reference implementations in different languages which you can check out for a solution:

Here is the list from the official BIP-85 page.

Quote
Reference Implementation
Python library implementation: https://github.com/ethankosakovsky/bip85
JavaScript library implementation: https://github.com/hoganri/bip85-js
Other Implementations
JavaScript library implementation: https://github.com/hoganri/bip85-js
Coldcard Firmware: Coldcard/firmware#39
Ian Coleman's Mnemonic Code Converter: https://github.com/iancoleman/bip39 and https://iancoleman.io/bip39/
AirGap Vault: https://github.com/airgap-it/airgap-vault/commit/d64332fc2f332be622a1229acb27f621e23774d6
btc_hd_wallet: https://github.com/scgbckbone/btc-hd-wallet

The reference implementations are checked for as many bugs and vulnerabilities as possible before they are included in the list here. So they should be pretty reliable and additionally you can simply automate one of them in your favorite programming language to make those child keys that you want.
hero member
Activity: 714
Merit: 1298
September 29, 2023, 08:17:54 AM
#10
But to generate  parent SEED you need  a reliable source of entropy  otherwise your child seeds will be under potential thread of  forced entry. The sources of entropy in ColdCard MK4 and Passport are quite sustainable. Passport 2, for instance, uses Avalanche diode for  ADC feeding to get random number used to generate parent SEED.

I already have a hardware wallet to generate a parent seed.  I'm strictly looking for a script to generate child seeds from an existing parent seed so the process can be automated.

In this case you can try this code using solely  `fromMnemonic` method  and commenting all other methods used  to instantiate the `BIP85` class  by putting  /*  at their  start  and   */  at the end.




Use your own SEED instead of  that string ('install scatter logic circle pencil average fall shoe quantum disease suspect usage') shown in example.

Disclaimer: I didn't check this code. Use it at your own risk. I'm not responsible for damage or theft (if any happen)  to your fund caused by code.


legendary
Activity: 3472
Merit: 10611
September 29, 2023, 07:21:01 AM
#9
Quick search resulted in at least two instances of JavaScript  implementation of BIP 85 (https://github.com/AndreasGassmann/bip85  and https://github.com/hoganri/bip85-js)
You should personally review the code you find by searching otherwise it may contain bugs specially in less popular projects. Otherwise stick to popular code like like Iancoleman source code or look at the BIP page itself, they almost always have a couple of "reference implementations" listed there that are more reliable than something you can find through quick search. Link to BIP-85 page (the second link you posted can also be found here).
full member
Activity: 128
Merit: 190
September 29, 2023, 03:27:20 AM
#8
But to generate  parent SEED you need  a reliable source of entropy  otherwise your child seeds will be under potential thread of  forced entry. The sources of entropy in ColdCard MK4 and Passport are quite sustainable. Passport 2, for instance, uses Avalanche diode for  ADC feeding to get random number used to generate parent SEED.

I already have a hardware wallet to generate a parent seed.  I'm strictly looking for a script to generate child seeds from an existing parent seed so the process can be automated.
hero member
Activity: 714
Merit: 1298
September 29, 2023, 02:48:56 AM
#7
Quick search resulted in at least two instances of JavaScript  implementation of BIP 85 (https://github.com/AndreasGassmann/bip85  and https://github.com/hoganri/bip85-js) but I'm not sure if both have the practical use due to my doubts in the source of entropy chosen.  Better to use hardware device like ColdCard MK4 or Passport 2 fo generate the child seeds  IMHO.

Unless I'm misunderstanding...  entropy shouldn't be a factor for BIP-85.  BIP-85 doesn't generate random seeds.  It generates child seeds from an existing parent seed.  And just as a seed will always generate the same addresses, a seed will always generate the same BIP-85 child seeds.



But to generate  parent SEED you need  a reliable source of entropy  otherwise your child seeds will be under potential thread of  forced entry. The sources of entropy in ColdCard MK4 and Passport are quite sustainable. Passport 2, for instance, uses Avalanche diode for  ADC feeding to get random number used to generate parent SEED.
full member
Activity: 128
Merit: 190
September 29, 2023, 02:16:15 AM
#6
Quick search resulted in at least two instances of JavaScript  implementation of BIP 85 (https://github.com/AndreasGassmann/bip85  and https://github.com/hoganri/bip85-js) but I'm not sure if both have the practical use due to my doubts in the source of entropy chosen.  Better to use hardware device like ColdCard MK4 or Passport 2 fo generate the child seeds  IMHO.

Unless I'm misunderstanding...  entropy shouldn't be a factor for BIP-85.  BIP-85 doesn't generate random seeds.  It generates child seeds from an existing parent seed.  And just as a seed will always generate the same addresses, a seed will always generate the same BIP-85 child seeds.

For example, here's a 12 word seed:
future bundle unaware chase appear barrel omit lyrics ill tank own come

Using that as a parent seed: BIP-85 index #747 for that seed will always generate this 12 word child seed:
defy remove border figure island source frog smile puzzle wedding already mansion

...and this 24 word seed:
return blue online number similar parrot ring trust column marine oil velvet naive tackle parade fresh blast donor south scale sausage soldier quit nut
hero member
Activity: 714
Merit: 1298
September 29, 2023, 01:10:42 AM
#5
I'm just hoping to automate generation of BIP-85 child seeds with a script for fast access.
Since BIP-85 is not popular and what you want to use it for is not used by others, the "script" you are looking for probably doesn't exist either. You should write it yourself by using the existing code in Iancoleman repository for instance.

Quick search resulted in at least two instances of JavaScript  implementation of BIP 85 (https://github.com/AndreasGassmann/bip85  and https://github.com/hoganri/bip85-js) but I'm not sure if both have the practical use due to my doubts in the source of entropy chosen.  Better to use hardware device like ColdCard MK4 or Passport 2 fo generate the child seeds  IMHO.
legendary
Activity: 3472
Merit: 10611
September 28, 2023, 11:05:02 PM
#4
I'm just hoping to automate generation of BIP-85 child seeds with a script for fast access.
Since BIP-85 is not popular and what you want to use it for is not used by others, the "script" you are looking for probably doesn't exist either. You should write it yourself by using the existing code in Iancoleman repository for instance.
full member
Activity: 128
Merit: 190
September 28, 2023, 07:23:56 PM
#3
Yeah, I'm aware of Ian Coleman's site.  It's excellent.  I'm just hoping to automate generation of BIP-85 child seeds with a script for fast access.
legendary
Activity: 1526
Merit: 1032
Up to 300% + 200 FS deposit bonuses
September 28, 2023, 07:03:28 PM
#2
I just look that BIP-85 on https://iancoleman.io/bip39/
So when I ticked that, the site show me BIP85 Child Key like picture below (this just exaple with 0 btc)



I created that BIP-85 key using 12 BIP 39 mnemonic seed : amazing turkey audit dance swap during mandate helmet ethics sniff answer gaze

That BIP-85 word : survey busy boss trend only space weird ribbon square prefer sort pistol worked perfectly when I put it on BIP 39 mnemonic seed.
full member
Activity: 128
Merit: 190
September 28, 2023, 04:34:44 PM
#1
Writing a script to generate BIP-85 child seeds is beyond my abilities.  Does one already exist?  I'd like to run the script on a Mac to generate passphrases for securing specific encrypted files (disk images, for example).

My basic idea is this:  I'd use a short BIP-39 seed phrase on my Mac as a master key (or parent seed) for generating passphrases instead of passwords for encrypted files, using BIP-85 child seeds.  I want to be clear here, I won't be using this seed or the child seeds for storing Bitcoin.  I just love the idea that a BIP-39 seed can generate millions of BIP-85 child seeds based on index numbers, which means if you remember a master seed phrase, you have access to millions of child seeds based on an index number.

BIP-85 such a brilliant system that could be useful for generating passphrases to better secure files.

EDIT: I probably should have added...  In a perfect world, the script would ask to input two things: the BIP-39 seed phrase and the BIP-85 index number.  Also, I'm not looking for help creating a parent seed.  I have hardware wallets that can easily do that.
Jump to: