Skip to main content

Package reference

API reference for the implemented packages. Scaffolded packages (v0.0.1) are not documented in detail here — see Overview and package catalog for the full list and version table.

PackageDescription
pq-oidOID constants and algorithm metadata
pq-algorithm-idCanonical identifier mappings (name / OID / JOSE / COSE / X.509)
pq-key-encoderDER, PEM, JWK, SPKI, PKCS#8 key encoding
pq-key-fingerprintPublic key fingerprint generation

Package layering

These four packages are intentionally layered:

  • pq-oid is the lowest layer. It exposes OID constants and an Algorithm table with sizes and metadata. No I/O, no encoding, no key material.
  • pq-algorithm-id builds on pq-oid and adds the multi-identifier mapping API used by anything that needs to translate between JOSE / COSE / X.509 algorithm descriptors. New code should prefer this over pq-oid's legacy JOSE/COSE helpers.
  • pq-key-encoder consumes algorithm identifiers to encode and decode key material in DER, PEM, JWK, SPKI, and PKCS#8 forms. Key material flows in and out as Uint8Arrays.
  • pq-key-fingerprint builds on pq-key-encoder and pq-algorithm-id to produce stable hashes of public keys for display, deduplication, and authentication-bound identifiers.

If you find yourself reimplementing one of these, consider contributing instead — see Contributing.