Richard J. Hayes
Members of MI5 believed "his gifts amounted almost to genius". The BBC producer who researched Hayes's life calls him "a Colossus of a man – Ireland's greatest unsung hero". One of the most notorious German spies interned in Ireland during the war, Günther Schutz, described him as "absolutely brilliant".
As far as Schutz and the other German spies whose cells he entered during the Emergency knew, their quiet-spoken and polite interrogator was "Captain Grey", a mysterious military figure always accompanied by another intelligence officer.
Only a handful of people in G2 military intelligence, knew that "Captain Grey", one of the most important and prolific code-breakers of the second World War, was not a military man at all.
It is only in recent years that the importance and extent of Hayes's work has become known. During the war his own family didn't know the nature of his role with military intelligence. His daughter Fairy, aged seven when the war broke out, only learnt recently that her father used her school exercise book to decode complex German ciphers. Even Gúnther Schutz went to his grave in 1991 still believing that it was another man, Commandant de Butleir, who was responsible for identifying his microdot codes – the first cryptologist in the world to do so.
But it was Hayes who spotted Schutz's codes. In all, 30 pages of operating instructions as well as extensive lists of names and addresses of Nazi sympathisers in the Republic were secreted in random characters in newspaper cuttings that the German intelligence agent was carrying when he was picked up by gardaí in Wexford in 1941.
Schutz – dropped into Ireland to make contact with IRA members sympathetic to the German cause and to transmit weather reports back to his handlers in Hamburg – readily gave up one of his codes to his Irish captors in the hope of diverting attention from his microdots, but a microscope in his luggage raised the suspicions of the authorities and his belongings were handed over to Hayes. He studied two newspaper cuttings tucked into the spy's pocket book and in a testimonial letter affirming the curative qualities of Aspro, he identified messages, reduced in size 400 times, and secreted within three letter 'o's in the text. On an article about Oxford Pamphlets, he spotted a further four microdots, with three more in an ad for the Green Park Hotel. Within 10 days of Schutz's arrest, Hayes had found and translated the entire contents of his highly sensitive microdots. It would take the FBI a further four months to even identify that such a system of transmitting messages existed.
"The Germans were so cocksure that the microdots couldn't be discovered that they didn't even encode them", Schutz said after the war. "They were to be a vital weapon in espionage. Finding them as the Irish intelligence officers did was an act of brilliance." It's not clear how Hayes, a Limerick-born veteran of the Irish War of Independence, who joined the National Library with a degree in languages from Trinity College (TCD) was identified by army intelligence as a codebreaker. Colonel Dan Bryan, head of G2, made the initial approaches to the newly appointed director in 1940 when a cipher was found on the first German agent to be captured in this country, Wilhelm Preetz.
Hayes made significant progress in breaking the code and in February 1941, at the behest of Eamon de Valera, he was given an office and three lieutenants to decode wireless messages which were being covertly transmitted from a house in north Dublin, owned by the German legation. One of his staff was Kevin Boland, son of the then justice minister Gerald Boland.
The operation was so secret that the younger Boland was instructed not to tell his father what he was doing.
Hayes had some success decoding cable messages, but it was working on complex letter based ciphers that he demonstrated his brilliance as a code breaker. When Major Hermann Goertz, the most senior Nazi agent to be captured in Ireland, was arrested at the end of 1941, he was carrying a code later described by MI5 as "one of the best three or four in the war". A similar cipher had already baffled cryptologists at Bletchley Park, the headquarters of British code-breaking activity, but Hayes finally identified a system of decoding it based on a sequence of rotating keywords.
The first of the Goertz messages to be successfully decoded was unlocked with the key 'Cathleen Ni Houlihan'. Informed of the breakthrough Hayes had made, Cecil Liddell of MI5 visited Dublin in 1943 and the two secret services continued to share intelligence information until the end of the war. Afterwards, Liddell said that there was a "whole series of ciphers that couldn't have been solved without Hayes's input".
Throughout his time with G2, Richard Hayes continued to visit his office at the National Library every day. He retired as director in 1967, when he took over the helm at the Chester Beatty Library. He died in 1976, leaving behind a collection of papers and manuscripts that is now catalogued in the National Library.
In 1946, Hayes wrote to the government, advising that "it is to be hoped that the Irish army will never again face an emergency so ill-provided in this essential security device".
He advocated the establishment of a permanent cryptology cell within the armed forces.