关于非对称加密算法我就不过多介绍了,本文着重于python3对RSA算法的实现。
from Crypto.PublicKey import RSA
import Crypto.Signature.PKCS1_v1_5 as sign_PKCS1_v1_5 #用于签名/验签
from Crypto.Cipher import PKCS1_v1_5 #用于加密
from Crypto import Random
from Crypto import Hash
x = RSA.generate(2048)
# y = RSA.generate(2048, Random.new().read) #
1