visit
We begin with one of the main mechanisms used in our protocol: MPC (Multi-party Computation). MPC allows a group of parties to create a digital signature in such a way that none of the parties have access to the secret needed to create the signature. Only a quorum (a part of parties) participates in signing.
In the case of MPC, the parties create a signature off-chain that makes it possible to sign any data, including transactions. For the protocol, such a signature is indistinguishable from a signature created by a single user.The MPC is a very young mechanism by the standards of cryptography. However, it is based on cryptographic algorithms that have been tested for decades.In a series of articles, we will explain how MPC works. We will talk about what a digital signature is, how to share private keys between parties, and how to sign data without having an entire private key in one place.In the first article, we’ll start with the basics: a digital signature.
Signer authenticity: to ensure that the message is signed by exactly that person who introduced themselves as the signer.Document integrity: to ensure that the message has not changed since the signature was created.
And historically, every time you sign, you draw the same symbol: your common signature. The security of such a system is based on the fact that no one but you can reproduce this symbol in the right way.
Consequently, one just has to look at the signature to ensure its veracity. Thus, the signed document contains the following information: the document itself, the public identifier of the signer (usually it’s a name), and the signature itself. There are weak points of the common signature. The signature looks always the same, and it doesn’t change whatever you sign with it. Additionally, anyone who has a signature sample can reproduce the signature.So, the common signature does not solve the problems perfectly. The digital signature is a way to solve problems using modern computing technology.A different approach is used in the case of digital signatures. The message, the signature, and the public identifier of the signer are numbers¹ linked by a mathematical formula². The formula allows to unambiguously establish that for the given message, only the one who possesses the given public identifier created the given signature. And there is no other way. Please note that a digital signature changes depending on the message signed with it.
We should have one more number to have the mathematical formula mentioned above working. Only the one who creates the signature knows this number. This secret number allows the owner to create a digital signature that guarantees the connection between the message and the signer’s public identifier. Public-Key Cryptography (or sometimes called Asymmetric Cryptography) studies such mathematical primitives.Thus, when you create a digital signature, two positive numbers are associated with you as the signer. One is called the private key*** (or secret key), and the other is called the public key. There is a one-way bond between these numbers: you can derive the public key from the private key using a mathematical formula, but never vice versa.The public key is a semblance of your name in a document signed with a common signature. This information about you is publicly known. On the other hand, only you should know the private key.A private key is used to create a digital signature, so the digital signature shows the signer’s authenticity. In its turn, the authentication is based on whether or not the correct private key was used. For authentication, one should have the signer’s public key, the signed message, the signature, and the formula binding the signed message and the private key.Thus, a digital signature routing consists of three parts:The KeyGen algorithm is used to create a pair of numbers: a public key and a private key; the Sig algorithm is used to create a signature, using a message and the private key; and the Ver algorithm is used to verify the signature using the signature, the signed message, and the public key.
Next, we will look at all three parts in detail.A private key is just a random number. A public key can be easily obtained by applying a pre-defined one-way compression function to the private key. The one-way compression function does not allow recovery of the input parameters by output results. So, we can safely share our public key without risking compromising our private key.
Modular exponentiation is a classic example of a one-way transformation. Common exponentiation pk=askis reversible (a is a fixed number). If we know pk and a, we can derive that sk=loga pk. Figure 1 illustrates this one-to-one correspondence: each value of sk corresponds to a single value of pk and vice versa.For the input string, “I promise to give you $5,000”, sha256 will return be657fcad7933b87869835c571b60ff1444f68179326e7754c3d99babf919995 (this is a number in hex format). If we add an extra 0 to the message like this: “I promise to give you $50,000”, the hash will change to 90222db12a4a59f8d083e3cf88bf22dab15385c9946f4526a67855e6a5ff0737.
To sum it up: the signature creation algorithm takes a private key sk and a number m (the message hash) for input and returns a number s. This number is a signature s=Sigsk, m. In the following chapters, we will continue covering the details of the cornerstone of cryptocurrencies — the ECDSA signature algorithm.Algorithms KeyGen and Sig generate digital signatures. Algorithm Ver is used for signature validation.
This algorithm requires the public key pk of the signer, the message hash m that was signed, and the signature s.The Ver algorithm returns 1 (TRUE) if the signature is correct and 0 (FALSE) otherwise.
Successful verification can guarantee thatThe public key pk matches the private key sk used for the signature generation. This means that the person claiming to be the signer is the actual signer of the transaction.The message that was signed (the hash) was not changed.Correspondingly, failed signature verification means that at least one of the following two facts comes true:The private key sk does not match the public key pk. Someone is impersonating the message signer.The message does not match. The signer did not sign this exact message.There is no way to figure out what exactly is invalidating the signature with the Ver algorithm.
The algorithm does not determine which of these conditions caused the invalidity of the signature.In our next article, we will talk about the algorithm ECDSA and elliptic curves.
Authors:
— — — — — — — — — — — — — — — -
[1],[2]: we will explore these concepts further in our publications.