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.
Expressions with floors and ceilings ( and ) 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 , and it bugged me a while before I figured out the right way of getting rid of them (sometimes).
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?
Last week we looked at an alternative series to compute , and this week we will have a look at the computation of . The usual series we learn in calculus textbook is given by
We can factorize the expression as
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
may be complex to evaluate. First, is cumbersome, and becomes small exceedingly rapidly.
While reading Cryptography: The Science of Secret Writing , the author makes a remark (p. 36) (without substantiating it further) that the number of possible distinct rectangles composed of 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.