Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dilithium driver #1624

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions builder/src/firmware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ pub mod driver_tests {
..BASE_FWID
};

pub const ML_DSA87: FwId = FwId {
bin_name: "ml_dsa87",
..BASE_FWID
};

pub const ECC384: FwId = FwId {
bin_name: "ecc384",
..BASE_FWID
Expand Down Expand Up @@ -400,6 +405,7 @@ pub const REGISTERED_FW: &[&FwId] = &[
&hw_model_tests::TEST_UNITIALIZED_READ,
&hw_model_tests::TEST_PCR_EXTEND,
&driver_tests::DOE,
&driver_tests::ML_DSA87,
&driver_tests::ECC384,
&driver_tests::ECC384_SIGN_VALIDATION_FAILURE,
&driver_tests::ERROR_REPORTER,
Expand Down
3 changes: 3 additions & 0 deletions drivers/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ pub type Array4x8 = Array4xN<8, 32>;
pub type Array4x12 = Array4xN<12, 48>;
pub type Array4x16 = Array4xN<16, 64>;
pub type Array4x32 = Array4xN<32, 128>;
pub type Array4x648 = Array4xN<648, 2592>;
pub type Array4x1157 = Array4xN<1157, 4628>;
pub type Array4x1224 = Array4xN<1224, 4896>;

#[cfg(test)]
mod tests {
Expand Down
10 changes: 9 additions & 1 deletion drivers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ mod kv_access;
mod lms;
mod mailbox;
pub mod memory_layout;
mod ml_dsa87;
mod okref;
mod pcr_bank;
pub mod pcr_log;
Expand All @@ -52,7 +53,10 @@ mod soc_ifc;
mod trng;
mod trng_ext;

pub use array::{Array4x12, Array4x16, Array4x4, Array4x5, Array4x8, Array4xN};
pub use array::{
Array4x1157, Array4x12, Array4x1224, Array4x16, Array4x4, Array4x5, Array4x648, Array4x8,
Array4xN,
};
pub use array_concat::array_concat3;
pub use bounded_address::{BoundedAddr, MemBounds, RomAddr};
pub use caliptra_error::{CaliptraError, CaliptraResult};
Expand Down Expand Up @@ -82,6 +86,10 @@ pub use lms::{
Sha256Digest, D_INTR, D_LEAF, D_MESG, D_PBLC,
};
pub use mailbox::{Mailbox, MailboxRecvTxn, MailboxSendTxn};
pub use ml_dsa87::{
MlDsa87, MlDsa87MsgScalar, MlDsa87PublicKey, MlDsa87PublicKeyScalar, MlDsa87Result,
MlDsa87SecretKey, MlDsa87SecretKeyScalar, MlDsa87Seed, MlDsa87SignatureScalar,
};
pub use okref::okmutref;
pub use okref::okref;
pub use pcr_bank::{PcrBank, PcrId};
Expand Down
Loading
Loading