tree-ecdh

module
v0.0.0-...-f54354b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: MIT

README ΒΆ

🌳 Tree ECDH πŸ”

πŸš€ Introduction

Tree ECDH (Tree Diffie-Hellman on Elliptic Curves) is an efficient key exchange protocol designed for secure group communication. It extends the classical Diffie-Hellman algorithm by introducing a hierarchical key structure, significantly reducing computational complexity from O(NΒ²) to O(N log N). This implementation leverages elliptic curve cryptography (ECC) for enhanced security and efficiency.

🎯 Features

  • βœ… Efficient group key exchange. Uses a tree-based structure to reduce computational complexity.
  • πŸ” Elliptic curve cryptography. Implements ECDH on the P-521 curve for enhanced security.
  • 🌲 Hierarchical key management. Supports scalable and efficient key computation for large groups.
  • πŸ› οΈ Unit-tested implementation. Ensures correctness and reliability.

🌳 Tree Diffie-Hellman algorithm

  1. 🌲 Arrange nodes in a binary tree structure.
  2. πŸ”„ Recursively compute shared secrets between pairs of nodes.
  3. πŸ”‘ Generate an intermediate public key for each pair.
  4. 🎯 Continue the process until a single root key is obtained.

πŸ“ Usage

To generate a key pair:

privateKey, publicKey, err := tree_ecdh.GenerateKeypair()

To compute a shared secret between two nodes:

sharedSecret := tree_ecdh.GenerateSharedSecret(privateKeyA, publicKeyB)

To compute a group key for multiple nodes:

groupSecret, err := tree_ecdh.GenerateTreeKeypair(nodes)

πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.

Directories ΒΆ

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL