Socket
Book a DemoInstallSign in
Socket

jwt-falcon

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwt-falcon

A lightweight JavaScript library for generating and verifying JSON Web Tokens (JWT) using the Falcon cryptographic algorithm, a lattice-based signature scheme that is post-quantum (PQ) proof and resistant to attacks from quantum computers.

0.0.12
latest
Source
npmnpm
Version published
Weekly downloads
18
350%
Maintainers
1
Weekly downloads
 
Created
Source

JWT-falcon

test Publish NPM package NPM package

A lightweight JavaScript library for generating and verifying JSON Web Tokens (JWT) using the Falcon cryptographic algorithm, a lattice-based signature scheme that is post-quantum (PQ) proof and resistant to attacks from quantum computers. Features

  • Generates JWTs using the Falcon algorithm
  • Verifies JWTs using the Falcon algorithm
  • Decodes JWTs to extract the payload

Install

Install the package: npm install jwt-falcon

Example

import Falcon from "falcon-crypto";
import { sign, verify, decode } from "jwt-falcon";
import { generateRandomString } from "./utils.js";

const falcon = F.falcon;

const keyPair = await falcon.keyPair();
const message = { message: generateRandomString() };

// sign and get JWT
const jwt = await sign(message, keyPair.privateKey);

// decode and verify
const decoded = await decode(jwt);
const verified = await verify(jwt, keyPair.publicKey);

License

This library is licensed under the MIT License.

Contributing

Contributions are welcome! Please submit a pull request with your changes.

Keywords

jwt

FAQs

Package last updated on 21 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.