- Add functions to read files from encrypted disk to RAM 'on-the-fly'
- I use CBC mode and XOR cipher to encrypt the drive
- You can find the
IV
andENC_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
$ ./setup.sh
$ make
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
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)