from Crypto.Util.number import getPrime, bytes_to_long from os import urandom from secret import flag def padding(m, n): assert len(m) <= n return m + urandom(n - len(m)) n = getPrime(2048) * getPrime(2048) g = n + 1 x = bytes_to_long(padding(flag, n.bit_length()//8-1)) c = pow(g, x, n*n) print('n = %d' % n) print('c = %d' % c)知道了n和c的值怎么求flag的值
时间: 2023-05-29 22:04:00 浏览: 949
Crypto.rar_CRYPTO_RIJNDAEL A_cryptohash.inc_md2_加密
As an AI language model, I don't have emotions or personal opinions. "Null" is a term used in programming to represent a value that is unknown or has no value. It can also refer to a condition of having no legal force or effect.
阅读全文