This repository provides sample implementations of RSA encryption/decryption, digital signature, and secure server-client communication in Rust.
You can try encryption, signature, or TCP-based secure message exchange using command-line arguments.
src/rsa_cryption.rs
RSA encryption and decryption logic (library API)src/rsa_signature.rs
RSA digital signature and verification logic (library API)src/rsa_server_client.rs
TCP server-client communication using RSA encryptionsrc/main.rs
Command-line interface for feature selectionsrc/lib.rs
Module definitions and documentation
-
Make sure you have Rust installed.
-
Clone this repository and navigate to the project directory.
-
Run the following commands:
-
To run the encryption/decryption demo:
cargo run -- crypto
-
To run the signature/verification demo:
cargo run -- signature
-
To run the server-client RSA communication:
- Start the server in one terminal:
cargo run -- server
- Start the client in another terminal:
cargo run -- client
- Start the server in one terminal:
-
- Learn the basics of RSA cryptography in Rust
- Practice modular Rust programming
- Interactive console-based demos for encryption, digital signatures, and secure TCP communication
- RSA encryption and Rust implementation (Japanese)
- Difference between RSA encryption and signature, with Rust implementation (Japanese)
This repository is licensed under the MIT License.