Skip to content
FoxcolabMessenger
Glossary

What is Public-key cryptography?

Public-key cryptography: Public-key cryptography uses a pair of linked keys: a public key anyone can use to encrypt or verify, and a private key only its owner keeps.

Also called: asymmetric cryptography, asymmetric encryption, public and private keys

Updated

Public key cryptography, also called asymmetric cryptography, uses two mathematically linked keys instead of one shared secret. The public key can be handed to anyone. The private key stays with its owner. Data locked with the public key can be unlocked only with the matching private key, which lets two people set up a secret conversation over an open network without ever meeting.

The padlock analogy

Think of a public key as an open padlock that you give out freely, and the private key as the only key that opens it. Anyone can snap your padlock shut on a box and send it to you, but only you can open it. Copying the padlock does not help an attacker, because closing the lock is easy and opening it needs the key.

Two jobs: encryption and signatures

  • Encryption and key agreement: others use your public key to send you secrets, or to agree a shared key with you through methods such as Diffie-Hellman.
  • Digital signatures: you sign data with your private key, and anyone can check the signature with your public key. This is how your phone confirms an app update really came from its developer, and how a website proves its identity.

Where you use public key cryptography every day

Every HTTPS website, most app logins, software updates and end-to-end encrypted messaging rely on it. Public-key operations are slow compared with ordinary symmetric encryption such as AES, so systems use them to agree or protect a short-lived symmetric key, then encrypt the actual data with that key. Modern apps typically use elliptic-curve keys, for example Curve25519, which are small and fast on phones.

The trust problem

Public keys solve secrecy but raise a new question: how do you know a public key really belongs to the person you think it does? Websites use certificates issued by trusted authorities. Messaging apps use identity keys and, in some apps, safety numbers or QR codes that two people can compare in person to confirm that nobody has swapped a key in the middle.

Will quantum computers break it?

Large quantum computers could one day break today's common public-key algorithms. That is why new post-quantum algorithms have been standardized and are gradually being added to protocols, often alongside the existing ones so that a weakness in either does not expose your data.

Public-key cryptography in Foxcolab

When you sign up, Foxcolab generates a Signal Protocol identity key pair on your phone. The public parts, along with pre-keys, are shared through Foxcolab's servers so others can start an end-to-end encrypted personal chat with you even when you are offline, while the private keys are kept on your device. This public-key setup protects personal one-to-one chats between people. Group chats, Teams, Spaces and chats with business accounts are encrypted in transit (TLS).

How Foxcolab handles security

Frequently asked questions

What is the difference between a public key and a private key?

A public key can be shared with anyone and is used to encrypt messages to you or check your signatures. A private key must stay secret and is used to decrypt those messages or create signatures.

Is RSA public-key cryptography?

Yes. RSA is one of the oldest public-key algorithms. Many modern apps prefer elliptic-curve algorithms because they offer similar security with much smaller keys.

What happens if someone gets my private key?

They could decrypt data meant for you or impersonate you. That is why private keys stay on the device, and why protocols like Signal's keep changing message keys to limit the damage.

Get Foxcolab for your family

Available on Google Play and the App Store. ₹49 once in India, with no subscription and no ads.