Squaring Zooko’s Triangle, part two

Paul Crowley wrote “A few days ago, in Squaring Zooko's Triangle, I sketched out a proposal for a new naming scheme which to a limited extent achieved all of the contradictory-seeming aims set out in Zooko's Triangle. Having discussed the essay with a few folk since, it seems like it might be worthwhile trying to clarify the ideas behind it. ”

Squaring Zooko’s triangle

Paul Crowley wrote “In this essay I propose a kind of name which is entirely decentralized, reasonably secure, and at least somewhat memorable. They look like this: Paul_Crowley:area-fluid-above-movie-start”

By cs:ŠJů (Own work) [CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons

A crypto standards manifesto

Paul Crowley wrote “Our very best examples of crypto standards in commonplace use are so poor it's no wonder that developers end up hand-rolling their own broken alternatives. It's time we offered them something better.”

The right placement

Paul Crowley wrote “I wrote a short script to display the results of the 2004 US presidential elections as a bar chart, shown below (click for full-size image, which will make more sense): The width of each state indicates the number of electoral college votes it has; the height the extent to which votes for one party exceeded votes for the other. The script is in Python and uses Cairo for drawing. The most challenging part of writing the script was...”

GF(232-5)

Paul Crowley wrote “In which our heroes make P2P applications several times more efficient using the mathematics of finite fields and some careful thought on what is efficient on today's processors”

Subclassing in JavaScript, part 2

Paul Crowley wrote “In my last entry, I described a problem, and promised a solution. There are many solutions online and in various JavaScript toolkits; as far as I can tell this one is the most elegant of the bunch, and I'd be pleased to see it replace the various other solutions out there. The main goals of this approach are: * The problem described in the previous post are avoided. What is per-instance stays per-instance, and what is shared stays shared; subclassing doesn't change one into the other. * The code to create a subclass looks reasonably elegant and straightforward and not too wordy. * The result is reasonably efficient in space and time The approach here also meets one nice but less important goal: * The approach can be used to subclass from a class not specifically built to work with this approach - in other words, when not subclassing, you make classes in the normal way. I shan't include a comparison with any other specific solutions here, but if there are any you're interested in, ask me. ”

Subclassing in JavaScript, part 1

Paul Crowley wrote “What's the right way to create a subclass in JavaScript? Wrong question, say the JavaScript advocates. JavaScript isn't one of those fuddy-duddy old class-based languages. It's something much more exciting: a prototype-based language! So remember, when you work with JavaScript, remember never to refer to "classes", because JavaScript doesn't have them, and it only shows you're stuck in the old way of thinking. I'm sure that these sentiments have done enormous harm to the reputations of real prototype-based languages, so let me banish it right here. JavaScript is not a prototype based language; it most closely resembles a class-based language, but all its mechanisms for doing the work of a class-based language are horribly broken, which is why its advocates try to pretend it's something else.”

Thermostat code release

Paul Crowley wrote “I’ve released my simple fan control program described in this entry (see also part one). Download source code for version 0.1 THIS CODE MAY MELT YOUR CPU – download only if you plan to read it, test it, and/or hack on it. The license makes it clear that it comes with no warranty. I’ve already…”

Making the client do all the work

Paul Crowley wrote “This paper proposes to reduce the workload of SSL servers by making the clients carry as much of the crypto-related load as possible. I think it’s possible to do even better. Key agreement: In the above, the server only has to do an RSA public key operation, which is cheap if the exponent is low…”

Thermostat defeat

Paul Crowley wrote “When I started on this, I thought I'd be able to dash off a script to keep my CPU fan quiet in a few hours. I've just spent far too much of this weekend obsessively hacking on it and testing it, and after creating a tool of great sophistication, I have basically given up in defeat. I'm now using a thermostat-like approach; either the fans are on full or on minimum, nothing in between. First installment of the saga ”

A better thermostat

Paul Crowley wrote “On a modern PC, the motherboard controls the power to the CPU fan, and has sensors that monitor the temperature of the CPU and the speed at which the fans are spinning. The slower the fan spins, the quieter it is, so it's desirable to monitor the CPU temperature and adjust the fan speed appropriately. Under Linux, the lm-sensors package is responsible for hardware monitoring and control. It comes with a script, "fancontrol", which is meant for this exact job; every ten seconds, it reads the CPU temperature, and adjusts the fan power. This way it can trade off a hotter CPU for a quieter system, while keeping the CPU temperature within acceptable limits. Unfortunately, its algorithm for choosing the fan power doesn't work well on my system.”

A two-player real-time puzzle game

Paul Crowley wrote “Seven years ago, I wrote a two-player puzzle game in Python. I recently dug it up again and Matthias persuaded me to make a first release available here. Both players sit at the same keyboard. RULES The object of the game is to take over all the other player’s generators. The board is made up…”

A trust metric enabled Wikipedia?

Paul Crowley wrote “Wikipedia has been described as "the encyclopaedia that works in practice but not in theory". In theory, an encyclopaedia that anyone can edit should suffer from out-of-control trolling and vandalism, and collapse under its own weight in an instant. In practice, that hasn't happened; vandals attack Wikipedia daily, but it still does very well as a useful source of information, especially if you bear in mind that its primary competition is not Britannica or other paid-for sources, but the rest of the Internet. Nonetheless, a recent controversy over malicious insertion of false information into Wikipedia had some concluding that the very process by which Wikipedia has "incurable flaws".”

Looking for needles in haystacks

Paul Crowley wrote “Here's a proper programming challenge, simple to state, and in the end quite challenging to solve. A function produces a 64-bit output given a 64-bit input. It mostly behaves like a random function, so given a random input, most outputs occur with probability between 0 and 2-63; in other words, for a randomly-chosen 64-bit y, there are usually between 0 and 2 solutions to the equation f(x) = y. However, a few occur with much greater frequency - more like 2-32 or so. The function is pretty quick and easy to calculate, but its internal structure defies direct analysis. How would you identify these more frequent occurrences by experiment? How big a computer would you need to do it in something like a few hours to a few days? Think about it for a while before you read on.”

Truncated differential cryptanalysis of five rounds of Salsa20

Paul Crowley wrote “eSTREAM have just put my paper online: Truncated differential cryptanalysis of five rounds of Salsa20 (PDF) (discussion, Wikipedia on Salsa20). This doesn’t break the whole cipher, just a seriously reduced version. Experimentation played a key role in finding this result. I found the first differential by writing a short Python program that implemented a pretty…”

Understanding “Understanding Brute Force”

Paul Crowley wrote “D J Bernstein's draft paper Understanding Brute Force argues that the way we currently measure the cost of cryptanalytic attacks is highly misleading. The paper is a good example of Bernstein's unconventional style, and mixes quite informal writing with very formal and precise descriptions of cryptanalytic methods and costs. Though his conclusions are correct, I think he hasn't quite put his finger on how people have come to be misled in the past, so I shall have a go here at arguing what I think is the same point in different words. ”