Skip to content

The drive encryption as an addition to very our toy-OS

Notifications You must be signed in to change notification settings

NinevskiyK/yabloko-with-secure-drive

 
 

Repository files navigation

Yet Another BootLoader, OS Kernel and Other stuff

Forked from

Updates

  • Add functions to read files from encrypted disk to RAM 'on-the-fly'

How does it work?

  • I use CBC mode and XOR cipher to encrypt the drive
  • You can find the IV and ENC_KEY constants on the beggining of the Makefile
  • When user boot OS, he enters the key which is stored in cr3 register
  • When user wants to run a program, the code of program decrypts using the key entered by the user. If the key right, the program runs, otherwise it's not.
  • NOTE: Only ELF files are encripted - the directory structure and kernel code aren't ecnrypted

Quickstart:

$ ./setup.sh
$ make

How to run using llvm

You can use this way even if you have windows. You need to install llvm and qemu. Check that executables clang, ld.lld, qemu-system-i386 available from your terminal/console.

make LLVM=on

How to debug in my favorite IDE

Start debug server using command make debug-server or make debug-server-nox if you don't want to see gui, and then connect using remote gdb option to localhost:1234 (symbols file is kernel.bin)

Includes code from:

About

The drive encryption as an addition to very our toy-OS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 84.9%
  • Makefile 7.9%
  • Assembly 6.6%
  • Shell 0.6%