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

drbg.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drbg.js

Deterministic Random Bit Generators

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

drbg.js

NPM Package Build Status Dependency status

js-standard-style

Deterministic Random Bits Generators

Based on NIST Recommended DRBG from NIST SP800-90A with the following properties:

  • CTR DRBG with DF with AES-128, AES-192, AES-256 cores see issue #1
  • Hash DRBG with DF with SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 cores
  • HMAC DRBG with SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 cores
  • with and without prediction resistance

Installation

npm install drbg.js

Usage

var drbgs = require('drbg.js') // import HashDRBG and HmacDRBG
var HashDRBG = drbgs.HashDRBG // or require('drbg.js/hash')
var HmacDRBG = drbgs.HmacDRBG // or require('drbg.js/hmac')

var drbg2 = new HashDRBG('sha256', entropy, nonce, personalization_data)
drbg2.generate(5, additional_data) // <Buffer qq qq qq qq qq>
drbg2.reseed(entropy, personalization_data)
drbg2.generate(5, additional_data) // <Buffer ww ww ww ww ww>

var drbg3 = new HmacDRBG('sha256', entropy, nonce, personalization_data)
drbg3.generate(5, additional_data) // <Buffer ee ee ee ee ee>
drbg3.reseed(entropy, personalization_data)
drbg3.generate(5, additional_data) // <Buffer rr rr rr rr rr>

LICENSE

This library is free and open-source software released under the MIT license.

Keywords

FAQs

Package last updated on 17 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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