Skip to content

daffukk/adiatron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adiatron

Adiatron is a command-line tool for encrypting and decrypting files of any size. It uses public-key cryptography for secure key exchange and authenticated streaming encryption to process large files with constant memory usage.

TODO

  • Keys selection(TUI)
  • Select usb drive for keys
  • Progress bar
  • Keys passphrase support
  • --version flag

How it works

  1. A random symmetric stream key is generated
  2. The stream key is encrypted using the recipient's public key
  3. File data is encrypted in chunks using authenticated streaming encryption
  4. Each chunk is verified during decryption to prevent tampering

Here is an encrypted file structure:

[ box_nonce ][ boxed_stream_key ][ secretstream_header ][ encrypted chunks... ]

Installation

Dependencies

  • libsodium
  • cmake
  • tar(optional)

Build

./build.sh

Usage

To encrypt files:

./adiatron encrypt file.mp4

To decrypt files:

./adiatron decrypt file.mp4.enc

Type ./adiatron to display all examples and options.

Note

See Tips and Issues section for more information.

How public-key exchange works

  1. Sender (Alice) generates a key pair and sends her public key to the receiver.
  2. Receiver (Bob) generates a key pair and sends his public key to the sender.
  3. Now:
    • Alice encrypts messages using Bob's public key + her secret key.
    • Bob decrypts messages using Alice's public key + his secret key.

Tips and Issues

Tip

Keys are automatically generated during file encryption or decryption.
However, you can generate keys in advance by using the command:

./adiatron keygen

Tip

You can create a short alias by adding this line to your shell configuration file(e.g., ~/.bashrc or ~/.zshrc):

alias adiatron=/path/to/adiatron

License

This project is licensed under MIT

About

A cryptographic file encryption tool that supports encrypting and decrypting files of arbitrary size. Uses public-key cryptography for secure key exchange and crypto_secretstream_xchacha20poly1305 for chunk-based, authenticated streaming encryption.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors