<?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 jeffcarp</title>
    <link>/categories/cryptography/</link>
    <description>Recent content in Cryptography on jeffcarp</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 05 Jan 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="/categories/cryptography/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Doing Post-Quantum Cryptography in JAX</title>
      <link>/posts/2025/post-quantum-cryptography-jax/</link>
      <pubDate>Sun, 05 Jan 2025 00:00:00 +0000</pubDate>
      <guid>/posts/2025/post-quantum-cryptography-jax/</guid>
      <description>&lt;p&gt;In 2018 while studying ML and&#xA;&lt;a href=&#34;/posts/2018/cs255-cryptography&#34;&gt;cryptography&lt;/a&gt;&#xA;around the same time, I realized that many cryptographic algorithms can be&#xA;expressed as computation graphs, the same ones supported by major ML&#xA;frameworks, which led to a completely frivolous attempt to &lt;a href=&#34;/posts/2018/cryptography-in-tensorflow/&#34;&gt;implement&#xA;cryptographic algorithms in&#xA;TensorFlow&lt;/a&gt;, just to see if it would&#xA;work.&lt;/p&gt;&#xA;&lt;p&gt;The world has changed a lot since 2018. JAX is growing in popularity as an ML&#xA;framework, and in the cryptography space, post-quantum cryptography has gone&#xA;from a mostly theoretical threat to a &lt;a href=&#34;https://www.infoq.com/news/2024/12/google-willow-quantum-supremacy/&#34;&gt;slightly more real&#xA;one&lt;/a&gt;. So&#xA;continuing the motivation of the original post, I decided to look into&#xA;implementing a post-quantum cryptography algorithm in JAX.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Doing Cryptography in TensorFlow</title>
      <link>/posts/2018/cryptography-in-tensorflow/</link>
      <pubDate>Sat, 23 Jun 2018 13:00:14 -0700</pubDate>
      <guid>/posts/2018/cryptography-in-tensorflow/</guid>
      <description>&lt;!--&#xA;After building a system with TensorFlow in Autumn 2017 and taking a course&#xA;on Cryptography in Winter 2018, I saw some interesting parallels.&#xA;&#xA;TensorFlow is marketed as a Machine Learning framework, but under the hood it&#39;s&#xA;a general platform for doing computations in the structure of a graph.&#xA;Similarly, cryptographic algorithms are frequently structured as the&#xA;manipulation of vectors or matrices in the structure of a graph. I put together&#xA;a Python notebook to explore this interesting relationship.&#xA;--&gt;&#xA;&lt;figure&gt;&#xA;  &lt;div style=&#34;display:flex;&#34;&gt;&#xA;    &lt;div style=&#34;flex:1;&#34;&gt;&#xA;        &lt;img src=&#34;feistel.gif&#34; alt=&#34;A Feistel Network, the algorithm behind DES.&#34; /&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div style=&#34;flex:1;&#34;&gt;&#xA;        &lt;img src=&#34;nnet.png&#34; alt=&#34;A neural network.&#34; /&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    On the left: the Feistel Network from the DES cipher, implemented below. On the right: a deep neural network.&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;https://www.tensorflow.org/&#34;&gt;TensorFlow&lt;/a&gt;&lt;/strong&gt; is a popular machine learning&#xA;framework. If you look under the hood, TensorFlow is a general platform for&#xA;doing computation over tensors in the structure of a graph.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Understanding the Security of Cryptographic Hash Functions</title>
      <link>/posts/2018/understanding-security-cryptographic-hash-functions/</link>
      <pubDate>Mon, 16 Apr 2018 21:33:26 -0700</pubDate>
      <guid>/posts/2018/understanding-security-cryptographic-hash-functions/</guid>
      <description>&lt;p&gt;Hash functions are an extremely versatile tool that you can find nearly&#xA;everywhere in software engineering.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bitcoin mining is done by &lt;a href=&#34;https://www.youtube.com/watch?v=bBC-nXj3Ng4&#34;&gt;repeatedly computing SHA256&#xA;hashes&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;git stores files internally using the SHA-1 hash of the content as the&#xA;filename (&lt;a href=&#34;https://en.wikipedia.org/wiki/Content-addressable_storage&#34;&gt;content-based&#xA;addressing&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;li&gt;When you download an app, your phone verifies that the app you&amp;rsquo;re about to&#xA;run is the app you intended to download by computing a checksum (a hash of&#xA;the entire app) and comparing it to one provided by the app store. If the&#xA;values are different, that means someone might have changed the contents of&#xA;the app.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This article intends to give you a deeper understanding of cryptographic&#xA;hash functions, when to use them, and how to think about their security&#xA;properties.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Thoughts on Stanford&#39;s CS255 Intro to Cryptography</title>
      <link>/posts/2018/cs255-cryptography/</link>
      <pubDate>Sat, 31 Mar 2018 12:31:22 -0700</pubDate>
      <guid>/posts/2018/cs255-cryptography/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve always been interested in Cryptography &amp;ndash; the field is a really compelling&#xA;marriage of beautiful mathematics with critical real-world applications.  Much&#xA;of the modern internet would not be possible without the clever math behind&#xA;asymmetric encryption.&lt;/p&gt;&#xA;&lt;p&gt;This Winter quarter I took &lt;a href=&#34;https://crypto.stanford.edu/~dabo/cs255/&#34;&gt;Stanford CS255: Introduction to&#xA;Cryptography&lt;/a&gt;. To be honest, it was&#xA;quite challenging as I was still working full time as a software engineer on&#xA;Chrome, and I was never that strong in the math department. However, I got a&#xA;ton out of this course and solidly recommend it to anyone interested. The&#xA;professor &amp;ndash; Dan Boneh &amp;ndash; was amazing and made the complex topics approachable.&#xA;He publishes the textbook for the course for free&#xA;&lt;a href=&#34;https://toc.cryptobook.us/book.pdf&#34;&gt;here&lt;/a&gt;. Here are some interesting things&#xA;I picked up from the course that I want to take with me.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
