hashsigs-ts README

The project's README from github.com/QuipNetwork/hashsigs-ts. As one markdown file: README.md.

hashsigs-ts

Hash-based signatures implementation in TypeScript, featuring WOTS+ (Winternitz One-Time Signature Plus).

License

SPDX-License-Identifier: AGPL-3.0-or-later
Copyright (C) 2024 quip.network

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Installation

npm install hashsigs-ts

Development

Setup

# Install dependencies
npm install

Building

# Build once
npm run build

# Watch mode during development
npm run dev

Testing

The project uses Vitest for testing with the following commands:

# Run tests once
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run coverage

Code Coverage

The project maintains high code coverage standards with the following minimum thresholds:

To view coverage reports:

  1. Run the coverage command:

    npm run coverage
    
  2. Coverage reports will be generated in multiple formats:

    • Console output (summary)
    • HTML report (in ./coverage/index.html)
    • JSON report
    • LCOV report (for CI/CD integration)

Repository

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure all tests pass and coverage thresholds are met before submitting a PR.

hashsigs-ts (QuipNetwork/hashsigs-ts)

Searching Database…

What is this?A TypeScript implementation of hash-based signatures, specifically WOTS+ (Winternitz One-Time Signature Plus), a post-quantum signature primitive.
Is this a complete signature scheme or just one building block?It's a single primitive (WOTS+), typically used as a building block inside larger hash-based schemes like SPHINCS+, rather than a full multi-use signature protocol on its own.
How do I add it to a project?Clone the repository and run npm install to pull in dependencies like @noble/hashes, then use the tsup-based build (npm run build) or run tests with Vitest.
What do I need to use it?It relies on the @noble/hashes package for the underlying hash functions and is built/tested with TypeScript and Vitest, which enforces strict coverage thresholds.
Can I reuse the same key pair to sign multiple messages?No — WOTS+ is a one-time signature scheme, so each key pair is only secure for signing a single message, as the name itself indicates.
What is WOTS+ typically used for?WOTS+ is a hash-based one-time signature primitive that serves as the core building block for larger multi-signature, post-quantum schemes such as SPHINCS+.
Why use hash-based signatures instead of RSA or ECDSA?Hash-based signatures only depend on the security of the underlying hash function, which is believed to remain safe even against quantum computers, unlike RSA or ECDSA.
What test coverage does the project enforce?The project requires at least 80% coverage for functions, branches, and statements, verified through Vitest's coverage reports.
Which cryptographic library does it build on?It uses the @noble/hashes package for the actual hash function implementations that power the WOTS+ signature scheme.
Size
0.1 MB
Stars
11.2K
Updated
CommitMar 28
Age
1y
Commits · 90 Days