As a by-product of the XtsSharp project, I implemented a SectorStream, which is a stream that reads and writes whole sectors (the size of which is configurable) to enable the XTS algorithm to operate on standard .NET streams.
I also implemented another stream based class that provides random access to an underlying SectorStream. This simulates random access by reading and writing entire sectors at once. This stream is called (yep, you guessed it) RandomAccessSectorStream.
The result is that you can use the random access stream to wrap a SectorStream and read and write to it as if it was just a normal .NET stream. It supports seeking to arbitrary points and reading / writing. The class handles the sector by sector reading and writing, which when using an XTSSectorStream, encrypts (when writing) and decrypts (when reading).
I’m not sure if this is usable outside of the XTS project, but it is completely separate code-wise, so maybe someone will find a use for it.
I’ve been meaning to write about this for some time, but laziness, procrastination and work have managed to get in the way.
DISCLAIMER: I am not a cryptographer, cryptography is something that interests me and the library is a proof of concept; you use it at your own risk.
I recently (i.e. a year ago!) wrote an implementation of the XTS algorithm in .NET (C#). I had asked a question on stackoverflow, but didn’t get much of a response. The only other implementations I found were in C or C++.
Continue reading →
This site has now moved to it’s own domain (garethlennox.com), rather than sitting in a subdirectory under another domain.
I managed to move it in the space of a couple of hours, without too many hassles. The main problem was that wordpress doesn’t like to have it’s main url changed from underneath it, so I had to get into the database and tweak some values. There is a good guide in the wordpress codex on how to do this.
Otherwise, marring some obscure file permission problems, it was very straight forward.
One other benefit of having my own domain is that I get to set the favicon for it, which is a smaller version of my logo. I used this handy tool to convert the favicon into a .ico format.
Finally, I’ve updated the design of this site, to brand-new spanking HTML5, including a fluent layout, that adjusts for larger and smaller screens (it looks great on a phone too!). I created the previous design in 2005, so it was time for a refresh.
Continue reading →
Just spend hours working out how to do this. If you’re moving pictures to another PC or your Picasa db gets broken, you may lose all your albums. The album information is stored alongside the Picasa database, in xml files with a .pal extension, which is irritating – you have to back up that folder too. Continue reading →