search

Home  >  Q&A  >  body text

php - In the rsa encryption algorithm, if the client's public key is leaked, is there a security risk?

After the public key in RSA is known to a third party, the third party uses the public key to encrypt the data; for example: A wants to write a letter to B: 1. B sends the public key to A 2. A gets the public key to encrypt the content of the letter , send the content to B 3. B decrypts it with the private key after getting A’s letter. Then the question comes: Question 1: When B gives A the public key, it is known by the third party C, can C also write to B?

世界只因有你世界只因有你2782 days ago2007

reply all(3)I'll reply

  • 習慣沉默

    習慣沉默2017-05-16 13:04:26

    The public key itself is public and can be known by anyone. The ciphertext encrypted by the public key can only be decrypted by the private key. Even the encrypted party cannot use the public key to decrypt the ciphertext, so no one who gets the public key can decrypt it.
    If you want to talk about the issue of authentication, that is, C can pretend to be B and write to A, this involves the issue of authentication.

    reply
    0
  • 阿神

    阿神2017-05-16 13:04:26

    Public key, as the name suggests, is something you are not afraid of showing to others

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-16 13:04:26

    Confusing data encryption with authentication.
    The public key obtained by C is only used for data encryption.
    In order for C to be able to successfully send data to B, it must pass B’s identity authentication level.
    B’s identity authentication for C has nothing to do with B’s public key.

    reply
    0
  • Cancelreply