1. encrypto1 = rsa.core.encrypt_int(a, public_key.e, public_key.n): This line encrypts the integer variable a using the RSA encryption algorithm with the public key public_key.e and public_key.n. The result is stored in the variable encrypto1.

  2. encrypto2 = rsa.core.encrypt_int(b, public_key.e, public_key.n): This line encrypts the integer variable b using the RSA encryption algorithm with the public key public_key.e and public_key.n. The result is stored in the variable encrypto2.

  3. decrypto =rsa.core.decrypt_int(encrypto1*encrypto2, private_key.d, public_key.n): This line performs the decryption process by multiplying encrypto1 and encrypto2 and then decrypting the result using the RSA decryption algorithm with the private key private_key.d and public_key.n. The decrypted value is stored in the variable decrypto.

  4. print(decrypto): This line prints the decrypted value stored in the variable decrypto

encrypto1 = rsacoreencrypt_inta public_keye public_keynencrypto2 = rsacoreencrypt_intb public_keye public_keyndecrypto =rsacoredecrypt_intencrypto1encrypto2 private_keyd public_keynprintdecrypto逐行解释代码

原文地址: https://www.cveoy.top/t/topic/hBya 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录