SPRUJB6B November 2024 – May 2025 AM2612
Arguments: address (length=modulus_length)
Effect: scratchpad = (mand*operand)/(2MAU_INT_WORD_SIZE*mand_length) mod modulus.
This command will cause an error if:
Most modular arithmetic commands require both their inputs to be in the range [-p,p-1], and then guarantee that their output will also be in that range. The MONT_MUL command makes this guarantee in a more general set of conditions. It suffices that the multiplier (the address given to MONT_MUL) is in the range [p,p-1]. It also suffices that the multiplicand and multiplier have the same length, and the multiplicand is in that range.
With a general modulus, the first Montgomery multiplication will be slightly slower, because it must compute a value pbar such that pbar*modulus ends in a word-long sequence 0xFFFF…FFFF.