vck_common/lib.rs
1// SPDX-FileCopyrightText: 2026 JC-Lab <joseph@jc-lab.net>
2//
3// SPDX-License-Identifier: Apache-2.0
4
5//! Common types, errors, JVCK metadata format, and loader→driver handover
6//! helpers shared across the kernel driver, the UEFI loader, and host tooling.
7//!
8//! The crate is `no_std` by default (kernel/UEFI). Enabling the `std` feature
9//! (the default for host test crates such as `sample/crypto-test`) builds it
10//! against `std` while still going through the `alloc` API surface.
11#![cfg_attr(not(feature = "std"), no_std)]
12
13extern crate alloc;
14
15pub mod cpu;
16pub mod error;
17pub mod handover;
18pub mod ioctl;
19pub mod jvck;
20pub mod rng;
21pub mod store;
22pub mod types;
23pub mod xts;
24
25pub use error::{VckError, VckResult};
26pub use rng::{set_random_source, RandomSource};
27pub use store::{EncryptedOffsetStore, SectorIo};
28pub use types::{EncryptedOffset, Guid, SectorRange, VolumeId};
29pub use xts::{VolumeCipher, XtsVolumeCipher};