<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bitbashing (Posts about algorithms)</title><link>https://randombit.net/bitbashing/</link><description></description><atom:link href="https://randombit.net/bitbashing/categories/algorithms.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2019 &lt;a href="mailto:jack@randombit.net"&gt;Jack Lloyd&lt;/a&gt; </copyright><lastBuildDate>Fri, 02 Aug 2019 22:27:07 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Algorithmic Complexity Attacks on Allocators</title><link>https://randombit.net/bitbashing/posts/allocation.html</link><dc:creator>Jack Lloyd</dc:creator><description>&lt;div&gt;&lt;p&gt;A few years back some researchers presented the concept of performing
denial of service through &lt;a class="reference external" href="http://www.cs.rice.edu/~scrosby/hash/"&gt;algorithmic complexity attacks&lt;/a&gt;, which essentially cause
pathological behavior in data structures like hash tables through
carefully chosen inputs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://randombit.net/bitbashing/posts/allocation.html"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>algorithms</category><category>security</category><guid>https://randombit.net/bitbashing/posts/allocation.html</guid><pubDate>Wed, 01 Nov 2006 05:00:00 GMT</pubDate></item><item><title>Finding Equivalences of Boolean Function</title><link>https://randombit.net/bitbashing/posts/booleans.html</link><dc:creator>Jack Lloyd</dc:creator><description>&lt;div&gt;&lt;p&gt;A fairly common class of functions in crypto are functions mapping
{0,1}&lt;sup&gt;3&lt;/sup&gt; onto {0,1}. In particular, these show up a lot in hash
functions derived from MD4, including MD5, SHA-1, RIPEMD, and
SHA-512. These range in complexity from simple three-term expressions
like "(A xor B xor C)" to functions like "((A and B) or (C and (A or
B)))". One interesting and important difference between these two
functions becomes very important when you consider how to implement
these functions on an x86 (or x86-64) processor. The x86 uses
two-operand instructions, and has very few registers, so computing
something like "(A and B) xor (not(A) and C)", which requires two
temporaries (one to hold A and B, the other (not(A) and C)) might
require you to spill values to the stack. Often, that means a major
performance hit. Finding an alternate form for this function that only
requires fewer temporary registers could be a major benefit. Obviously
finding these equivalences could be done by hand, but having a
computer do it seemed both faster and more interesting.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://randombit.net/bitbashing/posts/booleans.html"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>algorithms</category><category>programming</category><guid>https://randombit.net/bitbashing/posts/booleans.html</guid><pubDate>Wed, 30 Aug 2006 04:00:00 GMT</pubDate></item></channel></rss>