Giter Site home page Giter Site logo

cryptofloppy's Introduction

cryptoFloppy Build Status

The Secret Floppy

x86 bare-metal password-protected notepad on a single floppy

Features

  • All you need is an i386 personal computer with a floppy drive
  • No Operating System required
  • Encrypt and decrypt up to 9 512-character long messages
  • All data is stored on that single floppy
  • Perfect for dead-drops
  • Advanced encryption will protect your secrets
  • Simple interface, no manual required

Super Secret UI

And seriously

I wanted to try out writing something low-level in Assembly for x86. I thought writing a bootloader would be a nice exercise, but after I've written the first stage I had this idea for something more fun. Hence the cryptoFloppy.

TL;DR:

  • This is a for-fun project
  • It actually works - tested on a real computer (I'm that brave)
  • The 'encryption' for now is a simple XOR
  • I'd happily include a proper cipher, there is still plenty of space left
  • Anyone up for the challenge of writing a modern cipher for x86 protected real mode? :) (yeah, I'm new here)
  • UI can always use more love
  • People actually knowing what they doing are welcome to improve the code in terms of performance, readability and general best practices
  • I've tried to comment the code

Building and testing

For building on Unix-like systems you'll need NASM, dd and make. There is make target for testing for which you'll need QEMU - of course you can test on real hardware too.

Example build and test session:

$ make clean floppy.img emu

This will clean the bin files, assemble the sources, create a zero-filled file (space for saving the messages), bundle up the floppy image and run it via qemu-system-i386.

You should obviously always test your image in an emulator before even thinking about trying it on a real hardware, as at this level the code may wipe out your harddrives, produce seizure-inducing video and fax your mother a nasty letter. Though most probably bad code will just hang/reboot the machine.

For those brave enough and with an actual vintage working floppy drive writing the image to a real floppy diskette is just (adjust the device path if needed):

$ dd if=floppy.img of=/dev/fd0

Contributing

Fork the repo, hack away and remember to share back by making a Pull Request. All skill levels welcome. Feature ideas short-list:

  • Better UI (and there is a lot under this one)
    • Proper new-line handling when writing the message
    • Cursor keys for editing
    • Character left counter
    • Password confirmation
    • Write confirmation
    • ...
  • Work from any drive (not only A:)
  • Read and write more than just 9 sectors
  • Pad messages with random bytes to fill the whole sector

Feel free to add issues with ideas/concerns etc.

If you're a seasoned x86 assembly hacker you may go over the code and apply best practices and optimisations (with comments, so we can learn). Or if you're looking for a challenge - port some real crypto.

Learning corner

Links to readings I found useful and/or interesting:

Licensing

Seriously? Standard two-clause BSD license, see LICENSE.txt for details.

Copyright (c) 2015 Piotr S. Staszewski

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.