crypto: assert cipher algorithm is always valid