logoalt Hacker News

geekgod382 • today at 4:01 AM • 1 reply • view on HN

I don't understand the math. What does plaintext^e mod n actually do?


Replies

pred_ • today at 7:24 AM

Convert the plaintext to a number using some reversible encoding scheme. For instance, if the plaintext is an ASCII string, then take the ASCII index for each character to get fixed length binary strings, combine those strings.

Take that number, raise it to the power of e, and take the remainder after division of that number by n.