There are lots of security algorithms. One of the way to measure security of a cryptography algorithm is to find out its **key size**. There are many key size of a single algorithm.

> 
> ECC (Elliptic Curve Cryptography) has 163, 256, 384, 512 etc.
> 
> 
> RSA has 1024, 3072, 7680, 15360. I found this from [here](https://www.certicom.com/index.php/the-basics-of-ecc)
> 
> 
> 

but how can I calculate key size of an algorithm? How a single algorithm has different key size?

I am building an simple cryptographic algorithm but I don't know how to calculate key size of my algorithm.

My algorithm is to change a letter of a plain text by a code suppose

```
a=2H, b=3C, c=8S ......, z=6D

```

If the plain text is "cb" then cipher text will be "8S3C". So what will the key size of this algorithm be? How can I calculate it?