This invention discloses a reconfigurable circuit for public-
key cryptography algorithms. This circuit combines coarse / sub-coarse-grained reconfigurable circuits with
microcontroller circuits. The sub-coarse-grained reconfigurable unit array employs a reconfigurable multiplier array from a multi-level reconfigurable NTT circuit to support NTT's underlying
modular arithmetic. The coarse-grained reconfigurable units, through parameter configuration and data
interconnection configuration, are used to implement large integer
modular exponentiation and elliptic curve
scalar multiplication. Based on the novel multi-level reconfigurable NTT circuit provided in this invention,
quantum-resistant cryptographic algorithms can be implemented while also supporting traditional public-key cryptographic algorithms, thus offering advantages such as a small
algorithm engine area and high flexibility.