Sitemap
Press enter or click to view image in full size

Member-only story

(Crypto) Roll-ups and Hash

4 min readFeb 15, 2025

--

Oops. That title looks a bit like clickbait for one of those dodgy social media posts. The roll-up I mean here are JavaScript code integrations of hashing methods for cryptography. In this case, we will use the JavaScript integrations provided by the Cloudflare rolls-up CDN repository for the crypto-js library [here]:

Press enter or click to view image in full size

For this, allows us to simply integrate JavaScript code from the edge of the Cloud, and in a trustworthy way. As an example, let’s integrate HMAC, and where we have a signed hash of a message:

Press enter or click to view image in full size

For this, Bob sends Alice a message, and takes a hash of it, such as using SHA-256, and then signs this with a shared secret key. The main hashing methods we use include MD-5, SHA-1 and SHA-256. Luckily, the roll-ups can be added with:

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/hmac-md5.min.js"></script>
<script type="text/javascript"…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.