@cypher-laboratory/alicesring-lsag
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

types-Ring-Signature

This repository contains a TypeScript implementation of the Ring Signature algorithm using Spontaneous Anonymous Group (SAG).

About the implementation

The implementation is based on the SAG algorithm and uses the Elliptic Curve Cryptography (ECC) to generate the keys and sign the message.

We used the implementation proposed in Zero to Monero (p.36) as a reference.

Usage

import { RingSignature } from '@cypherlab/types-ring-signature';

const curve: Curve = new Curve(CurveName.SECP256K1);
const ring: Point[] = []; // your ring of public keys
const message = 'Hello World!';

const signerPrivateKey = BigInt('your private key');

// Sign
const signature: RingSignature = RingSignature.sign(
  ring,
  signerPrivateKey,
  message,
  curve,
);

// Verify
console.log(
  "Is signature verified? ", signature.verify()
);

// Export to jsonString
const jsonString = signature.toJsonString();

// Import from jsonString
const retrievedFromJson = RingSignature.fromJsonString(jsonString);

Readme

Keywords

none

Package Sidebar

Install

npm i @cypher-laboratory/alicesring-lsag

Weekly Downloads

69

Version

0.0.5

License

MIT

Unpacked Size

374 kB

Total Files

122

Last publish

Collaborators

  • lejamon
  • elli610
  • cypherlaboratory