
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@skiff-org/skiff-crypto
Advanced tools
Welcome! skiff-crypto
is a versatile, open-source JavaScript cryptography library specifically designed to provide strong and efficient cryptographic functions for use in NodeJS or in the browser. This package powers cryptography inside Skiff's end-to-end encrypted, privacy-first product suite, including Mail, Pages, Drive, and Calendar applications. For more on Skiff, visit skiff.com.
skiff-crypto brings together a host of cryptographic functionalities:
Using npm:
npm install @skiff-org/skiff-crypto
Using Yarn:
yarn add @skiff-org/skiff-crypto
const skiffCrypto = require('@skiff-org/skiff-crypto');
// or, `import * as skiffCrypto from '@skiff-org/skiff-crypto';`
// Asymmetric encryption example
const plaintext = "Hello, skiff-crypto!";
const keypair = skiffCrypto.generatePublicPrivateKeyPair();
const encrypted = skiffCrypto.stringEncryptAsymmetric(keypair.privateKey, { key: keypair.publicKey }, plaintext);
const decrypted = skiffCrypto.stringDecryptAsymmetric(keypair.privateKey, { key: keypair.publicKey }, encrypted);
console.log('Plaintext:', plaintext);
console.log('Ciphertext:', encrypted);
console.log('Expected to be true:', plaintext === decrypted);
// Symmetric encryption example
const symmetricKey = skiffCrypto.generateSymmetricKey();
// A datagram is used to manage object versions and metadata
const TestDatagram = skiffCrypto.createJSONWrapperDatagram('ddl://test');
const symmetricPlainText = "Hello, skiff-crypto (symmetric encryption)!";
const symmetricEncrypted = skiffCrypto.encryptSymmetric(symmetricPlainText, symmetricKey, TestDatagram);
const symmetricDecrypted = skiffCrypto.decryptSymmetric(symmetricEncrypted, symmetricKey, TestDatagram);
console.log('Symmetric encrypted content', symmetricEncrypted);
console.log('Symmetric decrypted content', symmetricDecrypted);
console.log('Expected to be true:', symmetricPlainText === symmetricDecrypted);
// Hash example
console.log('SHA-512 hash example', skiffCrypto.generateHash('Hello, skiff-crypto!'));
Detailed usage instructions and more examples are available in the API documentation.
Comprehensive documentation is available in the documentation site for the repository.
Contributions to skiff-crypto are very much appreciated! Please see our Contributing Guidelines for details on how you can contribute.
Cryptography is a sensitive domain. While skiff-crypto has been audited and built using widely-used, audited libraries, we urge you to use this library responsibly. Please have a sound understanding of the underlying principles of cryptography before implementation. Security issues or questions can be sent to security@skiff.org.
skiff-crypto is MIT licensed. You're encouraged to use and adapt the code for your projects, given that you respect the original copyright and abide by the license terms.
For questions, suggestions, or a friendly chat, feel free to contact us at hello@skiff.org. For bug reports or issues, please use our Github Issues page.
Enjoy secure coding!
FAQs
Cryptographic related functions and helpers
The npm package @skiff-org/skiff-crypto receives a total of 32 weekly downloads. As such, @skiff-org/skiff-crypto popularity was classified as not popular.
We found that @skiff-org/skiff-crypto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.