Go to file
Kristofers Solo 6c5cd9b78a
feat(cipher-factory): add AesCbc algorithm variant
Add AES-CBC support to Algorithm enum:
    - Add AesCbc variant with clap name "aes-cbc"
    - Add requires_iv() method to check if algorithm needs IV
    - Add new_cbc_cipher() for creating AesCbc instances
    - Add encrypt_cbc() and decrypt_cbc() helper methods
    - Update parse_text() and Display for AesCbc
2025-12-31 01:01:47 +02:00
aes feat(aes): add AES-CBC mode implementation 2025-12-31 00:58:49 +02:00
cipher-core feat(cipher-core): add PKCS#7 padding support 2025-12-31 00:48:49 +02:00
cipher-factory feat(cipher-factory): add AesCbc algorithm variant 2025-12-31 01:01:47 +02:00
cli feat(web): create CipherForm component 2025-11-26 03:43:23 +02:00
des docs(aes,des): add crate documentation and improve re-exports 2025-12-31 00:18:24 +02:00
web fix(web): type-erase component views to fix compiler recursion limit 2025-12-30 15:38:58 +02:00
.dockerignore feat(web): add Dockerfile 2025-11-26 05:49:24 +02:00
.gitignore chore: remove .env 2025-11-26 06:00:17 +02:00
Cargo.toml fix: clippy warnings 2025-11-26 06:42:29 +02:00
docker-compose.yml feat(web): add Dockerfile 2025-11-26 05:49:24 +02:00
Dockerfile feat(web): add Dockerfile 2025-11-26 05:49:24 +02:00
LICENSE-APACHE Create LICENSE-APACHE 2025-10-13 12:51:43 +03:00
LICENSE-MIT Create LICENSE-MIT 2025-10-13 12:52:21 +03:00
README.md fix: des guide 2025-11-26 06:26:04 +02:00
rust-toolchain.toml feat(web): add simple webpage 2025-11-26 01:11:19 +02:00

Cipher Workshop

This is a Rust workspace containing implementations of various cipher algorithms, along with a command-line interface (CLI) and a web interface to interact with them.

Features

  • AES and DES Implementations: The workspace includes implementations of the Advanced Encryption Standard (AES) and the Data Encryption Standard (DES).
  • Command-Line Interface: A CLI to encrypt and decrypt messages using the supported ciphers.
  • Web Interface: A web-based interface to perform cipher operations in the browser.

Workspace Structure

The cipher-workshop workspace is organized into the following crates:

  • aes: Implementation of the AES cipher.
  • cipher-core: Core traits and types for ciphers.
  • cipher-factory: A factory for creating cipher contexts.
  • cli: A command-line interface for the ciphers.
  • des: Implementation of the DES cipher.
  • web: A web interface for the ciphers, built with Leptos.

Getting Started

Prerequisites

Building the Project

Clone the repository and build the workspace:

git clone https://github.com/kristofers-solo/cipher-workshop.git
cd cipher-workshop
cargo build

Usage

CLI

The CLI allows you to encrypt and decrypt messages using the supported ciphers.

AES

To encrypt a message with AES:

cargo run --bin cli -- encrypt -a aes -k <KEY> <MESSAGE>

To decrypt a message with AES:

cargo run --bin cli -- decrypt -a aes -k <KEY> <MESSAGE> 

DES

To encrypt a message with DES:

cargo run --bin cli -- encrypt -a des -k <KEY> <MESSAGE>

To decrypt a message with DES:

cargo run --bin cli -- decrypt -a des -k <KEY> <MESSAGE>

Web Interface

The web interface provides a user-friendly way to interact with the ciphers, available at: https://cryptography.kristofers.xyz/

To run the web interface, navigate to the web directory and use trunk:

cd web
trunk serve --open

License

This project is licensed under either of the Apache License, Version 2.0 or the MIT license, at your option.