# Big-O Encryption Algorithm

I am currently doing a research paper on the Blowfish encryption algorithm and one of the components that I need to include is time and space complexity.

I have tried reading academic articles and journals, but they have the complexity in the matter of kilobytes.

Would anyone have an idea on what is the time and space complexity of the Blowfish encryption algorithm in Big-O notation?

• – kelalaka Feb 23 at 18:42

It is $$O(1)$$ time and space because the Blowfish block cipher has a constant bound on the key size (≤448 bits) and a constant block size (64 bits) and those are the only inputs—there are no variable-size inputs.
If you apply Blowfish in a composition like CBC then it is expanded to work on $$n$$ blocks by applying the Blowfish block cipher $$n$$ times, so it costs $$O(n)$$ time and $$O(1)$$ space.