Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@credify/crypto
Advanced tools
Crypto related functions and helpers for JavaScript implemented in TypeScript.
// yarn
$ yarn add @credify/crypto
// npm
$ npm install @credify/crypto
<script src="https://cdn.jsdelivr.net/npm/@credify/crypto@0.19.0/dist/index.min.js"></script>
import { Encryption } from "@credify/crypto";
const privateKeyPem =
`-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDrEavVupOf+G7U
83oh0TKLK0U+9BdY4cgPCe66gyLodY9NF7+r9NgZHlsSOaXXTCEJOo8/rb+JFW34
....
agUydf7cXbP1YoOBizTgt/WBiQk47Ym4JvEWDTHmEsT4snYjujiMvAlAS37JyvWD
osQZlO5eDVv0XR3aNy5pOR/ouC0o8a8=
-----END PRIVATE KEY-----`;
const cipherText = "XGI1icHgMVuTvYLMEwXp...YCfEqkHxv5FdyWaw="; // base64 encoded string
const encryptionSample = async () => {
const encryption = new Encryption();
await encryption.importPrivateKey(privateKeyPem);
const plainText = await encryption.decryptBase64StringToString(cipherText);
console.log(plainText);
}
import { Signing } from "@credify/crypto";
const privateKeyPem = `-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIPqO4b4UtXSaWGp5u38rCXYu4/LdbaSk7lD46LtRUu44
-----END PRIVATE KEY-----`;
const message = "test message";
const signing = new Signing();
signing.importPrivateKey(privateKeyPem);
const sign = signing.sign(message, { input: "utf8" });
const verified = signing.verify(message, sign);
console.log(verified) // true
@credify/crypto supports RSA encryption with 4096 bit length keys. Its padding scheme uses OAEP.
@credify/crypto utilizes EdDSA. This supports Curve25519.
In order to simply deal with private keys, this uses PKCS #8.
https://developers.credify.one/
@credify/crypto is released under the MIT license. See LICENSE for details.
FAQs
Credify cryptographic related helpers in JavaScript
The npm package @credify/crypto receives a total of 6 weekly downloads. As such, @credify/crypto popularity was classified as not popular.
We found that @credify/crypto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.