Developer platform

Plugin signing: cdnca-plugin

Download the offline signing tool, create a publisher key, register it and sign your manifest.

Download

An offline command-line tool shipped as a single executable. Every file and SHA256SUMS ship in the platform’s signed release; check the hash after downloading:

PlatformFile
Linux x86_64cdnca-plugin-linux-amd64
Linux ARM64cdnca-plugin-linux-arm64
macOS (Apple silicon)cdnca-plugin-darwin-arm64
Windows x86_64cdnca-plugin-windows-amd64.exe

SHA256SUMS (hashes of all files)

Download and verify

curl -fsSLO 'https://developer.cdnca.com/downloads/cdnca-plugin/cdnca-plugin-linux-amd64'
curl -fsSLO 'https://developer.cdnca.com/downloads/cdnca-plugin/SHA256SUMS'
sha256sum -c --ignore-missing SHA256SUMS
chmod +x cdnca-plugin-linux-amd64 && mv cdnca-plugin-linux-amd64 cdnca-plugin

On macOS use shasum (on ARM64 Linux use cdnca-plugin-linux-arm64):

curl -fsSLO 'https://developer.cdnca.com/downloads/cdnca-plugin/cdnca-plugin-darwin-arm64'
curl -fsSLO 'https://developer.cdnca.com/downloads/cdnca-plugin/SHA256SUMS'
shasum -a 256 -c --ignore-missing SHA256SUMS
chmod +x cdnca-plugin-darwin-arm64 && mv cdnca-plugin-darwin-arm64 cdnca-plugin

Windows (PowerShell): True means the hash matches.

Invoke-WebRequest 'https://developer.cdnca.com/downloads/cdnca-plugin/cdnca-plugin-windows-amd64.exe' -OutFile cdnca-plugin.exe
Invoke-WebRequest 'https://developer.cdnca.com/downloads/cdnca-plugin/SHA256SUMS' -OutFile SHA256SUMS
(Get-FileHash cdnca-plugin.exe -Algorithm SHA256).Hash.ToLower() -eq ((Select-String 'cdnca-plugin-windows-amd64.exe' SHA256SUMS).Line -split '\s+')[0]

If the hash does not match, do not run the file; download again and contact us if it still differs.

Usage

Publishers use their own Ed25519 private key for two things: proving possession when registering a public key on the seller site’s “Publisher keys” page (signing the platform’s challenge), and signing the manifest (its integrity section) before uploading a plugin version. The signing rules are the same code the platform verifies with; the key never leaves your machine and the tool makes no network calls.

1. Create a key

./cdnca-plugin keygen -out publisher.key
  • Writes publisher.key (mode 0600, a base64url-encoded 32-byte Ed25519 seed); an existing file is never overwritten.
  • Prints the public key (base64url, 32 bytes) to fill in at registration; print it again any time with ./cdnca-plugin pubkey -key publisher.key.
  • A lost private key cannot be recovered — you can only register a new public key. Back it up somewhere controlled and never commit it to a repository.

2. Register the public key (seller site → Publisher keys)

  1. Click “Register key”, enter your namespace and the public key from step 1, then click “Get the message to sign”.
  2. Copy the “Message (base64url)” shown on the page and run the command below on your machine.
  3. Paste the output into “Signature (base64url)” and click “Register”. A challenge is valid for 15 minutes and can be used once.
./cdnca-plugin sign-challenge -key publisher.key -message '<待签名内容>'

The tool first checks that the message is a platform challenge for this very key (cdnca-market-publisher-key-possession/v1 domain, matching public key and key ID) and refuses otherwise, so your key cannot be tricked into signing anything else.

3. Sign the manifest

./cdnca-plugin sign-manifest -key publisher.key -in manifest.json -out manifest.signed.json
  • metadata.publisher.id must be a namespace you registered; the tool derives integrity.key_id from namespace + public key, and it must be an active key of that namespace.
  • The tool replaces any existing integrity section with algorithm=Ed25519, key_id, payload_sha256 and signature, computed over the canonical manifest without integrity.
  • Changing any manifest field after signing invalidates the signature; sign again.
  • Manifests may only contain objects, arrays and strings; numbers or booleans are rejected (same rule as the platform).

Upload manifest.signed.json with the version.

Errors and exit codes

On failure the tool exits 1 and prints the reason to stderr (never key material); usage errors exit 2.