When generating keys, guard against the use of incompatible lengths
When generating keys, it is possible to provide bit lengths. These vary depending on chosen keys type and mechanisms (e.g. AES or RSA key).
To not allow low/incompatible lengths we should guard against this.