Comments (5)
Choose cai.rights
as example
hashlink
self#jumbf=cai/cb.adobe/cai.assertions/cai.rights?hl=mEiBChBVd8onGt71mftnzv4e9C6m67kAeHCK1K8TDtuKfDA
assertion
{"copyright":"Starling Labs"}
- starling.rights.2-spaces.json.txt
- starling.rights.4-spaces.json.txt
- starling.rights.no-spaces.json.txt
$ python3 utils/encode_hashlink.py -i starling.rights.2-spaces.json.txt
Input file: starling.rights.2-spaces.json.txt
hashlink param: mEiAUSYX4dM+r9uhZz4IVP8Z/LFBDJc/x/UAfi6urkpOjmw
$ python3 utils/encode_hashlink.py -i starling.rights.4-spaces.json.txt
Input file: starling.rights.4-spaces.json.txt
hashlink param: mEiBzzxFzjFEAQUsPQwtzkUHefGTpMegWzfi+bxEUlWSZCw
$ python3 utils/encode_hashlink.py -i starling.rights.no-spaces.json.txt
Input file: starling.rights.no-spaces.json.txt
hashlink param: mEiDERxtUoEmJ2b13EgVVzBZDBcLLnz3GE9qMkCnMwacwEQ
from pyc2pa.
Extract the cai/cb.adobe/cai.rights
Assertion Superbox
Superbox
LBox 00 00 00 51
TBox 6A 75 6D 62
Description Box
LBox 00 00 00 24
TBox 6A 75 6D 64
db_type 6A 73 6F 6E 00 11 00 10 80 00 00 AA 00 38 9B 71
db_toggle 03
db_label 63 61 69 2E 72 69 67 68 74 73 00 (cai.rights)
Content Box
LBox 00 00 00 25
TBox 6A 73 6F 6E (json)
Content 7B 22 63 6F 70 79 72 69 67 68 74 22 3A 22 53 74 61 72 6C 69 6E 67 20 4C 61 62 73 22 7D
Content (29)
{"copyright":"Starling Labs"}
from pyc2pa.
open
will add a newline char 0a
at the end of content bytes.
The length of read data will be 30 instead of 29. We need to add strip
to prevent this issue.
from pyc2pa.
Bofu Chen 3:24 PM
@mfisher @dkozma Thanks for Maurice's suggestion and the Claim tool, I update the multi-claim injection function.
Q1
The verify site will only show the newly injected Claim. I took two screenshots of the Chrome console messages, and would you help check them?
From the output of the Claim tool, the multi-claim injection looks okay. The AssertionHash errors should not affect the Claim display because the verification in the verify site has not been enabled?
Q2
For the AssertionHash errors, would you help check the encoding algorithm is correct?
We use the same hashlink generation function for the two Claims: cb.reuters_1 and cb.starling_1, and the Claim tool only returned the AssertionHash errors for cb.starling_1.
Q3
When generating assertion hash, should we use Superbox or raw content (e.g., JSON bytes or thumbnail in a Content Box) as the input?
Leonard Rosenthol 8:25 PM
Q3 - assertion hash is on the raw content
Bofu Chen 2:17 AM
Based on Leonard's answer for Q3
, I can answer Q2
by myself now: the hashlink algorithm is correct.
I use the cai/cb.adobe/cai.rights
Assertion content as the input
{"coyright":"Starling Labs"}
and can generate the same hash mEiBChBVd8onGt71mftnzv4e9C6m67kAeHCK1K8TDtuKfDA
Checking that why the Claim tool returned the AssertionHash errors if the hashlink algorithm is correct. (root cause and solution)
from pyc2pa.
This issue had been fixed by commit 18026b7
. Hash algorithm example is utils/encode_hashlink.py
from pyc2pa.
Related Issues (17)
- Doing multi-injection multiple times causes the injected image to be corrupted HOT 18
- JSON parsing function's results keep growing in memory HOT 1
- Injection error HOT 3
- Can not support using copy of raw photo as thumbnail for some photos HOT 1
- Fail to pass signature verification HOT 6
- Asset Repository HOT 3
- Incorrect UUIDs HOT 2
- System Dependency Issue
- import libexiv2python doesn't work on macOS HOT 2
- C2PA hello world example cannot work HOT 1
- CAI verification website does not list C2PA Information from test image HOT 1
- Unable to install c2pa on a MacOS HOT 2
- Fail to parse the generated CAI data HOT 2
- feature-support-c2pa-photo nor main follow the latest spec
- Support multiple Claims HOT 3
- pycrypto outdated & missing endesive library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyc2pa.