Dương Minh Nhật Đặng

@daminha

This is my blog https://dangduongminhnhat.github.io/

Joined on Aug 14, 2024

  • Xin chào các bạn, chào mừng quay trở lại với Phần 2 của series về mật mã học! Nếu bạn chưa xem qua Phần 1, mình thực sự khuyên bạn nên đọc trước tại đây, vì phần đó cung cấp nền tảng quan trọng cho những gì chúng ta sẽ cùng tìm hiểu trong bài này. Trong bài viết này, chúng ta sẽ khám phá khái niệm về hệ mã tính toán (computational encryption schemes), tìm hiểu định nghĩa chính xác của bảo mật ngữ nghĩa (semantic security), và phân tích một loại tấn công đặc biệt gọi là tấn công khôi phục thông điệp (message recovery attack). Đặc biệt, chúng ta sẽ chứng minh một kết quả nền tảng: rằng bảo mật ngữ nghĩa sẽ ngăn chặn tấn công khôi phục thông điệp — và chứng minh điều đó thông qua một kỹ thuật cực kỳ quan trọng trong mật mã học: giảm bảo mật (security reduction). Bắt đầu thôi nào! Computational ciphers và bảo mật ngữ nghĩa Như chúng ta đã biết, trong định lý của Shannon (Định lý 4 của bài blog Cryptography 1), cách duy nhất để đạt được bảo mật tuyệt đối là sử dụng khóa có độ dài bằng với thông điệp. Tuy nhiên, điều này không thực tế, chúng ta mong muốn rằng có thể mã hóa một thông điệp dài (ví dụ, một tài liệu có dung lượng vài megabyte) chỉ với một khóa ngắn (chẳng hạn, chỉ vài trăm bit). Cách duy nhất để vượt qua định lý của Shannon là nới lỏng các yêu cầu bảo mật. Chúng ta sẽ làm điều này bằng cách chỉ xem xét những kẻ tấn công có khả năng tính toán thực tế, tức là những kẻ tấn công trong thế giới thực, phải thực hiện tính toán trên các máy tính thực tế với lượng thời gian và bộ nhớ hợp lý. Điều này dẫn đến một định nghĩa bảo mật yếu hơn, được gọi là bảo mật ngữ nghĩa (semantic security).
     Like  Bookmark
  • Chào mừng đến với sê-ri chia sẻ kiến thức Cryptography! Xin chào mọi người! Tôi rất vui được chia sẻ với các bạn những kiến thức về Cryptography mà tôi đã học được. Đây là bài viết đầu tiên trong chuỗi sê-ri về mật mã, nơi tôi sẽ trình bày những khái niệm quan trọng và cốt lõi của lĩnh vực này. Trước khi bắt đầu, tôi khuyên bạn nên trang bị một số kiến thức toán học nền tảng, đặc biệt là xác suất rời rạc, có thể tham khảo tại Discrete Probability - High School Mathematics Extensions, và lý thuyết số cơ bản, một phần quan trọng trong nhiều thuật toán mật mã, có thể học từ sách A Computational Introduction to Number Theory and Algebra – Victor Shoup. Trong sê-ri này, tôi chủ yếu tham khảo cuốn sách A Graduate Course in Applied Cryptography của Dan Boneh và Victor Shoup, một tài liệu nhập môn rất hay và dễ tiếp cận, có thể xem mục lục tại đây. Nội dung bài viết đầu tiên này sẽ giới thiệu về mật mã Shannon – nền tảng đầu tiên của lý thuyết mật mã, cùng với khái niệm bảo mật hoàn hảo, định nghĩa chặt chẽ và giới hạn của một hệ mã an toàn tuyệt đối. Hy vọng mọi người sẽ theo dõi và ủng hộ sê-ri này! Nếu có bất kỳ thắc mắc hay ý kiến đóng góp, hãy để lại bình luận nhé. Bây giờ, hãy cùng bước vào chương đầu tiên: Mật mã Shannon và bảo mật hoàn hảo! 🔐 Định nghĩa mật mã Shannon Chúng ta sẽ bắt đầu với khái niệm mã hóa, giả sử Alice và Bob chia sẻ một khóa bí mật $k$. Alice muốn gửi một thông điệp $m$ cho Bob qua mạng mà vẫn giữ được tính bí mật của $m$ trước sự nghe lén của kẻ tấn công. Chúng ta sẽ bắt đầu phát triển các kỹ thuật cơ bản để giải quyết vấn đề này.
     Like  Bookmark
  • High-Level Protocol Description The core of the STARK (Scalable Transparent Argument of Knowledge) protocol involves proving the validity of an execution trace through polynomial commitments and interactive proofs. The protocol can be summarized in three major steps: Arithmetization and Commitment of Execution Trace: The prover encodes the computation's execution trace into a matrix $T$, which is transformed into polynomial form. The prover commits to these polynomials, which encode the trace's validity. Construction and Commitment of the Composition Polynomial: The prover constructs the polynomial $F$, which encodes all the constraints from the execution trace, and computes the quotient polynomial $H = \frac{F}{G}$. Opening of Polynomials at Random Point: The verifier challenges the prover with a random point $z$ and checks whether the values $F(z)$ and $H(z)$ satisfy the equation $H(z) = \frac{F(z)}{G(z)}$, thus confirming the trace's correctness. By following this process, the STARK protocol achieves both soundness and efficiency, ensuring that a verifier can be convinced of the correctness of a computation with high confidence, while minimizing the computational and communication costs involved. Arithmetization of the Execution Trace
     Like  Bookmark
  • The Vanishing Polynomial The polynomial that vanishes on the set $H$ can be expressed as: $$ Z_H(x) = (x - 1)(x - \omega)(x - \omega^2) \ldots (x - \omega^{n-1}) $$ For sufficiently large $n$, evaluating $Z_H(x)$ directly becomes cumbersome. However, leveraging the property $\omega^n = 1$, we can simplify this expression to: $$
     Like  Bookmark
  • Aztec Plonk Verifier: 0 Bug The Verification Equation The verification equation in PLONK is crucial to ensuring the soundness of the proof. It is given by the following expression: $$ e([W_\mathfrak{z}]1 + u \cdot [W{\mathfrak{z} \omega}]_1, [x]2) \cdot e(-(\mathfrak{z} \cdot [W\mathfrak{z}]1 + u \mathfrak{z} \omega \cdot [W{\mathfrak{z} \omega}]_1 + [F]_1 - [E]_1), [1]_2) \stackrel{?}{=} 1 $$ Here:
     Like  Bookmark
  • Composition, Recursion and Aggregation Proof Composition in STARKs In a standard STARK system, the verifier checks the validity of a proof $\pi_{STARK}$ using public parameters and verification criteria. Proof composition refers to the idea of utilizing different proof systems to construct a more efficient proof verification process. Specifically, composition approach delegates the verification of a STARK proof $\pi_{STARK}$ to a circuit verifier $C$. The prover can then provide a proof $\pi_{CIRCUIT}$ that verifies the correct execution of the circuit verifier $C$. As shown in the figure below, the verification process is reduced to verifying $\pi_{CIRCUIT}$, which is smaller and quicker to verify than the original $\pi_{STARK}$. image The primary advantage of this composition is that the proof $\pi_{CIRCUIT}$ is more compact, thus reducing the overall verification complexity. Let the original STARK proof be denoted as $\pi_{STARK}$. The verifier for this proof can be represented as a circuit $C$, whose execution can be verified by a second proof $\pi_{CIRCUIT}$. Therefore, the verification of $\pi_{STARK}$ is reduced to the verification of the circuit proof $\pi_{CIRCUIT}$. In this case, if the prover provides a proof for the correct execution of the verification circuit $\pi_{CIRCUIT}$, then this is enough to verify the original STARK.
     Like  Bookmark
  • Ethereum: A Decentralized Blockchain with Embedded Computation Ethereum is a decentralized blockchain platform that serves as the foundation for building applications and organizations in a permissionless, censorship-resistant manner. At the core of Ethereum lies a virtual machine, known as the Ethereum Virtual Machine (EVM), which acts as a global, shared computer. The state of this virtual machine is agreed upon by all participants within the Ethereum network, ensuring a unified and consistent state across the entire platform. Every node participating in the Ethereum network maintains a copy of the EVM's state. This distributed consensus ensures that any changes to the EVM's state are verified, validated, and propagated across the entire network. Participants in the Ethereum network can broadcast requests for the EVM to perform computations. These requests, known as transaction requests, are processed by the network, leading to a state change in the EVM. Once executed, this new state is committed to the blockchain and synchronized across all nodes in the network. The blockchain serves as a permanent and tamper-resistant ledger of all transactions and the current state of the EVM. Cryptographic mechanisms inherent in Ethereum ensure the integrity and immutability of the blockchain. Once a transaction is validated and added to the blockchain, it becomes irreversible and cannot be altered. Moreover, these cryptographic safeguards ensure that transactions are executed with proper authorization—only the rightful owner of an account can initiate a transaction involving their digital assets. Ether (ETH): The Native Cryptocurrency of Ethereum Ether (ETH) is the native cryptocurrency of the Ethereum platform. Its primary function is to create a marketplace for computational resources within the Ethereum network, providing an economic incentive for participants to verify and execute transaction requests. This marketplace ensures that the network remains secure, functional, and efficient.
     Like  Bookmark
  • In my research on security and privacy in ZK-EVM (Zero-Knowledge Ethereum Virtual Machine), it's essential to understand the foundational concepts of Zero-Knowledge Proofs (ZKPs). ZKPs are a revolutionary cryptographic technique that enables one party to prove knowledge of a fact without revealing any information about the fact itself. This blog will delve into the classification of Zero-Knowledge Proofs, their various applications, and how they play a pivotal role in enhancing privacy and security in blockchain systems, particularly in the context of ZK-EVM. Table of Contents Table of Contents Introduction to Zero Knowledge ProofsIntroduction Origins of Zero Knowledge Proof Systems and Privacy What is a Proof System?
     Like  Bookmark
  • In the digital age, chat applications like Zalo and Telegram are essential tools for communication. However, they also open doors for cybercriminals to exploit users. One sophisticated method involves extracting IP addresses using spoofed URLs and phishing tactics. This blog post dives into the mechanics of URL spoofing, the common types of attacks, and a step-by-step demonstration of how attackers can track IP addresses through seemingly harmless interactions on these chat applications. I'll also explore a specific vulnerability in Telegram that allows hackers to discover a user's IP address during calls, revealing the potential risks and the necessary precautions to safeguard your online privacy. Table of Contents Table of Contents Tracking IP Address by using an Image URLBackgroundURL spoofing Phishing Proof of Concept
     Like  Bookmark