Crypto Tools

The following tools are open-source and BCA Ventures doesn’t accept any liability for users’ use of these tools, use at your own risk!

Crypto Multi-Account/Multi-Address Mnemonic Generation

Ian Coleman’s BIP39 tool is a serverless web app that works offline thanks to the app relying only on the code in the html page, and has been referenced by popular crypto hardware wallets such as Ledger.  Users can also take steps to take to ensure the version downloaded matches the source on Github. BCA Ventures hosts version 0.3.7 for educational purposes:

BIP 39 Tool version 0.3.7

Brainwallet for Bitcoin and Litecoin single-address generation

 

The Brain Wallet is not recommended [any longer] due to its lack of return ‘change’ address and should therefore NOT be used unless those risks are fully understood by its users as sending anything less than the entire balance will result in a permanent loss of the remaining balance which will be unable to return to the address. The Brain Wallet is hosted on BCA Ventures for educational purposes, and  is a deterministic method to generate a single crypto public/private key address pair, and while it may provide convenience, the tradeoff is potentially less security if weak passphrases and salts are chosen, in addition to the lack of change addresses outlined above.  For educational purposes, BCA Ventures hosts a copy version 1.1 and version 2.1.0 of the Brain Wallet developed by Daniel Routman. Like the BIP39 tool, these web-apps can work offline simply by downloading the single html file from the page (i.e. right click then ‘save link as’) from the links below.

Brain Wallet Version 1.1

Brain Wallet version 2.1.0

Multi-signature and encryption/decryption tools

 

Developed by Israeli cryptographer Adi Shamir, co-inventor of the popular RSA encryption algorithm, the Shamir Secret Sharing Scheme allows a user to break a plain text secret into various pieces of cipher text where the reconstruction of the plaintext can only be achieved when a minimum number of respective cipher text files are rejoined (i.e. 2 of 3, 3 of 5, 6 of 8). BCA Ventures hosts a copy of the Shamir Secret Sharing Scheme available as a web-app (can also work offline):

Shamir Secret Sharing Scheme

SHA3 code in Python3 and Keccak

Many computer programming languages provide cryptographic tools including hash algorithms such as the SHA3 hash algorithm, which has been accepted for use by NIST for US Government Federal agencies and is widely used on the internet in countless applications. Python 3, for example, requires just a line of code after importing the “math” and “hashlib” modules:

hashlib.sha3_256(str(answer).encode(‘utf-8’)).hexdigest()

However, while SHA3 was the successor to SHA2, after the finalist Keccak was chosen, the FIPS 202 standardization of SHA3 made small changes that have to do with padding suffixes (where bits of data are prepended), so that a string of data hashed with Keccak would produce a different digest than the same string hashed with SHA3,  given the same output length (i.e. 256 bits).

Many versions of Python implement the SHA3 standard, and not the non-FIPS version developed by the Keccak finalists. To execute Keccak in Python, the pysha3 library can be used, but must be installed separately if Keccak is not already listed in your Hashlib module (confirmed by running: “dir(hashlib)” to check).

Comparing the output of SHA3, Keccak, and SHA2

The following example shows how the same input, in this case an empty string (“”), will result in three different hash digests when using the respective Keccak, SHA3, and SHA2 hashing algorithms with a same-size output (256-bit output shown as 64 character hex digest) :

Random Number Generator code in Python3

Python also provides a cryptographically secure pseudo-random number generator thanks to its “secrets” module. Here below is an example using a range of up to 256-bit numbers:

secrets.randbelow(2**257-1)

A description of the SHA3 Keccak algorithm is depicted below, showing the compression function and sponge-like qualities where there is an absorption and squeezing phase as data is absorbed and then the squeeze phase provides the hashed data as the output:

While the Keccak algorithm is widely used for its cryptographic hash function, the squeezing phase can also be used as a Random Number Generator (RNG).

It’s worth noting that Pseudo-Random Number Generators (PRNGs) are also widely used in cryptography and with crypto assets, with the main difference being that the “pseudo” aspect exists as an initial seed value is required, and acts as the pre-image to the resulting deterministic random string generated (and thus is potentially susceptible to a pre-image attack as well as providing the user the ability to recover the output using the initial seed).

Below is a GIF image animation of the SHA256 algorithm, sourced and converted from a related Youtube:

SHA256 encryption algorithm animation on BCA Ventures

The above SHA256 animation highlights the hundreds of linear steps taken as the algorithm is compiled and run using visualized computer code animated on the right half of the above graphic, in order to produce a resulting hash digest of the word “password” (used as the input to hash) shown in the left side of the video.

The oneway-ness (trapdoor) quality of a hash function is largely due to the many XOR operations applied in conjunction with the rotation of 3 dimensional bit arrays,  as working backward from a hash digest output quickly leads one to a dead-end, as there is no way to compute the prior block states (unless the pre-image) is known. This difficulty is what makes it near impossible to reverse engineer a hash digest into its original pre-hashing state (despite all the forward steps being deterministic), other than by brute-forcing (guessing) all possible pre-images, which is not feasible either for pre-images that are of an arbitrary length that are sufficiently random in terms of entropy and thus cryptographically-secure.

Open Source

Much of the internet and many of the modern web applications and operating systems are open-source. Below is an example of how the Linux operating system has evolved over the last few decades, across various branches and distributions: