unify encryption interfaces and model