I found that AES has dedicated hardware on most machines. The question is can we use ed25519 to replace AES? Instead of using RSA to encrypt the AES key and then encrypt the data with AES, can we just use ed25519 and stop using AES? Are there any performance comparisons between the two? I went through this and couldn't find much.

  • 3
    Two things: ed25519 is a signature scheme using public key cryptography, AES is a block cipher using symmetric keys. Public key cryptography is used to safely and conveniently share the symmetric key. But using public key cryptography to process large amount of data is going to cost you orders of magnitude more.
    – Marc
    Jul 24, 2020 at 8:28

1 Answer 1


You're comparing a signature scheme (ed25519) for integrity / authenticity with an encryption scheme (hybrid RSA / AES) giving you confidentiality. As such, the comparison makes very little sense.

If you want to speed up encryption then you could replace RSA encryption of the key with ECIES, for instance using X25519 as key agreement scheme for Curve25519. You would still need the AES encryption as ECIES is really just Diffie-Hellman key agreement: the actual encryption still needs to be performed using a symmetric cipher. You can choose any symmetric cipher for that, but on most modern computers AES is pretty fast. There are however stream ciphers such as ChaCha20 that are extremely fast where hardware AES acceleration is not available.

Obviously then, the above scheme will only remove the slowdown of the RSA (un)wrapping of the AES key. No asymmetric scheme is likely to be faster than AES.

If you go for the curve with stream cipher approach you might as well use one of the NaCL compatible libraries. Another advantage of doing that is that you will get a lot of low level security and performance for free (assuming you manage to choose a secure & fast implementation).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .