摘要:
# rsa 加密 def rsa_encrypt_bytes(bytes_str, n, e): if not isinstance(bytes_str, bytes): return None # 导入rsa库 import rsa.common pubkey = rsa.PublicKey(n, e) key_length = rs... 阅读全文
摘要:
# 分解模数n def rsa_moder(n): base = 2 while base < n: if n % base == 0: return base, n // base base += 1 # 求欧拉函数f(n) def rsa_get_euler(prime1, prime2): retu... 阅读全文