what text encryption algorithms are being used nowadays that are secure? Obviously I am not interested in DES or 3-DES that google shows me and which can break...

  • 1
    $\begingroup$ What do you mean by text encryption? Do you mean modern encryption algorithms that work on digital data? Have you ever heard the AES, ChaCha? $\endgroup$
    – kelalaka
    Nov 19, 2019 at 21:36
  • $\begingroup$ I am doing simulations on ns-3, and I need algorithms to encrypt/decrypt text messages. AES yes, ChaCha no first time I hear this. $\endgroup$ Nov 19, 2019 at 21:42
  • 1
    $\begingroup$ You might want to use a hybrid cipher, which involves asymmetric keys for a key exchange to create a shared secret (DH(E), ECDH(E)), pass it through HKDF, then use this as a symmetric key through AES, CTR mode is advised as its fast because it can be parallelized. $\endgroup$
    – SamG101
    Nov 19, 2019 at 22:00
  • $\begingroup$ I will use many and different encryption/decryption algorithms, so the more you suggest, the better... $\endgroup$ Nov 19, 2019 at 22:10
  • 2
    $\begingroup$ See Wikipedia block cipher and stream cipher page! $\endgroup$
    – kelalaka
    Nov 19, 2019 at 23:08

1 Answer 1


Generally we first encode the text to binary and then do the encryption. Then we can decrypt and decode to text again. If that suits your need then you can use any secure cipher. The conversion of a textual message to binary is called character encoding. UTF-8 is probably the most used encoding as it supports all Unicode characters & code points, keeps text relatively small and it is compatible with US ASCII. So there is generally no need for specialized text encryption algorithms.

If the ciphertext also needs to be text then you can perform an additional binary to text encoding. Before decryption you need to decode the encoding-specific text to binary again. Base 64 is probably the most used, as it is relatively efficient (6 bits per character) and ASCII (and thus UTF-8) compatible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.