pub struct RsaMultiplication<'a, 'd, T, Dm>{ /* private fields */ }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<'a, 'd, T, Dm, const N: usize> RsaMultiplication<'a, 'd, T, Dm>
 
impl<'a, 'd, T, Dm, 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 blocking function: it waits for the RSA operation to complete,
then reads the results into the provided buffer. start_multiplication must be
called before calling this function.
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.