Method and apparatus for decrypting encrypted messages