Skip to content
View Bastion-F's full-sized avatar

Block or report Bastion-F

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Bastion-F/README.md

πŸ›‘οΈ Experimental ARX-based encryption β€’ Cryptanalysis Wanted

πŸ›‘οΈ Bastion-F

Experimental ARX-based file encryption tool written in Rust. Custom cipher (Bastion-256). Open design. Cryptanalysis welcome.


⚠️ Cryptanalysis Wanted

Bastion-F is an experimental ARX-based stream cipher designed for educational and research purposes.

This project actively invites cryptanalysis.

We welcome:

  • distinguishers from random
  • reduced-round attacks
  • key recovery attempts
  • analysis of the key schedule and diffusion
  • related-key or nonce-misuse analysis

This is NOT production cryptography.


Building

This project is written in Rust and requires a recent stable toolchain.

Note that you can download compiled Bastion here: Download Bastion.exe v0.0.4

Requirements

  • Rust 1.70+ (stable)
  • Cargo

Build

git clone https://github.com/Bastion-F/bastion-f.git
cd bastion-f
cargo build --release

The resulting binary will be located at:

target/release/bastion-f

Usage

Bastion-F is a local file encryption tool.

Encrypt a file

bastion-f --encrypt --path secret.txt

This produces:

secret.txt.bastion

Decrypt a file

bastion-f --decrypt --path secret.txt.bastion

This restores:

secret.txt.dec

Optional secure deletion

bastion-f --encrypt --path secret.txt --shred

⚠️ Shredding is best-effort only and may not be reliable on SSDs or log-structured file systems.


Example

Encryption

$ bastion-f --encrypt --path notes.md
πŸ›‘οΈ  Bastion-F v0.0.4 | Terminal
πŸ”‘ Enter a master-key: ********
⠁ Reading & Compressing... [00:00:00]
πŸ—œοΈ  Compression finished.
πŸ”‘ Keys derived safely.
βš™οΈ  Encryption complete. [########################################] 100%
✍️  Digital signature added.
βœ… DONE: notes.md.bastion

Decryption

$ bastion-f --decrypt --path notes.md.bastion
πŸ›‘οΈ  Bastion-F v0.0.4 | Terminal
πŸ”‘ Enter a master-key: ********
⠁ Reconstructing keys... [00:00:00]
πŸ”‘ Keys reconstructed.
πŸ›‘οΈ  Signature valid.
βš™οΈ  Decryption complete. [########################################] 100%
πŸ”“ File restored.

Security Notes

  • Bastion-F is not a replacement for AES or ChaCha20
  • The cipher has not undergone extensive public cryptanalysis
  • Use for experimentation, learning, and research only

If you find a weakness, open an issue or contact the author.

Breaking this cipher is considered a contribution.

Popular repositories Loading

  1. Bastion-F Bastion-F Public

    Experimental ARX-based file encryption tool written in Rust. Includes custom cipher (Bastion-256) and actively invites cryptanalysis.

    Rust