pub struct Decryptor<C: Config<F, T>, F: PrimeField256, const T: usize, const R: usize> { /* private fields */ }Expand description
Decrypts an arbitrary number of field elements in batches of R using the Poseidon permutation
with state size T.
R must be T - 1 (the last element is reserved for capacity).
This symmetric cipher is implemented using the Poseidon PRP as a block cipher in duplex sponge mode, which is similar to CFB. The key lives in the capacity element.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<C, F, const T: usize, const R: usize> Freeze for Decryptor<C, F, T, R>
impl<C, F, const T: usize, const R: usize> RefUnwindSafe for Decryptor<C, F, T, R>
impl<C, F, const T: usize, const R: usize> Send for Decryptor<C, F, T, R>
impl<C, F, const T: usize, const R: usize> Sync for Decryptor<C, F, T, R>
impl<C, F, const T: usize, const R: usize> Unpin for Decryptor<C, F, T, R>
impl<C, F, const T: usize, const R: usize> UnsafeUnpin for Decryptor<C, F, T, R>
impl<C, F, const T: usize, const R: usize> UnwindSafe for Decryptor<C, F, T, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more