# Thread:

1. ## RSA algorithm why is this impossible for a useful RSA code?

e = 3
n = 10
M = 7

phi(n) = (5-1) * (2-1) = 4

ed = 1 mod 4
3d = 1 mod 4

d = 3

why is this impossible for a useful RSA code?

2. I don't know what you mean, it is a correct key generation mathematically speaking. Now, you can see that $e = d$, which is not great cryptographically speaking. And your semiprime is even (instant factorization). And your values are very small.

So what do you mean by "impossible" ?

3. Originally Posted by adam_leeds
e = 3
n = 10
M = 7

phi(n) = (5-1) * (2-1) = 4

ed = 1 mod 4
3d = 1 mod 4

d = 3

why is this impossible for a useful RSA code?
It is a valid RSA setup.
It is not very useful unless your alphabet only has 10 characters.

Not impossible.
But, not very useful.

Your alphabet may have 26 or 67 or 360 alphabetic characters, but when it is decoded you are going to have only 10 characters {n: 0,1,2,3,4,5,6,7,8,9 }

If you use the above to encode a message, you will use 1 character of plain_text to generate 1 character of cipher_text.
After the tenth character you are going to get a 1 to 1 relationship. It becomes a simple substitution cipher.

Typically, you would want to encode a group of characters at a time.
Suppose you have a group of plain_text (say 12 characters of your which are ALL ones: 111111111111) and generate a cipher_text.
If you change a single bit in the plain_text (111111111121) you want generate a completely different cipher_text that has NO similarity to the other cipher_text.

4. Originally Posted by Bacterius
I don't know what you mean, it is a correct key generation mathematically speaking. Now, you can see that $e = d$, which is not great cryptographically speaking. And your semiprime is even (instant factorization). And your values are very small.

So what do you mean by "impossible" ?
not sure thats what my question says, and i dont understand it.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 2, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.929821252822876, "perplexity_flag": "middle"}