-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Expand BIP85 to include ECC key types #1968
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
3728f8e
56a8de8
31eea92
9479612
729f412
86a64f1
04995e6
00a7583
b7756c9
c44de46
8b1397a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,36 +360,58 @@ OUTPUT | |
| * DERIVED ENTROPY=f7cfe56f63dca2490f65fcbf9ee63dcd85d18f751b6b5e1c1b8733af6459c904a75e82b4a22efff9b9e69de2144b293aa8714319a054b6cb55826a8e51425209 | ||
| * DERIVED PWD=_s`{TW89)i4` | ||
|
|
||
| ===RSA=== | ||
| ===GPG Keys=== | ||
|
|
||
| Application number: 828365' | ||
| Application number is dependant on the key type. | ||
|
||
|
|
||
| The derivation path format is: <code>m/83696968'/828365'/{key_bits}'/{key_index}'</code> | ||
| {| | ||
| !OpenGPG Key Type | ||
| !Application Number | ||
| |- | ||
| | RSA | ||
| | 828365' | ||
| |- | ||
| | ECC(Curve25519) | ||
| | 828366' | ||
| |- | ||
|
Comment on lines
+365
to
+378
|
||
| | ECC(secp256k1) | ||
| | 828367' | ||
| |- | ||
| | ECC(NIST) | ||
| | 828368' | ||
| |- | ||
| | ECC(Brainpool) | ||
| | 828369' | ||
| |- | ||
| |} | ||
|
|
||
| The RSA key generator should use BIP85-DRNG as the input RNG function. | ||
| The RSA key generator should use BIP85-DRNG as the input RNG function. Likewise, any ECC key types over 256bit should use BIP85-DRNG. | ||
3rdIteration marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ===RSA GPG=== | ||
| ====Primary Keys and Subkeys==== | ||
|
|
||
| Keys allocated for RSA-GPG purposes use the following scheme: | ||
| Keys allocated for GPG purposes use the following scheme: | ||
|
|
||
| - Main key <code>m/83696968'/828365'/{key_bits}'/{key_index}'</code> | ||
| - Sub keys: <code>m/83696968'/828365'/{key_bits}'/{key_index}'/{sub_key}'</code> | ||
| - Primary key <code>m/83696968'/{key_type}'/{key_bits}'/{key_index}'</code> | ||
|
||
| - Sub keys: <code>m/83696968'/{key_type}'/{key_bits}'/{key_index}'/{sub_key}'</code> | ||
|
|
||
| - key_index is the parent key for CERTIFY capability | ||
| - sub_key <code>0'</code> is used as the ENCRYPTION key | ||
| - sub_key <code>1'</code> is used as the AUTHENTICATION key | ||
| - sub_key <code>2'</code> is usually used as SIGNATURE key | ||
|
|
||
| Note on timestamps: | ||
| Additional subkeys can be added to a primary key, including keys of a different key type, following the role pattern defined above, but the key_index MUST be incremented with each subkey. | ||
3rdIteration marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <b>Note on timestamps:</b> | ||
|
|
||
| The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:05:05'</code> UTC) because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>). | ||
|
||
|
|
||
| Note on GPG key capabilities on smartcard/hardware devices: | ||
| <b>Note on GPG key capabilities on smartcard/hardware devices:</b> | ||
|
|
||
| GPG capable smart-cards SHOULD be loaded as follows: The encryption slot SHOULD be loaded with the ENCRYPTION capable key; the authentication slot SHOULD be loaded with the AUTHENTICATION capable key. The signature capable slot SHOULD be loaded with the SIGNATURE capable key. | ||
|
|
||
| However, depending on available slots on the smart-card, and preferred policy, the CERTIFY capable key MAY be flagged with CERTIFY and SIGNATURE capabilities and loaded into the SIGNATURE capable slot (for example where the smart-card has only three slots and the CERTIFY capability is required on the same card). In this case, the SIGNATURE capable sub-key would be disregarded because the CERTIFY capable key serves a dual purpose. | ||
|
|
||
|
|
||
3rdIteration marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ===DICE=== | ||
|
|
||
| Application number: 89101' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely need test vectors and expected outputs for all applications and sub applications. I can also add it to the reference implementation but won't be able to get to that right away. PRs welcome. https://github.com/akarve/bipsea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to work up some test vectors and a reference implementation once there is some agreement on a general direction :)