Pgp Key Generator
Fast, accurate and free online pgp key generator tool running directly in your browser.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulPGP Key Generator – What is PGP and how to keep your correspondence private?
In the era of widespread surveillance, data leaks and cyber threats, protecting privacy in electronic communications becomes a priority. Traditional emails are sent in clear text, which means they can be intercepted and read by third parties at any stage of transmission. One of the most powerful and proven tools for securing email and files is **PGP** (Pretty Good Privacy) cryptography. Created in 1991 by Phil Zimmermann, the PGP system is based on the concept of **asymmetric** (public key) cryptography.
Our free **Online PGP Key Generator** allows you to quickly and securely generate a unique pair of keys: **public key** and **private key**. The entire key pair generation process takes place directly in your web browser (locally) using the WebCrypto API standard. This means that your secret private key never goes online and remains solely in your hands.
How does PGP asymmetric cryptography work?
Unlike symmetric encryption (where the same key/password is used for encryption and decryption), asymmetric cryptography uses a pair of mathematically related keys:
- Public Key:As the name suggests, you can (and should) share this key with the world. It is used by other people to encrypt messages intended for you. No one who comes into possession of your public key will be able to decrypt the information encoded with it.
- Private Key:This key must be strictly protected and must never be shared with anyone. It is used to decrypt messages encrypted with your public key and to digitally sign the messages you send, which confirms their authenticity.
This concept can be compared to a mailbox: anyone can drop a letter through the slot (encrypt with the public key), but only the owner with the unique key to the door can take it out and read it (decrypt with the private key).
Basic Cryptographic Mechanisms: Encryption and Signing
PGP technology achieves two basic security goals:
1. Message Encryption (Confidentiality):
This process ensures that no one other than the intended recipient reads the content of the message. The encryption scheme is based on generating a random symmetric key (e.g. AES-256) that encrypts the message itself, and then encrypting this symmetric key with the recipient's asymmetric public key.
2. Digital Signature (Authenticity and Integrity):
Thanks to the digital signature, the recipient is sure that the message actually comes from you (it has not been forged) and that its content has not changed during transmission. The sender generates a hash of the message, which he encrypts with his private key. The recipient verifies the signature with the sender's public key.
Table: Differences between symmetric and asymmetric cryptography
| Feature | Symmetric cryptography (e.g. AES, ChaCha20) | Asymmetric cryptography (e.g. PGP, RSA, ECC) |
|---|---|---|
| Number of keys | One common key for encryption and decryption | Two related keys: public and private |
| Key distribution | Difficult - the key must be passed securely to the recipient | Easy - the public key can be shared openly |
| Speed of operation | Very fast (suitable for large files) | Slower (mainly used for session keys) |
| Application | Disk encryption, database, TLS communication | Secure email (PGP), digital signatures, SSH |
| Security | High, provided key is kept secret | Very high, facilitates authentication without revealing the secret |
How to securely generate and use a PGP key pair?
- Complete your identity:Enter your Name, Surname and e-mail address. This data will be stored inside the key's metadata (UserID), making it easier for others to identify who owns the public key.
- Select algorithm and key length:We recommend choosing the standard **RSA with a length of 4096 bits** or the modern **ECC (elliptic curve cryptography, e.g. Curve25519)**, which provide the highest level of security with excellent performance.
- Set a strong password (Passphrase):Protect your private key with a strong password. This will prevent unauthorized people from using your private key if the key file falls into the wrong hands.
- Generate a key pair:Click the "Generate" button. After a few seconds of complicated math, the system will display two blocks of text in PEM format (starting with the headers
-----BEGIN PGP PUBLIC KEY BLOCK-----). - Save keys:Download both keys. Share public with your interlocutors (or publish in key databases, so-called keyservers). Private hide in a safe place (e.g. password manager).
Frequently asked questions (FAQ)
Is it safe to generate PGP keys on this website?
Yes. Key pair generation takes place entirely locally in your browser's sandbox using secure JavaScript cryptographic algorithms. No data, including password (passphrase) and private key, is sent to our servers or saved anywhere. When you close the browser tab, the data disappears from RAM forever.
What happens if I forget the passphrase for my private key?
Due to the mathematical nature of PGP encryption, there is no method of recovering a forgotten private key password. There is no "Remind password" function. If you lose your password, your private key becomes useless - you won't be able to decrypt any messages sent to you. In such a situation, you must generate a new key pair and inform your business partners about it.
Where should I publish or share my public key?
You can safely send the public key to your friends by e-mail or paste it on your website or social media profile. It is also a good practice to send it to public PGP key servers (e.g. keys.openpgp.org or pgp.mit.edu), where any network user can search for your key based on your e-mail address.
What is the recommended RSA key length in PGP?
Currently, the minimum security standard for RSA is **2048 bits**, however, for long-term applications and protecting sensitive data, a key length of **4096 bits** is strongly recommended. Alternatively, elliptic curve keys (ECC) are becoming increasingly popular, offering a level of security equivalent to RSA 3072 with a much shorter key and faster processing time.
Does PGP also protect email subject lines?
No. The PGP standard only encrypts the actual content of email messages and attachments. Message metadata such as the sender's email address, recipient's address, date sent, and **subject** remain public in the message headers. This is necessary so that mail servers (SMTP) can deliver the parcel correctly.