Secure Disk Write and Recovery Using LSM Metadata Sync

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing trusted execution environments (TEEs) provide insufficient protection for data stored in disks, particularly vulnerable to rollback attacks when offline, as memory data is lost and cannot be used for attack detection.

Innovation Solution

A secure virtual disk solution is implemented using a hierarchical log structure with multiple layers of log-based data structures, enhancing security through authenticated encryption, metadata management, and synchronization mechanisms to resist rollback attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional data storage solutions are used, then data can be stored and accessed, but data security is insufficient against attacks such as eavesdropping, tampering, crash attacks, playback attacks, and rollback attacks

Engineering Contradiction:
Improvedata securityVSAvoidstorage system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The storage system is segmented into multiple layers: write cache layer, encrypted storage layer, and metadata layer. Each layer performs specific security functions (encryption, authentication, integrity verification) to protect against different types of attacks while maintaining manageable complexity through functional separation

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediary security management module is introduced between the host and storage device to handle encryption, authentication, and metadata management. This intermediary layer shields the host from security complexities while providing comprehensive protection against various attacks

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If authenticated encryption is performed on each user data block, then write confidentiality is improved, but processing time and computational overhead increase

Engineering Contradiction:
Improvewrite confidentialityVSAvoiddata processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Authentication tags are generated and attached to encrypted data blocks during the write operation before data is stored. This preliminary authentication preparation enables rapid verification during read operations without requiring re-computation, reducing overall processing time while maintaining strong confidentiality

Inventive Principle:
Principle #10Preliminary action

3Reliability

If metadata is written into an LSM tree structure, then data integrity and recovery capability are improved, but storage space and write operations complexity increase

Engineering Contradiction:
Improvedata integrityVSAvoidmetadata management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The LSM tree structure performs periodic compaction and merging operations to maintain metadata integrity. Uncommitted metadata entries are periodically cleaned up and merged into committed structures, ensuring data integrity while managing storage space efficiently through scheduled maintenance operations

Inventive Principle:
Principle #19Periodic action

4Reliability

If synchronization operations are sent to LSM tree and host disk, then data persistence is improved, but I/O operations and system performance overhead increase

Engineering Contradiction:
Improvedata persistenceVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Synchronization operations are integrated into the normal write path rather than being separate overhead operations. As data is written to the host disk, synchronization metadata is continuously updated in the LSM tree, eliminating the need for separate sync operations and maintaining data persistence without significant performance penalty

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS12619790B2Data writing method, recovery method, and reading method, and corresponding apparatus
Publication Date: 2026.05.05 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US12619790B2 patent drawing
  • US12619790B2 patent drawing
  • US12619790B2 patent drawing

AI summary

Implementations of the present specification provide a data writing, data recovery, and data reading method, and a corresponding secure disk apparatus. The data writing method includes following: User data blocks are first written into a write cache, and a plurality of user data blocks identified by LBAs are read from the write cache under a certain condition. For each user data block, an HBA is allocated to the user data block, authenticated encryption is performed on the user data block to generate an encrypted data block and authentication information, and first metadata corresponding to the user data block is generated, where the first metadata is organized in a form of a KV pair and includes the LBA, the HBA, and the authentication information. A plurality of write commands for the plurality of user data blocks are submitted to a host disk for the disk to store the encrypted data block based on the corresponding HBA. In addition, the first metadata corresponding to each user data block is further written into a first metadata table maintained by using an LSM tree. Then, a synchronization operation command is sent to the LSM tree and the host disk for the LSM tree and the host disk to complete data write persistence.