Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

krypt

A file encryptor written in pure x86-64 Assembly for Linux.

Overview

krypt is a minimalist, modular tool that performs in-place XOR encryption/decryption. It bypasses libc and communicates directly with the Linux kernel via syscalls.

Architecture

The project is split into three distinct modules to maintain separation of concerns:

  • src/data.asm: The transformation engine. Implements a stateful, circular XOR cipher.
  • src/io.asm: The interface layer. Handles raw Linux syscalls (sys_open, sys_read, sys_write, sys_lseek).
  • src/main.asm: The orchestrator. Manages the execution flow and state persistence across data chunks.

Engineering Highlights

  • Zero Dependencies: Does not link against libc.
  • In-Place Transformation: Uses sys_lseek to overwrite bytes directly on the disk, minimizing memory footprint and I/O overhead.
  • Stateful Chunking: Processes files in 1KB chunks while maintaining the encryption key's offset, allowing it to handle files of any size.
  • Modular Design: Uses the System V AMD64 ABI for internal function calls, making it easy to swap the encryption logic.

Build Requirements

  • NASM (Netwide Assembler)
  • GNU Linker (ld)
  • GNU Make

Usage

  1. Clone the repo:
    git clone [https://github.com/your-username/krypt.git](https://github.com/your-username/krypt.git)
    cd krypt
    
    

Build the binary:

  make 

Run

./bin/krypt

About

A simple XOR encryption tool written in X86_64 assembly

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages