JSPM

@lit-protocol/crypto

7.1.1-dev-3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13352
  • Score
    100M100P100Q139437F
  • License MIT

Package Exports

  • @lit-protocol/crypto
  • @lit-protocol/crypto/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lit-protocol/crypto) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Crypto

A comprehensive cryptographic toolkit for the Lit Protocol SDK that handles secure key operations, encryption/decryption, and advanced cryptographic schemes.

Installation

yarn add @lit-protocol/crypto

Quick Start

import { generateSessionKeyPair, encrypt } from '@lit-protocol/crypto';

// Generate a new key pair
const keyPair = await generateSessionKeyPair();

// Encrypt data with public key and identity param
const encryptedData = await encrypt(
  keyPair.slice(2),
  new Uint8Array([1, 2, 3]),
  new Uint8Array([4, 5, 6])
);

Key Features

  • Private key generation and management
  • BLS and ECDSA cryptographic schemes
  • Secure key import/export
  • Data encryption and decryption
  • Cryptographic share management
  • Signature generation and verification

Supported Operations

  • Key Generation: Create secure cryptographic keys
  • Encryption/Decryption: Protect sensitive data
  • Share Management: Handle distributed key shares
  • Signature Operations: Generate and verify cryptographic signatures