history: encrypted <-> plain convertion