Skip to content

Implement BIP-0085 #5

@watfordjc

Description

@watfordjc

Feature Branch

Current feature branch for this issue: bip0085.

Progress

  • Implement Base58 Encode/Decode.
  • Implement Base58Check Encode/Decode.
  • Implement BIP-0032.
  • Implement BIP-0085.
  • Create a derivative of BIP-0085 that uses SLIP-0021 derivation.
  • Create a method to allow destruction of entropy (and any chance of recovering a decryption key).

Background

The use of SLIP-0021 for key derivation was chosen because (a) SLIP-0021 is for symmetric keys, LTO drives use AES256-GCM, and AES is symmetric; (b) SLIP-0021 doesn't care how you get the secret to create node m, so I just went with BIP-0039; (c) it just uses HMAC-SHA2-512 to derive nodes.

Point (c) means that no elliptic curve cryptography has been involved in LTO-Encryption-Manager at this point- wrapping AES keys before sending them to an LTO drive involves encrypting the key to the drive's RSA-2048 public key.

However, I do want to implement BIP-0085 for deterministic entropy generation (e.g. using SHAKE256 for RSA keys), and that requires the implementation of BIP-0032 and EC crypto. I would also like to be able to deterministically generate crypto seeds/wallets/addresses for various reasons - bitcoin/litecoin/ethereum are probably what a thief would first be looking for, so transferring 0.1 LTC (currently about 5 GBP) to the first public address of m (Bitcoin seed) could act as a canary to warn that a BIP-0039 seed phrase may have been compromised.

I would also like to create a derivative of BIP-0085 that uses SLIP-0021 ASCII labels for nodes rather than BIP-0032 indexes. BIP-0085 tries to use the decimal equivalent of ASCII for its defined applications and even itself: everything BIP-0085 is under m/83696968H (a hardened node) with 83696968 being the decimal equivalent of ASCII SEED.

ASCII labels would make the requirement to note down what each index has been used for, so there could (for example) be a derivation path for generating TLS certificate keypairs where one of the node labels is the Common Name (CN) of the certificate. There is also the issue of key/entropy destruction that is not possible with increasing an index number that starts with zero and is an issue with SLIP-0021.

One of the advantages of using SLIP-0021 for LTO tape AES keys is that with the parameters needed to recreate the key stored in the cartridge memory (MAM) the only thing I need to keep a record of is the BIP-0039 seed phrase. One of the disadvantages is that there is no way to destroy data by deleting all copies of the keys because they can easily be re-derived.

Some things, like keys for TLS server certificates (Web sites, mail servers, etc.) might not need to be able to be destroyed because the biggest concern with them is that the private keys are somehow compromised. TLS connections negotiate a session key, and Perfect Forward Secrecy (PFS) means that if a server key is compromised past session keys should not be compromised.

Basically, I want the ability to deterministically create entropy/keys that can either (a) be destroyed, or (b) be easily recreated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions