decryption for history/detailedHistory