The invention provides a soft and hard collaborative segmented scanning type Montgomery
modular exponentiation calculation
system. An ARM processor and FPGA resources are arranged in the SoC platform. The ARM end is mainly used for overall task scheduling and data preprocessing necessary for a
system segmentation scanning
algorithm. Storing the processed data into a specific address of an SRAM (
Static Random Access Memory), and then starting an FPGA (
Field Programmable Gate Array) for operation. The FPGA end realizes
modular design and comprises an address generation module, a
modular inversion module, a CIOS Montgomery modular multiplication module, a segmented scanning type Montgomery
modular exponentiation control module and the like. According to the invention, 256-bit
modular exponentiation is realized, a 6-bit segmented scanning mode is adopted, and data to be pre-processed is stored in an SRAM (
Static Random Access Memory). Specifically, the Montgomery modular multiplication module is realized by adopting a CIOS
algorithm, large-bit-width 256-bit multiplication is subjected to 64-bit splitting, the area consumption caused by the large-bit-width multiplication is reduced, meanwhile, the CIOS
algorithm is optimized in the streamlined aspect, two original internal loops are subjected to streamlined
processing, the two internal loops are completed only by increasing a small number of periods, and the execution efficiency is improved.