Should ECDH keys be validated?

While analyzing Signal with Markus, I noticed that Signal's Curve25519-based ECDH doesn't validate public keys, and in particular will accept the 0 point as a public key—leading to a shared secret equivalent to 0 regardless of the value of the private key scalar. In contrast, libsodium will return an error if the shared secret happens … Continue reading Should ECDH keys be validated?

Auditing code for crypto flaws: the first 30 minutes

Auditing your code for proper crypto use is extremely important.  However, what if it's not generally your focus?  If your job today is to find flaws in the cryptographic components of application א, where should you start? I like to start an audit by checking which crypto primitives are used. This often gives you an idea of … Continue reading Auditing code for crypto flaws: the first 30 minutes

On CIA Crypto

On Tuesday, Wikileaks released a tranche of alleged Top Secret CIA documents, many involving explanations of their cryptographic requirements.   Reading through the documents turned out to be anticlimactic, the CIA’s cryptographic requirements are pretty boring, and that is how it usually works in cryptography. Quoting from the document, "These requirements are intended to ensure a … Continue reading On CIA Crypto

Why Replace SHA-1 with BLAKE2?

Unless you've lived under a rock for the last twelve years, you must know that the cryptographic hash function SHA-1 is broken, in the sense that it's not as secure as it should be: SHA-1 produces 160-bit digests, meaning that finding a collision (or two messages hashing to the same value) should take approximately 280 operations, … Continue reading Why Replace SHA-1 with BLAKE2?

Wire Cryptography Audit (with X41 D-Sec)

Kudelski Security's JP Aumasson and X41 D-Sec's Markus Vervier were hired to audit Wire's cryptography core, the Proteus library. Wire is an application for mobile and desktop systems that provides end-to-end encrypted messaging, and Proteus implements a protocol combining the X3DH key agreement protocol and the double ratchet algorithm in order to provide high security guarantees to Wire's … Continue reading Wire Cryptography Audit (with X41 D-Sec)

The Quantum Computer FAQ

This is probably how a quantum computer looks    ¯\(°_o)/¯ Several readers of the post Defeating Quantum Algorithms with Hash Functions found it difficult to follow without background information on quantum computers. So here I'd like to summarize basic facts about quantum computers and to debunk some preconceived ideas: What is NOT a quantum computer? A quantum computer … Continue reading The Quantum Computer FAQ

Forging RSA-PSS signatures with mbedTLS

This posts describes how to forge public-key signatures computed using mbedTLS’s implementation of RSA-PSS (the RSA-based standard signature scheme). Forging a signature means determining a valid signature of some message without knowing the secret key, but possibly know valid signatures of other messages. A signature scheme—or implementation thereof—is considered insecure if such forgeries are practical. … Continue reading Forging RSA-PSS signatures with mbedTLS