572 karma · joined Sep 18, 2010 (16y ago) · 143 submissions
comment 6y ago · link · parent
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
>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
Disclaimer: I work at Google.
comment 9y ago · link · parent
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
[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
76.
Vietnam: A Hacker's Report(vnhacker.blogspot.com ↗)
2 points · by cryptbe · 11y ago · discuss
comment 11y ago · link · parent
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 12y ago · link · parent
comment 12y ago · link · parent
[1] https://code.google.com/p/end-to-end/source/browse/javascrip....
comment 12y ago · link · parent
> 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
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
comment 12y ago · link · parent
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
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
This. The whole article could be replaced with this paragraph, and it couldn't be clearer.