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

Allow for single recipient structure to not have array structure #4

Closed
jimsch opened this issue Nov 29, 2014 · 2 comments
Closed

Allow for single recipient structure to not have array structure #4

jimsch opened this issue Nov 29, 2014 · 2 comments
Assignees

Comments

@jimsch
Copy link
Contributor

jimsch commented Nov 29, 2014

JOSE now allows for a single recipient to be encoded at the same level as the content. While COSE does not allow for quite the same way of encoding this it would be possible to do something similar.

Current syntax is "recipients : COSE_encrypt_a* | null;" This can be changed to "recipients : COSE_encrypt | COSE_encrypt_a* | null;" Do so would allow for a single recipient to be appended to the end of the current array of values rather than creating two array sub-encodings in CBOR. This encoding saves 2 bytes in the event of a single recipient at the expense of needing to pass in an offset in the array structure when parsing it.

Not really that hard to do from a programmers point of view.

@jimsch jimsch added this to the Publish -00 version milestone Dec 15, 2014
@jimsch jimsch self-assigned this Dec 17, 2014
@jimsch jimsch closed this as completed Dec 18, 2014
@jimsch
Copy link
Contributor Author

jimsch commented Apr 26, 2015

Open for group discussion

@jimsch
Copy link
Contributor Author

jimsch commented May 18, 2015

Based on the messages, there seems to be no support for combining the two maps together into a single map. I have therefore removed that from my working copy of the draft.

There was one request for allowing option b (where a single recipient can be represented as a single map entry rather than as an array of a single map). I have looked at code size, and there does not seem to be a lot of code associated with this option, but as there was no outcry for this option I have not included it.

Unless others have opinions that they believe need to be expressed, I am closing this issue.

@jimsch jimsch closed this as completed May 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant