Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A minimal Node.js implementation of the Autocrypt specification, that has no dependencies.
npm install autocrypt
var autocrypt = new Autocrypt(opts)
Options include:
storage
: the storage to use for internal state. Must implement get
and put
methods. ({get(fromEmail, cb), put(fromEmail, data, cb)}
)dir
: the directory for storing the internal state.autocrypt.processHeader(header, fromEmail, dateSent, cb)
Parse the email yourself and pass in the autocrypt header, from email, and date sent.
header
: String of the text after Autocrypt:
or an object with all parsed autocrypt headers.fromEmail
: String.dateSent
: Date object.autocrypt.generateAutocryptHeader(fromEmail, cb)
Generate a string Autocrypt header given the email. fromEmail
must reference a user that has been added with the addUser
method.
autocrypt.recommendation(fromEmail, toEmail, cb)
Generate an autocrypt UI recommendation given the from email and to email. fromEmail
must reference a user that has been added with the addUser
method.
autocrypt.addUser(fromEmail, key, opts, cb)
Add a user to autocrypt. This should be done for all new accounts. key
should be base64 encoding
opts
:
prefer-encrypt
: mutual
or nopreference
. Defaults to nopreference
.autocrypt._put(fromEmail, opts, cb)
Update a user in autocrypt.
autocrypt.getUser(fromEmail, cb)
Get a user who has been added to autocrypt. Returns an error in the callback if no user has been added with that email.
Autocrypt.stringify(header)
Turn an object into an Autocrypt MIME string for use in an email header.
var header = Autocrypt.stringify({
keydata: <base64-encoded-string>,
addr: 'myemail@myuniversity.edu',
'prefer-encrypt': 'mutual'
})
You can also pass the Autocrypt base-64 encoded keydata
directly.
var header = Autocrypt.stringify({
keydata: 'pYEWY0RSAEER1+gQRtZECyyww67....',
addr: 'myemail@myuniversity.edu',
'prefer-encrypt': 'mutual'
})
A value of type=1
is automatically added to the header if not supplied, since at this time Autocrypt only supports type=1
.
Autocrypt.parse(header)
Turn an Autocrypt MIME string into an object. Opposite of Autocrypt.stringify
.
var data = Autocrypt.parse('type=1;addr=myemail@myuniversity.edu;prefer-encrypt=mutual;keydata=Li4u;')
MIT
FAQs
Autocrypt node.js client
The npm package autocrypt receives a total of 3 weekly downloads. As such, autocrypt popularity was classified as not popular.
We found that autocrypt 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.