Realm

oa::crypto::bigint::reduce_montgomery

Compute public-data reduce_montgomery on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status). Computes T * R^-1 mod m for a double-width T. R = 2^(32*words); odd nonzero m is required. Invalid rows are zero. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

FnRust public API

Function Documentation

pub fn reduce_montgomery( left: &Matrix, modulus: &Matrix, ) -> Result<( Matrix, Matrix )>
Compute public-data reduce_montgomery on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status). Computes T * R^-1 mod m for a double-width T. R = 2^(32*words); odd nonzero m is required. Invalid rows are zero. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.