-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a common library for parsing and serializing CoVE TEE Attesta…
…tion Payload Signed-off-by: Wojciech Ozga <woz@zurich.ibm.com>
- Loading branch information
1 parent
dee243f
commit f16eb0c
Showing
24 changed files
with
638 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_MOUNT=y | ||
CONFIG_FEATURE_MOUNT_FSTAB=y | ||
CONFIG_UMOUNT=y | ||
CONFIG_FEATURE_UMOUNT_ALL=y | ||
CONFIG_CRYPTSETUP=y | ||
CONFIG_LOSETUP=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "tap" | ||
version = "0.1.0" | ||
authors = ["Wojciech Ozga <woz@zurich.ibm.com>"] | ||
description = "Library to parse the CoVE's TEE attestation payload" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
#rsa = "0.9" # to create lockboxes: encrypt symetric key using public keys of target TEEs | ||
#rand = "0.8" # to generate symmetric key used to encrypted payload | ||
|
||
# for symmetric encryption of payload | ||
aes-gcm = {version="0.10.3", default-features = false, features=["aes", "alloc"]} | ||
|
||
# provides macros that help removing boilerplate code in rust error handling | ||
thiserror-no-std = "2.0" | ||
|
||
[features] | ||
parser = [] | ||
serializer = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-FileCopyrightText: 2023 IBM Corporation | ||
// SPDX-FileContributor: Wojciech Ozga <woz@zurich.ibm.com>, IBM Research - Zurich | ||
// SPDX-License-Identifier: Apache-2.0 | ||
use thiserror_no_std::Error; | ||
|
||
#[derive(Error, Debug)] | ||
pub enum TapError { | ||
#[error("Unsupported TAP Lockbox algorithm {0}")] | ||
UnsupportedTapLockboxAlgorithm(u16), | ||
#[error("Unsupported TAP digest entry type {0}")] | ||
UnsupportedTapDigestEntryType(u16), | ||
#[error("Unsupported TAP digest algorithm {0}")] | ||
UnsupportedTapDigestAlgorithm(u16), | ||
#[error("Unsupported TAP payload encryption algorithm {0}")] | ||
UnsupportedTapPayloadEncryptionAlgorithm(u16), | ||
#[error("Invalid magic in the beginning of TAP")] | ||
InvalidMagicStart(), | ||
#[error("Invalid size of the TAP")] | ||
InvalidSize(), | ||
|
||
#[error("Aes error {0}")] | ||
AesError(#[from] aes_gcm::Error) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-FileCopyrightText: 2023 IBM Corporation | ||
// SPDX-FileContributor: Wojciech Ozga <woz@zurich.ibm.com>, IBM Research - Zurich | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#![no_std] | ||
#![no_main] | ||
extern crate alloc; | ||
|
||
mod error; | ||
#[cfg(feature = "parser")] | ||
mod parser; | ||
mod spec; | ||
#[cfg(feature = "serializer")] | ||
mod serializer; | ||
|
||
#[cfg(feature = "parser")] | ||
pub use parser::TeeAttestationPayloadParser; | ||
|
||
#[cfg(feature = "serializer")] | ||
pub use serializer::TeeAttestationPayloadSerializer; | ||
|
||
pub use spec::*; | ||
pub use error::*; |
Oops, something went wrong.