Crypto Assets Custody and Multi Party Computation

Like the internet made publishing a level playing field by enabling individuals with the ability to publish for masses as major publishers did, crypto assets is enabling a paradigm shift in the ownership of digital assets. Crypto assets enable an individual to control and secure their assets without relying on a bank to do the same. When you hear the phrase ‘Be your own bank’ in the context of crypto, what the crypto proponents really mean is that crypto enables you to secure and own our digital assets without outsourcing that task to a bank or a trusted third party. This is in contrast to owning traditional financial assets such as stocks or bonds where even though you are the owner of the assets on paper, they simply reside as entries on the ledger of a trusted third party such as a bank or a custodian. So how can a common man safe guard their crypto assets with security that rivals the security offered by the custodian banks? This powerful asymmetric security in the hands of an individual is made possible by a neat technique in cryptography called Elliptic Curve Cryptography.

An Intuitive Explanation of Elliptic Curve Cryptography (ECC)

Elliptic Curve Cryptography (ECC) is one of the most powerful and advanced form of modern public key cryptography. Public key cryptography is based on the idea that the key that you use to encrypt the data can be made public while the key that you use to decrypt the data needs to be private. A public and private key is generated as a pair with an algorithm binding the two. One key property of the algorithms that make public key cryptography work is that they are easy to compute in one direction but extremely difficult to compute the other way. Algorithms that share this property are called trap-door functions. They are alike one-way doors – easy to enter but extremely hard to exit. For example, RSA, one of the first generation public key cryptography, is based on the idea that it is easy to multiply two prime numbers into a large number but given only the same large number, it takes very long to find its prime factors, even for a computer. Let’s make it concrete by taking an example and labelling the numbers accordingly.

Public key: 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139

Private key: 37975227936943673922808872755445627854565536638199 and 40094690950920881030683735292761468389214899724061

In the above example, the public key is a very large number and the private key is the prime factors of the public key. It is very easy to multiply the numbers in the private key to get the public key but if all you have is the public key, it takes very long to find the private key. For all its merits, RSA algorithm is not future proof. Specialised algorithms developed since have been effective at solving prime factorisation moderately faster that pushed the cryptographers to build a better trapdoor function. ECC does just that.

An elliptic curve is a set of points that satisfy a mathematical equation and looks as follows:

A useful analogy to understand the ECC algorithm is to imagine a game of pool. A pool player can begin hitting the ball from the initial position and then continue hitting the ball a number of times to reach a final position. Now if you only know the initial and the final position of the ball, it is almost impossible to figure out how many times the player hit the ball to reach the final position.

Similarly, let’s imagine the movement of a point through an elliptic curve as shown above. We start with a certain point on the curve. To move to the next point, we use a function. We use the function repeatedly to move from one point to the other until we reach the final point. This is a great trapdoor function because known the starting point (A) and the number of times the point moved across the curve to get to the final point (E) along with the function used to find successive points, it is very easy to find the end point. On the other hand, if all you know is the starting point and the ending point, it is almost impossible to figure out how many hops it took to get there. This is why ECC algorithms are a great candidate for a trapdoor.

Once you generate a public key/private key pair locally on your device, then you can share your public key to receive crypto assets much like you share your email address and keep the private key securely much like a password. Except that lost passwords can be reset using your email address but lost private keys cuts you off from accessing your crypto assets. The flip side is that it is almost impossible for a malicious actor to figure out your private key from the public key since it is generated through the ECC trapdoor.

Securing crypto assets is just one of the applications of ECC though. It is a multi purpose technology that can be used in the secure transfer of data anywhere. In fact, that last encrypted message that you sent from Signal/Whatsapp used ECC for sure.

Crypto wallets

Crypto wallets are nothing but a piece of software that can generate and securely store private and public key pairs. Unlike conventional wallets like AliPay or PayPal that hold the balance of fiat money themselves, crypto wallets store only your cryptographic keys (private and public keys) and there are no coins or cash in your crypto wallet. Depending on how and where they store the keys , crypto wallets are classified into hot, cold and hardware wallets . Hot wallets are online wallets that are much easier to use but are prone to hacks since they are always online. Cold wallets are a broad category of wallets where you keep your private keys offline by writing them down on a paper, engrave them on a metal plate or store on a device that is completely offline. They are much more secure than hot wallets but are often not so easy to use given they are stored offline. Hardware wallets are devices that resemble a USB drive and is designed with a single purpose; store your private keys offline in a digital format while letting you plug it in to a computer when needed. Hardware wallets strike a balance between security and ease of use compared to hot and cold wallets.

Single point of Failure

While ECC is so powerful that nothing less than a futuristic quantum computer can break the underlying cryptography, the biggest risk with an individual being their own bank is that there is a single point of failure. If you lose your private keys, then there is no way for you to access your crypto assets. In addition, self custody of crypto assets makes you the target of attacks too. For instance, there are $5 wrench attacks on the rise. A wrench attack is when a malicious actor finds out that you have a lot of crypto and physically attacks or threatens you for your private keys. It doesn’t help the fact that crypto assets are unregulated in most jurisdictions and it doesn’t have any consumer or investor protection in the form of insurance (similar to the likes of FDIC or SIPC) to cover you in the case of loss of assets. While being your bank sounds lofty and appealing, the underlying risks it poses to an individual needs to be considered. On the other hand, the risks at the economy level are minimized compared to a centralised system that concentrates risks of everyone and gets hacked – think of the Equifax data breach. There are two developments in crypto assets custody that mitigates the risk of a ‘single point of failure’ mentioned above; Multi signature and Multi Party Computation

Multi signature

Multi signature wallets mitigate the risk of a single point of failure by designating multiple signatories to control the crypto assets in a single public key. This is more applicable and relevant in an organization where it enables multiple parties to be in charge of assets instead of a single individual. Each signatory will have their unique private key and in order to spend the crypto assets, it can be configured that atleast M number of signatories out of a total N number of designated signatories have to approve a transaction. While the M-of-N multi signature model eliminates single point of failure, the drawback is that the wallet configuration is fixed and inflexible. The threshold number of signatories, M, cannot be changed and if the organization grow or team members leave or join the firm, it will be necessary to create a new wallet and inform your counter parties of the new wallet to prevent the assets being sent to your old address.

Multi Party Computation (MPC)

MPC is one of the most exciting developments in the digital assets custody space as it not only solves for ‘single point of failure’ but also applies to individuals and organizations alike. While multi signature creates separate unique private key for each signatory, MPC splits a single private key in to multiple ‘key shares’. Each key share is independently held by a single device (ie. party) without revealing it to each other. When it is time to sign a transaction, the MPC process is triggered where each key share is recombined to sign the transaction. With MPC, you can have a key share on your desktop while keeping another key share on your mobile device, somewhat similar to 2FA, thereby eliminating the risk of a single point of failure. MPC is already getting popular in the institutional custody space and it won’t be too long before it becomes the popular choice of self custody for individuals.

Bear in mind that some of the above topics are complex than it sounds here and the math involved are even more complicated. Overall objective of this post is to give you an intuitive understanding about some of these topics and never meant as a detailed technical description of any of the above topics.