项目作者: danielhavir

项目描述 :
RFC8391: XMSS: eXtended Merkle Signature Scheme, a post-quantum signature scheme
高级语言: Go
项目地址: git://github.com/danielhavir/go-xmss.git
创建时间: 2018-12-12T05:18:41Z
项目社区:https://github.com/danielhavir/go-xmss

开源协议:BSD 3-Clause "New" or "Revised" License

下载


Dependency Status Build Status Go Report Card

XMSS: eXtended Merkle Signature Scheme

This project implements RFC8391, the eXtended Merkle Signature Scheme (XMSS), a hash-based digital signature system that can so far withstand known attacks using quantum computers. This repostiory contains code implementing the single-tree scheme, namely the following parameter sets (see section 5.3. for reference):

Name Functions n w len h
SHA2_10_256 SHA2-256 32 16 67 10
SHA2_16_256 SHA2-256 32 16 67 16
SHA2_20_256 SHA2-256 32 16 67 20

This code has no dependencies and is compatible with the official C implementation assuming the appropriate settings (see above) are presumed.

Install

  • Run go get https://github.com/danielhavir/go-xmss

Example

  1. package main
  2. import (
  3. "fmt"
  4. "github.com/danielhavir/go-xmss"
  5. )
  6. func main() {
  7. params := xmss.SHA2_16_256
  8. prv, pub := xmss.GenerateXMSSKeypar(params)
  9. msg := ...
  10. sig := prv.Sign(params, msg)
  11. m := make([]byte, params.SignBytes()+len(msg))
  12. if xmss.Verify(params, m, *sig, *pub) {
  13. fmt.Println("Signature matches.")
  14. } else {
  15. fmt.Println("Verification does not match.")
  16. }
  17. }

References