# Tweaking textbook RSA to make the encryption a Pseudorandom function

Lets say I want to tweak/alter the textbook RSA encryption function to create a pseudorandom function by pre-processing the input.

Suppose I do something simple like add 2 to the input before encrypting it:

$$c = (m+2)^e \bmod N$$

How do I know if this is not a secure pseudorandom function? Does this give any information about N?

I am aware that no tweak can make it a pseudo-random function. I am just trying to understand which values this setting cannot output so as to build a distinguisher. Sorry if I wasn't clear earlier. My question originally meant to ask which ciphertexts cannot be the output of this setting in order to distinguish it from a purely random function. I know 1 thing - This setting will never output 0 & 1 as the input is bounded $$0<=m<2^n$$

-

Didn't you answer your own question with the edit? This function can never output zero or one. If not, please clarify your question. – Jens Dec 18 '12 at 11:38

## 1 Answer

This is not a secure pseudorandom function. No tweak is going to make this a pseudorandom function. After all, it is a public-key operation, so anyone who knows your algorithm can compute $f(m)$ given $m$. Consequently, it cannot possibly be pseudorandom: there will always be a trivial distinguisher.

What are you actually trying to accomplish? Why do you think you want a tweak to RSA that makes it a pseudorandom function -- what problem are you trying to solve? I think you may need to step back from the specific mechanism you have in mind and think through what are the broader requirements of your particular application. Once you've done that, we may be in a better position to help you solve your problem.

-
{"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": 2, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "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": 20, "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": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9234657287597656, "perplexity_flag": "head"}