What is @sigstore/core?
@sigstore/core is an npm package that provides tools for signing, verifying, and managing software artifacts using Sigstore's transparency log and other related services. It is designed to enhance the security and integrity of software supply chains.
What are @sigstore/core's main functionalities?
Signing Artifacts
This feature allows you to sign software artifacts, ensuring their integrity and authenticity. The code sample demonstrates how to sign an artifact using the @sigstore/core package.
const sigstore = require('@sigstore/core');
async function signArtifact() {
const artifact = 'path/to/artifact';
const signature = await sigstore.sign(artifact);
console.log('Signature:', signature);
}
signArtifact();
Verifying Signatures
This feature allows you to verify the signatures of software artifacts. The code sample shows how to verify an artifact's signature using the @sigstore/core package.
const sigstore = require('@sigstore/core');
async function verifySignature() {
const artifact = 'path/to/artifact';
const signature = 'signature-string';
const isValid = await sigstore.verify(artifact, signature);
console.log('Is valid:', isValid);
}
verifySignature();
Managing Transparency Logs
This feature enables interaction with Sigstore's transparency log, which records the signing events. The code sample demonstrates how to retrieve a log entry for a given artifact hash.
const sigstore = require('@sigstore/core');
async function manageTransparencyLog() {
const logEntry = await sigstore.logEntry('artifact-hash');
console.log('Log Entry:', logEntry);
}
manageTransparencyLog();
Other packages similar to @sigstore/core
openpgp
The openpgp package provides tools for OpenPGP encryption and signing. It is a well-established library for cryptographic operations, but it does not integrate with Sigstore's transparency log or provide the same level of supply chain security features as @sigstore/core.
node-forge
node-forge is a comprehensive library for cryptographic operations in Node.js. It includes tools for signing, encryption, and certificate management. However, it lacks the specific integration with Sigstore's services and transparency log that @sigstore/core offers.
pkijs
pkijs is a library for Public Key Infrastructure (PKI) related tasks, including certificate handling and digital signatures. While it provides robust PKI functionalities, it does not offer the same supply chain security features and transparency log integration as @sigstore/core.