zkTLS technology: A new solution for on-chain verification of off-chain HTTPS data in Web3.

robot
Abstract generation in progress

Analysis of zkTLS Technology and Its Application Prospects in Web3

Recently, while exploring new project directions, I encountered a technology stack that I had not come across before—zkTLS. After in-depth research, I have compiled my learning insights as follows, hoping to share them with everyone.

zkTLS is a new technology that combines Zero-Knowledge Proofs (ZKP) and TLS (Transport Layer Security Protocol). In the Web3 space, it is mainly used in on-chain virtual machine environments to verify the authenticity of off-chain HTTPS data without the need to trust third parties. The authenticity here includes three aspects: the data source indeed comes from a certain HTTPS resource, the returned data is unaltered, and the timeliness of the data is guaranteed. Through this cryptographic implementation mechanism, on-chain smart contracts gain the ability to securely access off-chain Web2 HTTPS resources, thus breaking the data silos.

Overview of the TLS Protocol

To gain a deeper understanding of the value of zkTLS technology, it is necessary to briefly introduce the TLS protocol. TLS (Transport Layer Security) is used to provide encryption, authentication, and data integrity in network communications, ensuring the secure transmission of data between clients (such as browsers) and servers (such as websites).

The HTTPS protocol is essentially built on the HTTP protocol and uses the TLS protocol to ensure the privacy and integrity of information transmission, as well as to verify the authenticity of the server side. In contrast, the HTTP protocol is a plaintext transmission network protocol and cannot verify the authenticity of the server side, which leads to several security issues:

  1. Information may be monitored by third parties, leading to privacy breaches;
  2. Unable to verify the authenticity of the server, the request may be hijacked by malicious nodes;
  3. Unable to verify the integrity of the returned information, which may result in data loss due to network issues.

The TLS protocol is designed to address these issues. Its main solutions include:

  1. Encrypted communication: Use symmetric encryption (such as AES, ChaCha20) to protect data against eavesdropping.
  2. Identity authentication: Verify the server's identity through digital certificates issued by a third party to designated institutions (such as X.509 certificates) to prevent man-in-the-middle attacks.
  3. Data Integrity: Use HMAC (Hash-based Message Authentication Code) or AEAD (Authenticated Encryption) to ensure that the data has not been tampered with.

Data Exchange Process of HTTPS Protocol

The HTTPS protocol based on the TLS protocol is divided into two phases during data exchange: the handshake phase and the data transmission phase. The specific process is as follows:

  1. The client sends ClientHello:

    • Contains information on supported TLS versions, encryption algorithms, random numbers, etc.
    • The purpose is to let the server understand the client's encryption capabilities and prepare the security parameters.
  2. The server sends ServerHello:

    • Includes information such as the selected encryption algorithm, server random number, server certificate, etc.
    • The purpose is to let the client know the identity of the server and confirm the security parameters.
  3. Client verifies the server:

    • Verify server certificate
    • Calculate shared key
    • Send Finished message
    • The goal is to ensure the server is trustworthy and generate a session key.
  4. Start encrypted communication:

    • Use the agreed session key for encrypted communication
    • Use symmetric encryption to encrypt data, improving speed and security.
    • Use AEAD to prevent data tampering

Advantages of zkTLS

Traditional Web3 applications usually rely on oracle projects such as Chainlink and Pyth when accessing off-chain data. These projects act as a relay bridge between on-chain data and off-chain data, breaking the data silos. However, this oracle-based data acquisition solution has two main issues:

  1. High cost: To ensure the authenticity of data, a PoS consensus mechanism is required, which comes with high maintenance costs.
  2. Low efficiency: The consensus of the PoS mechanism requires time, leading to latency in on-chain data, which is not suitable for high-frequency access scenarios.

The emergence of zkTLS technology is precisely to address these issues. By introducing the ZKP zero-knowledge proof algorithm, it allows on-chain smart contracts to act as third parties, directly verifying that the data provided by a certain node indeed comes from a specific HTTPS resource and has not been tampered with, thereby avoiding the high usage costs caused by consensus algorithms in traditional oracles.

The Working Principle of zkTLS

zkTLS protects through cryptography, replacing the high costs of traditional oracles based on consensus mechanisms for data availability. Specifically, it achieves this through the following steps:

  1. Introduce ZKP Zero-Knowledge Proof
  2. Calculate the data obtained from the off-chain relay node's request for HTTPS resources, CA certificate verification information, temporal proof, and data integrity proof to generate the Proof.
  3. Maintain necessary verification information and verification algorithms on the chain.

This method allows smart contracts to verify the authenticity, timeliness, and reliability of data sources without exposing critical information.

Application Prospects of zkTLS

The application prospects of zkTLS technology are broad and mainly include:

  1. Reduce the on-chain price acquisition cost of long-tail assets
  2. Utilize authoritative websites in the Web2 world for on-chain KYC, optimizing DID.
  3. Improve the technical architecture design of Web3 games

However, the development of zkTLS technology has also brought challenges to existing Web3 enterprises, particularly affecting mainstream oracle projects. In response to these challenges, industry giants like Chainlink and Pyth are actively researching related directions and exploring new business models, such as shifting from time-based billing to usage-based billing, and providing Compute as a Service.

Of course, like most ZK projects, the main challenge of zkTLS technology still lies in how to reduce computational costs to make it commercially viable.

In summary, paying attention to the development trends of zkTLS and appropriately integrating this technology stack during product design may lead to new breakthroughs in business innovation and technical architecture.

LINK-0.36%
PYTH-0.94%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 7
  • Repost
  • Share
Comment
0/400
WalletDetectivevip
· 14h ago
There are new ways to play, not bad at all.
View OriginalReply0
SchrodingerAirdropvip
· 08-12 15:21
Ah, this is a new type of TLS technology, understand?
View OriginalReply0
LightningLadyvip
· 08-12 11:32
The new verification scheme is here. It's time to sell the previous Oracle Machine.
View OriginalReply0
ExpectationFarmervip
· 08-10 21:14
Another new White Paper has come out, can't keep up with the learning.
View OriginalReply0
DarkPoolWatchervip
· 08-10 21:03
Listening to all the fancy talk, isn't it just cross-chain data adjustment?
View OriginalReply0
0xLostKeyvip
· 08-10 20:52
New Cryptography technology has been introduced for Web3 arbitrage...
View OriginalReply0
GateUser-1a2ed0b9vip
· 08-10 20:51
New tricks are out again, tls plays encryption, bullfrog.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)