Live data from Hacker News

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

la3.org

31–40 of 565 posts

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

#31
"Basically, the code recurses a sha256 computation 1714 times to get a lookup key, and then once more to get a password for decryption."

This is an Easter Egg. Barcelona fell on September 11, 1714 during the War of Spanish Succession and with that Catalonia's freedom as well. September 11 is the National Day of Catalonia.

Also, at 17:14 of each and every game of FC Barcelona in Camp Nou Stadium, Barcelona fans claim for independence [1].

So it was not by chance that the coder chose 1714 for the encryption algorithm.

[1] https://www.youtube.com/watch?v=EneqR3oDpmQ

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

#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.

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

#33
post #2

Author here. I've tried to keep the article as apolitical as possible, while giving some context to provide the setting. Anyway, I'm very interested in knowing if the used crypto is sound or not, and stirring a discussion around possible alternative approaches. Ask me anything if you want to know further!

Out of curiosity, where on the actual website is the crypto code? (It's way harder to follow than your simplified version :) )

Also how are they distributing the initial hash - physical signs? I figure the easiest threat from Spain is to get people to show up to the wrong polling stations, which don't have them on the voter rolls, and then cast doubts on the validity of a referendum that has a huge number of provisional ballots. Since you don't actually need to staff polling stations, this attack only really requires a single person setting up a cloned website and distributing a different hash (although it gets easier if e.g. the postal service is willing to help you send out the wrong hash).

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

#34
post #27

I hope Mozilla shows leadership in adopting IPFS support in Firefox. I don't necessarily want it to adopt IPFS right now , but it should have a plan for when it thinks the project is "mature enough" to be adopted in a mainstream browser, but also it should be early enough that Firefox is the first to do it. Maybe Mozilla should even get involved early in IPFS so that it can shape the protocols the way it would prefer…

Should they also adopt Tor, Freenet, I2P, etc.?

But I would give a thumbs up for Gopher support.

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

#35
post #22

Wow, this is super cool that they thought of / implemented this. (I think your math on bits is wrong: I'm getting that log2(10 10 * 23 * 365 * 4) = 33.4, not 28.) A few notes on the crypto off the top of my head: 1. 1714 iterations of SHA-256 seems really low given that you're going to be looking this up approximately once per person. My 2010-era laptop can compute about a million hashes per second according to `open…

How is it any better to hash the same text 256 times? Entropy will always be the same. You'd just need to change the hashing function.

https://softwareengineering.stackexchange.com/questions/1154...

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

#36

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?

Except being Spain, the country where inquisition and conquistadores were born and where Franco ruled till mid 70s?

[deleted]

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

#37
post #20

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 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…

Governments usually do not like to give up the money making portions of their countries and neither does the population of the rest of the country. You never see a poor part of a country seceding (well, other than Quebec maybe).

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

#39
post #20

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 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 Catalonia's government is the one at fault for all this hassle.

My interpretation of GP's comment was about the draconian approach towards silencing internet activity. Is it believed the raiding of ISPs, outright blocking of websites, etc is the fault of Catalonia's government or Spain's?

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

#40
post #22

Wow, this is super cool that they thought of / implemented this. (I think your math on bits is wrong: I'm getting that log2(10 10 * 23 * 365 * 4) = 33.4, not 28.) A few notes on the crypto off the top of my head: 1. 1714 iterations of SHA-256 seems really low given that you're going to be looking this up approximately once per person. My 2010-era laptop can compute about a million hashes per second according to `open…

> (I think your math on bits is wrong: I'm getting that log2(1010 * 23 * 365 * 4) = 33.4, not 28.)

1. Totally right that I'm wrong, but I'm now getting 48 bits, not 33 ;)

2. That was a terrible mistake of my own. The lookup key is derived from the password, not the other way around. I've corrected the article to clarify that!

3. Yeah that's why I said you can do it with your laptop and not too much time ;)

Only using the latest part of the DNI is not that good though. The letter is actually a control character, which can be computed from the 8 numbers. Hence, if you have 5 numbers and the letter, there are only some possible 3-digit prefixes that lead to a valid DNI! How many? I would have to investigate further hehe...

Post reply on HN