This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node.js 0.5 Diffie-Hellman example | |
var assert = require("assert"); | |
var crypto = require("crypto"); | |
// the prime is shared by everyone | |
var server = crypto.createDiffieHellman(512); | |
var prime = server.getPrime(); | |
// sharing secret key on a pair |