Made revisions to deal with AES-encrypted keys and assumed security properties.