cyberphone / jws-ct Goto Github PK
View Code? Open in Web Editor NEWJWS/CT - JWS "Clear Text" Option
License: Other
JWS/CT - JWS "Clear Text" Option
License: Other
Qn. Since a key objective is to maintain human readability and general JSON-ness, why not leverage the JWS JSON serialized structures for the meta-info?
…the syntax of a JWS using the flattened JWS JSON
Serialization is as follows:
{
"payload":"<payload contents>",
"protected":"<integrity-protected header contents>",
"header":<non-integrity-protected header contents>,
"signature":"<signature contents>"
}
(or it's less-flat alternative for multi-sig) https://tools.ietf.org/html/rfc7515#section-7.2
I'm coming at this from wanting to avoid the complexity overhead of JSON-LD Signatures for (as you suggest) persistent signed JSON documents; finding https://tools.ietf.org/html/rfc7797; thinking all that was missing was some canonicalization; digging into JCS and https://gibson042.github.io/canonicaljson-spec/; discovering that all the 7797 implementations are focussed on detached serializations; and that all the payload examples seem to be of simple strings rather than anything with structure
And now stumbling across your jws-jcs which also uses the Base64 encoded detached (then re-attached) header and signature, I'm left thinking I must be missing something!??
(although, tbh, I'm not much of a fan of 'payload' as a property name, 'contents' or 'document' or 'body' would be more natural perhaps)
—edit—
So, when I wrote the above, I hadn't realized that this repo belonged to the JCS author/proposer, rather than just some random person's experiment! Thanks for JCS - I really don't understand how there isn't yet a standard for signed JSON documents that are, umm, JSON documents!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.