<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dylan Builds Things]]></title><description><![CDATA[I'm a self-taught programmer, application builder, UX designer, and social science researcher. I build tools for communities and study misinformation in the age]]></description><link>https://dhans.me</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 18:39:39 GMT</lastBuildDate><atom:link href="https://dhans.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A picture is worth a thousand bits]]></title><description><![CDATA[Encoding invisible unicode messages into PNGs with RGB value flipping]]></description><link>https://dhans.me/a-picture-is-worth-a-thousand-bits</link><guid isPermaLink="true">https://dhans.me/a-picture-is-worth-a-thousand-bits</guid><category><![CDATA[General Programming]]></category><category><![CDATA[image processing]]></category><category><![CDATA[encryption]]></category><dc:creator><![CDATA[Dylan Hanson]]></dc:creator><pubDate>Wed, 25 Oct 2023 22:00:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1698268439120/bcb9a6bf-269b-4c86-aba9-e9ae89b90406.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>While bored in class, I began wondering how one might be able to encode the contents of a string into an image as a secret message of sorts, undetectable to the naked eye. The string might be decipherable by someone who, given the image, knew how and where to look.</p>
<h3 id="heading-the-idea">The Idea</h3>
<p>All images are made up of pixels, each of which is little more than a color. And, as we know from computer screens, image colors can be represented using the RGBA scheme where a byte of data (8 bits, 256 possible values) is used to represent the individual values of R (red), G (green), B (blue), and A (alpha/opacity).</p>
<p>For example, a nice teal might be represented as such:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698269196861/c9580b90-3b7d-45c3-858e-fdfc5252e750.png" alt="rgba(41, 215, 177, 0.8)" /></p>
<p>Encoding a message, then, will require systematically adjusting the RGB colors of an image in a near-unnoticeable pattern. We can accomplish this by <strong>encoding each pixel with 1/2 of a single UTF-8 character.</strong> How does this work?</p>
<ul>
<li><p>UTF-8 is an encoding standard that represents characters using a single byte, or 8 bits.</p>
</li>
<li><p>RGBA color representations contain four independent numerical values.</p>
</li>
<li><p>We can map each RGBA value to a bitwise value (0 or 1) depending on whether it's even (0) or odd (1).</p>
<ul>
<li><p><code>41 % 2 = 1</code> (1 bit)</p>
</li>
<li><p><code>216 % 2 = 0</code> (0 bit)</p>
</li>
</ul>
</li>
<li><p>By stringing two pixels together, we can represent a single UTF-8 character:</p>
<ul>
<li><p><code>RGBA(40, 215, 178, 0.8)</code> % 2 → <code>0100</code></p>
</li>
<li><p><code>RGBA(42, 216, 178, 0.81)</code> % 2 → <code>0001</code></p>
</li>
<li><p><code>0100</code> <code>0001</code> = <code>A</code> in UTF-8</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-encoding">Encoding</h3>
<p>Using this train of thought, we can encode a message into a PNG by iterating through its pixels and intentionally flipping their individual RGBA values by +-1 to represent a bit value. This adjustment is minimal enough that it would be invisible to the naked eye, yet large enough for it to be usable.</p>
<h3 id="heading-decoding">Decoding</h3>
<p>A message might be decoded in the same way; the RGBA values for an image can easily be transcribed into their binary encoding. Start/stop sequences can be used to signal the beginning/end of the encoded message. From there, it is as easy as parsing the binary into UTF-8.</p>
<h3 id="heading-code-sample">Code Sample</h3>
<p>To be added...</p>
<h3 id="heading-usage-and-implications">Usage and Implications</h3>
<p>This is a simple idea that has undoubtedly been documented and reproduced before. However, it's still fun! Use it for passing hidden messages, or combine it with an encryption algorithm for even more secrecy.</p>
<p>It's worth noting that conversion from a PNG to a JPEG instantly wipes all encoded data because of the JPEG's compression algorithm fuzzily rewriting RGBA values (however minimally). I like the idea of using this to instantly wipe your secrets by simply pressing "compress."</p>
]]></content:encoded></item><item><title><![CDATA[I designed a crypto-powered digital diploma and won $1,000]]></title><description><![CDATA[I designed and proposed Cryptdegree for VINES' 48-hour-launch event in Fall 2022]]></description><link>https://dhans.me/i-designed-a-crypto-powered-digital-diploma-and-won-1000</link><guid isPermaLink="true">https://dhans.me/i-designed-a-crypto-powered-digital-diploma-and-won-1000</guid><dc:creator><![CDATA[Dylan Hanson]]></dc:creator><pubDate>Wed, 01 Feb 2023 06:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293900094/f556dbc3-b15f-42a3-9cbb-036492262ff1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I wanted to solve the credential verification problem between online learners and platforms like Udemy, EdX, and Coursera. Learners currently receive only an image of a diploma, and there is no interoperability between platforms. This devalues an online degree for both the student and the platform as the learner's certificate cannot be platform-agnostically verified.</p>
<p>I proposed Cryptdegree to solve this problem. It would offer a SaaS API that would mint an NFT diploma for a learner once they receive their degree; this NFT would contain encrypted data about the learner and their degree that could be trustlessly verified.</p>
<p>I won the 48HL grand prize of $1,000, and I received individual mentoring from the fintech sponsor of the prize.</p>
<h3 id="heading-the-logo">The Logo</h3>
<p>I made the logo myself in around an hour using Illustrator. It's the best part of the pitch.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698292756616/0b6d0f5a-3a2f-466e-9f67-46d06dd00fe8.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-the-mockup">The Mockup</h3>
<p>I created an example of the page used to verify a learner's credentials, here using their first name, last name, and birthday for cross-referencing.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698292802486/e661ae6f-e271-4115-90fc-29ae749f43f1.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-the-pitch-deck">The Pitch Deck</h3>
<p>Presented through an online video submission. Because it was due over vacation, I was <em>enormously</em> intoxicated while recording.</p>
<ol>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293255514/c6d3d272-a754-4acf-9d0b-14b0587c799d.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293262743/e42eac0b-40d4-4e38-aa5e-50602ef91999.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293270060/e0edf378-baf8-4489-a86c-da060c10d25c.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293274867/a5669935-a404-4abe-a2f5-318f9cd9ca75.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293279991/87a54e31-6bdd-474e-8b10-a96fad3a6331.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293286138/7e51258c-45ca-4f10-bb9e-ce2cd9f7a6e1.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293292071/daa50364-445c-4d55-b39a-da7154362a2c.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698293297499/a4b70253-8ab6-467c-be1b-383cebf9d235.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h3 id="heading-reflection">Reflection</h3>
<p>Though I would never build Cryptdegree, I could see why it is valuable. I believe that crypto can be an extremely useful tool when it is used as a <em>tool</em>, rather than as a means to an end. I'm not a big fan of cryptocurrencies, as you can imagine.</p>
]]></content:encoded></item></channel></rss>