Live data from Hacker News

How the Catalan government uses IPFS to sidestep Spain's legal block

la3.org

71–80 of 565 posts

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#71
post #32

"Basically, the code recurses a sha256 computation 1714 times to get a lookup key, and then once more to get a password for decryption." Other way around, no? The index is the hash of the decryption key (as it should be), it's just that the index is called "key" and the key is called "lookup". If the decryption key was the hash of the index, then it would be trivial to decrypt every entry.

You are right, and I made a huge blunder while "prettifying" the code and then commenting it. It should be corrected now!

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#72

Earlier quoted context omitted.

The crypto is far from ideal. The situation is very similar to password storage, where you want to not make it trivial to brute-force moderate-entropy passwords even if your database gets breached. We have functions designed specifically for that: scrypt, argon2 etc. https://www.npmjs.com/package/scryptsy is a pure JS implementation of scrypt for example. Even with scrypt the situation is not great, but using sha for…

I'm not sure what you mean by "the crypto is not ideal"? I was under the impression that there are not yet collisions for SHA-256 https://github.com/ipfs/faq/issues/22 Only for SHA-1 (which has 160 bit hashes) https://en.wikipedia.org/wiki/SHA-1#Attacks

The attack mentioned on the page is brute-forcing someone's details from partial information:

"it can be used to “fill the gaps” of information about any citizen. If you know someone’s birth date and the area where they live, you can obtain their government ID by trial-and-error on that website."

The mitigation is slowing down the number of guesses/second that an attacker can try. In a well-designed key derivation function, an attacker with 100x the resources should only be able to try out guesses 100x as fast. That's what scrypt/argon2/bcrypt/PBKDF2/... try and achieve.

SHA and other general-purpose hash functions tend to be easy to parallelize, at least in parts, and you can get huge speedups on GPUs or even better, FPGAs/ASICs. That's why no-one serious still mines bitcoins on CPUs and the big mining syndicates [hire planes](http://uk.businessinsider.com/cryptocurrency-miners-rent-boe...) to ship GPUs a little bit faster.

This has nothing to do with collisions. It's to do with hash functions being designed to be fast, and key derivation functions are designed to be slow and memory-hard.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#73
post #46

It seems shocking that Spain a member of the EU is resorting to these tactics. Can you discuss some of their justifications for doing so?

I'm not a lawyer and I don't have an opinion on the Spanish government's or judicial system's concrete actions to stop a illegal law to take effect, but: the only websites, posters, etc. being seized are those paid for and organized by the Catalan government. Any association, political party, or individual is completely free to campaign for whatever they want, including independence. We have a Spain-wide constitution…

>We have a Spain-wide constitution. The Catalan government decided it has a democratic mandate by the people of its region to not abide by it. The NORMAL reaction by the state is to apply it, and stop the Catalan government from breaking it. It's only oppresive insofar laws and the judicial system are opressive.

Of course, the American Revolution was also illegal by the laws of the British.

It's also oppressive in the sense of trying to rule people without their consent.

If you try to let people choose, but the other side says no, what's there left to do?

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#74
post #20

Earlier quoted context omitted.

The spanish constituion explicitly states that Spain is an indivisible country. Hence, the Constituional Court (that is elected by the parliament) has ruled out that any referendum about independence is illegal. At this point, the government says that both them and the judiciary powers are just defending the democratic rules, and Catalonia's government is the one at fault for all this hassle. The problem is that it i…

Changing the constitution isn't feasible? Are there any pro-separation parties in the national parliament?

It is completely feasible. In fact Spain was the project of many different kingdoms (or "nations" by modern standards): Basque, Aragon/Catalan, Galician and Castilian.

Not only that but many modern leftist political parties advocate for self determination freedom within our constitution.

So the fact that the Catalan parliament with a simple majority of separatists are claiming unilateral referendum of independence in a free country is just to gather momentum.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#75
post #58
post #20

Earlier quoted context omitted.

The spanish constituion explicitly states that Spain is an indivisible country. Hence, the Constituional Court (that is elected by the parliament) has ruled out that any referendum about independence is illegal. At this point, the government says that both them and the judiciary powers are just defending the democratic rules, and Catalonia's government is the one at fault for all this hassle. The problem is that it i…

And this is not the end of the history. Would be naively opening the door to a full hell of pain. Try to give one candy to calm a child having a tantrum in a room full of them and see what happens when the other children realize that crying, breaking toys and banging the head on the wall equals to be rewarded with sweets. You allow somebody to break the law and jump over the constitution just because they are inconso…

So? If they want independence who are we to deny it?

If your spouse wants a divorce, if your children wish to disown you — you can't deny them just because it's an inconvenience — it is their right.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#76
post #20

Earlier quoted context omitted.

The spanish constituion explicitly states that Spain is an indivisible country. Hence, the Constituional Court (that is elected by the parliament) has ruled out that any referendum about independence is illegal. At this point, the government says that both them and the judiciary powers are just defending the democratic rules, and Catalonia's government is the one at fault for all this hassle. The problem is that it i…

Changing the constitution isn't feasible? Are there any pro-separation parties in the national parliament?

I think Unidos Podemos supports the referendum (the leader has said he's against the separation but that it's Catalonia's choice). Then there's the "Republican Left of Catalonia–Catalonia Yes", which is pro-separation. Still, together they only have 80 out of 350 seats.

The second biggest party, currently in opposition, is obviously blaming the government for the whole mess, but I don't think they have any intention of voting to change the constitution.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#77

On one of the websites there is an ax in the coat of arms. http://www.referendum.cat/ I recognize that ax symbol from somewhere. https://en.wikipedia.org/wiki/Fascism

Upvote for balance because it's A) a reasonable suggestive misinterpretation and B) not untrue.

It's not like the swastika where it's so abstract. The symbol has such a specific detailed design that you have to be familiar with the history to know it's not a direct reference.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#78

It seems shocking that Spain a member of the EU is resorting to these tactics. Can you discuss some of their justifications for doing so?

The greater region of Montreal considered separating from the rest of Quebec if Quebec were to have separated from Canada. Same with some Aboriginal communities (who in some ways control vast areas of land, greater in size that many European countries!) They were quickly denied the right to do so on a legal basis. It never came to fistycuffs, but it could possibly have. Independence movements are a tricky thing.

In any democracy or lawful state, independence movements are just a matter of nationalistic feelings. It's normal they are a tricky thing. They do not obey the principles of solidarity (in this case) or rational thinking. They live mainly from either supremacist or victimization arguments.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#79

It seems shocking that Spain a member of the EU is resorting to these tactics. Can you discuss some of their justifications for doing so?

At first yeah, I'm surprised too.

Is the Catalan government a private organization? Or is it technically a part of the Spanish state.

Private organizations can organize, fund, and promote whatever referendums they want. And the Spanish govt. would just say they don't recognize the result.

But if the organizer is not a private organization, but instead a public institution, then it's likely abuse of authority and funds.

Re: How the Catalan government uses IPFS to sidestep Spain's legal block

#80
post #74

Earlier quoted context omitted.

Changing the constitution isn't feasible? Are there any pro-separation parties in the national parliament?

It is completely feasible. In fact Spain was the project of many different kingdoms (or "nations" by modern standards): Basque, Aragon/Catalan, Galician and Castilian. Not only that but many modern leftist political parties advocate for self determination freedom within our constitution. So the fact that the Catalan parliament with a simple majority of separatists are claiming unilateral referendum of independence in…

Come on jsdario...

It is indeed possible to change the constution, but:

1) You need 3/5ths of the camera to do so.

2) There is only one significant state-wide party supporting self determination (podemos, which a very young party that entered the scene only in the last election).

3) The major parties (PP and PSOE, which would be like the republicans and democrats in the state) are both overtly against self determination.

In any case, having to change the constitution amounts to having to get the support of 3/5ths of spain. This is hardly self-determination, don't you think?

Post reply on HN