Skip to content

feat(callgraph): add der, pkcs1, pkcs8, sec1 and spki contracts - #304

Open
matiasdaloia wants to merge 1 commit into
mainfrom
matiasdaloia/rustcrypto-formats-contracts
Open

matiasdaloia wants to merge 1 commit into
mainfrom
matiasdaloia/rustcrypto-formats-contracts

Conversation

@matiasdaloia

Copy link
Copy Markdown
Contributor

Summary

  • Family ID: rustcrypto-formats. Canonical family: RustCrypto formats. Refs scanoss/crypto-mining-service#332.
  • Adds Rust KB contracts for der, pkcs1, pkcs8, sec1, and spki.
  • Models SecretDocument and the PKCS#1 / PKCS#8 / SEC1 / SPKI key-document codecs, including encrypted PKCS#8 decrypt/encrypt.
  • Generic DER Document / Decode::from_der is not contracted. encrypt() wrapping defaults are not modelled as cipher contracts.

Unique PURLs

  • pkg:cargo/der
  • pkg:cargo/pkcs1
  • pkg:cargo/pkcs8
  • pkg:cargo/sec1
  • pkg:cargo/spki

Inventory

  • contracted: SecretDocument PEM/DER load and encode; PKCS#1 RSA private/public codecs; PKCS#8 DecodePrivateKey / EncodePrivateKey plus encrypted decrypt/encrypt; SEC1 private-key codecs and EncodedPoint::from_bytes; SPKI DecodePublicKey / EncodePublicKey and SubjectPublicKeyInfo::from_der
  • skipped-non-crypto: generic DER Document, AlgorithmIdentifier, ObjectIdentifier, field/group arithmetic, signature byte conversions

Local verification

  • go test ./internal/callgraph/contracts/ -count=1

Merge order

Merge after the matching crypto_rules PR and before the mining-service validation PR.

Model the same key-document codecs the formats rules detect, including
encrypted PKCS#8, without contracting generic DER document APIs.
@matiasdaloia matiasdaloia added crypto-coverage Crypto detection coverage expansion rust language: rust feature-parity Callgraph/contracts parity with Java/Python type:feature New feature or public contract labels Aug 26, 2026
@matiasdaloia

Copy link
Copy Markdown
Contributor Author

Re-opening once to fire pull_request workflows; no code change.

@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

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

View more details on SCANOSS Action Summary

@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 4
  • Undeclared components: 0
  • Declared components: 4
  • Detected files: 149
  • Detected files undeclared: 0
  • Detected files declared: 149
  • 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

crypto-coverage Crypto detection coverage expansion feature-parity Callgraph/contracts parity with Java/Python rust language: rust type:feature New feature or public contract

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant