From 04e6893562c081701cdba25375069704b943a49d Mon Sep 17 00:00:00 2001 From: meherett Date: Fri, 13 Oct 2023 07:15:32 +0300 Subject: [PATCH] Drop: index.html template file --- docs/index.html | 484 ------------------------------------------------ 1 file changed, 484 deletions(-) delete mode 100644 docs/index.html diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 45ea30b..0000000 --- a/docs/index.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - -Bitcoin Improvement Proposal 38 - - - -
-

Bitcoin Improvement Proposal 38

- -

Build Status PyPI Version Documentation Status PyPI License PyPI Python Version Coverage Status

-

BIP38 (Bitcoin Improvement Proposal 38) is a cryptographic standard that defines a method for encrypting and securing private keys associated with Bitcoin addresses. It provides a way to create encrypted versions of private keys, which can then be decrypted using a passphrase. This adds an additional layer of security to the process of storing and transmitting private keys.

-

By encrypting a private key with BIP38, users can protect their funds even if the encrypted private key is exposed. This is because an attacker would need to know the passphrase in order to decrypt the private key and gain access to the associated funds. BIP38 encryption is often used to create "paper wallets" or physical copies of Bitcoin private keys that can be stored offline for enhanced security.

-

For more info see the BIP38 specs.

-
-

Installing BIP38

-

The easiest way to install bip38 is via pip:

-
-pip install bip38
-
-

If you want to run the latest version of the code, you can install from git:

-
-pip install git+git://github.com/meherett/python-bip38.git
-
-

For the versions available, see the tags on this repository.

-
-
-

Quick Usage

-
-

No compression, no EC multiply:

-
-#!/usr/bin/env python3
-
-from bip38 import bip38_encrypt, bip38_decrypt
-
-import json
-
-wif: str = "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase="TestingOneTwoThree")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="TestingOneTwoThree"))
-
-wif: str = "5HtasZ6ofTHP6HCwTqTkLDuLQisYPah7aUnSKfC7h4hMUVw2gi5"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase="Satoshi")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="Satoshi", detail=False))
-
-wif: str = "5Jajm8eQ22H3pGWLEVCXyvND8dQZhiQhoLJNKjYXk9roUFTMSZ4"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase=u"\u03D2\u0301\u0000\U00010400\U0001F4A9")
-print(encrypted_wif, json.dumps(bip38_decrypt(encrypted_wif=encrypted_wif, passphrase=u"\u03D2\u0301\u0000\U00010400\U0001F4A9", detail=True), indent=4))
-
-
- Output
-6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg 5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR
-6PRNFFkZc2NZ6dJqFfhRoFNMR9Lnyj7dYGrzdgXXVMXcxoKTePPX1dWByq 5HtasZ6ofTHP6HCwTqTkLDuLQisYPah7aUnSKfC7h4hMUVw2gi5
-6PRW5o9FLp4gJDDVqJQKJFTpMvdsSGJxMYHtHaQBF3ooa8mwD69bapcDQn {
-     "wif": "5Jajm8eQ22H3pGWLEVCXyvND8dQZhiQhoLJNKjYXk9roUFTMSZ4",
-     "private_key": "64eeab5f9be2a01a8365a579511eb3373c87c40da6d2a25f05bda68fe077b66e",
-     "wif_type": "wif",
-     "public_key": "04b18e0ff1cbd907b45ad3d3df73fe637625435a5363fc1c7d26532e0642a5791dabbcefcb8145eeb4ca239649d15d3f8850ed2b3d37fadb6d69eb6f8d5e97a1b6",
-     "public_key_type": "uncompressed",
-     "address": "16ktGzmfrurhbhi6JGqsMWf7TyqK9HNAeF",
-     "lot": null,
-     "sequence": null
-}
-
-
-
-

Compression, no EC multiply:

-
-#!/usr/bin/env python3
-
-from bip38 import bip38_encrypt, bip38_decrypt
-
-wif: str = "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase="TestingOneTwoThree")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="TestingOneTwoThree"))
-
-wif: str = "KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7"
-encrypted_wif: str = bip38_encrypt(wif=wif", passphrase="Satoshi")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="Satoshi"))
-
-
- Output
-6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP
-6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7 KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7
-
-
-
-

EC multiply, no compression, no lot/sequence:

-
-#!/usr/bin/env python3
-
-from bip38 import intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt
-
-import json
-
-intermediate_passphrase: str = intermediate_code(
-    passphrase="meherett", lot=None, sequence=None
-)
-print("Intermediate Passphrase:", intermediate_passphrase)
-encrypted_wif: dict = create_new_encrypted_wif(
-    intermediate_passphrase=intermediate_passphrase, public_key_type="uncompressed", seed=SEED
-)
-print("Encrypted WIF:", json.dumps(encrypted_wif, indent=4))
-
-print("Confirm Code:", json.dumps(confirm_code(
-    passphrase="meherett", confirmation_code=encrypted_wif["confirmation_code"], detail=False
-), indent=4))
-
-print("BIP38 Decrypted:", json.dumps(bip38_decrypt(
-    encrypted_wif=encrypted_wif["encrypted_wif"], passphrase="meherett", detail=False
-), indent=4))
-
-
- Output
-6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP
-6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7 KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7
-
-
-
-
-

Development

-

We welcome pull requests. To get started, just fork this github repository, clone it locally, and run:

-
-$ pip install -e .[cli,tests,docs] -r requirements.txt
-
-
-
- -