IN A small village north-west of Bangalore, peasants queue for identities. Each man fills in a form with his name and rough date of birth, or gets someone who can read to do it for him. He places his fingertips on one scanner and stares at another. A photograph of his face is snapped. These images are uploaded to a computer. Within a few weeks he will have an identity number.

The Indian government is trying to give all 1.2 billion Indians something like an American Social Security number, but more secure. Because each “universal identity number” (UID) will be tied to biometric markers, it will prove beyond reasonable doubt that anyone who has one is who he says he is. In a country where hundreds of millions of people lack documents, addresses or even surnames, this will be rather useful. It should also boost a wide range of businesses.

So far the process has gone smoothly. More than 1m people have been enrolled since October, and the pace is accelerating. It needs to: 1m is less than 0.1% of the population. The scheme presents difficulties both for the people in charge, many of whom were recruited from software firms, and for the private contractors who are doing much of the work. How do you ensure that the data are accurate? How do you build a robust database containing biometric information about more people than any other? How do you deal with peasants whose fingerprints are unreadable after years of manual work? (Adding moisture to their fingertips helps.)

When an individual is enrolled, his biometric data must be compared with everyone else's to ensure there is no duplication. Sometimes the workers who show people how to place their fingers on the scanner accidentally scan their own fingerprints. As enrolments hit a peak of about 1m a day, the system will need to carry out a staggering 14 billion matches per second.

This mighty task has been awarded to private contractors in an unusual way. There are three vendors: Accenture and L-1 Identity Solutions of America, plus Morpho of France. The firm that does the fastest, most accurate job gets 50% of the work; the others get 30% or 20%. This allocation is frequently reassessed, so if the second-best firm starts doing better, it picks up some work from the leading firm. This keeps everyone sharp.

One database, many possibilities

The government's aim is to improve services and reduce corruption. A shocking two-thirds of the subsidised grain that the government allocates to the poor is either stolen or adulterated. When middlemen say they have delivered so many bags of rice to so many thousands of peasants, there is no way to tell if they are lying. But if each peasant has to scan her irises every time she picks up her ration, it will be harder to scam the system. Similar controls could be used to curb voter fraud.

A reliable way of identifying people would also smooth financial transactions. Some 42m poor households toil for a government scheme that guarantees them up to 100 days of work at the minimum wage each year. The money is welcome; the trek to the bank to collect it is not. Ram, a peasant in Madhya Pradesh, walks 6km (4 miles) to the bus stop, travels 14km clinging to the roof of a bus, waits two hours in the bank and then does it all again in reverse. The trip swallows a fifth of his earnings, in the form of fares and the opportunity cost of missing a day's work.

The identity scheme could help Ram avoid this hassle. The plan is to supply scanners to village shops and link them to distant banks via mobile phones. The man could walk in, scan his fingers and authorise the bank to transfer his money to the shopkeeper's bank account. The shopkeeper could then advance Ram the money, minus a small fee.

Small shopkeepers are salivating. B.C. Manjunath, who runs a tiny kirana store selling boiled sweets, soap and single eggs, sees two ways to profit. As well as charging fees, he would benefit from customers with more cash in their pockets. At present he has little choice but to extend credit. Customers owe Mr Manjunath's family 20,000 rupees ($440), interest free.

Because the UID system is an open platform, businesses will be able to graft inventive applications onto it. Hospitals could match medical records with patients who are far from home. This would help make records portable, says Shivinder Singh, the managing director of Fortis Healthcare, a chain of private hospitals. Insurance would become easier to provide. Barely one in 100 Indians has health insurance, not least because identities are so hard to verify. Indeed, all kinds of insurance would be much cheaper if companies had a reliable way of discovering, for example, that a man applying for car insurance in Mumbai had been convicted of drink-driving in Delhi.

Microfinance should start to work better, too. It enjoyed a huge boom in recent years, followed by a bust. Many poor people found they could borrow more than they could ever hope to repay by going to several lenders. As a result, some microfinance outfits collapsed. The UID scheme ought to allow for greater control over such small loans.

A secure identity system will also help schools, reckons Suhas Gopinath, the boss of Globals, a firm that helps schools handle information. It would make it easier to monitor each student's progress, he says. And if a student migrates to another state, his school records could move with him.

Even with strict controls for privacy, the UID scheme will help companies understand more about the population they serve. “It would be fantastic for just about any business,” predicts Mr Singh. There is a caveat, of course: the scheme must work. Britain has put off plans for biometric identity cards partly because of worries about soaring costs and technical snafus. Building and running India's database is a challenge as gargantuan as India itself.