Skip to content
Closed
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
32 changes: 24 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ path = "lib/counters"
anyhow = { version = "1.0.31", default-features = false, features = ["std"] }
array-init = { version = "2.1.0" }
arrayvec = { version = "0.7.4", default-features = false }
aspeed-ddk = { git = "https://github.com/aspeedtech-bmc/aspeed-rust.git" }
aspeed-ddk = { git = "https://github.com/rusty1968/aspeed-rust.git", branch = "aspeed-integration" }
ast1060-pac = { git = "https://github.com/aspeedtech-bmc/ast1060-pac.git" }
atty = { version = "0.2", default-features = false }
bitfield = { version = "0.13", default-features = false }
Expand All @@ -75,6 +75,7 @@ derive_more = { version = "0.99", default-features = false, features = ["from",
digest = { version = "0.10", default-features = false }
dunce = { version = "1.0.2", default-features = false }
embedded-hal = { version = "0.2", default-features = false }
embedded-hal-1 = { version = "1", default-features = false , package = "embedded-hal" }
enum-kinds = { version = "0.5.1", default-features = false, features = ["no-stdlib"] }
enum-map = { version = "2.7.3", default-features = false }
filetime = { version = "0.2.12", default-features = false }
Expand Down Expand Up @@ -167,9 +168,9 @@ transceiver-messages = { git = "https://github.com/oxidecomputer/transceiver-con
vsc7448-pac = { git = "https://github.com/oxidecomputer/vsc7448", default-features = false }

# OpenPRot
openprot-platform-mock = { git = "https://github.com/rusty1968/openprot.git", branch = "i2c-hardware" }
openprot-hal-blocking = { git = "https://github.com/rusty1968/openprot.git", branch = "i2c-hardware" }
openprot-hal-nb = { git = "https://github.com/rusty1968/openprot.git", branch = "i2c-hardware" }
openprot-platform-mock = { git = "https://github.com/rusty1968/openprot.git", rev = "3563607ea21ef2d9b23a4f902a10e4f44a27c33b" }
openprot-hal-blocking = { git = "https://github.com/rusty1968/openprot.git", rev = "3563607ea21ef2d9b23a4f902a10e4f44a27c33b" }
openprot-hal-nb = { git = "https://github.com/rusty1968/openprot.git", rev = "3563607ea21ef2d9b23a4f902a10e4f44a27c33b" }

[patch.crates-io]
# See https://gitlab.com/robigalia/ssmarshal/-/merge_requests/2
Expand Down
48 changes: 48 additions & 0 deletions app/ast1060-ecdsa-test/app-placeholder.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name = "ast1060-ecdsa-test"
target = "thumbv7em-none-eabihf"
board = "ast1060-rot"
chip = "../../chips/ast1060"
stacksize = 1024

[kernel]
name = "ast1060-ecdsa-test"
requires = {flash = 32000, ram = 4096}

[tasks.jefe]
name = "task-jefe"
priority = 0
max-sizes = {flash = 8192, ram = 4096}
start = true
stacksize = 1536
notifications = ["fault", "timer"]

[tasks.idle]
name = "task-idle"
priority = 5
max-sizes = {flash = 128, ram = 256}
stacksize = 256
start = true

[tasks.uart_driver]
name = "drv-ast1060-uart"
priority = 2
max-sizes = {flash = 8192, ram = 2048}
uses = ["uart"]
start = true
notifications = ["uart-irq"]
interrupts = {"uart.irq" = "uart-irq"}

[tasks.ecdsa_server]
name = "drv-openprot-ecdsa-server"
priority = 3
max-sizes = {flash = 16384, ram = 4096}
start = true
stacksize = 2048

[tasks.ecdsa_test]
name = "task-ecdsa-test"
priority = 4
max-sizes = {flash = 16384, ram = 4096}
start = true
stacksize = 2048
task-slots = ["ecdsa_server", "uart_driver"]
1 change: 1 addition & 0 deletions app/ast1060-ecdsa-test/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ priority = 3
max-sizes = {flash = 16384, ram = 4096}
start = true
stacksize = 2048
features = ["ast1060-verifier"]

[tasks.ecdsa_test]
name = "task-ecdsa-test"
Expand Down
13 changes: 13 additions & 0 deletions drv/ast1060-ecdsa/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "drv-ast1060-ecdsa"
version = "0.1.0"
edition = "2024"

[dependencies]
zerocopy-derive = { workspace = true }
openprot-hal-blocking = { workspace = true }
zerocopy = { workspace = true }
embedded-hal-1 = { workspace = true }
ast1060-pac = { workspace = true }
[lints]
workspace = true
17 changes: 17 additions & 0 deletions drv/ast1060-ecdsa/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//! P384 Serializable Key and Signature Implementation
//!
//! This module provides concrete implementations of the OpenPRoT serializable
//! key and signature traits for the P384 elliptic curve, supporting zero-copy
//! serialization and deserialization.
#![no_std]

use openprot_hal_blocking::ecdsa::{P384, PublicKey, P384PublicKey, P384Signature, SerializablePublicKey, SerializableSignature, Signature, ErrorKind};
use zerocopy::{IntoBytes, FromBytes, Immutable};


pub mod verifier;

// Re-export the main verifier types for other crates to use
pub use verifier::{AspeedEcdsa, AspeedEcdsaError};


Loading