Andrew Milich / 4.01.2023

skiff-crypto is open-source and MIT licensed

Our cryptography libraries are open-source, MIT licensed, and available online.
Skiff-crypto library sample code.
We are thrilled to announce that skiff-crypto - Skiff’s cryptography library for symmetric encryption, asymmetric encryption, and object versioning - is now open source and MIT licensed!Visit the NPM package here.From powering end-to-end encryption to managing object structure and versioning, skiff-crypto provides a simple and powerful interface for performing cryptography in JavaScript/TypeScript, both in Node.JS and in the browser.The library is published with full TypeScript types, an interface for generating public/private keypairs, and convenient functions for encrypting and decrypting strings.

Installation

skiff-crypto library can be installed easily via both yarn and npm.For yarn users, install with:yarn add @skiff-org/skiff-cryptoFor npm users, install with:npm install @skiff-org/skiff-cryptoNPM link here and GitHub link here.

Example code

Below is a simple demonstration of how to use the Skiff-Crypto library.const skiffCrypto = require('@skiff-org/skiff-crypto');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);
Please note that the example code above is a very simple demonstration of how skiff-crypto works and what it can do. For a deeper understanding of the library, its full capabilities, and best practices, we recommend that you delve into the documentation.We're excited to see what you'll build with skiff-crypto ! We welcome your contributions and feedback. Together, let's continue to build more powerful, intuitive, and accessible applications.Happy coding!

Questions, comments, or feedback

Write to us at support@skiff.org with any questions, comments, or feedback. You can also post a GitHub issue or contact us on Twitter, Reddit, or Discord.
Want access to privacy?Join Skiff's end-to-end encrypted email, document, drive, and calendar platform.

Join the community

Become a part of our 600,000+ community and join the future of a private and decentralized internet.

Free plan • No card required