Locally Decodable and Updatable Non-Malleable Codes and Their Applications

Dana Dachman-Soled, Feng-Hao Liu, Elaine Shi, Hong-Sheng Zhou

Abstract

Traditional Non-Malleable Codes (NMCs) provide strong security guarantees against tampering and leakage but suffer from a lack of locality, requiring global operations for even minor data updates. This paper introduces a new class of NMCs that are simultaneously non-malleable, leakage-resilient, and locally decodable and updatable. We present two constructions: a one-time secure scheme with $O(1)$ locality and a continual-attack resilient scheme with $O(\log n)$ locality using Merkle trees. These primitives are applied to construct a Tamper and Leakage Resilient (TLR) RAM, providing a formal framework for secure computation on untrusted memory.

1. Introduction

In the field of hardware security, physical attacks such as memory leakage and bit-level tampering pose significant risks to sensitive data. Non-Malleable Codes (NMCs) were introduced to mitigate these risks by ensuring that any modification to a codeword results in either the original message or a completely unrelated one, preventing an adversary from performing structured "mauling" of the data.

However, a major limitation of standard NMCs is their lack of locality. To read or update a single bit of the underlying message, one must decode and re-encode the entire codeword. This global dependency makes them impractical for large-scale storage systems like Random Access Memory (RAM). This work bridges this gap by developing codes that maintain high-level security while allowing for efficient, granular data access.

2. Problem Statement: The Locality Gap

The central challenge is to achieve locality—the ability to access or modify small portions of a message without processing the entire codeword—while preserving non-malleability and leakage resilience. In a typical RAM setting, an application needs to perform frequent, small-scale reads and writes. A secure storage solution must support these operations efficiently to be viable.

3. Methodology and Constructions

The authors propose a modular framework based on "Key Encapsulation," leading to two distinct constructions.

3.1 One-Time Secure Construction

For environments where data is subject to a single tampering event, the authors propose a scheme with constant locality.

  • Mechanism: A message $M$ is divided into blocks $(m_1, \dots, m_n)$. A secret key $sk$ is generated and protected using a standard (non-local) NMC. Each message block $m_i$ is then individually encrypted using an authenticated encryption (AE) scheme with $sk$.
  • Efficiency: Reading or updating a block requires decoding the small NMC-protected $sk$ and processing the specific ciphertext block, achieving $O(1)$ locality.

3.2 Continual Attack Construction

To handle "continual" settings where an adversary can attack multiple times, the one-time construction is insufficient due to "rewind attacks" (replacing new data with old, valid ciphertexts).

  • Binding via Merkle Trees: The authors integrate a Merkle Tree into the construction. The root of the tree, which hashes all blocks together, is encoded into the NMC along with the secret key.
  • Security: Any attempt to "rewind" a single block to a previous version will result in a mismatch with the stored Merkle root during decoding, effectively detecting the tampering.
  • Locality: Updates require $O(\log n)$ work to refresh the authentication path in the Merkle tree.

4. Applications: TLR-RAM

The primary application of these codes is the creation of a Tamper and Leakage Resilient (TLR) RAM. By combining local NMCs with Oblivious RAM (ORAM), the authors create a "compiler" that secures any RAM program. While ORAM obfuscates access patterns (hiding where the CPU looks), the local NMC ensures the integrity and privacy of the data values (protecting what is stored).

5. Key Insights

  • Fine-Grained Simulation: The authors developed a new security definition for local codes. Unlike global NMCs, a local NMC must account for partial tampering where some blocks remain unchanged. Their "fine-grained" simulator correctly models these partial corruptions.
  • Locality as a Practical Primitive: This work moves NMCs from a theoretical curiosity to a practical building block for secure hardware.

6. Results and Discussion

The constructions provide a rigorous theoretical foundation for secure memory. The $O(1)$ and $O(\log n)$ locality bounds demonstrate that security does not necessitate prohibitive performance costs. However, the authors acknowledge limitations:

  • Non-Adaptive Queries: The current schemes assume access patterns are fixed in advance.
  • CPU Security: The model assumes the CPU itself is a "trusted enclave," which may not hold against sophisticated side-channel attacks.
  • Latency: The combination of ORAM and Merkle trees introduces non-trivial latency compared to unprotected RAM.

7. Conclusion

This paper successfully addresses the locality problem in non-malleable coding. By providing efficient, locally updatable constructions and applying them to RAM security, the authors offer a robust path forward for designing hardware that remains secure even in the face of physical compromise.

Summary updated

BibTeX
@inproceedings{dachmansoled2015locally,
  author = {Dana Dachman-Soled and Feng-Hao Liu and Elaine Shi and Hong-Sheng Zhou},
  title = {{Locally Decodable and Updatable Non-Malleable Codes and Their Applications}},
  booktitle = {TCC},
  year = {2015},
  url = {https://openreview.net/forum?id=3mgbzhj5di},
}
Figure