1.0.5 • Published 10 months ago

quantumesh v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

QuantuMesh

QuantuMesh is an advanced encryption library designed for high security and performance. It provides AES-256-GCM and ChaCha20-Poly1305 encryption, Argon2 password hashing, and ECDH key exchange to secure data and communications.

Features

  • AES-256-GCM & ChaCha20-Poly1305 Encryption: Industry-standard encryption for secure data protection.
  • Argon2 Password Hashing: A cutting-edge password hashing algorithm for enhanced security.
  • ECDH Key Exchange: Securely generates and shares encryption keys between parties.
  • Universal Verification: Verifies both encrypted data and hashed passwords.
  • Lightweight & High Performance: Optimized for speed and efficiency in cryptographic applications.
  • Simple API: Designed for easy integration into projects.

Installation

Install QuantuMesh via npm:

npm install quantumesh

Usage

Importing the Library

import QuantuMesh from 'quantumesh';
const qme = new QuantuMesh();

Encryption & Decryption

Encrypt and decrypt sensitive data securely using AES-256-GCM and ChaCha20-Poly1305:

const data = "Hello, world!";
const keys = qme.genkey();

// Encrypt
const encrypted = qme.Encrypt(data);
console.log("Encrypted Data:", encrypted);

// Decrypt
const decrypted = qme.Decrypt(encrypted.encryptedAES, encrypted.encryptedChaCha, encrypted.keys);
console.log("Decrypted Data:", decrypted); // "Hello, world!"

Password Hashing & Verification

Hash passwords securely using Argon2 and verify them efficiently:

const password = "securepassword";
const hash = await qme.Hash(password);
console.log("Password Hash:", hash);

const isValid = await qme.VerifyPass(password, hash);
console.log("Password Valid:", isValid); // true

ECDH Key Exchange

Generate key pairs and securely compute shared secrets using Elliptic Curve Diffie-Hellman (ECDH):

const keyPairA = qme.genecc();
const keyPairB = qme.genecc();

const sharedKeyA = qme.ShareKey(keyPairA.privateKey, keyPairB.publicKey);
const sharedKeyB = qme.ShareKey(keyPairB.privateKey, keyPairA.publicKey);

console.log("Shared Key Match:", sharedKeyA === sharedKeyB); // true

Why Use QuantuMesh?

  • Advanced Security: Uses modern cryptographic algorithms to protect data.
  • High Performance: Optimized implementations for fast execution.
  • Versatile: Supports both symmetric and asymmetric encryption, password hashing, and key exchange.
  • Easy Integration: Simple API for seamless use in applications.
  • Open Source: Freely available and licensed under MIT License.

License

QuantuMesh is open-source and released under the MIT License.

Author

Developed by K-phanendra.

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago