pub trait TeeBigIntExt {
// Required methods
unsafe fn to_teebigint(
&self,
bigint: *mut TEE_BigInt,
alloc_size: usize,
) -> Result<(), Error>;
unsafe fn from_teebigint(bigint: *const TEE_BigInt) -> Result<Self, Error>
where Self: Sized;
}Expand description
TEE BigInt 扩展 trait
Required Methods§
Sourceunsafe fn to_teebigint(
&self,
bigint: *mut TEE_BigInt,
alloc_size: usize,
) -> Result<(), Error>
unsafe fn to_teebigint( &self, bigint: *mut TEE_BigInt, alloc_size: usize, ) -> Result<(), Error>
将 MPI 转换为 TEE_BigInt
Sourceunsafe fn from_teebigint(bigint: *const TEE_BigInt) -> Result<Self, Error>where
Self: Sized,
unsafe fn from_teebigint(bigint: *const TEE_BigInt) -> Result<Self, Error>where
Self: Sized,
从 TEE_BigInt 创建 MPI
Implementations on Foreign Types§
Source§impl TeeBigIntExt for Mpi
为 Mpi 实现 TEE BigInt 扩展 trait
impl TeeBigIntExt for Mpi
为 Mpi 实现 TEE BigInt 扩展 trait
Source§unsafe fn to_teebigint(
&self,
bigint: *mut TEE_BigInt,
alloc_size: usize,
) -> Result<(), Error>
unsafe fn to_teebigint( &self, bigint: *mut TEE_BigInt, alloc_size: usize, ) -> Result<(), Error>
将 Mpi 对象复制到 TEE_BigInt 结构中
注意:mbedtls 使用 64-bit limbs,而 TEE_BigInt 使用 32-bit limbs
Source§unsafe fn from_teebigint(bigint: *const TEE_BigInt) -> Result<Self, Error>
unsafe fn from_teebigint(bigint: *const TEE_BigInt) -> Result<Self, Error>
从 TEE_BigInt 结构体创建 Mpi 对象
从 TEE_BigInt 提取数据并初始化 Mpi