France’s external intelligence service, the DGSE, has sponsored a school competition to find the nation’s most talented young code-breakers.
It is the first time the DGSE has got involved in such a project in schools.
The first round drew in 17,000 pupils, and just 38 competed in the final on Wednesday, won by a Parisian team.
A DGSE spokesman said the aim was to spread awareness about intelligence work. Security is a major concern after last year’s jihadist attacks in Paris.
DGSE stands for Directorate-General for External Security.
Part of the DGSE’s work involves spying on Islamist groups. In November jihadist bombings and shootings in Paris, claimed by the Islamic State (IS) group, killed 130 people.
In January 2015 jihadists in Paris killed 17 people in attacks on the satirical magazine Charlie Hebdo, a Jewish supermarket and police.
Associations of mathematicians organised the cryptography tests for school pupils. The competition was called Alkindi, after a celebrated 9th-Century Muslim Arab mathematician and philosopher, Abu Yusuf Yaqub Ibn Ishaq al-Kindi.
The DGSE’s role was to provide some help and funding for it, the DGSE official told the BBC. The tests were done on the internet, and French overseas schools were among those which took part.
“It was a way for us to spread awareness about the DGSE’s technical skills,” he said.
“The aim wasn’t to recruit youngsters but rather to inform, especially those pupils interested in maths, so that they can see the sort of work that the DGSE does.”
It was also “a way for us to spread a culture of intelligence in France”, he said, arguing that it was “a contribution to developing citizenship”. The official declined to be named.
Nearly all the French regional education authorities got involved in the competition.
In recent years the British spy agency GCHQ has also set cryptographic challenges for the general public on the internet. One involved a Christmas card brainteaser. Other tests involved cyber security battles, which GCHQ said could attract new recruits to the spy service.
All copyrights for this article are reserved to bbc education