mirror of
https://github.com/trussed-dev/trussed-rsa-backend.git
synced 2026-06-20 04:16:22 -07:00
Fix compilation
This commit is contained in:
@@ -46,7 +46,7 @@ pub trait Rsa2048Pkcs1v15: CryptoClient {
|
||||
/// The resulting [`serialized_key`](trussed::api::reply::SerializeKey::serialized_key) contains a buffer of the parts of the key
|
||||
/// as a postcard-serialized [`RsaPublicParts`](crate::RsaPublicParts):
|
||||
/// ```
|
||||
///# use rsa_backend::*;
|
||||
///# use trussed_rsa_backend::*;
|
||||
///# use trussed::{postcard_deserialize,syscall,types::Location::{Volatile,Internal}};
|
||||
///# mod client {
|
||||
///# include!("../tests/client/mod.rs");
|
||||
@@ -165,7 +165,7 @@ pub trait Rsa3072Pkcs1v15: CryptoClient {
|
||||
/// The resulting [`serialized_key`](trussed::api::reply::SerializeKey::serialized_key) contains a buffer of the parts of the key
|
||||
/// as a postcard-serialized [`RsaPublicParts`](crate::RsaPublicParts):
|
||||
/// ```
|
||||
///# use rsa_backend::*;
|
||||
///# use trussed_rsa_backend::*;
|
||||
///# use trussed::{postcard_deserialize,syscall,types::Location::{Volatile,Internal}};
|
||||
///# mod client {
|
||||
///# include!("../tests/client/mod.rs");
|
||||
@@ -284,7 +284,7 @@ pub trait Rsa4096Pkcs1v15: CryptoClient {
|
||||
/// The resulting [`serialized_key`](trussed::api::reply::SerializeKey::serialized_key) contains a buffer of the parts of the key
|
||||
/// as a postcard-serialized [`RsaPublicParts`](crate::RsaPublicParts):
|
||||
/// ```
|
||||
///# use rsa_backend::*;
|
||||
///# use trussed_rsa_backend::*;
|
||||
///# use trussed::{postcard_deserialize,syscall,types::Location::{Volatile,Internal}};
|
||||
///# mod client {
|
||||
///# include!("../tests/client/mod.rs");
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// #![no_std]
|
||||
#![no_std]
|
||||
|
||||
use heapless_bytes::Bytes;
|
||||
use num_bigint_dig::traits::ModInverse;
|
||||
@@ -112,7 +112,7 @@ fn deserialize_parts_key(
|
||||
) -> Result<reply::DeserializeKey, Error> {
|
||||
let parsed: RsaPublicParts = postcard_deserialize(&request.serialized_key).map_err(|_err| {
|
||||
error!("Failed to deserialize key parts");
|
||||
dbg!(Error::InvalidSerializedKey)
|
||||
Error::InvalidSerializedKey
|
||||
})?;
|
||||
let n = BigUint::from_bytes_be(parsed.n);
|
||||
let e = BigUint::from_bytes_be(parsed.e);
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
|
||||
use rsa_backend::SoftwareRsa;
|
||||
use trussed_rsa_backend::SoftwareRsa;
|
||||
|
||||
pub struct Dispatcher;
|
||||
pub enum BackendIds {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ use trussed::types::Mechanism;
|
||||
use trussed::types::StorageAttributes;
|
||||
use trussed::Bytes;
|
||||
|
||||
use rsa_backend::*;
|
||||
use trussed_rsa_backend::*;
|
||||
|
||||
use hex_literal::hex;
|
||||
use num_bigint_dig::BigUint;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ use trussed::types::Mechanism;
|
||||
use trussed::types::StorageAttributes;
|
||||
use trussed::Bytes;
|
||||
|
||||
use rsa_backend::*;
|
||||
use trussed_rsa_backend::*;
|
||||
|
||||
use hex_literal::hex;
|
||||
use num_bigint_dig::BigUint;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ use trussed::types::Mechanism;
|
||||
use trussed::types::StorageAttributes;
|
||||
use trussed::Bytes;
|
||||
|
||||
use rsa_backend::*;
|
||||
use trussed_rsa_backend::*;
|
||||
|
||||
use hex_literal::hex;
|
||||
use num_bigint_dig::BigUint;
|
||||
|
||||
Reference in New Issue
Block a user