Skip to content

feat(contracts): add liboqs-node Node contract KB - #545

Open
agustingroh wants to merge 2 commits into
mainfrom
tier0/npm-liboqs-275-finder
Open

agustingroh wants to merge 2 commits into
mainfrom
tier0/npm-liboqs-275-finder

Conversation

@agustingroh

Copy link
Copy Markdown
Contributor

Part 2 of 3 for crypto-mining-service#275.

12 entries: two class constructors and the methods they make reachable.

One type per class, not one per mechanism

The mechanism arrives as the constructor's first argument, so a per-mechanism type could not resolve new Signature(alg) with a variable. Same shape as the jwa and keccak KBs; reading the literal is the rules' job.

The second constructor argument is a secret key

Both arities are declared because of it: new Signature(alg) generates a fresh key pair, while new Signature(alg, secretKey) resumes from existing private key material. If those arities ever collapse, an inventory loses the difference between minting a key and loading one.

verify is declared at arity 3 only — liboqs verification takes message, signature and public key, and there is no two-argument form.

exportSecretKey is output: it hands out material that already exists, and for these schemes that material is large — Classic-McEliece private keys run to hundreds of kilobytes.

Deliberately uncontracted: getDetails and the KEMs/Sigs enumeration helpers, which report which mechanisms the build supports and perform no cryptography. The test asserts their absence.

Test sensitivity proved before opening: changing verify to arity 2 fails the suite. make lint 0 issues.

12 entries. Two classes with the mechanism as the constructor's first argument,
so there is one type per class rather than one per mechanism -- a per-mechanism
type could not resolve new Signature(alg) with a variable.

Both constructor arities are declared because the second argument is a secret
key: arity 1 generates a fresh key pair, arity 2 resumes from existing private
key material.
@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 4
  • Undeclared components: 0
  • Declared components: 4
  • Detected files: 160
  • Detected files undeclared: 0
  • Detected files declared: 160
  • Licenses detected: 4
  • Licenses detected with copyleft: 2
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

…nded check

Each of these asked whether a neighbouring package had a key in the merged KB,
which answers a different question from the one intended: the scan passes only
while that neighbour has no KB of its own, and adding one is the ordinary way
this catalog grows.

Adding liboqs-node.yaml failed the crystals-kyber test though crystals-kyber-js
had not changed -- the same failure mode the shared assertLibraryOwnsItsKeys
helper was introduced for. bitcoinjs-lib and google-cloud-kms carried the same
latent defect and would have failed the day an ecpair or another @Google-Cloud
KB shipped.
@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 4
  • Undeclared components: 0
  • Declared components: 4
  • Detected files: 160
  • Detected files undeclared: 0
  • Detected files declared: 160
  • Licenses detected: 4
  • Licenses detected with copyleft: 2
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

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.

2 participants