WordOperations
Trait defining bitwise operations for word types used in cryptographic algorithms.
Fully qualified path: alexandria_math::sha512::WordOperations
pub trait WordOperations<T>
Trait functions
shr
Performs logical right shift operation.
Arguments
self- The value to shiftn- Number of positions to shift right
Returns
T- The shifted value
Fully qualified path: alexandria_math::sha512::WordOperations::shr
fn shr(self: T, n: u64) -> T
shl
Performs logical left shift operation.
Arguments
self- The value to shiftn- Number of positions to shift left
Returns
T- The shifted value
Fully qualified path: alexandria_math::sha512::WordOperations::shl
fn shl(self: T, n: u64) -> T
rotr_precomputed
Performs rotate right with precomputed power values for efficiency.
Arguments
self- The value to rotatetwo_pow_n- Precomputed value of 2^ntwo_pow_64_n- Precomputed value of 2^(64-n)
Returns
T- The rotated value
Fully qualified path: alexandria_math::sha512::WordOperations::rotr_precomputed
fn rotr_precomputed(self: T, two_pow_n: u64, two_pow_64_n: u64) -> T
rotl
Performs rotate left operation.
Arguments
self- The value to rotaten- Number of positions to rotate left
Returns
T- The rotated value
Fully qualified path: alexandria_math::sha512::WordOperations::rotl
fn rotl(self: T, n: u64) -> T