Added backend check to cipher primitives