SAN JOSE — John McAfee lived up to his reputation Saturday as tech’s most popular wild child, electrifying an audience with new details of his plan to thwart the NSA’s surveillance of ordinary Americans with an inexpensive, pocket-size gadget.

Dubbed “Decentral,” the as-yet-unbuilt device will cost less than $100, McAfee promised the enthusiastic crowd of about 300 engineers, musicians and artists at the San Jose McEnery Convention Center.

“There will be no way (for the government) to tell who you are or where you are,” he said in an onstage interview with moderator Dan Holden at the inaugural C2SV Technology Conference + Music Festival.

And if the U.S. government bans its sale, “I’ll sell it in England, Japan, the Third World. This is coming and cannot be stopped.”

The ambitious — some would say quixotic — project is the latest chapter of McAfee’s colorful life.

The anti-virus software pioneer’s antics have included his widely publicized flight last year from Belize, where he remains wanted as a “person of interest” in the shooting death of his neighbor.

Even so, he remains an icon in the annals of Silicon Valley’s history of entrepreneurship. In 1989, he founded the anti-virus software company that still bears his name and once was worth $100 million. In 1994, he ended his relationship with the company and moved to Colorado.

During the interview, the 68-year-old with spiky black hair tipped blond, who wore light blue cargo pants and a black sweatshirt, remarked on a wide range of topics, from how quickly he gets bored once one of his creations comes to fruition (including the software security company he founded) to how yoga helped him 30 years ago to quit using drugs, including his favorite (psychedelic mushrooms).

It was a talk bound to appeal to the young audience, which broke into frequent applause. Among the group was his new 30-year-old wife, Janice Dyson. She said in a brief interview afterward with this newspaper that she is a former stripper. The couple met in Miami, where McAfee went after being deported from Guatemala.

“I keep him grounded,” she said.

McAfee outlined what some might regard as a pie-in-the-sky plan to finish the first prototype of the Decentral in six months. He said the gadget is called Decentral because by communicating with smartphones, tablets and other devices, it will create decentralized, floating and moving local networks that can’t be penetrated by government spy agencies.

The design is in place already for a version whose range will be three blocks in the city and a quarter mile in the country, he said. The device will be compatible with both Android and iPhones.

As far as consumers’ appetite for such a gizmo, he said, “I cannot imagine one college student in the world who will not stand in line to get one.”

Commuters will also find it useful, he said. Neighborhoods will be better able to fight crime because Decentral will include an option that sends an alert if there is a burglary or other crime.

McAfee said the idea for the device came to him well before computer analyst and whistleblower Edward Snowden leaked National Security Agency documents that exposed widespread monitoring of U.S. citizens’ phone calls and Internet communications.

But with Snowden’s actions, “it became the right time” to make it real, he said.

At the end of the 75-minute discussion, McAfee gamely took questions from the audience about everything from what advice he’d give teens (do what you love) to what he fears (his wife, he joked). In response to a question about marijuana, he made clear he doesn’t embrace every aspect of the youth culture.

He said he liked pot users when he sold drugs decades ago because their “lives never go anywhere and they remain customers,” adding, “Marijuana is a drug of illusion — it creates the illusion that you’re doing great things when all you’re doing is sitting on the sofa growing a beard.”

McAfee also reiterated that he never killed anyone in Belize and fled after angering the authorities by refusing to pay a $2 million bribe.

There seemed to be intense interest Saturday in McAfee’s current plans. One man asked whether Decentral essentially creates a “dark Web,” or part of the Internet that can no longer be accessed by conventional means.

Yes, he said.

Will the privacy it affords allow criminals and others to evade the authorities, another wanted to know.

“It will of course be used for nefarious purposes,” he said, “just like the telephone is.”

Contact Tracey Kaplan at 408-278-3482.