# What would be a simple example of an asymmetric encryption function (asymmetric function)?

I am trying to understand RSA encryption but the algorithm seems quite complex.

I know that with asymmetric encryption you use a key and a function to encrypt data and a different function to decrypt it.

I understand the xor-ing used in most basic symmetric algorithms (functions). The same key (a series of bits of the same length as the plain data is used to encrypt and decrypt). This is possible because the xor function is symmetric (from what I know).

What are some examples of asymmetric functions? What is the function that you use to encrypt and what is the function you use to decrypt and how do you compute the second argument of the function (the first one being the data you are trying to encrypt/decrypt)?

• You may want to ask this question to the crypto community. You will probably get a more technical and reasoned answer there. – Brent Kirkpatrick Mar 20 '16 at 19:24
• If you think of algebraic theory, then an asymmetric function would be one that is not its own inverse. – Brent Kirkpatrick Mar 20 '16 at 19:25
• That is correct. That is what I had in mind when I said symmetric ( I am not sure if it is the right term though). So xor is symmetric because the inverse of xor is xor. Is there any other definition of symmetric function? – yoyo_fun Mar 20 '16 at 19:29
• RSA isn't that complicated, actually. You can do it on paper and there is a simple example on the wiki that may help you to understand what is happening there. Rather than trying to understand schemes that are simpler (they exists, but are insecure), you may as well understand RSA. You only need to know a tiny part of maths to understand that (and parts of it you learned when learning to tell the time) – Tobi Nary Mar 20 '16 at 19:45
• Brent - we have a rule: Be Nice! You are very close to overstepping the line here. I will respond to flags. – Rory Alsop Mar 20 '16 at 20:49

• @yoyo_fun: it is, except that in order to reach decent security (i.e. resistance to attackers who know their maths), RSA is done with integers which are quite bigger than that C offers. With C, integers are up to 64-bit, but with RSA we usually handle 2048-bit integers. Some libraries (e.g. gmp) or programming languages have support for big integers (e.g. Java's BigInteger class). – Thomas Pornin Mar 20 '16 at 20:43