Giter Site home page Giter Site logo

web-logs2 / jinzhao-disk-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stanplatinum/jinzhao-disk

0.0 0.0 0.0 76.49 MB

Jinzhao Disk (JinDisk) is a log-structured secure block device for TEEs. This repo is JinDisk's Linux version.

License: Other

Shell 0.16% C 95.11% Rust 4.46% Makefile 0.27%

jinzhao-disk-2's Introduction

Jinzhao Disk

Introduction

Jinzhao Disk (or JinDisk) is a log-structured secure block device for TEEs, which has the following key features:

  • Transparent protection. As a block device, JinDisk can transparently protect any file system (e.g., Ext4) that is stacked upon it and runs inside a TEE from a strong adversary outside the TEE.

  • Strong security. JinDisk promises six security properties: confidentiality, integrity, freshness, consistency, atomicity, and anonymity. For more information, see the security goal below.

  • High performance. Thanks to its unique log-structured design, JinDisk can deliver an excellent I/O performance that is close to the theoretically optimal level.

Security Goal

JinDisk targets a typical setting of TEE usage, where applications are ported into the TEE with no (or few) modifications thanks to a TEE-aware runtime. For enclave TEEs (e.g., Intel SGX), one popular choice for such a runtime is library OSes (e.g., Occlum). For VM TEEs (e.g., AMD SEV), one can choose off-the-shelf OS kernels like Linux.

The threat model of JinDisk.

As shown in the image above, the TEE runtime is integrated with JinDisk, which serves as a trusted logical block device that supports four standard block I/O commands including read(), write(), flush(), and trim(). From the perspective of JinDisk's users (e.g., file systems), all data written to or read from JinDisk is in plaintext. To serve these I/O requests securely, JinDisk takes some extra security measures, including but not limited to encrypting/decrypting the data transferred to/from the host block device properly.

To distinguish between the addresses on the trusted logical block device (i.e., JinDisk) and on the untrusted host block device, we term the former as logical block addresses (LBAs) and the latter host block addresses (HBAs).

The security goal of JinDisk is to provide to its users (e.g., file systems) the following six security guarantees:

  • Confidentiality guarantees that the user data submitted by any write is not leaked and thus prevents tampering attacks.
  • Integrity promises that the user data returned from any read are genuinely generated by the user and thus prevents snooping attacks.
  • Freshness ensures that the user data returned from any read are up-to-date and thus prevents rollback attacks.
  • Consistency ensures that all the security guarantees are held despite any accidental crashes or crashing attacks.
  • Atomicity promises that all writes before a flush are persisted in an all-or-nothing manner.
  • Anonymity avoids LBA leakage in the sense that the adversary cannot learn LBAs from the on-disk data structures directly or infer LBAs from HBAs.

Prior disk I/O protection solutions only provide a subset of JinDisk's security guarantees. For example, Linux's dm-crypt and dm-integrity only protect confidentiality and integrity, respectively. Although Linux's dm-verity ensures both integrity and freshness, it is read-only. As another example, Intel SGX Protected File System Library protects confidentiality, integrity, freshness, and consistency, but falls short of atomicity and anonymity.

Implementations

As of this moment, JinDisk has two implementations.

Both implementations are being developed actively. They are ready for technical preview, but still lack some production-grade features.

Our long-term plan is to ultimately merge the two implementations into one unified Rust implementation that can be integrated with Linux, Occlum, and probably other OSes as well. We will submit patches to the Linux community so that JinDisk may be eventually included in the mainline Linux.

For more information about the design of JinDisk, see the paper.

How to Use

The repository contains the Linux version of JinDisk, which consists of two parts:

  • kernel-module is the kernel-space component of JinDisk, a Linux device mapper target that implements the log-structured secure block device.

  • user-cli is the user-space component of JinDisk, which includes a set of tools used to set up JinDisk-enabled virtual disks conveniently.

License

Except where noted otherwise, the individual files within this package are licensed as 3-Clause BSD license. However, when linked together to form a Linux kernel module, the resulting Linux kernel module is dual licensed as BSD/GPLv2.

jinzhao-disk-2's People

Contributors

stanplatinum avatar cqs21 avatar tatetian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.