Montgomery Reduction Scheme Functions
- length of the contextIppsMontStateis defined as the data length of the modulusncarried by the structure
- size of the contextIppsMontStateis therefore defined as the maximum data length of such an integer modulusnthat could be carried by this operational vehicle.
- Get the buffer size required to configure the contextIppsMontStateby calling the functionMontGetSize. For limited memory system, choose binary method, and otherwise, choose sliding window method. Using the binary method reduces the buffer size significantly while using sliding window method enhances the performance.
- Call the functionMontSetto set the integer big number module forIppsMontState.
- Call the functionMontFormto convert the integerxto be its Montgomery form.
- Call the functionMontExpto compute the Montgomery modular exponentiation.
- Call the functionMontMulto compute the Montgomery modular multiplication of the above result with the integer 1 as to convert the above result back to the desired classical modular exponential result.
- Clean up secret data stored in the context.
- Free the memory using an operating system memory free function, if needed.