Creating a digital business can sound like something magic. In this post we demonstrate examples of digital businesses.
Table of contents
- What is a digital business
- What is a digital identity
- Example of source code to secure your digital business
Having said that, let’s dig in. These are the topics that will be discussed in this article:
What is a digital business?
Digital businesses use emerging technologies to create value. Blockchain is one of those digital technologies that enable faster customer experiences and drives new business models.
Some examples of digital businesses include: Netflix, Amazon, Facebook.
What is a digital identity?
Your online activity can be a part of your digital identity. This includes information relating to you, personally, or even relating to your daily online activities.
Examples of data that can be part of your digital identity include: Bank card details, your date of birth, your email address, your online purchase history, and so on.
Representing a digital identity
The digital business creation command makes use of BIP44 mnemonic phrases to map so-called digital identities to your business.
You can execute this command to create your own digital business, by typing this in your terminal: BlockSnippets MiniBusiness -n “Your Company Name”. It will ask you for a password, please do not forget this password.
Backup your digital business
After you run this command, you will find a new backup file inside the data/ folder. This file contains the backup of the digital identities. Provided you don’t lose your password (Please, don’t forget to backup your password.), you will always be able to use your digital business.
The created data/your-company-name.json file contains all the information necessary to manage your digital business on-chain. Please note that a production-ready implementation would not store any sensitive data inside such a JSON file.
For the sake of simplicity, we encrypt the mnemonic passphrase seed (BIP32) using AES encryption and your password. This keeps it somewhat safe, but must not be used in production.
Since we mentioned quite a few times that this is a simplistic showcase, and that it should not be used in production environment – it is probably fine for us to leave the encryption source code here, for you to reproduce and play with:
Example of source code to secure your digital business
* Part of BlockSnippets shared under LGPL-3.0
* Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom
// – Generates random salt and gets binary of password
const binarySalt = MnemonicPassPhrase.CATAPULT_RNG(16)
const binaryPw = Buffer.from(this.password, ‘utf8’)
// – From here on, always use salted password
//// Note: It is important to use the binary *plaintext* password here
const saltedPw = Buffer.concat([binarySalt, binaryPw])
// – Stores salt in hexadecimal format
this.salt = binarySalt.toString(‘hex’)
// – Generates a random mnemonic pass phrase (24-words)
const mnemonicWords = MnemonicPassPhrase.createRandom()
// – Uses salted plaintext password to encrypt mnemonic phrase
this.encryptedSeed = Crypto.encrypt(mnemonicWords.toSeed(
// – Saves password hash, never store in plain text
this.passwordHash = Buffer.from(sha256(saltedPw)).toString(‘hex’)
The above source generates a random salt that is used for AES encryption with our password. This step, while not mandatory, is important to make sure you don’t leave plaintext traces of sensitive information on any device.
The generated mnemonic phrase is a 24-words phrase that only contains words from the BIP44 words list. Read a detailed definition of this in “What is a mnemonic phrase?”, in our Dictionary.
Our digital business implementation makes use of accounts that are generated from the above mentioned 24-words passphrases. The reason behind this is that such 24-words phrases always create the same accounts.
Looking for a detailed technical description of BIP32, mnemonic phrases and “Multi-Account Hierarchy for Deterministic Wallet”?(2019) Grégory Saive: NIP-006 – Multi-Account Hierarchy for Deterministic Wallet
Now that you are familiar with digital businesses and digital identities, you can read on about how to use blockchain for your digital business.
We hope that this article was insightful for you and are looking forward to any feedback and messages. Please share your thoughts in the comments section below!
This website may contain information about financial firms, employees of such firms, and/or their products and services such as real estate, stocks, bonds, and other types of investments. While this website may intend - as the author deem necessary - to provide information on financial matters and investments, such information or references should not be construed or interpreted as investment advice or viewed as an endorsement.