This is presented as a math problem that has the internet perplexed. But Veli can lift the Veil of confusion. If we take a look at operator precedence the rules are pretty clear, at least in programming. Parenthesis () have precedence 1 while / and * both have precedence 3. In a programming language expressions are treated by evaluating the operations with lowest precedence numbers (in the expression) first. In this case it means to evaluate the sub-expression inside the parenthesis first. Now, because division and multiplication have the same precedence, look in the associativity column of the operator precedence table (from the link above). It says left-to-right. That means the following steps are taken when evaluating:

6 / 2 * (1 + 2) ; first parenthesis
6 / 2 * 3       ; evaluate 6 / 2
3 * 3

The answer is 9 and nothing else.

Some confusion is introduced in the step 6 / 2 * 3 because both operators have the same precedence. The left-to-right associativity means to evaluate the leftmost operator first. All popular programming languages does the left to right thing in this case and most calculators too. Only some old pocket calculators from the 80:s got this wrong.

Note. Mathematically speaking I am not sure though, the order might be undefined if the operators have the same precedence. Please comment if you have a good source on how associativity is defined mathematically for multiplication and division. What I gave here is the programming language version.

Publicerat i Matematik | Lämna en kommentar

Is it possible to shut down the internet?

Our modern society is increasingly depending on the internet for its existence. If there was a way to shut down the internet then little things like, hmm let’s think… phones, TV, drinking water supply, waste water purification, the economic system etc. All that and more would more or less instantly stop working. Even power plants and the power grid itself would probably stop working since they too are becoming more dependent on remote management through the internet. One could argue it being pretty important to keep the internet up and running.

But could it be shut down?

Internet is a resilient network. Wikipedia definition: ”the ability to provide and maintain an acceptable level of service in the face of faults and challenges to normal operation. Threats and challenges for services can range from simple misconfiguration over large scale natural disasters to targeted attacks.”

This means that the internet dynamically reconfigures itself when something goes wrong. On the internet backbone this is typically done using the BGP protocol. It also means you can not shut down the internet by just cutting one cable. There is no single point of failure.

Is there a kill switch?

Lately more and more people are arguing that internet needs a kill switch to – for instance – quickly take a country offline in case of ongoing cyber attacks. To install a kill switch you would first have to insert a single point of control into the network. This is typically a bad idea and goes against the idea of resilience. Think about it. If you have the power to shut down the single point and take the country offline, what is stopping an adversary to for instance detonate an EMP over that single point and in one blow take the country offline? The answer is that there is no internet kill switch today and it would probably be a bad idea to install one. This even before considering the ”human right” aspect  (people consider it a human right to have internet access nowadays).

But I still want to shut down the internet!

Seven mythical keys

Another way to cripple the internet would be to stop the DNS system from working. There are rumors about seven mythical keys that are passed on through some mystical ceremony. Could those seven keys be used to kill the internet? Short answer, no. Long answer, read this article from ICANN.

The DNS servers can also be attacked using denial of service attacks but that would only take them offline for a limited time period, annoying as it is, not critical. There are various other DNS attacks possible too but all these DNS problems only cripples the internet, doesn’t shut it down entirely.

So how can I shut it down then? Please, please tell me.

Short answer: YOU can’t. But still there might be a way for an advanced actor. After Snowden there has been lots of talk about backdoors and implants for routers. Take a look at the core routers on the internet backbone.  There are only a limited number of models used as core routers. If an actor with enough resources can find a way into each one of these models, then they can reconfigure BGP on the core routers and have full control over enabling and disabling arbitrary parts of the internet!

This is what happened for instance in Egypt 2011 when the government shut down all internet service providers except the one the government itself used (working some BGP magic to accomplish this).

So a government can clearly shut down arbitrary parts of the internet in its own country. But any actor with access to the routers could do it, if they just found a way in. Snowden showed that NSA can do it. Probably the Chinese, Russians, British and maybe others too. Anyone of those actors can take any parts of any country offline if they can just get into the core routers. To make it harder to recover they could also change the passwords, or in other ways change the authentication mechanisms to stop the rightful owners to get back into their own routers and restore normal operation.

Another way is to just cut the power for the routers, but that is not very practical since you would have to cut the power in many physical places at once. If you are capable of doing that then you are already in control of the country.

In short, it is very hard to shut down the internet, but it can be done if you can get into the core routers on the internet backbone.

Publicerat i Säkerhet | 3 kommentarer

Några ord om opinionsundersökningar

Det har varit mycket kackel och debakel om opinionsundersökningarna före både brexit och amerikanska valet 2016. I bägge fallen blev folk förvånade att undersökningarna visade så pass fel. Här tänkte jag reda ut några saker som kan gå fel.

Läs mer

Publicerat i Matematik, Media, Uncategorized | 1 kommentar

Amnesty och prostitution

I augusti 2015 röstade internationella Amnesty igenom att verka för en legalisering av prostitution. ETC hävdar nu att beslutet grundade sig på en oseriös norsk rapport.

Jag har inte ens funderat på det där innan men logiken som förbudsivrarna använder känns inte helt sund. Här är tre problem som jag noterade vid en första anblick.

Läs mer

Publicerat i Orwellianskt, Politik | Lämna en kommentar


I veckan har det varit rabalder över att busschafförer vägrat köra med Prideflagga på bussen. Utan att känna till chaufförernas religion började jag ändå fundera lite om religioner och kulturkrockar.

Läs mer

Publicerat i Politik | Lämna en kommentar


March 24 2016 became the date when wartime Bosnian Serb leader Radovan Karadzic got his ICTY verdict.

Läs mer

Publicerat i Politik | 2 kommentarer

The Assange Case

Most people know Assange from the excellent work he did with WikiLeaks. But releasing information about American war crimes made him some powerful enemies. It was only a matter of time until they would find a way to get back at him.

In August 2010 these powerful people saw an opportunity. During a visit to Sweden Assange had sexual affairs with two women (who for legal reasons can not be named). Woman A happily tweeted about her relationship with Assange after the alleged rape took place. These tweets were later removed, but numerous screenshots are preserved. Exactly what happened the days afterwards is not fully known, but it is not unreasonable to assume that one of these powerful people reached out to woman A in some way and persuaded her (and her friend, the other woman) to press sexually political charges.

Now the larger political circus was set in motion. Remember that the U.S. was at the height of its power back then and no country on earth (except maybe Serbia for a short while, a move that was thoroughly punished as a warning signal to other countries) dared to go against the hegemonic will of the Empire. To believe Sweden has an independent justice system would be naive at best, a fact that was proven beyond doubt in the Pirate Bay political farce.

Assange said he was afraid Sweden would extradite him to the U.S. and at the time the politically correct Swedish establishment ridiculed him and labelled him a conspiracy nut. But time proved Assange right in his fears. Court documents published in May 2014 proves Assange was still under active and ongoing investigation at the time by several government agencies, including the FBI. In Assange’s earlier TV show World Tomorrow the president of Equador – Raphael Correa – said Assange was welcome to reach out to him if he ever found himself subject of political persecution (because of his work with WikiLeaks). Correa predicted events correctly and Assange later took refuge in the Embassy of Ecuador in London.

Every fact in this case points in the direction that Assange was right in his fears that Sweden would really extradite him to the U.S. if he set his foot in Sweden again. So Assange could not travel back to Sweden to respond to the rape allegations and the Swedish prosecution refused to travel to London to perform the hearing there (we can only guess on why they refused to travel, but it certainly looks like their refusal might be part of an attempt of getting Assange extradited). Well extradited he would likely face charges of being a malicious foreign actor and expect similar treatment as Bradley/Chelsea Manning.

In February 2016 the U.N. (UNWGAD) came to the same conclusion! They found that Assange’s residence in the Embassy of Ecuador – to avoid arrest and extradition to Sweden/U.S. – was arbitrary detention in violation of international law, and that Mr Assange should be afforded the right to compensation.

Now the U.K. and Sweden really faced a dilemma. Should they follow the U.N. decision and international law or should they continue to be stooges of the Empire? Well it is a rhetorical question. Of course they chose the stooge path…

The Guatemalan human rights lawyer Renata Avila sums it up perfectly:

Publicerat i Orwellianskt, Politik | 1 kommentar