Diplomat who wrote ‘cipher’ given top post