Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@trust/keyto
Advanced tools
A utility for translating cryptographic keys between representations
A utility for translating cryptographic keys between representations.
Keyto is pronounced 'key-to'.
Full project documentation is available here.
$ npm install @trust/keyto --save
Translate Private PEM to Public JWK:
const keyto = require('@trust/keyto')
let pemPrivate = getPrivatePemStringSomehow()
let jwk = getPublicJwkSomehow()
// String data can either be passed in directly:
let key = keyto.from(pemPrivate, 'pem').toJwk('public')
// Or can be passed in as an object instead:
let key = keyto.from({ key: pemPrivate }, 'pem').toJwk('public')
assertEqual(jwk, key)
Translate Private Hex (Blockchain) Key to PKCS8 Public PEM:
const keyto = require('@trust/keyto')
let blk = getPrivateBlockchainHexStringSomehow()
let pemPublic = getPublicPemSomehow()
let key = keyto.from(blk, 'blk').toString('pem', 'public_pkcs8')
assertEqual(pemPublic, key)
args:
format:
Format can be any of these: 'pem', 'jwk' or 'blk'.
args:
selector:
Selector can be any of these: 'public', 'private'.
args:
format:
Format can be any of these: 'pem', 'jwk' or 'blk'.
selector:
Selector can be any of these: 'public', 'private', 'public_pkcs1', 'public_pkcs8', 'private_pkcs1' or 'private_pkcs8'.
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2017-2020 Greg Linklater
FAQs
A utility for translating cryptographic keys between representations
We found that @trust/keyto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.