pub struct RsaMultiplication<'a, 'd, T: RsaMode + Multi, Dm: DriverMode> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
Support for RSA peripheral’s large number multiplication feature that could
be used to find the operand a * operand b
.
Each operand is a little endian byte array of the same size
Implementations§
Source§impl<T, const N: usize> RsaMultiplication<'_, '_, T, Async>
impl<T, const N: usize> RsaMultiplication<'_, '_, T, Async>
Sourcepub async fn multiplication<const O: usize>(
&mut self,
operand_b: &T::InputType,
outbuf: &mut T::OutputType,
)where
T: Multi<OutputType = [u32; O]>,
pub async fn multiplication<const O: usize>(
&mut self,
operand_b: &T::InputType,
outbuf: &mut T::OutputType,
)where
T: Multi<OutputType = [u32; O]>,
Asynchronously performs an RSA multiplication operation.
Source§impl<'a, 'd, T, Dm: DriverMode, const N: usize> RsaMultiplication<'a, 'd, T, Dm>
impl<'a, 'd, T, Dm: DriverMode, const N: usize> RsaMultiplication<'a, 'd, T, Dm>
Sourcepub fn new(rsa: &'a mut Rsa<'d, Dm>, operand_a: &T::InputType) -> Self
pub fn new(rsa: &'a mut Rsa<'d, Dm>, operand_a: &T::InputType) -> Self
Creates an instance of RsaMultiplication
.
Sourcepub fn start_multiplication(&mut self, operand_b: &T::InputType)
pub fn start_multiplication(&mut self, operand_b: &T::InputType)
Starts the multiplication operation.
Sourcepub fn read_results<const O: usize>(&mut self, outbuf: &mut T::OutputType)where
T: Multi<OutputType = [u32; O]>,
pub fn read_results<const O: usize>(&mut self, outbuf: &mut T::OutputType)where
T: Multi<OutputType = [u32; O]>,
Reads the result to the given buffer.
This is a non blocking function that returns without an error if
operation is completed successfully. start_multiplication
must be
called before calling this function.