明文x=200412
p=499, q=929 (p,q是素数)
n = p×q = 499×929 =463571
φ(n) = (p-1)(q-1) = (499-1) (929-1) = 462144
取a=255157, b=9949 (ab mod φ(n)=1, 255157×9949=462144×5493+1)
加密:
密文y=xb mod n=2004129949 mod 463571=418883
解密:
密文x=ya mod n=418883255157 mod 463517=200412