id0-rsa.pubのメモ【Intro to RSA】

Intro to RSA

RSAが何かという話。
以下問題文。

Given the following public key, private key, and encrypted message (c=me mod N), compute the original message (m). Submit your answer as a hex integer (no lead 0x, all lower case characters).

(e, N) = (0x3, 0x64ac4671cb4401e906cd273a2ecbc679f55b879f0ecb25eefcb377ac724ee3b1)
d = 0x431d844bdcd801460488c4d17487d9a5ccc95698301d6ab2e218e4b575d52ea3
c = 0x599f55a1b0520a19233c169b8c339f10695f9e61c92bd8fd3c17c8bba0d5677e

cを復号すれば良い。dが与えられているのであとは計算するだけ。

$ python
>>> hex(pow(c, d, N))
'0x4d801868d894740b2be29309fcd3edcd51bd2c2a685028b89290f9268c727581L'

今日は夜遅いのでこれだけでおしまい。