Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

2013-06-15

Secure distributed development despite NSA spying

In 2009 I wanted to setup an environment to do some distributed development with two friends of mine. As this was no public project our requirements have been:
  • No central server with our source code in unencrypted form.
  • Local development should be possible without Internet connection.
Today I might use encfs and dropbox, but at that time I went a different way.
I used git to store the repositories and dar to make encrypted differential backups with chunks of 1 MB and a perl script to build them and an info file with checksum. At our first meeting we created a secret symmetric key with
dd if=/dev/random bs=1 count=32 | base64
You may have to move your mouse around to get enough entropy for 32 bytes. But 32 bytes  should keep eavesdropper from getting useful information for a loooong time.
The backup and restore scripts make sure that the backups have sequential numbers so that you can't restore backup #47 from user alex if you haven't restored his #46 before. Here are the backup and restore scripts.
mkBack.pl
mkRestore.pl
~/.mkBack.pm should contain something like this:
$me = "frank"; # You should know your name :-)
$backupBase="$ENV{HOME}/dar";
$repoDir="$ENV{HOME}/git/sync-repos";
# replace your-secret with the output of
# dd if=/dev/random bs=1 count=32 | base64
$key='bf:your-secrect';

With this setup repositories are located under~/git/sync-repos. in a subdirectory for every user you receive backups from and yourself. So mine are under ~/git/sync-repos/frank . So I push to ~/git/sync-repos/frank/example.git and merge from ~/git/sync-repos/alex/example.git to get changes from Alex.

mkBack.pl creates a backup in newly created directory under $backupBase and tells you what you should mail to your friends.
Your friends should save the files to any directory and run
mkRestore.pl directory
where directory defaults to the current directory.

1988-09-28

Early warnings

Once upon the time I was browsing through a book which disassembled the Amiga Kickstart-ROM (well I don't remember it's name but it was long before the very nice Amiga Guru-Buch came out). What I saw there, immediately caught my  attention. If the filesystem on a new mounted filesystem had a specific problem it would try to load a program to fix it. The interesting point was, that it first tried to load from that filesystem! If it couldn't find it there it tried the system-partition. Some hours later I had a floppy that upon inserting it into your Amiga immediately showed a very nice custom Guru-Meditation. I showed this floppy to a friend of mine who was astonished as well because the Amiga had no known feature to automatically start a program upon inserting a floppy. It was very hard to keep it from starting it. Luckily viruses where more a theoretic thing at that time. We had copy protection on our mind. It would be very funny to start the game immediately upon inserting the disk.