Modular inverse arithmetic plays an important role in elliptic curve cryptography.This paper analyzes the Montgomery modular inversion algorithm in finite fields GF(p) and GF(2n) respectively and improves the latter by advancing the comparison of degree of variables.This improvement makes it easy to implement the Modular inverse arithmetic in GF(p) and GF(2n) in a unified hardware design and shortens the delay of comparison of degree.A dual-field modular inversion algorithm is presented and a scalable and unified architecture for Montgomery inverse hardware in finite fields GF(p) and GF(2n) is completed accordingly.Finally this work has been verified by modeling it in Verilog-HDL,implementing it under 0.18 μm CMOS technology.The result indicates that the work has advanced performance better than other works.