Image File Handling
Core concepts for handling image files containing a Trust Label
Image File Handling
The TrustNXT Protect SDK creates standard image files (like JPEG) that contain an embedded Trust Label. This guide explains how to handle these files while maintaining their integrity.
Compatibility
Files created by the SDK are compatible with all standard image viewers, libraries, and web browsers. No special software is required to view or display them.
However, because the Trust Label is cryptographically tied to the exact pixel data and metadata of the file, special care must be taken during processing.
What is a Trust Label?
A Trust Label is a bundle of cryptographic signatures and metadata stored within the image headers. It includes:
- A fingerprint (hash) of the image data.
- Authenticated sensor data (GPS, timestamp, device info).
- Signing certificates.
Any modification to the file, even if invisible to the human eye, will result in a mismatch with the cryptographic fingerprint, immediately invalidating the Trust Label.
Maintaining Integrity
To keep the Trust Label valid, you must avoid any operation that alters the file's binary content. Common operations that invalidate a Trust Label include:
- Resizing or cropping.
- Re-compressing (e.g., opening and re-saving a JPEG).
- Stripping EXIF/metadata headers.
- Applying filters or watermarks.
Best Practices
Should your workflow require image processing (such as generating thumbnails), we recommend:
- Preserve the Original: Always store the original, unaltered file as your "Source of Truth."
- Verify First: Perform verification using the Inspect API on the original file before any processing occurs.
- Link Derivatives: If you must create processed versions, maintain a database link between the processed version and the original verified asset.
Are you looking for a way to make intentional modifications (visible or invisible) to an image file while keeping the trust label intact? Contact you're account representative, we're happy to discuss your use case and offer a solution!