The courtyard, just off a busy street in a Delhi slum called Mongolpuri, is buzzing with people—men in plastic sandals arguing with one another, women in saris holding babies on their hips, skinny young guys chattering on cheap cell phones. New arrivals take up positions at the end of a long queue leading to the gated entry of a low cement building. Every so often, a worker opens the gate briefly and people elbow their way inside onto a dimly lit stairway, four or five on each step. Slowly they work their way upward to a second-story landing, where they are stopped again by a steel grille.

After a long wait, a lean woman in a sequined red sari, three children in tow, has finally made it to the head of the line. Her name is Kiran; like many poor Indians, she uses just one name. She and her school-age brood stare curiously through the grille at the people and machines on the other side. Eventually, an unsmiling man in a collared shirt lets them into the big open room. People crowd around mismatched tables scattered with computers, printers, and scanners. Bedsheets nailed up over the windows filter the sun but not the racket of diesel buses and clattering bicycles outside. Kiran glances at the brightly colored posters in Hindi and English on the walls. They don’t tell her much, though, since she can’t read.

A neatly dressed middle-aged man leads the children to a nearby table, and a brisk young woman in a green skirt sits Kiran down at another. The young woman takes her own seat in front of a Samsung laptop, picks up a slim gray plastic box from the cluttered tabletop, and shows Kiran how to look into the opening at one end. Kiran puts it up to her face and for a moment sees nothing but blackness. Then suddenly two bright circles of light flare out. Kiran’s eyes, blinking and uncertain, appear on the laptop screen, magnified tenfold. Click. The oversize eyes freeze on the screen. Kiran’s irises have just been captured.

Kiran has never touched or even seen a real computer, let alone an iris scanner. She thinks she’s 32, but she’s not sure exactly when she was born. Kiran has no birth certificate, or ID of any kind for that matter—no driver’s license, no voting card, nothing at all to document her existence. Eight years ago, she left her home in a destitute farming village and wound up here in Mongolpuri, a teeming warren of shabby apartment blocks and tarp-roofed shanties where grimy barefoot children, cargo bicycles, haggard dogs, goats, and cows jostle through narrow, trash-filled streets. Kiran earns about $1.50 a day sorting cast-off clothing for recycling. In short, she’s just another of India’s vast legions of anonymous poor.

Now, for the first time, her government is taking note of her. Kiran and her children are having their personal information recorded in an official database—not just any official database, but one of the biggest the world has ever seen. They are the latest among millions of enrollees in India’s Unique Identification project, also known as Aadhaar, which means “the foundation” in several Indian languages. Its goal is to issue identification numbers linked to the fingerprints and iris scans of every single person in India.

That’s more than 1.2 billion people—everyone from Himalayan mountain villagers to Bangalorean call-center workers, from Rajasthani desert nomads to Mumbai street beggars—speaking more than 300 languages and dialects. The biometrics and the Aadhaar identification number will serve as a verifiable, portable, all but unfakable national ID. It is by far the biggest and most technologically complicated biometrics program ever attempted.

Aadhaar faces titanic physical and technical challenges: reaching millions of illiterate Indians who have never seen a computer, persuading them to have their irises scanned, ensuring that their information is accurate, and safeguarding the resulting ocean of data. This is India, after all—a country notorious for corruption and for failing to complete major public projects. And the whole idea horrifies civil libertarians. But if Aadhaar’s organizers pull it off, the initiative could boost the fortunes of India’s poorest citizens and turbocharge the already booming national economy.

The Indian government has tried to implement national identity schemes before but has never managed to reach much more than a fraction of the population. So when parliament set up the Unique Identification Authority of India in 2009 to try again with a biometrically based system, it borrowed a trick used by corporations all over the world: Go to an outsourcer. The government tapped billionaire Nandan Nilekani, the “Bill Gates of Bangalore.”

Nilekani is about as close to a national hero as a former software engineer can get. He cofounded outsourcing colossus Infosys in 1981 and helped build it from a seven-man startup into a $6.4 billion behemoth that employs more than 130,000 people. After stepping down from the CEO job in 2007, Nilekani turned most of his energy to public service projects, working on government commissions to improve welfare services and e-governance. He’s a Davos-attending, TED-talk-giving, best-seller-authoring member of the global elite, pegged by Time magazine in 2009 as one of the world’s 100 most influential people. This is the guy who suggested to golf buddy Thomas Friedman that the world was getting flat. “Our government undertakes a lot of initiatives, but not all of them work,” says B. B. Nanawati, a career federal civil servant who heads the program’s technology-procurement department. “But this one is likely to work because of Chairman Nilekani’s involvement. We believe he can make this happen.”

The Unique Identification Authority’s headquarters occupies a couple of floors in a hulking tower complex of red stone and mirrored glass on Connaught Place, the bustling center of Delhi. As chair of the project, Nilekani now holds a cabinet-level rank, but his shop looks more like a startup than a government ministry. When I show up in February, the walls of the reception area are still bare drywall, and the wiring and air-conditioning ducts have yet to be hidden behind ceiling tiles. Plastic-wrapped chairs are corralled in unassigned offices.

“I took this job because it’s a project with great potential to have an impact,” Nilekani says in his spacious office, decorated with only a collection of plaques and awards and an electric flytrap glowing purple in a corner. He’s a medium-size man of 56 with bushy salt-and-pepper hair and a matching mustache. His heavy eyebrows and lips and protuberant brown eyes give him a slightly baleful look, like the villain in a comic opera. “One basic problem is people not having an acknowledged existence by the state and so not being able to access things they’re entitled to. Making the poor, the marginalized, the homeless part of the system is a huge benefit.”

Aadhaar is a key piece of the Indian government’s campaign for “financial inclusion.” Today, there are as many as 400 million Indians who, like Kiran, have no official ID of any kind. And if you can’t prove who you are, you can’t access government programs, can’t get a bank account, a loan, or insurance. You’re pretty much locked out of the formal economy.

Today, less than half of Indian households have a bank account. The rest are “unbanked,” stuck stashing whatever savings they have under the mattress. That means the money isn’t gaining interest, either for its owner or for a bank, which could be loaning it out. India’s impoverished don’t have much to save—but there are hundreds of millions of them. If they each put just $10 into a bank account, that would add billions in new capital to the financial system.

To help make that happen, Nilekani has recruited ethnic Indian tech stars from around the world, including the cofounder of Snapfish and top engineers from Google and Intel. With that private-sector expertise on board, the agency has far outpaced the Indian government’s usual leisurely rate of action. Aadhaar launched last September, just 14 months after Nilekani took the job, and officials armed with iris and fingerprint scanners, digital cameras, and laptops began registering the first few villagers and Delhi slum dwellers. More than 16 million people have since been enrolled, and the pace is accelerating. By the end of 2011, the agency expects to be signing up 1 million Indians a day, and by 2014, it should have 600 million people in its database.

The village of Gagenahalli sits amid a placid quilt of green millet and tomato fields in the hinterlands of Karnataka state, some 1,300 miles south of Delhi. Bulls with tassels on their horns pull wooden carts decorated with deities and demons past tiny, cheerily painted houses of dried mud. Old men and skinny cows lounge in the shade of baobab trees. It’s a lovely place to visit but a hard place to live. Many of Gagenahalli’s 8,500 residents are landless peasants, and about three-quarters subsist below India’s official poverty line, earning less than a dollar a day.

Most Indians still live in rural hamlets like this, so getting them enrolled in Aadhaar requires some creativity. One evening not long ago, a man walked through Gagenahalli’s red-dirt streets beating a drum and calling the villagers to gather outside—the traditional way to make public announcements. He explained that the government wanted everyone to visit the village schoolhouse in the weeks ahead to be photographed.

A few days later, Shivanna, a stringy 55-year-old farmer—again, with just the one name—presents himself in a cement classroom commandeered by the agency. He doesn’t know what it’s all about, nor is he particularly interested. “When the government asks to take your picture, you just go and do it,” he shrugs. Shivanna takes a worn plastic chair at one of the four enrollment stations set up about the room. All the computer gear and the single bare lightbulb are plugged into a stack of car batteries and kerosene-powered generators—the village gets only a few hours of electricity a day from the national grid.

A young man in a polo shirt records Shivanna’s personal information in a form on his laptop. It’s bare-bones stuff: name, address, age, gender (including the option of transgender). He has Shivanna look into a camera mounted on the laptop. Once the Aadhaar software tells him he’s got Shivanna’s full face in the frame and enough light, he snaps the picture. The program runs similar quality checks on the agent’s work as Shivanna looks into the iris scanner and then puts his fingers on the glowing green glass of the fingerprint scanner. “We had to dumb it down so that anyone could learn to use the software,” says Srikanth Nadhamuni, Aadhaar’s head of technology, as he watches the scan progress.

About 100 miles east of Gagenahalli is Bangalore, the center of India’s booming IT industry. In one of its southern suburbs, across a busy street from Cisco’s in-country headquarters, sits the office building housing Aadhaar’s Central ID Repository. The information collected from Shivanna the farmer, Kiran the rag sorter, and every other person enrolled in the Aadhaar system gets sent here, electronically or via couriered hard drive.

This is Nadhamuni’s domain. He’s a trim, energetic, half-bald engineer with geek-chic rectangular glasses. His English is full of the awesomes and likes that he picked up in Silicon Valley, where he worked for 14 years. In 2002, he, his engineer wife, and their two kids returned to India, and a year later he and Nilekani launched a nonprofit dedicated to digitizing government functions. Nilekani even kicked the organization a few million dollars.

Some of the projects that Nadhamuni worked on—computerizing birth and death records, improving the tracking of schoolkids in migrant worker families—impressed upon him how much India needed a central identity system. When Nilekani asked him to be point man for the task of wrangling Aadhaar’s data, Nadhamuni says, “I was, like, delighted.”

The offices, like the identity program’s Delhi headquarters, are still under construction. When I tour them, rolls of carpet tied with string are stacked along a wall, and workers’ bare feet have left plaster-dust prints in a corridor leading to an unfinished meeting room. The rows of cubicles that will eventually accommodate roughly 400 workers are only about half full. The wall intended for a dozen video monitors showing incoming data packets is, for now, empty.

Each individual record is between 4 and 8 megabytes; add in a pile of quality-control information and the database will ultimately hold in the neighborhood of 20 petabytes—that is, 2 x 1016 bytes. That will make it 128 times the size of the biggest biometrics database in the world today: the Department of Homeland Security’s set of fingerprints and photos of 129 million people.

The unprecedented scale of Aadhaar’s data will make managing it extraordinarily difficult. One of Nadhamuni’s most important tasks is de-duplication, ensuring that each record in the database is matched to one and only one person. That’s crucial to keep scammers from enrolling multiple times under different names to double-dip on their benefits. To guard against that, the agency needs to check all 10 fingers and both irises of each person against those of everyone else. In a few years, when the database contains 600 million people and is taking in 1 million more per day, Nadhamuni says, they’ll need to run about 14 billion matches per second. “That’s enormous,” he says.

Coping with that load takes more than just adding extra servers. Even Nadhamuni isn’t sure how big the ultimate server farm will be. He isn’t even totally sure how to work it yet. “Technology doesn’t scale that elegantly,” he says. “The problems you have at 100 million are different from problems you have at 500 million.” And Aadhaar won’t know what those problems are until they show up. As the system grows, different components slow down in different ways. There might be programming flaws that delay each request by an amount too tiny to notice when you’re running a small number of queries—but when you get into the millions, those tiny delays add up to a major issue. When the system was first activated, Nadhamuni says, he and his team were querying their database, created with the ubiquitous software MySQL, about 5,000 times a day and getting answers back in a fraction of a second. But when they leaped up to 20,000 queries, the lag time rose dramatically. The engineers eventually figured out that they needed to run more copies of MySQL in parallel; software, not hardware, was the bottleneck. “It’s like you’ve got a car with a Hyundai engine, and up to 30 miles per hour it does fine,” Nadhamuni says. “But when you go faster, the nuts and bolts fall off and you go, whoa, I need a Ferrari engine. But for us, it’s not like there are a dozen engines and we can just pick the fastest one. We are building these engines as we go along.”

Using both fingerprints and irises, of course, makes the task tremendously more complex. But irises are useful to identify the millions of adult Indians whose finger pads have been worn smooth by years of manual labor, and for children under 16, whose fingerprints are still developing. Identifying someone by their fingerprints works only about 95 percent of the time, says R. S. Sharma, the agency’s director general. Using prints plus irises boosts the rate to 99 percent.

That 1 percent error rate sounds pretty good until you consider that in India it means 12 million people could end up with faulty records. And given the fallibility of little-educated technicians in a poor country, the number could be even higher. A small MIT study of data entry on electronic forms by Indian health care workers found an error rate of 4.2 percent. In fact, at one point during my visit to Gagenahalli, Nadhamuni shows me the receipt given to a woman after her enrollment; I point out that it lists her as a man. A tad flustered, Nadhamuni assures me that there are procedures for people to get their records corrected. “Perfect solutions don’t exist,” Nilekani says, “but this is a substantial improvement over the way things are now.”

For the past year or so, Mohammed Alam, 24, has spent his nights in a charity-run Delhi “night shelter” for the homeless. Inside the weathered cement building, nearly 100 men and one 3-year-old boy in various states of dishevelment sprawl on worn cotton mats in a gloomy open room. A bloody Bollywood action movie flickers on a small TV sitting on a folding table in a corner. The stench of ammonia wafts from the group bathroom across the foyer.

Alam looks markedly healthier than most of his compeers, his glossy black hair elaborately gelled and his teal shirt and jeans spotless. He left his home in Lucknow because of family problems he’d rather not specify and has been getting by in the capital ever since, doing odd labor jobs. In a good month, he pulls in about $50. That makes it hard to afford his own place to live. But the Unique Identification Authority came to enroll the shelter’s inhabitants a few weeks ago, and Alam just received a letter from the authority with his randomly generated 12-digit Aadhaar number.

The authority doesn’t issue cards or formal identity documents. Once enrolled, each person’s eyeballs and fingertips are all they need to prove who they are—in theory, anyway. For now Alam keeps the folded-up letter in his pocket. It serves as ID when the police stop him, he says. But more important, he just used it to open a bank account. “I tend to spend more money when it’s on me,” he says.

Local grocers could act as banks, doling out cash and accepting deposits for a small fee.

That’s exactly the kind of thinking Nilekani is counting on. One of his first major coups was persuading India’s central bank to declare the Aadhaar number adequate identification to issue no-frills accounts. Bringing biometrically verified banking to the poor could lead to enormous savings in government benefit programs—for both the recipients and the state. Today, a pensioner in a village like Gagenahalli has to take a bus to the nearest town to collect his monthly payment in cash. That’s time and money lost for him. Meanwhile, more than 40 percent of the government’s $250 billion in subsidies and other spending on the poor will be siphoned off by scammers over the next five years, according to investment group CLSA. Both problems could largely be solved if instead the funds were sent straight to bank accounts held by biometrically verified recipients. “It’s like having 1.2 billion pipes through which you can send the benefits directly,” Sharma says. Connecting the poor to banks could also enable some of them to get loans to start businesses or pay for their children’s education.

Banks, however, are in short supply in the countryside, where most Indians live; the one nearest to Gagenahalli is 7 miles away. That’s one reason only 47 percent of Indian households have bank accounts (compared with 92 percent in the US). So Indian financial institutions have begun introducing “business correspondents” into bankless areas, essentially deputizing some shopkeeper or other trusted local who has access to a little cash to handle villagers’ tiny deposits and withdrawals. Here’s how it’s supposed to work: Say Shivanna wants 50 rupees from his savings account. Instead of schlepping miles to an actual bank, he goes to the little kiosk down the road from his house. The guy in the kiosk scans Shivanna’s fingerprints with an inexpensive handheld machine. (There are several on the market already; other similar gadgets—and even cell phone apps—that scan irises are in the works.) Then he transmits the image via cellular network to the tech hub in Bangalore and gets a simple confirmation-of-identity message. (The same process works for deposits.) Once Shivanna’s identity is validated, the kiosk guy gives him his cash or deposit receipt, minus a small commission. Shivanna’s bank reimburses the kiosk guy. Shivanna saves time and money, the kiosk guy makes a little profit, the bank gets more capital, and the rising tide lifts all boats.

In practice, of course, all kinds of things might go wrong. “Some iris scanners can be fooled by a high-quality photo pasted onto a contact lens,” says a senior exec from a biometrics-equipment maker working on the project. Fingerprints can be lifted from almost anything you touch, and a laser-printer reproduction of one will have tiny ridges of ink that may fool scanners. Or a corrupt Aadhaar worker could pair a scammer’s name with someone else’s biometrics. The system is being built with open architecture so other agencies and businesses can add their own applications. The idea is to make Aadhaar a platform for all kinds of purposes beyond government benefits and banking, much like a smartphone is a platform for more than making phone calls. In January, the Indian Department of Communications declared Aadhaar numbers to be adequate ID to get a mobile phone. It’s easy to imagine the numbers being used to authenticate airline passengers, track students, improve land ownership records, and make health records portable. But opening up the Aadhaar system so widely makes it vulnerable. Each record is encrypted on the enroller’s hard drive as soon as it’s completed, and the central database will have state-of-the-art safeguards. Still, Sharma acknowledges, “there’s no lock in the world that can’t be broken.”

Anyway, Nadhamuni points out, credit card numbers are stolen all the time, but everyone still uses them because the card companies have come up with enough ways to spot when they’re being used fraudulently. In the big scheme of things, credit card fraud is a relatively small problem compared with the gigantic benefit of being able, say, to buy stuff online. He believes the same calculus will hold for Aadhaar. And if Aadhaar data is stolen, they have countermeasures to deal with it.

There’s also the question of whether India’s cell phone network, which will carry the bulk of the verification requests, can handle such a load. “We expect to be getting 100 million requests per day in a few years,” Nadhamuni says. “And the authentication needs to happen fast. The answer needs to come back in maybe five seconds.” Partly to meet that demand, the federal government is investing billions to massively expand the nation’s broadband capacity. “It’s not there yet,” Nilekani says. “But if someone had told you 10 years ago that there would be 700 million mobile phones in this country today, you’d say he was smoking something.”

The technological problems may pale compared to the potential civil liberties issues. Anti-Aadhaar protesters showed up at Nilekani’s January speech at the National Institute of Advanced Studies. Several anti-Aadhaar websites have sprung up. And members of parliament and prominent intellectuals have criticized the whole idea. (A Christian sect even denounced it as a cover for introducing the number of the Beast.)

Technically, Aadhaar is voluntary. No one is obligated to get scanned into the system. But that’s like saying no American is obligated to get a Social Security number. In practice, once the Aadhaar system really takes hold, it will be extremely difficult for anyone to function without being part of it. “I find it obnoxious and frightening,” says Aruna Roy, one of India’s most respected advocates for the poor (and, like Nilekani, one of Time ‘s 100 most influential people). India, she points out, is a country where people have many times been targeted for discrimination and violence because of their religion or caste.

Earlier this year, privacy concerns scuttled an effort to give every citizen of the United Kingdom a biometric ID card, and similar worries have slowed ID plans in Canada and Australia. “But the intentions were very different. It comes more from a security and surveillance perspective,” Nilekani says. “Many of these countries already have ID. In our situation, our whole focus is on delivering benefits to people. It’s all about making your life easier.”

The Unique Identification Authority is very deliberately not collecting information on anyone’s race or caste. But local governments and other agencies subcontracted to collect data are permitted to ask questions about race or caste and link the information they harvest to the respondent’s Aadhaar number. In Gagenahalli, for instance, agents asked villagers several extra questions about their economic conditions that the Karnataka state government requested. “I haven’t seen any agencies asking for caste or religion, but the fact that they can seems problematic,” admits a midlevel Aadhaar official who asked to remain anonymous. And while the agency has pledged not to share its data with security services or other government agencies, “if they want to, they can,” says Delhi human rights lawyer Usha Ramanathan. “All that information is in the hands of the state.” It’s not an unreasonable concern; in the wake of the Mumbai terror attacks, security is a major preoccupation in India. Armed guards, x-ray machines, and metal detectors are standard features at the entrances of big hotels, shopping centers, and even Delhi subway stations. Police officials have told Indian newspapers that they would love to use Aadhaar numbers to help catch criminals. And, in fact, some of the agency’s own publicly available planning documents mention the system’s potential usefulness for security functions. “We would share data for national security purposes,” Nilekani admits. “But there will be processes for that so you have checks and balances.” Every official I speak with, from Nilekani on down, seems impatient when I bring up this issue. They breezily remind me that there’s an electronic data privacy bill before parliament—as though the mere fact that the government is thinking about the issue is enough.

For supporters, the bottom line is simple: The upsides beat the downsides. “Any new technology has potential risks,” Nilekani says. “Your mobile phone can be tapped and tracked. One could argue we already have a surveillance state because of that. But does that mean we should stop making mobile phones? When you have hundreds of millions of people who are not getting access to basic services, isn’t that more important than some imagined risk?”

Indeed, Kiran, the mother of three at the Mongolpuri enrollment station, actively wants the government to have a record of her and her children. She’s a bit mystified when I ask if the idea worries her. If you’ve never read a newspaper, let alone fretted over your Facebook privacy settings, the question of whether the government might abuse your digital data must seem pretty abstract—especially when you compare it with the benefits the government is offering.

The first thing Kiran plans to use her Aadhaar number for, she says, is to obtain a city government card that will entitle her to subsidized groceries. “I’ve tried very hard to get one before, but they wouldn’t give it to me because I couldn’t prove I live in Delhi,” she says. Having that proof will take some other stress off her mind, too. She’s constantly afraid the police will order non-Delhi residents to leave the overcrowded slum, but now she has something to show them if they do.

Her three children come running up, fresh from having their own irises scanned. They’re excitedly waving their receipts for the numbers that will be attached to them for the rest of their lives. “It was fun!” 7-year-old Sadar says. “It wasn’t scary at all.”

Vince Beiser (@vincelb) wrote about activists combating Chinese online censorship in issue 18.11.