# Secret, Public, and Private Keys?

...and nonces. Can someone show an example of how this actually works using small intelligible numbers? For example:

secret key: "100" public key: "10" private key: "1000"

I am just trying to better understand the concept of "signing" and how public keys are generated and what/how private keys are generated.

Is this possible to do without going in to some mind twisting mathematics?

• All you need to do is use small prime numbers. RSA's strength is in the use of large prime numbers, but other than that, the math is quite simple. Can you tell us what research you have done and what about it was "mind twisting"? It will help us answer you better. – schroeder May 26 '15 at 16:38
• Here's a related question and answer about terminology. No numerical example though, just concepts. – RoraΖ May 26 '15 at 17:09
• Just for information, be aware that there is also a site from the StackExchange network fully dedicated to cryptography. You will find there other questions by people calculating RSA by hand (for instance here and there). – WhiteWinterWolf May 27 '15 at 8:42

Confusing question, but I'll take a stab...

• 'Secret Keys' are used in symmetric encryption, meaning the sender and receiver have the same key that is used to turn text into a cypher AND to turn the cypher back into text on the other end. AES is a 'symmetric' algorithm.

• 'Public Keys' are coupled with a private key to do asymmetric encryption, meaning the receivers public key is used by the sender to turn text into a cypher, but decryption on the receiving end requires the receivers private key. RSA is a asymmetric algorithm.

Often asymmetric algorithms are used to initialize a connection and to exchange secret keys to do symmetric encryption from that point forward due to performance. Such is the case with https.

• 'Signing' refers to Public Key Infrastructure (PKI) where certificate authorities provide some level of assurance that a website is who they say they are. Only related to public/private/secret keys in that they 'sign' the web providers SSL/TLS certificates.
• Thanks Brian. So a VPN: each gateway has a secret key/password used for symmetric encryption. IKE Phase 1: Authentication, key establishment and negotiation of cryptographic algorithms. So, the initiating gw sends not the secret but a hash of it (the secret after being run thru the hashing algorithm)? – Ronnie Royston May 26 '15 at 19:03

Secret key. It is a key that is shared by both parties. So let's take a simple cipher called rot which shifts the byte value by the amount of a secret key E.g. Key is 10. Byte sequence 12,34,68 would be converted to 22,44,78 when encrypted with the key and decrypted back to the same value using the same key.

Asymmetric keys such as private and public can require some math. The concept is basically the same except the key value is not the same. One is public the other is private.

The concept is something like this.

G(F(x)) = x

Where F is a public key function and G is a private key function when both are applied as above to x you should get x.

Unfortunate developing an algorithm for this requires a bit of math. Most commonly inverse modulo.