Graph-Based Symmetric Encryption#

I implemented a symmetric encryption algorithm based on Prim’s minimum spanning tree algorithm. This method isn’t especially practical due to its performance characteristics, but I find the mathematical approach fascinating! :)

Here is the GitHub repository with the full implementation.

Research and Implementation#

Spanning tree and associated matrix visualization

The algorithm uses graph theory concepts to create a unique encryption scheme:

  1. Graph Construction: Create a graph from the input data
  2. Spanning Tree: Use Prim’s algorithm to generate a minimum spanning tree
  3. Matrix Operations: Convert the tree structure into matrices for encryption/decryption
  4. Key Generation: The spanning tree serves as part of the encryption key

Research Papers#

Here are the papers I referenced while developing this algorithm (note: some contain errors, particularly in matrix multiplication order):

Performance Analysis#

While this approach is mathematically interesting, it has some limitations:

  • Speed: Significantly slower than traditional symmetric encryption
  • Complexity: High computational overhead for graph operations
  • Scalability: Performance degrades with larger input sizes

However, it provides unique properties that could be useful in specific scenarios where traditional methods aren’t suitable.

Future Work#

This project is ongoing with several planned improvements:

  1. CLI Interface: Making it easily usable from the command line
  2. Performance Optimization: Exploring ways to improve speed
  3. Security Analysis: Formal security evaluation
  4. Practical Applications: Finding use cases where this approach excels

Contributing#

Feel free to contribute or fork the project to make it better! I’m particularly interested in:

  • Performance optimizations
  • Security analysis
  • Alternative graph algorithms
  • Real-world applications

Your contributions and feedback are always welcome!