import hashlib from Crypto.PublicKey import RSA from Crypto.Signature import pkcs1_15 from Crypto.Hash import SHA256 from Crypto import Random # pip install pycryptodome def generate_rsa_keys(key_size=1024): """生成RSA密钥对并详细输出""" print("1. 生成RSA密钥对...") key = RS…
