Naming your implementation. In Identifier, fill in:
ImplementerID — your Implementer ID, e.g. MPAI0042.
ImplementationID — the AIM type the file implements (the same as its
Header), then -I and an instance number, e.g. MMC-TIQ-V2.5-I01.
Use -I02, -I03 and so on for further implementations of the same AIM, such
as builds for other platforms.
The Store sets AIMName to the two joined —
MPAI0042MMC-TIQ-V2.5-I01 — and that is the implementation's ID. Each AIMName can be used
only once.
After the check you give, for each file, its archive's SHA-256 and size and an
authorship signature made with the signing key registered under
Signing keys on your account page.
How to get the SHA-256 and the size
Replace your-aim.zip with your archive file. The SHA-256
is the 64-character value the first command prints; the second prints the size in bytes.
Linux or WSL:
macOS:
shasum -a 256 your-aim.zip
Windows PowerShell:
(Get-FileHash your-aim.zip -Algorithm SHA256).Hash.ToLower()
(Get-Item your-aim.zip).Length
Or download the copy you are hosting, then run the commands above on it — Linux, macOS or WSL:
curl -fsSL -o your-aim.zip 'https://you.example/aims/pkg.zip'
Windows PowerShell:
Invoke-WebRequest 'https://you.example/aims/pkg.zip' -OutFile your-aim.zip
The size must match what your server reports.
How to produce an authorship signature
Repeat for each file, with that file's own archive.
Run these where your private key lives — the Store never sees it. Replace the
highlighted values with your own.
Your Implementer ID and your archive's URL, SHA-256 and size:
IMPLEMENTER_ID='MPAI0042'
ARCHIVE_URL='https://you.example/aims/pkg.zip'
ARCHIVE_SHA256='paste-the-64-character-sha256-here'
The SHA-256 of the metadata file you are submitting — Linux or WSL:
MSHA=$(printf '%s' "$(jq -cSa . your_aim.json)" | sha256sum | cut -d' ' -f1)
macOS:
MSHA=$(printf '%s' "$(jq -cSa . your_aim.json)" | shasum -a 256 | cut -d' ' -f1)
Build the manifest:
jq -cSa -n --arg i "$IMPLEMENTER_ID" --arg m "$MSHA" --arg u "$ARCHIVE_URL" --arg h "$ARCHIVE_SHA256" --argjson s "$ARCHIVE_SIZE" '{_type:"mpai-submission",spec_version:"2.0",implementer_id:$i,metadata_sha256:$m,artifact:{download_url:$u,sha256:($h|ascii_downcase),size:$s}}' | tr -d '\n' > manifest.json
Sign it with your private key:
openssl pkeyutl -sign -inkey mpai_key.pem -rawin -in manifest.json -out sub.sig
Print the signature, and paste it into the Authorship signature field:
xxd -p -c 256 sub.sig | tr -d '\n'
Needs OpenSSL 3.0 or later (check with openssl version). The
openssl built into macOS is LibreSSL, which cannot do this; install OpenSSL 3, for example
with brew install openssl@3. Keep the a in jq -cSa: without it,
any non-ASCII character changes the bytes and the signature will not match.