Asymmetric Encryption Tool

Input
Output

Online asymmetric encryption supporting RSA / ECC / SM2. Key generation and encryption/decryption happen locally in the browser.

How to Use & FAQ5 steps · 8 Q&A

Asymmetric Encryption (RSA / ECC / SM2)

Online asymmetric encryption supporting RSA / ECC / SM2. Key generation and encryption/decryption happen locally in the browser.

How to Use

  1. Choose an algorithm and operationSelect RSA / ECC / SM2 and either "Encrypt/Decrypt" or "Sign/Verify". Encryption and signing are different uses — don't mix them.
  2. Prepare a key pairClick "Generate key pair" to create one, or paste an existing public and private key; never leak the private key.
  3. Enter the contentFor encryption, enter the text to encrypt; for signing, enter the message to sign.
  4. Run the operationClick Encrypt/Decrypt or Sign/Verify; the result appears in the output box. Keep the encryption result together with its algorithm info.
  5. Copy and exportCopy the ciphertext / signature, and store the private key offline separately from the public key and ciphertext.

FAQ

What is the difference between RSA and ECC / SM2?

Both are asymmetric encryption: encrypt with the public key and decrypt with the private key. RSA is based on the integer factorization problem, while ECC / SM2 are based on elliptic curves — they use shorter keys and are more efficient at equivalent security levels. ECC is common on mobile and in certificates; SM2 is used for Chinese compliance.

What are public and private keys used for?

The public key can be shared and is used to encrypt data or verify signatures; the private key must be kept secret and is used to decrypt or generate digital signatures. Leaking the private key is like handing over your identity — keep it offline.

Does the online tool save my key pair?

No. Keys are generated and used only locally and are never uploaded to any server; but export and save the private key soon after generating it, since it is lost on refresh.

Is the key usage the same for encryption and signing?

No. Encryption uses the public key to encrypt and the private key to decrypt; signing uses the private key to sign and the public key to verify. The directions are opposite and not interchangeable. Use signing to prove authorship, encryption so only you can read it.

What RSA key length should I use?

At least 2048 bits is recommended; choose 3072 or 4096 bits for higher security. Longer keys are more secure but slower for encryption and signing, and very long keys are not worth it for performance-sensitive cases.

Why not encrypt large files directly with asymmetric encryption?

Asymmetric encryption is slow and length-limited (a single operation can only encrypt data slightly shorter than the key). In practice hybrid encryption is used: protect a symmetric key with the asymmetric algorithm, then encrypt the bulk data with a symmetric cipher such as AES.

Can signing and encryption be done together?

Yes, but in two steps: encrypt with the recipient's public key for confidentiality, and sign with your own private key for authenticity. Typically sign first, then encrypt, so the receiver can verify the source before decrypting.

Can the generated keys be used in other software?

This tool exports standard PEM / hex formats that most libraries supporting the same algorithm (e.g. OpenSSL, Web Crypto) can read; but formats vary slightly across systems, so if import fails, check that the format and algorithm match.