Better HN
topnewbestaskshowjobs
Log inSign up

cryptbe

572 karma · joined Sep 18, 2010 (16y ago) · 143 submissions

Submissions

comment 6y ago · link · parent

You should not implement Ristretto, and continue implementing stuff that you're comfortable with.

Crypto is deep. You can get involved at the levels you feel comfortable with.

comment 6y ago · link · parent

If one implements EdDSA, but does not follow RFC 8032, one is doing it wrong on multiple levels.

comment 6y ago · link · parent

I didn't say anything about gatekeeping. It's okay to make mistakes, that's one of the best way to learn.

I said if one isn't comfortable with the math, maybe don't try to roll one's own crypto and advertise or use it as production-grade crypto.

comment 6y ago · link · parent

>Ristretto is nice, terribly complex, and you don't actually need to care about the conceptual complexity. As an implementer, your only job is to execute the explicit formulas in section 5 of the Ristretto website. You do not have to be able to follow the hard math (just how you do not have to be able to follow the hard math involved in making the explicit formulas).

I don't think one should blindly follow an instruction without understanding why in any fields, let alone in crypto where a small, subtle difference can make or break it. Also, understanding crypto requires less math than inventing (and attacking) crypto, so it takes some effort, but it's doable even for hobbyists. If the math makes one uncomfortable, maybe one shouldn't try to roll their own crypto for production use in the first place.

Case in point: the author of this article that we're commenting on made a deadly mistake because they did not understand the math behind point conversion between Ed25519 and Curve25519 [1].

Below I also point out a mistake in their claim about malleability in EdDSA.

[1] https://www.reddit.com/r/crypto/comments/8toywt/critical_vul...

comment 6y ago · link · parent

tl;dr: the conclusion of the EdDSA part of the article is wrong. EdDSA has its problems, but malleability is not one of them, if one is following RFC 8032.

>There are several ways to sign a document with EdDSA, and produce a valid signature. The three sources of malleability are:

>We can add a multiple of L (the order of the prime subgroup) to s. Recall that B has order L as well, so it will absorb any cofactor. Basically everything happens modulo L, so adding L won't change a thing.

This is prevented in RFC 8032 by checking that 0 <= s < L. Tink [1] does this check, and therefore is malleability free.

>We can sign the same message with a different nonce r. This requires knowledge of the secret key a.

This proves that the signature of a message is not unique -- that is the signer can product multiple signatures -- but I haven't seen anyone calling this a malleability issue. Malleability is about taking a triple (public key, signature message) and tweaking bits to produce another valid triple.

>We can add a low order point to A, and subtract it from R. That way we produce a valid signature, but from a public key nobody vouches for. If the verifier checks the weaker equation, we can add a low order point to just R, and produce a "valid" signature with the same public key.

This is the second time I saw this claim. When I first saw it [2], I thought, wait, this test is missing in Wycheproof [3], but Bleichenbacher does NOT miss anything. That's when I knew it's wrong.

Modifying A or R instantly makes the signature invalid. Using the article's notation, the signature is validated by checking that

B.s.8 == R.8 + A.h.8, where h = SHA-512(R, A, M) and M is the message

Multiplying the cofactor or not doesn't matter, doesn't introduce any weakness, as implied by the article. If R or A is changed, h will change.

[1] https://github.com/google/tink

[2] https://github.com/dalek-cryptography/ed25519-dalek/issues/2...

[3] https://github.com/google/wycheproof. Wycheproof has tests for EdDSA malleability, but it only tests if s is not properly range checked.

66.

Potential data breach in the Bay Area?(vnhacker.blogspot.com ↗)

2 points · by cryptbe · 6y ago · discuss

comment 8y ago · link · parent

At Google you can ask your coworkers to write feedback that would be included in your promo package. I wonder why the author didn't ask the developers that they helped to write a few sentences explaining how much time they'd saved thanks to the author's help. The hiring committee wouldn't ask for any metric if there were already a few people testifying that "I saved XX hours".

Disclaimer: I work at Google.

comment 9y ago · link · parent

<shameless plug>

If you enjoy these challenges you might want to join my team at Google, to analyze, break, design and implement real-world crypto solutions for products used by billions of people.

Aside from short-term projects like analyzing and improving state-of-the-art password hashing or end-to-end encryption schemes, we've started two long-term that could use your help: Wycheproof [1] and Tink [2]. The former is a revolutionary testing framework that has discovered 40+ bugs [1] in many popular crypto libraries. The later provides a safe, simple, agile and fast way to accomplish common crypto tasks.

If this sounds exciting, please send your resumes to thaidn@google.com. Cheers!

[1] https://github.com/google/wycheproof

[2] https://github.com/google/tink

[3] https://github.com/google/wycheproof/blob/master/doc/bugs.md

</shameless plug>

comment 10y ago · link · parent

You meant Matt Cutts? He's still at Google, isn't he?

comment 10y ago · link · parent

Because generating p on the fly is expensive. On the other hand, using a safe prime is fine, even if it was generated by a third party.

comment 10y ago · link · parent

Crypto as I know it doesn't allow performing an authenticated key exchange between two entities without neither a pre-shared secret nor a trusted third party (CA) [1]. Anyone who promises anything like that is either selling snake-oil or hiding some requirement. DANE still requires trusted third parties, I'm not sure why it's better than the current model.

[1] There's https://en.wikipedia.org/wiki/Merkle%27s_Puzzles, but it's not really practical when you make it secure and not secure when you make it practical.

72.

Bad life advice – Replay attacks against HTTPS(blog.valverde.me ↗)

1 points · by cryptbe · 11y ago · discuss

73.

A Whirlwind Tour of Galois Theory(vnhacker.blogspot.com ↗)

2 points · by cryptbe · 11y ago · discuss

74.

Why not validate Curve25519 public keys could be harmful(vnhacker.blogspot.com ↗)

1 points · by cryptbe · 11y ago · discuss

comment 11y ago · link · parent

Prior art: https://plus.sandbox.google.com/+AleksandrDobkin-Google/post....

76.

Vietnam: A Hacker's Report(vnhacker.blogspot.com ↗)

2 points · by cryptbe · 11y ago · discuss

comment 11y ago · link · parent

> 3. For some historical reasons, many people feel the need to change keys regularly. This is rather misguided: key rotation makes sense in an army or spy network where there are many keys, and partial compromissions are the normal and expected situation, so a spy network must, by necessity, be in permanent self-cleansing recovery mode; when there is a single key and the normal situation is that the key is NOT compromised, changing it brings no tangible advantage.

This is a really strange advice from Thomas Pornin. People rotate keys because not doing so weakens most symmetric encryption schemes. For example while using AES-GCM with 96-bit nonces one needs to rotate keys after encrypting roughly 2^32 ~ 4 billion messages; otherwise the IV collision probability will be higher than 2^(-32), which is already high enough in most large scale systems (and really bad things happen when the IV is repeated).

comment 11y ago · link · parent

While I'm not 100% sure, it's likely that VNNIC has been 0wned.

Rationale: VNNIC doesn't provide any online DNS management tools. One has to submit a paper request in person to change any DNS records.

Edit: it looks like it's the registrar WebNic.cc that got hacked.

comment 12y ago · link · parent

POODLE worked not only against SSLv3, but also against any TLS implementations that check padding in SSLv3's style (e.g., just checking the last byte, and ignoring the rest of the padding). SSL accelerators from F5 and A10 were vulnerable. Thus, many of the world's largest sites were vulnerable.

comment 12y ago · link · parent

Speed. Key generation (and most other operations) in ECC is order of magnitude faster than in RSA, DSA or ElGamal. Last time I checked it took End-To-End's Javascript library seconds to generate a key pair in RSA, but only milliseconds in ECC.

comment 12y ago · link · parent

Great question. The core crypto library in End-To-End has already supported ECDH on Curve25519 and Ed25519 since day one [1]. We're discussing with GnuPG team on extending RFC 6637 to include these algorithms in the OpenPGP standard.

[1] https://code.google.com/p/end-to-end/source/browse/javascrip....

comment 12y ago · link · parent

Congratulations Werner and GnuPG team!

> GnuPG now support Elliptic Curve keys for public key encryption. This is defined in RFC-6637. Because there is no other mainstream OpenPGP implementation yet available which supports ECC, the use of such keys is still very limited. [1]

Google End-To-End [2] supports ECC by default. We are working on supporting Ed25519, but encrypting and signing with NIST curves should work and be compatible with GnuPG. That said, we've had a lot of compat issues, so it'll be great if Hacker News readers and GnuPG users can help test our implementation against GnuPG. You can generate keys in GnuPG and import them to End-To-End and vice versa, or you can encrypt/sign messages on one software and decrypt/verify them on the other. If you found a bug or anything that doesn't work as expected, you can report it at https://code.google.com/p/end-to-end/wiki/Issues?tm=3. If it's a security bug you're eligible for a monetary reward under our bug bounty program :-).

[1] https://gnupg.org/faq/whats-new-in-2.1.html#ecc [2] https://code.google.com/p/end-to-end/

comment 12y ago · link · parent

> Sure you have control over the first N bytes. Look at the request-line: "GET /hello/world/this/is/my/url HTTP/1.1". Sure, you don't control the spaces, but you can assume any practical implementation uses a single space character. Combine that with control over the method (with XHR or statically through <form> or <img>) and the path, you're in business.

tptacek is right. To make BEAST work we had to control _all_ the bytes of the very first block. We tried very hard to make it work with Javascript, but we couldn't. Java applet (and maybe Flash) was the only tool that gave us that kind of control.

comment 12y ago · link · parent

When Pornin disclosed CRIME I was telling myself: "Wait a minute, I saw this name somewhere." Then I remembered that it was Pornin's article [1] that helped me understand how zlib flush modes work.

I thought that was pretty funny.

[1] http://www.bolet.org/~pornin/deflate-flush-en.html

comment 12y ago · link · parent

If you want to learn the math, check out http://www.amazon.com/Introduction-Mathematical-Cryptography....

comment 12y ago · link · parent

What might happen if r = s = -n? I think it's pure luck that this doesn't lead to a signature forgery.

comment 12y ago · link · parent

I took a quick look at your implementation of ECDSA and I think it has a bug at line 311 [1]. It looks like I could bypass the check if r or s is negative.

One thing that I don't understand is why big integer libraries developed exclusively for crypto need negative numbers. The library [2] that I contribute to doesn't need them, and it works just fine. Actually I could argue that having only non-negative numbers make it simpler and faster.

[1] https://github.com/cryptocoinjs/ecdsa/blob/master/lib/ecdsa.... [2] https://code.google.com/p/end-to-end/source/browse/javascrip...

comment 12y ago · link · parent

Oh yeah, it was restricted to my team. I'll make it public, and notify you via email. BTW IDEA is not enabled/registered.

comment 12y ago · link · parent

Thanks for the report. I'll take a look and get back to you. Where can I contact you?

Edit: I've just filed https://code.google.com/p/end-to-end/issues/detail?id=82. We can discuss the problems of IDEA there. Thanks!

comment 12y ago · link · parent

> None of this bickering changes a simple truth: when a web mail provider claims to provide "NSA-proof" end-to-end encryption, hosted in Switzerland just to be safe, using software that you don't have to install on your computers at all, then you need to assume that web mail provider can read your email, and so can anyone who can coerce that provider into doing something. If you believe that --- and you should --- then I don't care what you think about the rest of the Matasano article.

This. The whole article could be replaced with this paragraph, and it couldn't be clearer.

12345