Help Center / Data Integrity / Independent Verification

Independent Verification

Auditors can independently verify analysis log signatures without MTC Skopos using standard tools.

Linux / macOS

Verify checksum

# Strip __signature__ and compute SHA-256
jq -j 'del(.__signature__)' analysis.log | sha256sum

# Compare the output with the checksum value in __signature__ (without the "sha256:" prefix)

Verify Ed25519 signature

# 1. Extract the signed content (without __signature__)
jq -j 'del(.__signature__)' analysis.log > content.bin

# 2. Extract and decode the base64 signature to raw bytes
jq -r '.__signature__.signature' analysis.log | base64 -d > signature.bin

# 3. Convert the raw 32-byte public key to PEM format for openssl
(echo "-----BEGIN PUBLIC KEY-----"
 cat <(printf '\x30\x2a\x30\x05\x06\x03\x2b\x65\x70\x03\x21\x00') mtc-v1.pub | base64
 echo "-----END PUBLIC KEY-----") > pubkey.pem

# 4. Verify with openssl
openssl pkeyutl -verify -pubin -inkey pubkey.pem -sigfile signature.bin -rawin -in content.bin

# Clean up
rm content.bin signature.bin pubkey.pem

Verify non-repudiation signature (BYOK)

If the file was dual-signed with a BYOK key, a non_repudiation_signature field is present:

# 1. Extract non-repudiation signature
jq -r '.__signature__.non_repudiation_signature.signature' analysis.log | base64 -d > nr_sig.bin

# 2. Verify with the BYOK public key
jq -j 'del(.__signature__)' analysis.log > content.bin
KEY_ID=$(jq -r '.__signature__.non_repudiation_signature.key_id' analysis.log)
(echo "-----BEGIN PUBLIC KEY-----"
 cat <(printf '\x30\x2a\x30\x05\x06\x03\x2b\x65\x70\x03\x21\x00') "${KEY_ID}.pub" | base64
 echo "-----END PUBLIC KEY-----") > nr_pubkey.pem
openssl pkeyutl -verify -pubin -inkey nr_pubkey.pem -sigfile nr_sig.bin -rawin -in content.bin

# Clean up
rm content.bin nr_sig.bin nr_pubkey.pem

Windows (PowerShell)

Verify checksum

Using Python (recommended for exact JSON formatting match):

python -c "
import json, hashlib
obj = json.load(open('analysis.log'))
sig = obj.pop('__signature__', None)
content = json.dumps(obj, indent=2)
h = hashlib.sha256(content.encode()).hexdigest()
print(f'Checksum: sha256:{h}')
if sig: print(f'Expected: {sig[\"checksum\"]}')
print('MATCH' if sig and f'sha256:{h}' == sig['checksum'] else 'MISMATCH')
"

If Python is not available:

# Requires jq for Windows (https://jqlang.github.io/jq/download/)
jq -j "del(.__signature__)" analysis.log | Out-File -Encoding utf8NoBOM -NoNewline content.bin
certutil -hashfile content.bin SHA256
# Compare with the checksum value from __signature__

Verify Ed25519 signature

# Requires: pip install cryptography
python -c "
import json, base64
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey

obj = json.load(open('analysis.log'))
sig_section = obj.pop('__signature__')
content = json.dumps(obj, indent=2).encode()
signature = base64.b64decode(sig_section['signature'])
pub_key_bytes = open('mtc-v1.pub', 'rb').read()
pub_key = Ed25519PublicKey.from_public_bytes(pub_key_bytes)

try:
    pub_key.verify(signature, content)
    print('Signature: VALID')
except Exception as e:
    print(f'Signature: INVALID ({e})')

import hashlib
checksum = 'sha256:' + hashlib.sha256(content).hexdigest()
expected = sig_section['checksum']
print(f'Checksum:  {\"MATCH\" if checksum == expected else \"MISMATCH\"} ({checksum})')

# Verify non-repudiation signature if present (BYOK files)
nr = sig_section.get('non_repudiation_signature')
if nr:
    nr_sig = base64.b64decode(nr['signature'])
    nr_pub_bytes = open(nr['key_id'] + '.pub', 'rb').read()
    nr_key = Ed25519PublicKey.from_public_bytes(nr_pub_bytes)
    try:
        nr_key.verify(nr_sig, content)
        print('Non-repudiation signature: VALID')
    except Exception as e:
        print(f'Non-repudiation signature: INVALID ({e})')
"

Updated on: 2026-03-29

« Back to Data Integrity