crypto: cipher: introduce context free function