ruscrypt 0.3.0

⚑ Lightning-fast cryptography toolkit built with Rust - A comprehensive CLI tool for classical and modern cryptographic operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
<div align="center">
  <img src="https://cdn.pixabay.com/photo/2019/10/06/11/40/lock-4529981_1280.png" alt="ruscrypt logo" width="200" height="200">

# RusCrypt

### _⚑ Lightning-fast cryptography toolkit built with Rust ⚑_

![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge&logo=rust&logoColor=white) ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)
[![Build Status](https://img.shields.io/badge/build-passing-brightgreen?style=for-the-badge)](https://github.com/Adel2411/ruscrypt)
[![Version](https://img.shields.io/badge/version-0.3.0-blue?style=for-the-badge)](https://github.com/Adel2411/ruscrypt)

**Modern cryptographic operations made simple and blazingly fast**

[πŸ“– Documentation](#-documentation) β€’ [πŸš€ Quick Start](#-quick-start) β€’ [πŸ’‘ Examples](#-examples) β€’ [🀝 Contributing](#-contributing) β€’ [πŸ“š API Docs](https://docs.rs/ruscrypt/0.1.0/ruscrypt/)

</div>

---

## πŸ“‘ Table of Contents

- [🎯 Overview]#-overview
- [✨ Features]#-features
- [πŸ“¦ Installation]#-installation
- [πŸ“Έ Screenshot]#-screenshot
- [πŸš€ Quick Start]#-quick-start
- [πŸ“– Documentation]#-documentation
- [πŸ’‘ Examples]#-examples
- [πŸ§ͺ Testing]#-testing
- [πŸ”’ Security]#-security
- [🀝 Contributing]#-contributing
- [πŸ“„ License]#-license

---

## πŸ“Έ Screenshot

Below is a screenshot of the interactive usage of `ruscrypt`:

![ruscrypt usage screenshot](./assets/examples.png)

_Example: Interactive help and encryption prompt._

---

## 🎯 Overview

**ruscrypt** is a powerful command-line cryptography toolkit that brings together classical and modern cryptographic algorithms in one unified interface. Built with Rust for **maximum performance**, **memory safety**, and **security**.

> πŸŽ“ **Perfect for**: Learning cryptography, educational purposes, quick encryption tasks, and understanding algorithm implementations.

### Why ruscrypt?

| Feature             | Description                                              |
| ------------------- | -------------------------------------------------------- |
| ⚑ **Blazing Fast** | Rust's zero-cost abstractions ensure optimal performance |
| πŸ”’ **Memory Safe**  | No buffer overflows or memory leaks                      |
| 🎯 **Simple API**   | One command format for all algorithms                    |
| πŸ“š **Educational**  | Clean implementations perfect for learning               |
| πŸ”§ **Interactive**  | Guided prompts for all required parameters               |

---

## ✨ Features

<div align="center">

| πŸ›οΈ **Classical Ciphers** | πŸ” **Stream & Block Ciphers** | πŸ”‘ **Asymmetric Encryption** | πŸ”’ **Hash Functions** |
| :----------------------: | :---------------------------: | :--------------------------: | :-------------------: |
|      Caesar Cipher       |              RC4              |             RSA              |          MD5          |
|     Vigenère Cipher      |       AES (128/192/256)       |        Diffie-Hellman        |         SHA-1         |
|     Playfair Cipher      |         DES (ECB/CBC)         |              -               |        SHA-256        |
|    Rail Fence Cipher     |         AES (ECB/CBC)         |              -               |           -           |

</div>

---

## πŸ—οΈ Architecture Overview

The RusCrypt toolkit follows a modular architecture designed for extensibility and maintainability

### Data Flow Architecture

```mermaid
sequenceDiagram
    participant User
    participant CLI
    participant Dispatcher
    participant Interactive
    participant Algorithm
    participant Utils

    User->>CLI: Command with flags
    CLI->>Dispatcher: Parsed arguments
    Dispatcher->>Interactive: Prompt for inputs
    Interactive->>User: Request parameters
    User->>Interactive: Provide inputs
    Interactive->>Dispatcher: User data
    Dispatcher->>Algorithm: Execute operation
    Algorithm->>Utils: Helper functions
    Utils->>Algorithm: Processed data
    Algorithm->>Dispatcher: Result
    Dispatcher->>User: Formatted output
```

---

## πŸ—οΈ Project Structure

```
ruscrypt/
β”œβ”€β”€ Cargo.toml                  # Project manifest
β”œβ”€β”€ README.md                   # Documentation
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.rs                 # Entry point
β”‚   β”œβ”€β”€ lib.rs                  # Library exports
β”‚   β”œβ”€β”€ cli.rs                  # CLI parsing
β”‚   β”œβ”€β”€ dispatcher.rs           # Command routing
β”‚   β”œβ”€β”€ interactive.rs          # User prompts
β”‚   β”œβ”€β”€ utils.rs                # Shared utilities
β”‚   β”‚
β”‚   β”œβ”€β”€ classical/              # Classical ciphers
β”‚   β”œβ”€β”€ stream/                 # Stream ciphers
β”‚   β”œβ”€β”€ block/                  # Block ciphers
β”‚   β”œβ”€β”€ asym/                   # Asymmetric crypto
β”‚   β”œβ”€β”€ hash/                   # Hash functions
β”‚   └── tests/                  # Test modules
β”‚       β”œβ”€β”€ mod.rs
β”‚       β”œβ”€β”€ classical.rs
β”‚       β”œβ”€β”€ stream.rs
β”‚       β”œβ”€β”€ block.rs
β”‚       β”œβ”€β”€ hash.rs
β”‚       β”œβ”€β”€ asym.rs
```

---

## πŸ“¦ Installation

### Prerequisites

- **Rust**: 1.70.0 or higher

### Install from crates.io (Recommended)

```bash
# πŸ“₯ Install the CLI tool globally
cargo install ruscrypt

# 🎯 Binary will be available in your PATH
ruscrypt --help
```

### Use as a Library

```bash
# πŸ“š Add to your Cargo.toml dependencies
cargo add ruscrypt

# Or manually add to Cargo.toml:
# [dependencies]
# ruscrypt = "0.1.0"
```

### Build from Source

```bash
# πŸ“₯ Clone the repository
git clone https://github.com/Adel2411/ruscrypt.git
cd ruscrypt

# πŸ”¨ Build in release mode for optimal performance
cargo build --release

# 🎯 Binary will be available at
./target/release/ruscrypt
```

---

## πŸš€ Quick Start

### Command Format

```bash
# Show help information (any of these commands):
ruscrypt
ruscrypt --help
ruscrypt <encrypt|decrypt|hash|exchange|keygen|sign|verify> --help

# Check version
ruscrypt --version

# For encryption and decryption
ruscrypt <encrypt|decrypt> --<algorithm>

# For hashing operations
ruscrypt hash --<algorithm>

# For key exchange protocols
ruscrypt exchange --<protocol>

# For key generation
ruscrypt keygen --<algorithm>

# For digital signatures (new!)
ruscrypt sign --<algorithm>
ruscrypt verify --<algorithm>
```

### Interactive Experience

All operations are **interactive** - the tool will prompt you for required inputs:

```bash
# Example: Caesar cipher encryption
$ ruscrypt encrypt --caesar
Enter text to encrypt: Hello World
Enter shift value (1-25): 3
Encrypted text: Khoor Zruog

# Example: AES encryption
$ ruscrypt encrypt --aes
Enter text to encrypt: Secret message
Enter password: ********
Select AES key size: 256
Select encryption mode: CBC
Select output encoding: base64
Encrypted text: [base64 encoded result]

# Example: SHA-256 hashing
$ ruscrypt hash --sha256
Enter text to hash: password123
SHA-256 hash: ef92b778bafe771e89245b89ecbc08a44a4e166c06659911881f383d4473e94f

# Example: RSA key generation (new!)
$ ruscrypt keygen --rsa
Select RSA key size: 1024
Select key output format: n:e / PEM
Public Key: ...
Private Key: ...

# Example: RSA digital signature (new!)
$ ruscrypt sign --rsa
Enter message to sign: This is a test message
Enter private key (n:d format or PEM): 12345:67890
Select output encoding: base64
Digital signature: SGVsbG8gV29ybGQ=

# Example: RSA signature verification (new!)
$ ruscrypt verify --rsa
Enter original message: This is a test message
Enter signature to verify: SGVsbG8gV29ybGQ=
Enter public key (n:e format or PEM): 12345:65537
Select signature encoding: base64
βœ… VALID: The signature is authentic!
```

---

## πŸ“– Documentation

### Algorithm Reference

#### πŸ›οΈ Classical Ciphers

<details>
<summary><strong>Caesar Cipher</strong> - Simple substitution cipher</summary>

```bash
# Encrypt
ruscrypt encrypt --caesar
# Prompts:
# - Text to encrypt
# - Shift value (1-25)

# Decrypt
ruscrypt decrypt --caesar
# Prompts:
# - Text to decrypt
# - Shift value (1-25)
```

**How it works**: Each letter is shifted by a fixed number of positions in the alphabet.

</details>

<details>
<summary><strong>Vigenère Cipher</strong> - Polyalphabetic substitution</summary>

```bash
# Encrypt
ruscrypt encrypt --vigenere
# Prompts:
# - Text to encrypt
# - Keyword

# Decrypt
ruscrypt decrypt --vigenere
# Prompts:
# - Text to decrypt
# - Keyword
```

**How it works**: Uses a keyword to shift letters by varying amounts.

</details>

<details>
<summary><strong>Playfair Cipher</strong> - Digraph substitution</summary>

```bash
# Encrypt
ruscrypt encrypt --playfair
# Prompts:
# - Text to encrypt
# - Keyword for matrix

# Decrypt
ruscrypt decrypt --playfair
# Prompts:
# - Text to decrypt
# - Keyword for matrix
```

**How it works**: Encrypts pairs of letters using a 5x5 key matrix.

</details>

<details>
<summary><strong>Rail Fence Cipher</strong> - Transposition cipher</summary>

```bash
# Encrypt
ruscrypt encrypt --railfence
# Prompts:
# - Text to encrypt
# - Number of rails (2-10)

# Decrypt
ruscrypt decrypt --railfence
# Prompts:
# - Text to decrypt
# - Number of rails (2-10)
```

**How it works**: Text is written in a zigzag pattern across multiple rails.

</details>

#### πŸ” Stream & Block Ciphers

<details>
<summary><strong>RC4</strong> - Stream cipher</summary>

```bash
# Encrypt
ruscrypt encrypt --rc4
# Prompts:
# - Text to encrypt
# - Key (variable length)
# - Output encoding (base64/hex)

# Decrypt
ruscrypt decrypt --rc4
# Prompts:
# - Text to decrypt
# - Key (same as encryption)
# - Input encoding (base64/hex)
```

**Note**: Legacy algorithm, use for educational purposes only.

</details>

<details>
<summary><strong>AES</strong> - Advanced Encryption Standard</summary>

```bash
# Encrypt
ruscrypt encrypt --aes
# Prompts:
# - Text to encrypt
# - Password
# - Key size (128/192/256)
# - Mode (ECB/CBC)
# - Output encoding (base64/hex)

# Decrypt
ruscrypt decrypt --aes
# Prompts:
# - Text to decrypt
# - Password (same as encryption)
# - Key size (same as encryption)
# - Mode (same as encryption)
# - Input encoding (same as encryption)
```

**Security**: Industry-standard symmetric encryption.

</details>

<details>
<summary><strong>DES</strong> - Data Encryption Standard</summary>

```bash
# Encrypt
ruscrypt encrypt --des
# Prompts:
# - Text to encrypt
# - Key (exactly 8 characters)
# - Mode (ECB/CBC)
# - Output encoding (base64/hex)

# Decrypt
ruscrypt decrypt --des
# Prompts:
# - Text to decrypt
# - Key (same as encryption)
# - Mode (same as encryption)
# - Input encoding (same as encryption)
```

**Note**: Legacy algorithm, use for educational purposes only.

</details>

#### πŸ”‘ Asymmetric Encryption

<details>
<summary><strong>RSA</strong> - Rivest-Shamir-Adleman</summary>

```bash
# Encrypt
ruscrypt encrypt --rsa
# Prompts:
# - Text to encrypt
# - Key size (512/1024/2048)
# - Output encoding (base64/hex)
# Tool generates key pair automatically

# Decrypt
ruscrypt decrypt --rsa
# Prompts:
# - Text to decrypt
# - Private key (format: n:d or PEM)
# - Input encoding (base64/hex)

# Key generation
ruscrypt keygen --rsa
# Prompts:
# - Key size (512/1024/2048)
# - Output format (n:e or PEM)
# Prints public and private key in selected format

# Digital signature (new!)
ruscrypt sign --rsa
# Prompts:
# - Message to sign
# - Private key (format: n:d or PEM)
# - Output encoding (base64/hex)
# Creates digital signature for message

# Signature verification (new!)
ruscrypt verify --rsa
# Prompts:
# - Original message
# - Signature to verify
# - Public key (format: n:e or PEM)
# - Signature encoding (base64/hex)
# Verifies signature authenticity
```

**Use case**: Small data encryption, digital signatures, and authentication.

</details>

<details>
<summary><strong>Diffie-Hellman</strong> - Key Exchange</summary>

```bash
# Key exchange operations
ruscrypt exchange --dh
# Options:
# - Interactive Simulation (Alice & Bob)
# - Manual Exchange - Start Session
# - Manual Exchange - Complete with Other's Key
# - Mathematical Concept Demo
```

**Use case**: Secure key exchange demonstration.

</details>

#### πŸ”’ Hash Functions

<details>
<summary><strong>MD5</strong> - Message Digest 5</summary>

```bash
ruscrypt hash --md5
# Prompts:
# - Text to hash
# Output: 32-character hexadecimal hash
```

**Note**: Cryptographically broken, use only for compatibility.

</details>

<details>
<summary><strong>SHA-1</strong> - Secure Hash Algorithm 1</summary>

```bash
ruscrypt hash --sha1
# Prompts:
# - Text to hash
# Output: 40-character hexadecimal hash
```

**Note**: Deprecated, use only for legacy compatibility.

</details>

<details>
<summary><strong>SHA-256</strong> - Secure Hash Algorithm 256</summary>

```bash
ruscrypt hash --sha256
# Prompts:
# - Text to hash
# Output: 64-character hexadecimal hash
```

**Recommended**: Use for all new applications requiring hashing.

</details>

---

## πŸ’‘ Examples

### Classical Cipher Examples

```bash
# πŸ›οΈ Caesar cipher example
$ ruscrypt encrypt --caesar
Enter text to encrypt: HELLO WORLD
Enter shift value (1-25): 5
Encrypted text: MJQQT BTWQI

$ ruscrypt decrypt --caesar
Enter text to decrypt: MJQQT BTWQI
Enter shift value (1-25): 5
Decrypted text: HELLO WORLD

# πŸ›οΈ VigenΓ¨re cipher example
$ ruscrypt encrypt --vigenere
Enter text to encrypt: ATTACKATDAWN
Enter keyword: LEMON
Encrypted text: LXFOPVEFRNHR
```

### Modern Encryption Examples

```bash
# πŸ” AES encryption example
$ ruscrypt encrypt --aes
Enter text to encrypt: This is a secret message
Enter password: mySecurePassword123
Select AES key size: 256
Select encryption mode: CBC
Select output encoding: base64
Encrypted text (AES-256, CBC, base64): U2FsdGVkX1+vupppZksvRf5pq5g5XjFRlipRkwB0K1Y96Qsv2Lm+31cmzaAILwyt

# πŸ” RSA encryption example
$ ruscrypt encrypt --rsa
Enter text to encrypt: Hello RSA
Select RSA key size: 1024
Select output encoding: base64

πŸ” RSA Encryption Complete!
πŸ“€ Encrypted data: SGVsbG8gUlNB...
πŸ”‘ Private key (SAVE THIS!): 12345678:98765432
⚠️  Keep your private key secure - you'll need it for decryption!
```

### Hash Function Examples

```bash
# πŸ”’ Hash function examples
$ ruscrypt hash --sha256
Enter text to hash: password123
SHA-256 hash: ef92b778bafe771e89245b89ecbc08a44a4e166c06659911881f383d4473e94f

$ ruscrypt hash --md5
Enter text to hash: hello world
MD5 hash: 5d41402abc4b2a76b9719d911017c592

$ ruscrypt hash --sha1
Enter text to hash: test
SHA-1 hash: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
```

### Key Exchange Example

```bash
# πŸ”‘ Diffie-Hellman key exchange
$ ruscrypt exchange --dh
Select Diffie-Hellman operation: Interactive Simulation (Alice & Bob)

πŸ”‘ Diffie-Hellman Key Exchange Simulation
==========================================

πŸ‘© Alice (You):
  Prime (p):     2147483647
  Generator (g): 2
  Private key:   12345 (keep secret!)
  Public key:    987654321 (share with Bob)

πŸ‘¨ Bob (Simulated):
  Private key:   67890 (Bob keeps secret)
  Public key:    123456789 (Bob shares with you)

🀝 Key Exchange Result:
  Alice computed shared secret: 555666777
  Bob computed shared secret:   555666777
  βœ… SUCCESS: Both parties have the same shared secret!
```

### RSA Digital Signature Examples

```bash
# πŸ” RSA digital signature creation
$ ruscrypt sign --rsa
Enter message to sign: This document is authentic
Enter private key (n:d format or PEM): 12345678901234567890:98765432109876543210
Select output encoding: base64
βœ… Digital signature created successfully!
πŸ“ Original message: This document is authentic
πŸ” Digital signature (BASE64): SGVsbG8gV29ybGQ=...

# πŸ” RSA signature verification
$ ruscrypt verify --rsa
Enter original message: This document is authentic
Enter signature to verify: SGVsbG8gV29ybGQ=...
Enter public key (n:e format or PEM): 12345678901234567890:65537
Select signature encoding: base64
βœ… VALID: The signature is authentic!
πŸ”’ The message integrity is verified and the signature is genuine.
```

---

## πŸ§ͺ Testing

### Run Test Suite

```bash
# πŸ§ͺ Run all tests
cargo test

# ⚑ Run specific test files
cargo test classical      # Test classical ciphers
cargo test stream        # Test stream ciphers
cargo test block         # Test block ciphers
cargo test hash          # Test hash functions
cargo test asym          # Test asymmetric crypto

# 🎯 Run specific algorithm tests
cargo test caesar_tests        # Test Caesar cipher
cargo test vigenere_tests      # Test Vigenère cipher
cargo test aes_tests          # Test AES encryption
cargo test rsa_tests           # Test RSA encryption
cargo test sha256_tests        # Test SHA-256 hashing
cargo test dh_tests            # Test Diffie-Hellman
```

### Manual Testing

Test each algorithm interactively:

```bash
# Check available commands
ruscrypt --help

# Test classical ciphers
ruscrypt encrypt --caesar
ruscrypt encrypt --vigenere
ruscrypt encrypt --playfair
ruscrypt encrypt --railfence

# Test stream & block ciphers
ruscrypt encrypt --rc4
ruscrypt encrypt --aes
ruscrypt encrypt --des

# Test asymmetric encryption
ruscrypt encrypt --rsa
ruscrypt exchange --dh

# Test key generation
ruscrypt keygen --rsa

# Test digital signatures (new!)
ruscrypt sign --rsa
ruscrypt verify --rsa

# Test hash functions
ruscrypt hash --md5
ruscrypt hash --sha1
ruscrypt hash --sha256
```

---

## πŸ”’ Security

### ⚠️ Important Security Considerations

| ⚠️ **Warning**           | **Description**                                                  |
| ------------------------ | ---------------------------------------------------------------- |
| πŸŽ“ **Educational Use**   | This tool is designed for learning and experimentation           |
| 🚫 **Legacy Algorithms** | RC4, DES, MD5, and SHA-1 are **NOT secure** for modern use       |
| 🚫 **Classical Ciphers** | All classical ciphers are **NOT secure** for real-world use      |
| πŸ”‘ **Interactive Input** | Passwords are entered visibly - use only for testing             |
| 🏭 **Production Use**    | Use AES and RSA with proper key management for real applications |

### πŸ›‘οΈ Recommended Algorithms

```bash
# βœ… Secure for modern use
ruscrypt encrypt --aes      # Symmetric encryption (AES-256, CBC mode)
ruscrypt encrypt --rsa      # Asymmetric encryption (2048+ bit keys)
ruscrypt hash --sha256      # Cryptographic hashing

# ❌ Educational/legacy only
ruscrypt encrypt --caesar   # Easily broken
ruscrypt encrypt --des      # 56-bit key, deprecated
ruscrypt encrypt --rc4      # Known vulnerabilities
ruscrypt hash --md5         # Collision attacks possible
ruscrypt hash --sha1        # Deprecated by NIST
```

### πŸ” Key Management Best Practices

- **AES**: Use strong passwords (12+ characters, mixed case, numbers, symbols)
- **DES**: Use exactly 8 characters as required by the algorithm
- **RSA**: Use 2048+ bit keys for real applications (512/1024 for education only)
- **RC4**: Use random keys of appropriate length

---

## 🀝 Contributing

We welcome contributions! Here's how to get started:

### πŸš€ Quick Contribution Guide

1. **🍴 Fork** the repository
2. **🌿 Create** a feature branch:
   ```bash
   git checkout -b feature/new-algorithm
   ```
3. **✨ Make** your changes
4. **πŸ§ͺ Test** thoroughly:
   ```bash
   cargo test
   cargo clippy
   cargo fmt
   ```
5. **πŸ“ Commit** and create a Pull Request

### 🎯 Contribution Areas

| Area                    | Description                   | Difficulty |
| ----------------------- | ----------------------------- | ---------- |
| πŸ” **New Algorithms**   | Implement additional ciphers  | 🟑 Medium  |
| 🎨 **CLI Improvements** | Better interactive experience | 🟒 Easy    |
| πŸ“š **Documentation**    | Examples and guides           | 🟒 Easy    |
| πŸ§ͺ **Testing**          | More comprehensive tests      | 🟑 Medium  |

### πŸ”§ Development Setup

```bash
# Clone and setup
git clone https://github.com/Adel2411/ruscrypt.git
cd ruscrypt

# Install dependencies
cargo build

# Run tests
cargo test

# Format code
cargo fmt

# Check for issues
cargo clippy
```

---

## πŸ“„ License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

---

<div align="center">

## 🌟 Show Your Support

If you find **ruscrypt** useful, please consider:

[![⭐ Star on GitHub](https://img.shields.io/badge/⭐-Star%20on%20GitHub-yellow?style=for-the-badge)](https://github.com/Adel2411/ruscrypt)

---

**Created with ❀️ by [Adel2411](https://github.com/Adel2411)**

[![GitHub](https://img.shields.io/badge/GitHub-Adel2411-181717?style=for-the-badge&logo=github)](https://github.com/Adel2411)

#### _Built with Rust πŸ¦€ β€’ Secured with Math πŸ”’ β€’ Crafted with Passion πŸ’Ž_

</div>