GitHub: https://github.com/awnumar/rosen Many governments and other well-resourced actors around the world implement some form of censorship to assert control over the flow of information on the Internet, either because it is deemed “sensitive” or because it is inconvenient for those with power. Suppose there is some adversary, Eve, that wants to prevent users from accessing some…
It is safe to assume that in any useful cryptosystem $ C_k $ there exists at least one person with access to the key $ k $. An adversary with sufficient leverage can bypass the computational cost of a conventional attack by exerting their influence on this person. xkcd - security The technique is sometimes referred to as rubber-hose cryptanalysis and it gives the adversary some serious creative…
In my post on implementing an in-memory encryption scheme to protect sensitive information, I referenced a mitigation strategy called a Boojum. It is described by Bruce Schneier , Niels Ferguson and Tadayoshi Kohno in their book, Cryptography Engineering: Design Principles and Practical Applications . A number of people asked me about the mechanisms of the attack and the scheme, so I am including…
In a previous post I talked about designing and implementing an in-memory data structure for storing sensitive information in Go. The latest version of memguard adds something new: encryption. But why? Well, there are limitations to the old solution of using guarded heap allocations for everything. A minimum of three memory pages have to be allocated for each value: two guard pages sandwiching $ n…
According to the Go language specification : Strings are immutable: once created, it is impossible to change the contents of a string. We’ll see about that. data := [] byte ( "yellow submarine" ) str := * ( * string )( unsafe . Pointer ( & data )) for i := range data { data [ i ] = 'x' fmt . Printf ( "%s\n%s\n\n" , string ( data ), str ) } Try it out yourself .
Go is an incredibly useful programming language because it hands you a fair amount of power while remaining fairly succinct. Here are few bits of knowledge I’ve picked up in my time spent with it. Say you have a fixed-size byte array and you want to pass it to a function that only accepts slices. That’s easy, you can “slice” it: var bufarray [ 32 ] byte bufslice := bufarray…
A few months ago, while working on gravity , I started looking around for guidance on how I should manage encryption keys. I found a few references here and there, but the best I happened to put together with the limited information available was something like: Call mlock(2) (or VirtualLock ) on any sensitive resources. Overwrite the resources when finished with them. Allow them to run out of…
The perfect cryptographic primitive—does it exist? You’ve probably heard of the one-time pad : a cipher infamous for its drawbacks almost as much as for its absolute perfection. It is an example of an information-theoretic secure cipher—one that is mathematically proven to be unbreakable even in the face of infinite computing power. So why don’t we use it? Well, the…