Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign json data representation rather than image #15

Open
patcon opened this issue Oct 31, 2014 · 5 comments
Open

Sign json data representation rather than image #15

patcon opened this issue Oct 31, 2014 · 5 comments

Comments

@patcon
Copy link

patcon commented Oct 31, 2014

https://github.com/MrChrisJ/World-Citizenship#step-6

Just thinking that signing the image is a little fuzzy. We don't care if someone redesigns their card or optimizes the image compression -- we care if they changed the underlying data that the card represents. So maybe we could write a spec for the json data object that will be used to generate the html of the passport?

Thoughts?

@MrChrisJ
Copy link
Owner

MrChrisJ commented Nov 1, 2014

Yep. you could just make a XML document of the file and hash that, then use the XML data to make the design of the final. Then put the hash of both in the blockchain meaning they could create child designs as much as they wanted as long as the underlying data didn't change.

@MrChrisJ
Copy link
Owner

MrChrisJ commented Nov 5, 2014

Actually looking again I did specify the creation of an HTML document in the original design because my thinking at the time was that this would be a hosted service by someone at Keybase or other similar company. So in fact let's just broaden it and say it can be in XML or JSON. I prefer XML as a data-interchange format because it meets one of the goals of the project which is to help non-programmers to understand the underlying technology; to give them more control and autonomy when using such important tools.

If we ask the user to hash the XML and the image it produces an extra step but I think the payoff is greater, as you say, which is that they can change up the design which may broaden its appeal and make the process seem a bit magical. And perhaps we can streamline the process in to a script so that it becomes drag and drop like http://proofofexistence.com/.

What would be important now is to make sure that the documentation first guides the user through through the manual process so that they understand what the pretty automation wrapper will be doing when they hit run. This will ensure they don't grow complacent and outsource all the power to the developers.

I will update the readme, what do you think?

@patcon
Copy link
Author

patcon commented Nov 5, 2014

Hm. Need to re-read the current process (which I'll try to do later today), but my first thoughts:

  • why hash the rendered image we produce at all? Why not just store these in the data object (which is later hashed):
    • hash of profile photo
    • link to profile photo

I prefer XML as a data-interchange format because it meets one of the goals of the project which is to help non-programmers to understand the underlying technology

  • by this do you mean that XML is more friendly to non-programmers than JSON? Funny, as I feel the opposite :) I realize you said you plan to make format an option, and so this question is more idle curiosity on my part.

@MrChrisJ
Copy link
Owner

MrChrisJ commented Nov 6, 2014

Actually I did a quick (very unscientific) survey and 1 person say they preferred XML but two said JSON hands down. Also we can use JSON as the data object and just has that as I have learned that you can put the binary of the JPG in to it, is that right?

I am not a coder, but I am learning fast : )

@ppsirg
Copy link

ppsirg commented Jan 30, 2015

im a programmer and i have never seen a binary jpg or any binary file inside a json file(not in python, not in javascript, not in java, at least those who i have enough experience to be sure), i think is not possible, you can handle images by using the url of the image(absolute or relative), plus, json is much more user-friendly than xml, but xml actually supports binary files inside. please, check this, is very confusing(i just started looking for if json could support images as binary inside).
about what patcon said, a link of photo seems nice, but a photo hash, if metadata changes, hash should not be valid, so, is very risky(i have not tested, but im working on it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@patcon @MrChrisJ @ppsirg and others