Live data from Hacker News

So, you want to crypto

blog.existentialize.com

61–70 of 75 posts

Re: So, you want to crypto

#61
In college cryptography was my main interest, but it was mostly theoretical (math) and little programming, which meant I was in fact useless when it came to practice because I had no experience in implementation and (I found) there are so many unknowns that one of the most important things is experience in implementing stuff in/on a specific language/platform.

I have signed up to the Coursera course and hope to brush up on basic topics and start doing more advanced crypto.

Re: So, you want to crypto

#62

Earlier quoted context omitted.

I'm not a cryptography expert either, but I'll give this a crack... In as much as SHA1 is a "cryptographic hash function", Linus isn't taking advantage of a few of it's cryptographic properties in his usage of it in git. It would for example, make no difference to the workings of git if you could reverse-engineer the contents of an object from its SHA1. In the same way, it doesn't matter much to the operation of git…

Thanks for this, you answered my questions thoroughly. I'm not entirely convinced by this though: > [A signed commit] doesn't guarantee anything about the contents of that commit if the repository has been tampered with. I think most people would intuitively expect the signed commit to guarantee the contents of the tree being signed. The idea that you could "git pull" a repo from a compromised machine, verify the sig…

I'm no expert but as far as I understand, the signature would be valid as long as the hash stays the same. If the commit has been tampered with in such a way that the hash does not change, the signature would still appear valid.

Re: So, you want to crypto

#63

Earlier quoted context omitted.

Git assumes that a matching SHA1 means that the content is equal to the original content. Is that not crypto? For example, if you sign a tag, it appears to sign the SHA1 of the associated content. This is definitely outside of my expertise, so I'm sure that my understanding is incomplete. The larger questions for me are: - if git's SHA1 content-addressable design is not crypto, how do you distinguish crypto from soft…

I'm not a cryptography expert either, but I'll give this a crack... In as much as SHA1 is a "cryptographic hash function", Linus isn't taking advantage of a few of it's cryptographic properties in his usage of it in git. It would for example, make no difference to the workings of git if you could reverse-engineer the contents of an object from its SHA1. In the same way, it doesn't matter much to the operation of git…

I thought the hash was in fact used for ensuring data integrity. That's pretty much what Linus stated when he said you have a guarantee that the data you put into your repository is exactly the data you get out of it.

Re: So, you want to crypto

#64
post #56
post #49

Ok so I do want to crypto and (to the best of my ability) I already do. I follow best practices, read about the subject matter, did coursera's crypto 1 (and where the hell is pt2? 1 was awesome!). I use established algorithms and I use, well audited implementations etc etc. where available. I have a question about MACs. We're using HMAC based on SHA256 with 32-byte keys on our new system, but our security architect o…

Part 1 begins again in January and part 2 begins right after it's done.

I hope so! By then I will have been waiting about two years!

(Can't really complain though, it's excellent and free)

Re: So, you want to crypto

#65
post #49

Ok so I do want to crypto and (to the best of my ability) I already do. I follow best practices, read about the subject matter, did coursera's crypto 1 (and where the hell is pt2? 1 was awesome!). I use established algorithms and I use, well audited implementations etc etc. where available. I have a question about MACs. We're using HMAC based on SHA256 with 32-byte keys on our new system, but our security architect o…

It definitely does reduce the strength of the MAC, but it is okay if your security requirements require it. Keeping in mind that some generic birthday attacks already reduce HMAC strength to n/2 bits (IIRC), and SHA-256 has you down to 128 bits of security (with an online attack though). Truncation is mentioned in RFC 2104. I quote: 5. Truncated output A well-known practice with message authentication codes is to tru…

Thankyou, that's extremely useful. Birthday attacks I had thought of, did not know sha256 was effectively 128 bits. Will dig into the rfc and other stuff and see if I can make a case for longer (maybe 16 byte) field.

I know some of the older MAC techniques (ANSI X9.19) turn out to actually aid key recovery if you use shorter MACs, which is odd...

Re: So, you want to crypto

#66
post #17
post #12

Earlier quoted context omitted.

A world full of brilliant cryptographers outraged at the NSA, trying to get the NSA off the IETF crypto review board, working on publishing results about NSA-sponsored crypto... and you want to talk about the MD2 and RC2 constants? What's the largest system that ever relied on MD2? Let's start there.

There were certificates (including a root CA) using MD2 until recently. MD2 itself was only retired in 2011 [1]. https://www.rfc-editor.org/rfc/rfc6149.txt

"were"

Re: So, you want to crypto

#67

I'm curious to hear people's thoughts about git. Git is "crypto" to some extent, Linus does not appear to have tons of crypto expertise, and it uses SHA1 as a MAC AFAICT (which according to tptacek's earlier comment is invalid). And yet I've never heard about attacks on its crypto. This was interesting for me to think about because it seems like a counterpoint to the article, in that it is a very successful project t…

AFAIK the only "crypto" in git is GPG used to sign tags. The content addressable data store where all the objects are kept is basically a filesystem where every filename is the SHA1 of its contents. If you were to generate an object that was a SHA1 collision of an existing object and inject it via a commit (without access to filesystem, otherwise the point is sort of moot) then git won't overwrite the original object…

git's SHA1 is useful in one sense cryptographically: If you have a sha1 hash, then it represents the entire state of the repository and its history, so if you have a copy of the hash you can verify that any given copy of the repo has not been tampered with (but a way to generate collisions would subvert this). This has been used in a few cases when repository servers have been broken into (and a similar feature in bitkeeper allowed the detection of an attempted backdoor insertion in linux).

Re: So, you want to crypto

#68
post #23

Earlier quoted context omitted.

i know you have the intellectual curiousity of a sausage, but some of us are simply interested. we don't all need to be motivated by logic. how would you derive it? tagging pairs of hex digits and sorting doesn't cut it. would rivest have used a hack that's a biased shuffle? i doubt it. and downvotes. happy xmas!

You're right. I was snippy, and in a particularly dumb way. Sorry about that.

eh, no need to apologise. i think we're used to you here and there's a level of tolerance given the contributions you make.

also, did you see http://www.jakoblell.com/blog/2013/12/22/practical-malleabil... which i think could be added to an early crypto challenge? (but maybe you already cover the idea).

Re: So, you want to crypto

#69
I love this article. It takes a pro-active, how to proceed attitude at the same time laying out the classic pitfalls that exist. This is the tone I wish to have at all times instead of the cynical one that I undoubtedly adopt.
Post reply on HN