I sometimes see, in discussions of symmetric ciphers, reference to the 'key agility' of a particular algorithm. It seems to be related to the difficulty of switching encryption keys, but I don't understand more than that.

Can anyone give a good explanation of 'key agility' and some contexts in which it is important?

  • $\begingroup$ Poor key agility can be an advantage in some situations. The slow/expensive key initialization (ie, key agility) in Blowfish means that it's more immune to brute-force attacks. $\endgroup$
    – hunter
    Commented Nov 28, 2013 at 13:14

1 Answer 1


Here's what I can say about the general meaning of it:

  1. It means that the amount of preprocessing of a key is small. So the amount of time from generating/importing a new key to actually starting encrypting is neglegible.

  2. It means that the amount of state a cipher uses is small. The state of a cipher generally is the key or preprocessed key schedule plus the actual block. If this is small it means that you can potentially fit many keys in the CPU cache.

Note that if you have either an extreme of 1 or 2 you can live with just one. If preprocessing takes a long time but the generated key schedule is small you can simply do it once and store it with the key. If preprocessing is very cheap but the state is very large you can do it on-the-fly.

To give an example of the key agility of my own cipher (broken link to pdf), here's why:

  1. The key schedule only consists of permutations of the key - this means it's just memory loads and can be done on the fly.
  2. The full state is only twice the block size - so 128 bytes.

As for why it's important, an example would be a busy HTTPS server. It has to handle many connections at once, and (if everything is done right) each connection has it's own associated keys. Being able to use many keys at once, and preferably to generate and use keys on the fly (ephemeral keys) is a huge bonus in performance and security.

  • $\begingroup$ [+1] from a Kerckhoffs point of view. ;) It's nice to see that paper has "grown". $\endgroup$
    – e-sushi
    Commented Nov 27, 2013 at 23:06
  • $\begingroup$ The link does not seem to work anymore, feel free to undo my edit if you feel like it and can point to a location that works. $\endgroup$
    – otus
    Commented Oct 27, 2015 at 16:11

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.