There is a cold calculus to war that can lead to the formation of the most unlikely of alliances.

Take Charles “Lucky” Luciano.

He was the original Godfather, the first true mob boss in the United States.

He was also an official ally during the Second World War.

Luciano’s mob controlled the New York waterfront, a resource the U.S. Navy needed.

Although in prison, Lucky still ran his organization, so the government struck a deal.

His sentence was commuted in exchange for his aid in keeping the docks safe and operational.

The times, it seems, haven’t changed much.

Although no deals have been struck (that we know of), the Lucky Luciano of the ongoing fight with ISIS might be the loose confederation of hackers called Anonymous who, depending on your point of view, are heroes, vigilantes, criminals or agents of chaos.

Recently, Anonymous hackers took credit for shutting down thousands of ISIS-related websites, Twitter accounts and Facebook pages.

That might not sound like much when people are being savagely killed by theocratic lunatics in the Middle East, but even jihadists know social media is a powerful recruiting tool.

Anonymous has struck a real blow against ISIS.

But while I applaud Anonymous for taking the digital fight to our common foe, I’m left feeling a little uncomfortable.

Here’s the thing about Anonymous: On some level, they are criminals. They’ve always been criminals.

They’ve hacked everything from government websites to the Church of Scientology.

They’ve shown that when they apply themselves, they can hit just about anyone’s digital resources.

They do not answer to anyone. You can’t predict what Anonymous will do next.

Although the press often presents them as a single entity, there is no central organization.

They come together in cliques for specific causes, with no overriding authority.

What those causes entail is fiercely debated within their community, if it can be called that.

Some see themselves as crusaders for justice (as defined by them), others simply do it for the “lulz” — causing chaos because it entertains them.

Sometimes I sympathize with their causes — Anonymous has led food drives for the homeless, disabled the online activities of the KKK, disrupted child porn websites.

Sometimes I cannot, for example when they took down Sony’s Playstation Network, compromising millions of player accounts, or attacked the websites of news organizations.

About the only thing that seems to rally them in a general sense is infringement on the free flow of information and speech.

ISIS ended up in the Anonymous crosshairs after the Charlie Hebdo murders.

Other targets, such as the U.S. government, have been involved in hiding, blocking or shutting down the flow of information in a manner Anonymous deems unjust.

If the Internet is supposed to be a free body of information, then Anonymous sometimes acts as its immune system.

Not that they don’t pay a price.

Dozens of Anonymous hackers have been arrested over the last few years.

Which brings us back to Lucky Luciano. You see, although he did his bit during the war, he was still a mobster and he was deported after the war, never to return to his beloved America.

It is hard to argue that Anonymous hacks of jihadist accounts aren’t useful.

Yes, it’s illegal, but it will hamper ISIS’ ability to grow, which is good.

But sooner or later, ISIS will die. And like Lucky, the end of an uneasy alliance might not go so well for Anonymous.