$K_{pub} = (n, e)$
$K_{pvt} = d$
Then
$E_{K_{pub}}(x) \equiv x^e \mod n$
Practically, when RSA is used to encrypt strings, what is the $x$ here? You cannot take it byte by byte because $\mod n$ will result in values larger than a byte. So what is done?
mod n
will result in values larger than a byte – user93353 Jan 14 '21 at 09:49e
to encrypt this? If I raise A (65) to the powere
mod n, then the result wouldn't fit in a byte - so A encrypted may take more than 1 byte. It may take upto n/8 bytes. So do I chop the string "ABCD" into n bit size blocks & then iteratively raise each block to powere
? – user93353 Jan 14 '21 at 10:4665666769
then encrypt it of course using with a proper scheme like PKCS#1 v1.5 padding or OAEP – kelalaka Jan 14 '21 at 10:48