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

Document how fields in the test vectors have to be interpreted #10

Open
stevenroose opened this issue Apr 11, 2017 · 5 comments
Open

Document how fields in the test vectors have to be interpreted #10

stevenroose opened this issue Apr 11, 2017 · 5 comments
Assignees

Comments

@stevenroose
Copy link
Contributor

Some binary values are hexadecimal, this can be spotted rather easily. Some, however, appear to be Base64, looking at the code, but they could just as well be UTF8.

Please document this somewhere.

@stevenroose
Copy link
Contributor Author

stevenroose commented Apr 11, 2017

Oh, also, is it base64 or base64url? Apparently the modulus and signature fields of a RSA-SHA-256 fulfillment are not valid base64. I'm out of inspiration for testing other encodings.

@stevenroose
Copy link
Contributor Author

I think I found out it's base64url.

@justmoon
Copy link
Contributor

Yes, this should be documented.

@justmoon justmoon self-assigned this Apr 11, 2017
@stevenroose
Copy link
Contributor Author

stevenroose commented Apr 11, 2017 via email

@justmoon
Copy link
Contributor

Yeah, there is a reason both are used. IIRC, the JSON format for conditions is defined in the cryptoconditions spec and specifies base64url for efficiency.

Outside of the standardized JSON representation of the cryptoconditions I used hex because it makes comparing expected vs actual a lot simpler.

This is from memory, so apologies if I'm misremembering.

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

2 participants