-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bip85 passwords #1344
bip85 passwords #1344
Conversation
This needs to account for different password requirements. |
hi, can you elaborate? My thinking was |
Of course, I could write down a txt file saying But at that point, this is less useful than just writing down a randomly generated password. |
So, ie. instead of num_bytes, maybe use multiple variables
etc etc etc |
I would like to keep length requirements same as for hex 16-64 as I want this to generate strong passwords - on par with bitcoin security (min. cca 128bits) --> now I'm not sure if it is good idea to start generating passwords as your bank requires, between 40 -65bits of entropy, which seems to be low (on top for financial applications). Yet I know that there are lots of apps with "strange" password requirements out there. Thoughts ? |
|
REMAKE:
|
comment about Banks and other junk websites with silly password requirements:
|
above account is imo gone (rumor goes that he/she created it just for bip85 and no longer watch it or respond) |
Nevertheless, this cannot be merged without an ACK from that human. |
ACK |
Do we have any contingency plan in case "that human" is gone? (which seems to be the case) |
Make a new BIP. Many BIPs reference other BIPs. |
From BIP 2:
|
sent email with request to transfer ownership to bip editors and @ethankosakovsky |
I love the concept in general but the problem is there are a lot of strange password policies being enforced. Many don't calculate entropy correctly - for example, a long password a-zA-Z0-9 being considered unacceptable regardless of the because of no symbols. I have seen website enforcing upper, lower, numerals, and symbols and must be a specific length. So even with a 25 character password of a-zA-Z0-9. Would I be correct in assuming there no guarantee a password generated under this proposed method would be acceptable by all websites? How do you handle cases where password change policy is in effect forcing you to change your password every 90 days or whatever. Or if for any reason (like a breach) the website forces a password reset on everyone. I think it's a pity we're only generating passwords according to the base64 alphabet. It would seem more appropriate to use hex 0x20 (or maybe 0x21) until 0x7e which is the full range of ASCII roman letters, numerals and basic symbols. It would achieve a lot more entropy for shorter passwords as well. On a side note, I would like to comment that I think the speed at which you're proposing and implementing does not really allow for community input. From opening the PR to already having it implemented in 3rd party systems was just a matter of days. For the record, I felt extremely pressured in the beginning of BIP85 proposal. While it was wonderful to have the enthusiasm for the idea, some aspects were rushed in trying to avoid a split proposal/implementation (i.e. implemented differently in Coldcard vs the BIP). It really does take time to consider the cases, and for community input. I think there needs to be more evangelizing of the proposal to garner feedback - surely there are things that others might consider that we didn't. While BIP85 deliberated avoided inventing new cryptography by seeking to repurpose existing proven technology, the implementation and usecases could have done with a bit more polishing. Back to the proposal, there are other problems, in that some sites enforce restrictions on password length. This proposal really falls a bit short on these numerous cases. I also wonder if there shouldn't really be some form of salt involved, using the domain name as a DN of sorts. This might allow iterating when password changes are forced or required due to a breach on the provider's side. |
@ethankosakovsky welcome back! (sorry for pronouncing you gone) "lot of strange password policies being enforced" --> true and we will never make them all happy. We shouldn't some of them are pretty dumb. My bank for instance does not allow passwords longer than 20 characters (I wrote to them on multiple occasion but they just do not care) "Would I be correct in assuming there no guarantee a password generated under this proposed method would be acceptable by all websites?" --> same as above, we will never make them all happy "How do you handle cases where password change policy is in effect forcing you to change your password every 90 days or whatever. Or if for any reason (like a breach) the website forces a password reset on everyone." --> no strategy for that, I would just bump derivation index. Open to this "I also wonder if there shouldn't really be some form of salt involved, using the domain name as a DN of sorts. This might allow iterating when password changes are forced or required due to a breach on the provider's side." but think it really complicates the concept "I think it's a pity we're only generating passwords according to the base64 alphabet. It would seem more appropriate to use hex 0x20 (or maybe 0x21) until 0x7e which is the full range of ASCII roman letters, numerals and basic symbols. It would achieve a lot more entropy for shorter passwords as well." --> open to this, bas64 for chosen for its availability and I know that I want to generate long passwords so character set did not matter that much If we find better way of doing this - I will gladly submit PR to Coldcard, as feature there is very new and not heavily used. |
base85 would encode almost all the printable symbols and it's already part of base64 library in Python for example.
|
@scgbckbone Well I would suggest either adjusting this to use Base85, or if it's already deployed too widely, add a second program option with Base85 for the encoding. @luke-jr ACK |
I know above is not ideal (2 application numbers instead of just one and add another derivation path component {64,85}) but I do not want to "fork off" anyone already using this... |
ACK |
My concern about this proposal is the fact that BIP85 master seed is a highly-valuable information which has to be kept in the most secure way (since it assumed to derive all the rest seeds eveywhere). On the other hand, creating new passwords is a daily thing, and since it uses private key entropy it would require to keep the whole BIP85 seed as a hot wallet! So my proposal is to have a BP85 path to derive another "BIPXXX" seed, which must not be used for anything else than passwords derivation (according to the proposed specification in this PR) - and put it as an independent BIP. In this case we can easily keep the specific xpriv as a hot wallet, since it would not compromise anything else than a set of password. |
Hello everyone, FYI, there is a project that works the way @scgbckbone described I think: https://github.com/nelkor/passcryptum . Just as a reference. |
BIP-85 Passwords
Application number 707764' was chosen as follows:
b"pwd"
-->[112, 119, 100]
---to hex-->707764
+ make it hardened -->707764'
Rationale
Having ability to generate countless number of strong passwords from one seed (one seed to rule them all). Main intention is to generate very strong passwords for sensitive applications like encrypting of ssh keys, master password for password managers etc. Passwords are constrained by length. Min. 20 character and max. 86 character. Generated passwords have at least 120 and maximum of 516 bits of entropy. This is provably overkill for applications like Gmail or twitter but is not the intended use case anyway.
Passwords are generated by encoding whole 64 bytes of generated entropy and removing any spaces or new lines inserted by Base64 encoding process. Slice base64 result string
on index 0 to
pwd_len
. This slice is the resulting password. Aspwd_len
is limited to 86, passwords will not contain padding.Base64 is a great and well known candidate for password use case as it contains both lower/upper case characters, numbers and special characters
+
and/
.Constraints
pwd_length
min. 20 max. 86Changes:
Implementations: