📅  最后修改于: 2023-12-03 15:17:08.264000             🧑  作者: Mango
KEX is a key exchange platform designed for programmers to securely exchange keys for encryption and authentication purposes.
To get started with KEX, you can download the latest release from our official website or install directly using Package Manager.
You can install KEX using Package Manager by running the following command:
npm install kex
Here's an example usage of KEX:
const kex = require('kex');
// Generate keys for two users
const user1 = kex.generateKeys();
const user2 = kex.generateKeys();
// Exchange keys between users
const user1Exchange = kex.exchangeKeys(user1.privateKey, user2.publicKey);
const user2Exchange = kex.exchangeKeys(user2.privateKey, user1.publicKey);
// Encrypt and decrypt message using exchanged keys
const message = 'Hello World!';
const encryptedMessage = kex.encrypt(message, user1Exchange.sharedSecret);
const decryptedMessage = kex.decrypt(encryptedMessage, user2Exchange.sharedSecret);
console.log(decryptedMessage);
We welcome contributions from the community. If you find any issues or bugs, or want to improve the platform, feel free to raise an issue or pull request on our official GitHub repository.
KEX is licensed under the MIT License. See the LICENSE file for details.