## Caesar’s Cipher

April 2, 2013

Julius Caesar, presumably sometimes during the war in Gaul, according to Suetonius, used a simple cipher to ensure the privacy of his communications.

Caesar’s method can hardly be considered anything close to secure, but it’s still worthwhile to have a look at how you can implement it, and break it, mostly because it’s one of the simplest substitution ciphers.

## A Special Case…

March 26, 2013

Expressions with floors and ceilings ($\lfloor x \rfloor$ and $\lceil y \rceil$) are usually troublesome to work with. There are cases where you can essentially remove them by a change of variables.

Turns out, one form that regularly comes up in my calculations is $\lfloor \lg x \rfloor$, and it bugged me a while before I figured out the right way of getting rid of them (sometimes).

## Shallow Constitude

March 19, 2013

In programming languages, there are constructs that are of little pragmatic importance (that is, they do not really affect how code behaves or what code is generated by the compiler) but are of great “social” importance as they instruct the programmer as to what contract the code complies to.

One of those constructs in C++ is the const (and other access modifiers) that explicitly states to the programmer that this function argument will be treated as read-only, and that it’s safe to pass your data to it, it won’t be modified. But is it all but security theater?

## Compressed Series (Part II)

March 12, 2013

Last week we looked at an alternative series to compute $e$, and this week we will have a look at the computation of $e^x$. The usual series we learn in calculus textbook is given by

$\displaystyle e^x=\sum_{n=0}^\infty \frac{x^n}{n!}$

We can factorize the expression as

## Compressed Series (Part I)

March 5, 2013

Numerical methods are generally rather hard to get right because of error propagation due to the limited precision of floats (or even doubles). This seems to be especially true with methods involving series, where a usually large number of ever diminishing terms must added to attain something that looks like convergence. Even fairly simple sequences such as

$\displaystyle e=\sum_{n=0}^\infty \frac{1}{n!}$

may be complex to evaluate. First, $n!$ is cumbersome, and $\displaystyle \frac{1}{n!}$ becomes small exceedingly rapidly.

## Zenmap

February 26, 2013

I recently discovered a cute little front-end to nmap called zenmap.

Zenmap is installed by default in distributions such as Backtrack Linux, but is also found in Ubuntu’s repositories.

## On rectangles

February 19, 2013

While reading Cryptography: The Science of Secret Writing [1], the author makes a remark (p. 36) (without substantiating it further) that the number of possible distinct rectangles composed of $n$ squares (a regular grid) is quite limited.

Unsubstantiated (or, more exactly, undemonstrated) claims usually bug me if the demonstration is not immediate. In this case, I determined fairly rapidly the solution, but I guess I would have liked something less vague than “increased in size does not necessarily provide greater possibilities for combination.” Let’s have a look at that problem.