Skip to content

fix: use go-qrllib 0.1.0 and sign with hexseeds or SK files#16

Merged
jplomas merged 2 commits intotheQRL:mainfrom
jplomas:main
Nov 18, 2025
Merged

fix: use go-qrllib 0.1.0 and sign with hexseeds or SK files#16
jplomas merged 2 commits intotheQRL:mainfrom
jplomas:main

Conversation

@jplomas
Copy link
Copy Markdown
Contributor

@jplomas jplomas commented Nov 18, 2025

Autogenerated PR description:

This pull request introduces support for signing files or strings using either a hexseed or a private key, with automatic detection of key type from a file. It also adds new unit tests for both the hash and sign packages, updates dependencies, and includes a new test vector. The most significant changes are grouped below:

Key Handling and Signing Enhancements:

  • Added a --keyfile (-kf) CLI flag to allow signing using a private key or hexseed loaded from a file, with automatic detection of the key type. This includes the new readKeyFromFile function to parse both RFC7468-formatted hexseed and private key files, as well as plain hexseed strings. The CLI now prevents using both --hexseed and --keyfile simultaneously and handles key type detection for signing operations. (main.go [1] [2] [3] [4]
  • Implemented new signing functions in the sign package to support signing with a private key directly: SignMessageWithPrivateKey, SignFileWithPrivateKey, and SignStringWithPrivateKey. (sign/sign.go [1] [2]

Testing Improvements:

  • Added comprehensive unit tests for the hash package, covering all supported hash functions with expected outputs. (hash/hash_test.go hash/hash_test.goR1-R95)
  • Added a basic unit test for SignString in the sign package to verify signature length. (sign/sign_test.go sign/sign_test.goR1-R17)

Dependency and Import Updates:

  • Updated the go-qrllib dependency to version v0.1.0 in go.mod. (go.mod go.modL9-R9)
  • Updated import paths for dilithium to reflect its new location in go-qrllib/crypto/dilithium. (main.go [1] sign/sign.go [2]

Other Additions:

  • Added a new Dilithium public key file (deployment.pk.asc).
  • Added a new test vector in test_vectors/ascii.txt.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Nov 18, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​theQRL/​go-qrllib@​v0.0.0-20240701181907-0e6b70d94f91 ⏵ v0.1.0100100100100100

View full report

@jplomas jplomas merged commit c1c9615 into theQRL:main Nov 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant