Gordon Welchman was a tutor at Sidney Sussex College and taught Herivel as he studied the Mathematical Tripos. However, events far outside their control would determine the course of the careers of many of the students and staff that were studying at Cambridge at this time. Adolf Hitler had become Chancellor of Germany in 1933 and quickly began to build up the German armed forces. In March 1938 German troops had marched into Austria and later that year Germany was given the Sudetenland in the Munich Agreement. Although some, like Neville Chamberlain the British Prime Minister, were still trying to avoid a war, others believed that war was inevitable. One who was convinced that war was imminent was Alastair Denniston who was the head of the British Government Code and Cypher School. Denniston had been involved with codebreaking during World War I but he realised that times had changed and different skills would be needed of his codebreakers. In World War I codebreakers were recruited from expert linguists but now he believed that mathematicians were needed. He went to Cambridge to recruit mathematicians.
Welchman was one of the first that Denniston recruited to Bletchley Park where the codebreaking operations were to be conducted. Welchman was made responsible for setting up and organising Hut 6 which had the task of breaking the German Army and Air Force Enigma codes. He immediately set about recruiting others to join in this important work and he approached his student Herivel who was still at Cambridge starting research towards his doctorate in mathematics. On 29 January 1940 Herivel arrived at Bletchley Park and joined Welchman's team working in Hut 6. The problem of the Enigma codes they were trying to break was explained to him by Alan Turing. They were trying to break what they called the 'Red' Enigma cipher, the one which was most significant since it was used by Luftwaffe officers communicating with the ground troops. In Hut 6 Herivel worked under Welchman and alongside other mathematicians such as David Rees who had been a fellow student of Herivel's at Sidney Sussex College. Herivel and Rees combined to make a highly significant breakthrough very soon after Herivel began working in Hut 6. Herivel made the suggestion in February 1940 that if the operators were lazy they might not move the rotors of the Enigma machine far from their position at the end of the last message sent on the previous day. He said :-
I was very young and very confident and I said 'I'm going to find some way to break into it'. Every evening, when I went back to my digs and when I'd had my supper, I would sit down in front of the fire and put my feet up and think of some method of breaking into the Red. Then one evening, I remember vividly suddenly finding myself thinking about the other end of the story, the German operators, what they were doing and inevitably then I thought of them starting off the day.Herivel continued :-
I thought of this imaginary German fellow with his wheels and his book of keys. He would open the book and find what wheels and settings he was supposed to use that day. He would set the rings on the wheels, put them into the machine, and the next thing he would have to do would be to choose a three-letter indicator for his first message of the day. If the intercept sites could send us the indicators of all the first messages of the day for the individual German operators, there was a sporting chance that they would cluster around the ring settings for the day.The code breakers in Hut 6 immediately tried to see if they could spot such clusters. At first no clustering was found but for several months they kept looking for this. Herivel said :-
Rees was working on his own on the night shift in the Machine Room [on the night of 22 May 1940 twelve days after Germany invaded France], and noticed that among the many Enigma messages [sent on 20 May] there were several that were very close together. So he tried out various possibilities, and as the day shift came in he finally managed to break into the Red.The deputy head of Hut 6 was Stuart Milner-Barry (1906-1995), a Cambridge graduate in classics and moral sciences who had been recruited by Welchman since he was one of the best chess players in Britain. He spoke of the moment the breakthrough was made using Herivel's brilliant idea :-
I can remember most vividly the roars of excitement, the standing on chairs and the waving of order papers which greeted the first breaking of Red by hand in the middle of the Battle of France. This first break into the Red was the greatest event of all because it was not only, in effect, a new key, which is always exciting, but because we did not then know whether our number was up altogether or not.Max Newman joined the team at Bletchley Park in 1942 and he headed a section called the "Newmanry" which worked on the Colossus, a more advanced electronic computer. Herivel joined the "Newmanry" where the Colossus reduced the time taken to decode a message from days to hours. Again he was working with David Rees who also joined the "Newmanry". Herivel worked at Bletchley until October 1945 being head of the "Newmanry" from June 1945.
The Official Secrets Act prevented Herivel, and all the others who worked at Bletchley Park, from saying what they had done during the war. This, in fact, caused many of them severe problems since these brilliant people who had done so much to help win the war were criticised by others including their own families for not contributing to the war effort. Herivel, like the others, had to construct a story to account for his work during the war and he told everyone that he had been a sanitary inspector. Elizabeth Maude Jones had worked at Bletchley and Herivel had seen her there although, because of tight security, they had never spoken. However, he returned to Ireland after the war and when he was sitting in a cafe in Portrush, Elizabeth came in and seeing him went over to speak. Their friendship rapidly developed and they were married in 1947. They had three daughters, Susan, Mary and Josephine who were all educated at the Belfast Methodist College where their father had studied. The three girls showed great talents at school, Susan in art and Josephine in music.
Although he had begun research at Cambridge towards his doctorate before he began his war work, Herivel decided not to restart research but to become a school teacher. He was appointed as an assistant master of mathematics at Campbell College, Belfast in 1947. This boys' school was founded in 1894 and had an excellent reputation. He taught there for one year 1947-48 but, finding it difficult to control a class of boys, decided to seek a position in university teaching :-
[Herivel's teaching] experience was extremely unsatisfactory: he had to give it up when he realised that he had no control over the boys he was supposed to be teaching. To have moved from the collegiate anarchy of Bletchley to the uncongenial anarchy of school must have seemed at best a disappointment.Herivel took a position at Queen's University, Belfast, as a mathematics lecturer. He began publishing papers such as A general variational principle for dissipative systems (1954), A general variational principle for dissipative systems. II (1955) and The derivation of the equations of motion of an ideal fluid by Hamilton's principle (1955). However, he soon moved into teaching the History and Philosophy of Science and this became his main area of research. His papers in this area include Newton's Discovery of the Law of Centrifugal Force (1960), Newtonian studies. III: The originals of the two propositions discovered by Newton in December 1679? (1961), Interpretation of an Early Newton Manuscript (1961), Newton on Rotating Bodies (1962), Sur les premières recherches de Newton en dynamique (1962), Newtonian studies. IV (1963), Newton's First Solution to the Problem of Kepler Motion (1965), Aspects of French Theoretical Physics in the Nineteenth Century (1966), Newton's achievement in dynamics (1970), The influence of Fourier on British mathematics (1972), and Joseph Fourier: the man and the physicist (1975).
In addition to these papers Herivel published two books on the history of science. These were The Background to Newton's Principia. A study of Newton's dynamical researches in the years 1664-84 (1965) and Joseph Fourier: The Man and the Physicist (1975).
In addition he wrote about the decoding work at Bletchley Park in Herivelismus and the German Military Enigma (2008). Note that 'Herivelismus' was the name that was given to Herivel's brilliant suggestion on breaking Enigma codes.
The well-known actor Simon Callow was taught by Herivel at the University of Belfast but only discovered about his remarkable codebreaking achievements after he died, when he read his book. He said :-
I was absolutely astonished. He was a wonderful teacher, in the old fashioned way. During his tutorials he used to make tea and toast crumpets by the fire. [He was] a very profound thinker but very unexpected in his approaches but there was no sense that he had done anything extraordinary with his life. That was his generation; they didn't kiss and tell.Herivel, who was elected a member of the International Academy of History of Science in 1976, retired from his position in Belfast in 1978 and went to live in Oxford where he was made a visiting fellow at All Souls College. He had bought a house in Lonsdale Road, Oxford, in 1975 in preparation for retiring there. His wife Elizabeth died in 2005 and, in January 2011, he died in his car having just returned home from the library with a book he needed for the research he was undertaking.
We noted above that Herivel had three daughters but in all the obituaries which appeared after his death only two daughters, Susan and Mary, are mentioned. The third daughter, Josephine, became involved in left wing politics and joined a Maoist sect in south London. In 1978, the year Herivel retired, Josephine (then aged 22) was one of six women arrested for assault and obstructing the police in London. She refused to recognise the court and called the presiding judge a 'fascist lackey'. Herivel and his family made attempts to contact Josephine but these were unsuccessful. In October 2013 Josephine contacted the Freedom Charity claiming that she and two other women had been held as slaves by the Maoist sect for over 30 years (see , , , , ,  and many more newspaper reports).
Herivel's daughter Susan is an Oxford potter living in the house in Lonsdale road where her parents lived. She has made a plaque which has been installed on the house which reads "John Herivel Mathematician and Codebreaker lived here 1975-2011". For more details see .
Let us end this biography by giving a quote from Herivel. A colleague recalled a conversation with Herivel in which they discussed the difference between genius and talent. Herivel said:-
A genius is someone like Mozart, Newton or Einstein who did remarkable things all their life, but a man of talent may have a stroke of genius once in a lifetime.There is no doubt that Herivel was that man of talent who did have a stroke of genius that, in an indirect way, certainly saved the lives of a great many people.
Article by: J J O'Connor and E F Robertson