Bitcoin Forum
May 10, 2024, 04:06:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A Script To Generate BIP-85 Child Seeds?  (Read 156 times)
Meuserna (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 190


View Profile
September 28, 2023, 09:34:44 PM
Last edit: September 29, 2023, 08:35:36 AM by Meuserna
 #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.
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715313994
Hero Member
*
Offline Offline

Posts: 1715313994

View Profile Personal Message (Offline)

Ignore
1715313994
Reply with quote  #2

1715313994
Report to moderator
1715313994
Hero Member
*
Offline Offline

Posts: 1715313994

View Profile Personal Message (Offline)

Ignore
1715313994
Reply with quote  #2

1715313994
Report to moderator
blue Snow
Legendary
*
Offline Offline

Activity: 1498
Merit: 1026


#SWGT CERTIK Audited


View Profile WWW
September 29, 2023, 12:03:28 AM
 #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.

Meuserna (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 190


View Profile
September 29, 2023, 12:23:56 AM
 #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.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
September 29, 2023, 04:05:02 AM
 #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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
satscraper
Hero Member
*****
Offline Offline

Activity: 728
Merit: 1378


Cashback 15%


View Profile
September 29, 2023, 06:10:42 AM
Merited by pooya87 (2)
 #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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Meuserna (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 190


View Profile
September 29, 2023, 07: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
satscraper
Hero Member
*****
Offline Offline

Activity: 728
Merit: 1378


Cashback 15%


View Profile
September 29, 2023, 07: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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Meuserna (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 190


View Profile
September 29, 2023, 08: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.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
September 29, 2023, 12:21:01 PM
 #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).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
satscraper
Hero Member
*****
Offline Offline

Activity: 728
Merit: 1378


Cashback 15%


View Profile
September 29, 2023, 01:17:54 PM
Last edit: September 29, 2023, 01:42:59 PM by satscraper
 #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.



.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
NotATether
Legendary
*
Online Online

Activity: 1596
Merit: 6734


bitcoincleanup.com / bitmixlist.org


View Profile WWW
September 29, 2023, 03:18:41 PM
 #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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Meuserna (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 190


View Profile
September 29, 2023, 07: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).
satscraper
Hero Member
*****
Offline Offline

Activity: 728
Merit: 1378


Cashback 15%


View Profile
October 01, 2023, 06: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?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Meuserna (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 190


View Profile
October 01, 2023, 08: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.
garlonicon
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1932


View Profile
October 01, 2023, 03:06:59 PM
Merited by ABCbits (1)
 #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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!