Current location - Quotes Website - Signature design - What is RSA?
What is RSA?
RSA public key cryptosystem is named after three cryptographers who invented the system, Rivest, Shamir and Adleman, and it has become the most successful algorithm in commercialization.

System establishment and key generation choose two large prime numbers P and Q, and the other one is n=pq. Random numbers e and d are selected according to certain rules, so that they satisfy edmod (p-1) (q-1) =1. Then (e, n) is made public as the public key of the user, and D is saved as the private key of the corresponding user.

Encryption process If plaintext message M is to be encrypted and sent to users, the calculation process of ciphertext C is as follows: c = me mod n.

In the process of decryption, when the user receives the ciphertext c, the ciphertext is recovered by calculating CD mod n = m.

The security of RSA public key system is a mathematical problem based on prime decomposition of large integers. Once people find an effective way to decompose large integers, the security of RSA public key cryptosystem will collapse.

RSA public key cryptosystem can be easily transformed into digital signature scheme. Suppose a user (user A) owns RSA public and private key pair, that is, private key D corresponds to public key (e, n).

Generate signature When user A wants to digitally sign plaintext message M, calculate s=md mod n, then S is the digital signature of message M. ..

Verifying Signature When a user (user B) wants to verify the digital signature of user A, user B needs to get the plaintext message M and the digital signature S, and then verify whether the equation se mod n=m holds. If yes, the verification is passed, otherwise the legal digital signature with S as m cannot be accepted.

Note that digital signature does not provide message confidentiality, because the signer needs to send the signature message M and signature S to the verifier at the same time. If you don't want others to illegally obtain the content of M in this process, you need to encrypt M again. This situation is not a simple digital signature, but a combination of encryption and digital signature. A more effective method is to use signature encryption algorithm.

(Please inform before reprinting)