<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cryptography on Latacora</title><link>https://www.latacora.com/categories/cryptography/</link><description>Recent content in Cryptography on Latacora</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 29 Jul 2024 12:25:48 -0500</lastBuildDate><atom:link href="https://www.latacora.com/categories/cryptography/index.xml" rel="self" type="application/rss+xml"/><item><title>Cryptographic Right Answers: Post Quantum Edition</title><link>https://www.latacora.com/blog/post-quantum-cryptographic-right-answers/</link><pubDate>Mon, 29 Jul 2024 12:25:48 -0500</pubDate><guid>https://www.latacora.com/blog/post-quantum-cryptographic-right-answers/</guid><description>&lt;p&gt;One of our favorite blog posts is our
&amp;ldquo;&lt;a href="https://www.latacora.com/blog/2018/04/03/cryptographic-right-answers/" target="_blank" rel="noopener noreferrer"&gt;crypto right answers&lt;/a&gt;&amp;rdquo;
post. It&amp;rsquo;s intended to be an easy-to-use guide to help engineers pick the best
cryptography choices without needing to go too far down a rabbit hole. With
post-quantum cryptography (PQC) recently transitioning from an academic
research topic to a more practical cryptography concern we figured it’s time
for an update of our cryptography recommendations.&lt;/p&gt;
&lt;p&gt;One thing that makes recommending PQC challenging is that historically, we’ve
been able to provide “better” answers for classical cryptography. Faster and
bigger hashes, stronger password KDFs, easier-to-use primitives… These things
all have the same fundamental “shape”: you can take an existing design and drop
in something else to make it better. MD5 and BLAKE3 are not comparable in
strength, but you can just use BLAKE3 in place of MD5 and get something that’s
just far better with minimal API changes.&lt;/p&gt;</description></item><item><title>Real World Crypto 2024</title><link>https://www.latacora.com/blog/2024/05/07/real-world-crypto-2024/</link><pubDate>Tue, 07 May 2024 07:00:17 -0400</pubDate><guid>https://www.latacora.com/blog/2024/05/07/real-world-crypto-2024/</guid><description>&lt;p&gt;We traveled to Toronto this year to attend
&lt;a href="https://rwc.iacr.org/2024/program.php" target="_blank" rel="noopener noreferrer"&gt;RWC 2024&lt;/a&gt;. The conference was held in
&lt;a href="https://en.wikipedia.org/wiki/TIFF_Lightbox" target="_blank" rel="noopener noreferrer"&gt;TIFF Lightbox&lt;/a&gt; located in the
city’s downtown; the venue is the headquarters for the Toronto Film Festival
and contains five cinema rooms. RWC is a single-tracked conference and there’s
no hard requirement that talks are backed by papers. Each RWC includes the
&lt;a href="https://rwc.iacr.org/LevchinPrize/" target="_blank" rel="noopener noreferrer"&gt;Levchin prize&lt;/a&gt; ceremony for major
achievements in applied cryptography, several invited talks and the lightning
talks session.&lt;/p&gt;</description></item><item><title>A case for password hashing with delegation</title><link>https://www.latacora.com/blog/2023/12/22/case-for-password-hashing/</link><pubDate>Fri, 22 Dec 2023 10:18:16 -0500</pubDate><guid>https://www.latacora.com/blog/2023/12/22/case-for-password-hashing/</guid><description>&lt;p&gt;When people talk about PBKDFs (Password Based Key Derivation Functions), this
is usually either in the context of secure password storage, or in the context
of how to derive cryptographic keys from potentially low-entropy passwords. The
Password Hashing Competition (PHC, 2013-2015) was an open competition to derive
new password hashing algorithms, resulting in Argon2 hash as its winner. Apart
from achieving general hash security, many of the candidates focused on
achieving resistance to parallel attacks on available hardware such as GPUs.&lt;/p&gt;</description></item><item><title>Stop using encrypted email</title><link>https://www.latacora.com/blog/2020/02/19/stop-using-encrypted-email/</link><pubDate>Wed, 19 Feb 2020 14:50:00 -0400</pubDate><guid>https://www.latacora.com/blog/2020/02/19/stop-using-encrypted-email/</guid><description>&lt;p&gt;Email is unsafe and cannot be made safe. The tools we have today to encrypt
email are badly flawed. Even if those flaws were fixed, email would remain
unsafe. Its problems cannot plausibly be mitigated. Avoid encrypted email.&lt;/p&gt;
&lt;p&gt;Technologists hate this argument. Few of them specialize in cryptography or
privacy, but all of them are interested in it, and many of them tinker with
encrypted email tools.&lt;/p&gt;
&lt;p&gt;Most email encryption on the Internet is performative, done as a status signal
or show of solidarity. Ordinary people don’t exchange email messages that any
powerful adversary would bother to read, and for those people, encrypted email
is &lt;a href="https://www.google.com/search?q=larp" target="_blank" rel="noopener noreferrer"&gt;LARP&lt;/a&gt; security. It doesn’t matter
whether or not these emails are safe, which is why they’re encrypted so
shoddily.&lt;/p&gt;</description></item><item><title>How (not) to sign a JSON object</title><link>https://www.latacora.com/blog/2019/07/24/how-not-to-sign-json/</link><pubDate>Wed, 24 Jul 2019 08:50:00 -0400</pubDate><guid>https://www.latacora.com/blog/2019/07/24/how-not-to-sign-json/</guid><description>&lt;p&gt;Last year we did a blog post on interservice auth. This post is mostly about
authenticating consumers to an API. That’s a related but subtly different
problem: you can probably impose more requirements on your internal users than
your customers. The idea is the same though: you’re trying to differentiate
between a legitimate user and an attacker, usually by getting the legitimate
user to prove that they know a credential that the attacker doesn’t.&lt;/p&gt;</description></item><item><title>The PGP problem</title><link>https://www.latacora.com/blog/2019/07/16/the-pgp-problem/</link><pubDate>Tue, 16 Jul 2019 21:14:00 -0400</pubDate><guid>https://www.latacora.com/blog/2019/07/16/the-pgp-problem/</guid><description>&lt;p&gt;&lt;a href="https://blog.cryptographyengineering.com/2014/08/13/whats-matter-with-pgp/" target="_blank" rel="noopener noreferrer"&gt;Cryptography engineers have been tearing their hair out over PGP’s deficiencies&lt;/a&gt;
for (literally) decades. When other kinds of engineers get wind of this,
they’re shocked. PGP is bad? Why do people keep telling me to use PGP? The
answer is that they shouldn’t be telling you that, because PGP is bad and needs
to go away.&lt;/p&gt;
&lt;p&gt;There are, as you’re about to see, lots of problems with PGP. Fortunately, if
you’re not morbidly curious, there’s a simple meta-problem with it: it was
designed in the 1990s, before serious modern cryptography. No competent crypto
engineer would design a system that looked like PGP today, nor tolerate most of
its defects in any other design. Serious cryptographers have largely given up
on PGP and don’t spend much time publishing on it anymore
(&lt;a href="https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-poddebniak.pdf" target="_blank" rel="noopener noreferrer"&gt;with a notable exception&lt;/a&gt;).
Well-understood problems in PGP have gone unaddressed for over a decade because
of this.&lt;/p&gt;</description></item><item><title>Analyzing a simple encryption scheme using GitHub SSH keys</title><link>https://www.latacora.com/blog/2018/09/30/analyzing-github-ssh-key-encryption/</link><pubDate>Sun, 30 Sep 2018 13:54:00 -0400</pubDate><guid>https://www.latacora.com/blog/2018/09/30/analyzing-github-ssh-key-encryption/</guid><description>&lt;p&gt;(This is an introductory level analysis of a scheme involving RSA. If you&amp;rsquo;re
already comfortable with Bleichenbacher oracles you should skip it.)&lt;/p&gt;
&lt;p&gt;Someone pointed me at the following suggestion on the Internet for encrypting
secrets to people based on their GitHub SSH keys. I like the idea of making it
easier for people to leverage key material and tools they already have. The
encryption instructions are:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;my secret&amp;#34;&lt;/span&gt; &amp;gt; message.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -q &lt;span class="s2"&gt;&amp;#34;https://github.com/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.keys&amp;#34;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; head -n &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;gt; recipient.pub
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh-keygen -e -m pkcs8 -f recipient.pub &amp;gt; recipient.pem
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;openssl rsautl &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -encrypt &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -pubin &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -inkey recipient.pem &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -ssl &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -in message.txt &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -out encrypted.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Anything using an openssl command line tool makes me a little uncomfortable.
Let’s poke at it a little.&lt;/p&gt;</description></item><item><title>ROCA vs. ROBOT: An Eternal Golden Braid</title><link>https://www.latacora.com/blog/2018/08/08/roca-vs-robot/</link><pubDate>Wed, 08 Aug 2018 18:52:00 -0400</pubDate><guid>https://www.latacora.com/blog/2018/08/08/roca-vs-robot/</guid><description>&lt;p&gt;The ROCA RSA key generation flaw or ROBOT, the “Return Of Bleichenbacher”
attack: which is most deserving of the “Best Cryptographic Attack” Pwnie award
at the 2018 Black Hat USA conference? Only one can survive. Let us consider.&lt;/p&gt;
&lt;p&gt;Assume for the moment that it’s down to those two: ROBOT and ROCA. But first
take a moment to consider the best cases for the “runners up”. They are all
excellent; it was a very good year for crypto research.&lt;/p&gt;</description></item><item><title>The default OpenSSH key encryption is worse than plaintext</title><link>https://www.latacora.com/blog/2018/08/03/default-openssh-key-encryption/</link><pubDate>Fri, 03 Aug 2018 10:02:00 -0400</pubDate><guid>https://www.latacora.com/blog/2018/08/03/default-openssh-key-encryption/</guid><description>&lt;p&gt;Update: I don&amp;rsquo;t know if we can take credit for it or if it&amp;rsquo;s random chance, but
I note OpenSSH changed its default in the release after this blog post. The
system works!&lt;/p&gt;
&lt;p&gt;The eslint-scope npm package got compromised recently, stealing npm credentials
from your home directory. We started running tabletop exercises: what else
would you smash-and-grab, and how can we mitigate that risk?&lt;/p&gt;
&lt;p&gt;Most people have an RSA SSH key laying around. That SSH key has all sorts of
privileges: typically logging into prod and GitHub access. Unlike an npm
credential, an SSH key is encrypted, so perhaps it’s safe even if it leaks?
Let’s find out!&lt;/p&gt;</description></item><item><title>Factoring the Noise protocol matrix</title><link>https://www.latacora.com/blog/2018/07/18/factoring-the-noise/</link><pubDate>Wed, 18 Jul 2018 11:59:00 -0400</pubDate><guid>https://www.latacora.com/blog/2018/07/18/factoring-the-noise/</guid><description>&lt;p&gt;TL;DR: if I ever told you to use Noise, I probably meant Noise_IK and should
have been more specific.&lt;/p&gt;
&lt;p&gt;The Noise protocol is one of the best things to happen to encrypted protocol
design. &lt;a href="https://www.wireguard.com" target="_blank" rel="noopener noreferrer"&gt;WireGuard&lt;/a&gt; inherits its elegance from
Noise. Noise is a cryptography engineer’s darling spec. It’s important not to
get blindsided while fawning over it and to pay attention to where implementers
run into trouble. Someone raised a concern I had run into before: Noise has a
matrix.&lt;/p&gt;</description></item><item><title>There will be WireGuard</title><link>https://www.latacora.com/blog/2018/05/16/there-will-be-wireguard/</link><pubDate>Wed, 16 May 2018 21:56:00 -0400</pubDate><guid>https://www.latacora.com/blog/2018/05/16/there-will-be-wireguard/</guid><description>&lt;p&gt;Amidst the hubbub of the Efail PGP/SMIME debacle yesterday, the WireGuard
project made a pretty momentous announcement: a MacOS command line version of
the &lt;a href="https://www.wireguard.com/" target="_blank" rel="noopener noreferrer"&gt;WireGuard VPN&lt;/a&gt; is
&lt;a href="https://lists.zx2c4.com/pipermail/wireguard/2018-May/002854.html" target="_blank" rel="noopener noreferrer"&gt;now available for testing&lt;/a&gt;,
and should stabilize in the coming few months. I’m prepared to be wrong, but I
think that for a lot of young tech companies, this might be the biggest thing
to happen to remote access in decades.&lt;/p&gt;
&lt;p&gt;WireGuard is a modern, streamlined VPN protocol that Jason Donenfeld developed
based on Trevor Perrin’s &lt;a href="http://noiseprotocol.org/" target="_blank" rel="noopener noreferrer"&gt;Noise protocol framework&lt;/a&gt;.
Imagine a VPN with the cryptographic sophistication of Signal Protocol and
you’re not far off. Here are the important details:&lt;/p&gt;</description></item><item><title>Cryptographic right answers</title><link>https://www.latacora.com/blog/cryptographic-right-answers/</link><pubDate>Tue, 03 Apr 2018 15:25:00 -0400</pubDate><guid>https://www.latacora.com/blog/cryptographic-right-answers/</guid><description>&lt;p&gt;We’re less interested in empowering developers and a lot more pessimistic about
the prospects of getting this stuff right.&lt;/p&gt;
&lt;p&gt;There are, in the literature and in the most sophisticated modern systems,
“better” answers for many of these items. If you’re building for low-footprint
embedded systems, you can use STROBE and a sound, modern, authenticated
encryption stack entirely out of a single SHA-3-like sponge constructions. You
can use NOISE to build a secure transport protocol with its own AKE. Speaking
of AKEs, there are, like, 30 different password AKEs you could choose from.&lt;/p&gt;</description></item></channel></rss>