It is the classic picture flashed across the world during every Indian general election – smiling voters coming out of a polling booth, holding up a finger daubed with blue ink, flaunting it as a badge of honour for having voted in the world’s largest democratic exercise.

Voting in this year’s general election kicks off on 11 April and, because of the size of the country, will last for six weeks to ensure that some 900 million Indians get the chance to cast their vote. The Election Commission has been girding its loins for some weeks now in preparation for the mammoth logistical exercise.

But its first order of business – as it has been for decades – was to get in touch small company in Mysore, in the country’s south, and order vast amounts of a special kind of ink.

The ink is essential to the nation’s democratic process. It is indelible, thus preventing electoral fraud and double voting. Drawn with a brush or stick on the nail and cuticle of the forefinger of the left hand, it is designed to last for weeks, until a new nail grows.

The government-owned company Mysore Paints & Varnish has been making the ink, based on a secret chemical formula, since 1962, when, in the run up to the third general after independence, the Election Commission asked the company to make an ink that could not be rubbed or washed off.

This year, about 100 employees are working on the batch, which is made up of more than 2.6 million 10ml plastic vials. The vials used to be made of glass but breakage was an issue. What hasn’t changed, however, is the secret formula.

Mysore Paints and Varnish Limited in the city of Mysore, India. Photograph: Amrit Dhillon

“I don’t know what the secret formula is myself!” said Mysore Paints & Varnish managing director Dr Chandrashekhar Doddamani. “I am not allowed to know. Only two of our chemists at any given time know the secret and pass it on when they retire.” Is it kept in a vault, like the Coca Cola formula? “No, not a safe, but only two of our chemists know where it is,” he said.

One of the ink’s ingredients is known to be silver nitrate, which stains the nail on exposure to ultraviolet light. It cannot be washed off with soap, detergent or chemicals.

Security at the plant is strict. Frisking, CCTV cameras, passwords to enter certain areas and a ban on bringing lunch boxes are among the measures used to protect the formula.

When ready, the ink will be dispatched to one million polling booths across India. But that is not the only place it goes. The company exports the ink to 30 countries from Thailand and Malaysia to Afghanistan and Nigeria.

Mysore Paints & Varnish was founded in 1937 by one of the richest men in the world at that time, Maharjah Krishnaraja Wadiyar IV, to create jobs for his subjects.

Prime minister Narendra Modi shows his ink-marked finger to his supporters after casting his vote in 2014 Photograph: Amit Dave/REUTERS

Known as a “philosopher-king” for his commitment to education and welfare and to making Mysore a modern, model state, he suffered from the Rolls Royce fixation that afflicted most Indian maharajas. He even ordered Rolls Royces to ferry his staff around the palace and town.

In 1947, after Indian independence, the government took over the company. From 1962, it has been the only company authorised to make the ink for all elections, local or national. Despite being 82 years old, the company is not a slave to tradition. It is currently testing marker pens that could end up replacing the ink in a bottle. “It will be easier to use, no need to open a bottle or use a brush. It will also be easier to pack. But we have to finish our tests first,” said Doddamani.

As a civil servant, Doddamani has served in many posts and headed many corporations but being at the helm of Mysore Paints & Varnish is more than a run-of-the-mill job for him. “It’s an honour to play a role in the functioning of Indian democracy. And it’s a real achievement for everyone in the company to have kept the formula a secret for all this time,” he said.