tessl install tessl/npm-crypto-browserify@3.12.0Browser-compatible implementation of Node.js crypto module providing cryptographic operations in web environments.
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1x
Baseline
Agent success rate without this tile
100%
Build a secure key exchange service that establishes shared secrets between two parties using standardized cryptographic parameters.
Your service should provide functionality to:
@generates
/**
* Creates a key exchange instance using a standardized parameter set.
*
* @param {string} groupName - The name of the standardized parameter group to use
* @returns {object} A key exchange instance
*/
function createKeyExchange(groupName) {
// IMPLEMENTATION HERE
}
/**
* Generates a key pair for the exchange instance.
*
* @param {object} exchange - The key exchange instance
*/
function generateKeys(exchange) {
// IMPLEMENTATION HERE
}
/**
* Gets the public key from an exchange instance.
*
* @param {object} exchange - The key exchange instance
* @returns {string} The public key encoded as hexadecimal
*/
function getPublicKey(exchange) {
// IMPLEMENTATION HERE
}
/**
* Computes the shared secret using the other party's public key.
*
* @param {object} exchange - The key exchange instance
* @param {string} otherPublicKey - The other party's public key (hexadecimal)
* @returns {string} The computed shared secret encoded as hexadecimal
*/
function computeSharedSecret(exchange, otherPublicKey) {
// IMPLEMENTATION HERE
}
module.exports = {
createKeyExchange,
generateKeys,
getPublicKey,
computeSharedSecret
};Provides cryptographic operations for secure key exchange.