Use C2PA tool

To use C2PA tool:

  1. Get your image to be signed and the manifest to be embedded in place.
    1. Image A.jpg is the image being signed in the command below.
    2. Manifest See this link to learn more about manifests.  You are required to pass "alg": "ps256" and "sign_cert": "chain.pem" in the manifest being passed in the command. If you receive an error Invalid signing algorithm provided, try using es256 instead.
  2. Command for signing the manifest file:
    c2patool A.jpg \ 
    
    --manifest manifest.json \ 
    
    --output signed-image.jpg \ 
    
    --signer-path ./target/release/remote-signer \ 
    
    --no_signing_verify -f -d
    
  3. Understand the commands:
    CommandExplanation
    C2patool A.jpgInput file A.jpg to be signed.
    –manifest manifest.json \JSON manifest containing metadata (claim generator, assertions, signing algorithm, certificate chain).
    –output signed-image.jpg \Output file with embedded manifest. Original A.jpg is unchanged.
    –signer-path ./target/release/remote-signer \Uses external signer binary c2patool pipes claim bytes into this program which returns a signature.
    –no_signing_verify -f -dSkips verification of the signature. Useful for testing but carries risk if something goes wrong.
    -fForces overwrite signed-image.jpgif it already exists.
    -dEnabled debug logging for troubleshooting.