
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
A javascript module for converting cryptographic keys and other sequences of random bytes into human-readable phrases, similar to Diceware but with a larger wordlist of size 2^16
. With Niceware, a 128-bit key is equivalent to an 8-word phrase.
+8svofk0Y1o=
and bacca cavort west volley
are equally strong (64 bits of
randomness).To install:
npm install niceware
To generate an 8-byte passphrase:
const niceware = require('niceware')
// The number of bytes must be even
const passphrase = niceware.generatePassphrase(8)
// Result: [ 'deathtrap', 'stegosaur', 'nilled', 'nonscheduled' ]
To use Niceware in modern browsers, include
browser/niceware.js in a script
tag. Niceware is then available in the window.niceware
object.
<script src='niceware.js'></script>
<script>
const passphrase = window.niceware.generatePassphrase(8)
</script>
Niceware uses window.{crypto, msCrypto}.getRandomValues
for entropy in the browser.
Niceware is also available as a third-party Chrome extension, thanks to Noah Feder. https://chrome.google.com/webstore/detail/niceware-password/dhnichgmciickpnnnhfcljljnfomadag
NOTE: When used in the browser, Buffer
is replaced with window.Uint8Array
.
Array.<string>
Buffer
Array.<string>
Array.<string>
Converts a byte array into a passphrase.
Kind: static method of niceware
Param | Type | Description |
---|---|---|
bytes | Buffer | The bytes to convert |
Buffer
Converts a phrase back into the original byte array.
Kind: static method of niceware
Param | Type | Description |
---|---|---|
words | Array.<string> | The words to convert |
Array.<string>
Generates a random passphrase with the specified number of bytes.
NOTE: size
must be an even number.
Kind: static method of niceware
Param | Type | Description |
---|---|---|
size | number | The number of random bytes to use |
Niceware was inspired by Diceware. Its wordlist is derived from http://www-01.sil.org/linguistics/wordlists/english/. This project is based on my work on OpenPGP key backup for the Yahoo End-to-End project.
FAQs
Utility for generating memorable passwords and converting random bytes into human-readable phrases
The npm package niceware receives a total of 2,990 weekly downloads. As such, niceware popularity was classified as popular.
We found that niceware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.