It's no secret the FBI is struggling to unlock an iPhone, but John McAfee, the outspoken pioneer of cybersecurity, has an idea: He'll do it himself.

McAfee, who created the antivirus software that still bears his name, says he and his team will break the encryption on the iPhone that belonged to one of the San Bernardino shooters.

He made the offer in an op-ed first published by Business Insider. He said he is volunteering to crack the phone's encryption so Apple doesn't have to worry about creating an exploitable backdoor into its own products.

It's also not a bad way to get some attention since he's one of the Libertarian Party's candidates for president.

His campaign slogan is "Privacy, Freedom and Technology," which makes the Apple story the perfect issue for him to tackle.

"The president is in charge of the armed forces, and if that man doesn't understand the art of war being used — and today it's cyberwar — he should not sit in the chair," McAfee said on CNN.

In his op-ed, he wrote, "If the Government succeeds in getting this back door, then it will eventually get a back door into all encryption, and our world, as we know it, is over."

A federal court judge ordered Apple to break into the iPhone Tuesday, but on Wednesday, Apple CEO Tim Cook published a letter opposing the order because it would set a "dangerous precedent."

This video includes clips from McAfee 16 and Apple and images from Getty Images.