Skip to content

"๐Ÿ” My crypto algorithm implementations from class assignments - classic encryption methods coded from scratch. Academic projects turned learning playground! Hope these help fellow CS students survive their cryptography courses ๐Ÿ’ปโœ๏ธ"

Notifications You must be signed in to change notification settings

Jia2005/CSS-Codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Crypto Codes

GitHub last commit GitHub code size in bytes

Hey there! ๐Ÿ‘‹ Welcome to my collection of cryptography algorithms implemented from your college assignments.

This repo contains various encryption, hashing, and key exchange implementations for learning and educational purposes.

๐Ÿ”’ Symmetric Encryption

Algorithm Description Time Complexity
Caesar The classic substitution cipher that shifts characters by a fixed offset O(n)
Playfair Digraph substitution cipher that encrypts pairs of letters O(n)
๐Ÿ’ก Example usage (click to expand)
// Caesar cipher example
String plaintext = "HELLO";
int shift = 3;
String encrypted = caesar.encrypt(plaintext, shift);  // Returns "KHOOR"

๐Ÿ”‘ Asymmetric Encryption

Algorithm Description Security
RSA Public-key cryptosystem for secure data transmission Based on factoring large integers
Diffie-Hellman Method for securely exchanging cryptographic keys over public channels Based on discrete logarithm problem
โš™๏ธ Implementation details (click to expand)
// RSA simplified example
KeyPair keys = RSA.generateKeyPair(1024);
String encrypted = RSA.encrypt("Secret message", keys.publicKey);
String decrypted = RSA.decrypt(encrypted, keys.privateKey);

๐Ÿงฎ Hashing Algorithms

Algorithm Description Output Size
MD5 Widely used hash function producing a 128-bit hash value 128 bits (16 bytes)

๐Ÿง  Math Utilities

Utility Description Used In
Euclidean Algorithms for computing GCD and modular inverse RSA, many crypto systems
Buffer_Overflow Demonstration of memory vulnerability Security testing

๐Ÿ“– How to Run

โ˜• Java Implementations

# Compile the Java file
javac RSA.java

# Run the program
java RSA

# Example output:
# Generated keys: (public_key, private_key)
# Encrypted: a7f12d8e...
# Decrypted: Hello, world!

๐Ÿ”ง C Implementations

# Compile with gcc
gcc Buffer_Overflow.c -o buffer

# Run the executable
./buffer

# Example output:
# Demonstrating buffer overflow vulnerability...

๐Ÿค Contributing

Found a bug? Have a better implementation? Want to add a new algorithm? I'd love your help!

# Fork this repository
# Create your feature branch
git checkout -b cool-new-feature

# Commit your changes
git commit -m 'Added an awesome crypto algorithm'

# Push to the branch
git push origin cool-new-feature

# Open a Pull Request ๐ŸŽ‰

โญ Support

If this repo helped you understand crypto concepts better, consider giving it a star! Each star motivates me to add more algorithms and improve the existing ones! โœจ

About

"๐Ÿ” My crypto algorithm implementations from class assignments - classic encryption methods coded from scratch. Academic projects turned learning playground! Hope these help fellow CS students survive their cryptography courses ๐Ÿ’ปโœ๏ธ"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published