If we remove the logic from the backend then we provide a means to crash the process from within Python (just pass an even integer to `generate_rsa_private_key`), so I think checks need to be enforced at both layers.