Modular multiplicative inverse

模逆元是数论中的一种概念,特别是在模算术的领域。它是一个整数x,使得ax≡1(modm)。这种关系在解决线性同余方程如ax≡b(modm)时至关重要。模逆元的计算在公钥密码系统,如RSA算法中具有实际应用,并且可以使用扩展欧几里得算法快速计算。
摘要由CSDN通过智能技术生成

In mathematics, particularly in the area of arithmetic, a modular multiplicative inverse of an integer a is an integer x such that the product ax is congruent to 1 with respect to the modulus m.[1] In the standard notation of modular arithmetic this congruence is written as




1
(
mod

)
,
ax \equiv 1 \pmod{m},
which is the shorthand way of writing the statement that m divides (evenly) the quantity ax − 1, or, put another way, the remainder after dividing ax by the integer m is 1. If a does have an inverse modulo m, then there are an infinite number of solutions of this congruence, which form a congruence class with respect to this modulus. Furthermore, any integer that is congruent to a (i.e., in a’s congruence class) has any element of x’s congruence class as a modular multiplicative inverse. Using the notation of

¯{\displaystyle {\overline {w}}} to indicate the congruence class containing w, this can be expressed by saying that the modulo multiplicative inverse of the congruence class

¯{\overline {a}} is the congruence class

¯{\overline {x}} such that:


¯



¯

1
¯
,
{\displaystyle {\overline {a}}\cdot _{m}{\overline {x}}={\overline {1}},}
where the symbol


{\displaystyle \cdot _{m}} denotes the multiplication of equivalence classes modulo m.[2] Written in this way, the analogy with the usual concept of a multiplicative inverse in the set of rational or real numbers is clearly represented, replacing the numbers by congruence classes and altering the binary operation appropriately.

As with the analogous operation on the real numbers, a fundamental use of this operation is in solving, when possible, linear congruences of the form

.
{\displaystyle ax\equiv b{\pmod {m}}.}
Finding modular multiplicative inverses also has practical applications in the field of cryptography, i.e. public-key cryptography and the RSA algorithm.[3][4][5] A benefit for the computer implementation of these applications is that there exists a very fast algorithm (the extended Euclidean algorithm) that can be used for the calculation of modular multiplicative inverses.

Modular arithmetic

Integers modulo m
Multiplicative group of integers modulo m
Example
Computation

Extended Euclidean algorithm
Using Euler’s theorem
Multiple inverses
Applications
See also

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值