Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elliptic

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elliptic - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

8

lib/elliptic/ecdsa/index.js

@@ -32,7 +32,11 @@ var assert = require('assert');

ECDSA.prototype.genKeyPair = function genKeyPair() {
ECDSA.prototype.genKeyPair = function genKeyPair(options) {
if (!options)
options = {};
// Instantiate Hmac_DRBG
var drbg = new elliptic.hmacDRBG({
hash: this.hash,
entropy: elliptic.rand(this.hash.hmacStrength),
pers: options.pers,
entropy: options.entropy || elliptic.rand(this.hash.hmacStrength),
nonce: this.n

@@ -39,0 +43,0 @@ });

{
"name": "elliptic",
"version": "0.8.0",
"version": "0.9.0",
"description": "EC cryptography",

@@ -5,0 +5,0 @@ "main": "lib/elliptic.js",

@@ -176,2 +176,16 @@ var assert = require('assert');

});
it('should deterministically generate private key', function() {
var curve = elliptic.nist.secp256k1;
assert(curve);
var ecdsa = new elliptic.ecdsa(curve);
var keys = ecdsa.genKeyPair({
pers: 'my.pers.string',
entropy: hash.sha256().update('hello world').digest()
});
assert.equal(
keys.getPrivate('hex'),
'c381628be281b2e35e913fc3a2e8ac3867eae90e5ad9d0d7a2e4af90cee92787');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc