Atomic Cross-Chain-Swaps are obsolete. CDGs are the next big thing!

in #atomic6 years ago

In this blog series, we have an interview with Thomas M. Mayer, one of the three cryptographers who invented CDGs. Thomas M. Mayer explains what's behind this technology and why CDGs can change the crypto world.

Nikolay: Thomas, CDG are three letters that are supposed to change the crypto world. What does it mean?

Tom: CDG stands for cryptographic deposit guarantee. The Tokrex developers also say TOK instead of CDG. This comes from "Theory of Knowledge" and is a relic of the early days of its conception.

Nikolay: Okay. Before we go deeper, what you can do with a cryptographic deposit guarantee?

Tom: You can do two things with it. Transfer Crypto Coins to another party in less than a second. Means real-time intra-chain. Or you can exchange your coins across blockchains in a matter of milliseconds without the need for a trusted third party. Means you do a real-time cross-chain swap.

Nikolay: This sounds ground-breaking for the blockchain industry. The next question I have and I think all Blockchain experts will ask is, how you do that? We all know that a blockchain transaction has a block latency and therefore a real-time transfer is still in the distant future. What are you doing differently?

Tom: The blockchain transaction that you are talking about, that is bound to the block latency, corresponds to the transaction model of Nakamoto. Nakamoto says a transaction, in simple terms, is a signed message that contains the public key of a payer and a payee. The payer signs the message with his private key so that everyone can verify the validity of the transaction. Regardless of the consensus method used by a blockchain, a transaction is not completed until the signed message has been added to one of the next blocks of the chain. This per definition is an on-chain transaction by Nakamoto. And it explains the cause of the block latency that lies in the chosen consensus method, which a blockchain uses.

Nikolay: I agree. So far nothing new.

Tom: Now let's talk about a model we call a meta-swap. For now, it's just a theoretical model to better understand CDGs. If you can use your private key to sign an on-chain transaction, then it must be also valid that we can swap the private key directly to exchange blockchain values. This is nothing else but a consequence of the Nakamoto transaction model.

Nikolay: OK. Can you give an example?

Tom: Clear. Let's compare an on-chain transaction with a meta-swap transaction. Let's say you have exactly one bitcoin in your wallet. And you want to send exactly one Bitcoin to me. You can either sign an on-chain transaction or send me the private key to your wallet directly. What is faster?

Nikolay: Of course, the latter. The meta-swap. But that would not be good for you. Because then I could also access the Bitcoin cause we both have the private key.

Tom: Exactly. That's why the meta-swap is just a thought model. But a meta-swap simply demonstrates how a CDG works. Now let me ask you a question. Why is a meta-swap faster?

Nikolay: I have a feeling I know where this is going. No on-chain transaction means no block latency... okay. I got you.

Tom: But you are right. A meta-swap cannot be done in practice, because then both parties have the private key and thus can perform on-chain transactions. In addition, you can not exchange exact quantities with a meta-swap. But now that we understand the basic concept, we can understand a CDG.

Nikolay: I'm curious.

Tom: A CDG is generated by a distributed key generator. A distributed key generator is nothing but a cryptography that computes a private key that is spread across multiple nodes. None of the nodes knows the private key. A node only knows a key part or correctly speaking the secret share. But it cannot use it to reconstruct the actual private key. At the same time, all nodes compute a common public key, which everyone knows, and everyone is allowed to know it.

Nikolay: Basically, a CDG is a key pair that consists of a private key that nobody knows and a commonly known public key. So, it's a big difference to a Multisig. But how do you get back to the private key?

Tom: When 51% of the nodes holding the secret shares work together the actual private key becomes visible again. That’s Threshold Cryptography. So, you only need the majority of nodes holding the private key secret shares to reconstruct it later. Bye, the way, the nodes that hold the secret shares of the private key are called "Escrow Nodes".

Nikolay: Correct me if I'm wrong. A cryptographic deposit guarantee is a distributed private key providing access to e.g. a bitcoin. The trick is that nobody knows the private key, but the public key can be used to spend e.g. a bitcoin. How can I get back my Bitcoin?

Tom: Well it’s not a trick, but cryptography. Yes, you are correct. If you're the owner of the cryptographic deposit guarantee, you can tell the nodes holding the secret shares to send you back the actual private key. The best metaphor for understanding a CDG is an envelope. Once you have generated a CDG, you have a public key that allows you to put something into the envelope. To this public key, you send your Bitcoin. In addition, you create a CDG with a different key pair that you can use to verify ownership of your CDG. If you want to get the private key back, prove to the Escrow Nodes with this key pair that you own the CDG. And then the Escrow Nodes will send you the key parts. If you have the key parts of 51%, you can add them up and again have the private key that gives you access to your Bitcoin. In a figurative sense, you open the envelope again.

When you think back to your first objection. A meta-swap does not work in practice, because then we both would have the private key. A CDG solves the problem because none of us knows the private key and we only trade the right to disclose the private key to the underlying.

Nikolay: Is that a smart contract?

Tom: Indeed. You have a contract with the escrow nodes holding your secrets shares until to the point they provide it again. It’s a smart contract because an escrow node gets a fee for its service only in case it holds the secret share until you open the CDG again.

Nikolay: I see. I think I understood how a CDG works. How can I do a transaction with it?

Tom: Let's stay with Bitcoin now. First, send a bitcoin to the public address of the CDG. From this point on, nobody has access to the Bitcoin. Not even you. A CDG transaction is the change of ownership of the key parts of the CDG. As we've already discussed, you also have a key pair for your CDG that allows you to prove ownership of your CDG and sign a CDG transaction. Specifically, you sign a message with the key pair of the CDG and instructs the escrow nodes that next time they may only reveal the key parts to the new owner. This is a change of ownership of a CDG or a transaction.

Nikolay: And for keeping track of ownership a blockchain is used?

Tom: No. Not with the Tokrex implementation. But you're right, you could use a blockchain for that. We favor a direct peer-to-peer exchange based on an encrypt-and-swap scheme according to Goldfeder. Simply because a blockchain would again introduce block latency into the system. We do not like that. That's why CDGs are actually pure off-chain transactions.

Nikolay: I understand. And I am fascinated by the potential of a CDG. It is essentially a secure way to exchange private keys for crypto assets, without block latency. And that's why they can be exchanged in real time.

Tom: That’s it. Instead of an on-chain transaction, a CDG actually exchanges the right to disclose the private key to it's underlying that is bound in the CDG.

Nikolay: But you can only exchange fixed values with it. Such as a Bitcoin or one Ethereum?

Tom: You are addressing the second problem of our meta-swap. However, this can be solved by the fragmentation of CDGs. Just imagine that you split a Bitcoin into 100 CDGs. This will give you 100 CDGs of one millibitcoin each (mBTC). That makes the exchange much more practical.

Nikolay: I understand. Unfortunately, Thomas, we do not have much time left. I already have the idea that a CDG is suitable for cross-chain swaps because it can be created for private keys of different blockchains. Can you say anything more about that?

Tom: We now have the same vibe (laughs). Exactly. A CDG can be used for any private key, whether Bitcoin, Ethereum, Litecoin, ERC20 or others. And thus real-time cross-chain swaps can be performed. Decentralized without third-party peer-to-peer. What we have not discussed yet in detail is how to exchange CDGs against each other.

Nikolay: Yes. I would suggest we deepen that in our next interview in the next few days. For anyone who is interested, I recommend the detailed paper titled "Tokrex: A meta-system for real-time intra and cross-chain swaps". This can be found on the Tokrex website at www.tokrex.org.

Tom: There are other details that belonging to a CDG. Such as Proactive Secret Sharing, which ensures that there are always enough escrow nodes available to reconstruct private keys. Since we exploit asymmetric cryptography with a CDG, it is also interesting that you do not have to adapt existing blockchain technologies to use them with a CDG. That's a big advantage over an Atomic cross-chain swap.

Nikolay: Definitely we will deepen CDGs from this point on in our next interview. This is a fundamental technology that has a significant impact on the evolution of crypto technology, as I see it now. One thing would interest me because you already mentioned it. What is the difference to an Atomic cross-chain swap, as discussed in the crypto community nowadays?

Tom: An atomic cross-chain-swap uses on-chain transactions to exchange blockchain values peer-to-peer. That means it’s bound to block latency. Means it’s much slower. And we also see that as a reason why decentralized exchanges could not really prevail today against the central crypto exchanges. Although a CDG uses an on-chain transaction once, it can then be swapped as often as desired in real-time peer-to-peer. That makes a CDG superior to Atomic cross-chain swaps.

Nikolay: Now, when I think about the possibilities of CDG, it can also solve even the scaling problem of blockchains. Thomas, we'll meet again in a few days. It was clear to us that CDGs are a big topic and a single conversation with you is not enough. I thank you very much and I find CDGs a super exciting topic. It will definitely be able to change something big.

Tom: Thank you very much.

Link to Tokrex: https://www.tokrex.org
Link to Whitepapers: https://tokrex.org/#whitepapers
Video: Tom explains the Tokrex Crypto-System:

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.029
BTC 60320.14
ETH 3373.37
USDT 1.00
SBD 2.51