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…

这是什么?这是基于哈希的签名方案的 TypeScript 实现,具体是 WOTS+(Winternitz One-Time Signature Plus),一种抗量子签名原语。
这是一个完整的签名方案,还是只是一个构建模块?它是一个单独的原语(WOTS+),通常用作 SPHINCS+ 等更大的基于哈希的方案中的构建模块,本身并不是一个可多次使用的完整签名协议。
我要怎样把它加入项目?克隆仓库,然后运行 npm install 安装 @noble/hashes 等依赖,再使用基于 tsup 的构建命令(npm run build),或者用 Vitest 运行测试。
使用它需要准备什么?它依赖 @noble/hashes 包提供底层哈希函数,并使用 TypeScript 和 Vitest 进行构建和测试,其中 Vitest 会强制执行严格的覆盖率阈值。
我能否用同一个密钥对签名多条消息?不能。WOTS+ 是一次性签名方案,因此每个密钥对只在签名一条消息时是安全的,名称本身也说明了这一点。
WOTS+ 通常用来做什么?WOTS+ 是一种基于哈希的一次性签名原语,是 SPHINCS+ 等更大的多签名抗量子方案的核心构建模块。
为什么使用基于哈希的签名,而不是 RSA 或 ECDSA?基于哈希的签名只依赖底层哈希函数的安全性,据信即使面对量子计算机也依然安全,而 RSA 或 ECDSA 则不然。
项目强制要求什么测试覆盖率?项目要求函数、分支和语句的覆盖率均不低于 80%,并通过 Vitest 的覆盖率报告进行验证。
它基于哪个密码学库?它使用 @noble/hashes 包来实现实际的哈希函数,这些函数是 WOTS+ 签名方案的基础。
Size
0.1 MB
Stars
11.2K
Updated
CommitMar 28
Age
1y
Commits · 90 Days