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

DRAFT: digital signatures decorator and message family #79

Closed
wants to merge 7 commits into from

Conversation

kdenhartog
Copy link
Contributor

@kdenhartog kdenhartog commented Jan 7, 2019

Signed-off-by: Kyle Den Hartog kdenhar@gmail.com

rendered text

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>
The `@sig` feild decorator may be used with any field of data. Its value should match the json object format of the Signature Message Family outlined below.

```JSON
"example_feild.@sig": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo - feild

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I'll get this changed on my next update.

@swcurran
Copy link
Member

swcurran commented Jan 9, 2019

This is like the "attachments" HIPE in that it makes sense, but it would be great to have some use cases as to where this would be used.

I'm also intrigued as to using this with anoncrypt vs. using authcrypt. Could I get the same impact (same business function) of authcrypt by using anoncrypt and adding the signature decorator on the ciphertext field? I'm guessing not... :-)

@tplooker
Copy link

tplooker commented Jan 9, 2019

Great HIPE, once this has matured further I might modify #75 to use this functionality to provide proof of ownership of a routing identifier.


```JSON
{
@type: signature/1.0/ecdsa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some sort of standardized signature qualification we could use here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I believe the DID spec specifies them. This will need to be added before the propose phase.

@kdenhartog
Copy link
Contributor Author

This is like the "attachments" HIPE in that it makes sense, but it would be great to have some use cases as to where this would be used.

I'm also intrigued as to using this with anoncrypt vs. using authcrypt. Could I get the same impact (same business function) of authcrypt by using anoncrypt and adding the signature decorator on the ciphertext field? I'm guessing not... :-)

I agree, I think a perfect first use case is with @tplooker PR #75 and we'll eventually need it for credentials as well.

With regards to the anoncrypt w/ signature decorator there is a slight difference. The difference being that with Authcrypt, repudiable authentication is used, where as with the suggestion you included it's non-repudiable authentication. These properties have subtle difference that will affect privacy which is why we've defaulted to using authcrypt with the option of adding non-repudiable signatures for authentication.

@TelegramSam
Copy link
Contributor

have some use cases as to where this would be used.

Connection protocol (and later maintenance) needs this.

@TelegramSam
Copy link
Contributor

As I see it, these signatures can be processed by a receiving agent prior to presenting the data to a message handler. Then the handler can access the verified signature metadata and the signed data easily.

as an alternative, convenience functions can be used to access signed data inside the handler, to simplify the processing of these signatures.

Some quick text describing that intent could be helpful in the HIPE to help explain how the complexity of using these signatures can be mitigated.

Copy link
Contributor

@mikelodder7 mikelodder7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where you might build a list of acceptable signatures but we need to do it. At Real World Crypto 2019 Nadia Heninger presented a paper that uses lattice crypto to reverse engineer signatures to derive the private keys based on poorly generated nonces.

text/digital-signatures/README.md Show resolved Hide resolved
text/digital-signatures/README.md Show resolved Hide resolved
@kdenhartog kdenhartog changed the title initial draft of digital signatures DRAFT: digital signatures decorator and message family Jan 16, 2019
TelegramSam and others added 4 commits January 21, 2019 10:35
Signed-off-by: Sam Curren <telegramsam@gmail.com>
Updated handling, field renaming
Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>
Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>
How should multiple signatures be represented?
- One solution is to do [<digital_sig1>, <digital_sig2>] for `signature` and do [<verkey1>, <verkey2>] for `signers`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool idea but should be a separate HIPE.

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>
@type: "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/signature/1.0/ed25519Sha512_single"
"signature": <digital signature function output>
"sig_data": <base64URL(64bit_integer_from_unix_epoch||message_data)>
"signers": <signing_verkey>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be signer insted of signers given that there will only be one for this signature type?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signers makes sense so its future proof. I vote for signers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you seeing multi-sig format and single signer formats being the same @mikelodder7? That's what I was intending as well in which signers would make sense to use for this.

@andrewwhitehead
Copy link
Member

I could use some detail on the timestamp representation, "append timestamp as 8 bytes to the front of the message data". Is that a big-endian unsigned (long) int?

## Rationale and alternatives
[alternatives]: #alternatives

JSON Web Signatures is an alternative to this specification. The reason we've chosen to diverge from this specification is do to the inability to support our need for message decorators. Additional concerns around non-support for BLS signatures and other multi-signature schemes caused us to want to diverge.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why JWS precludes message decorators? I don't get that from skimming the JWS spec.

The "non-support for BLS signatures" is a crypto thing beyond me, but it seems to me that the reasons need to be good for not to go with an existing spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe JWS formats won't work with CL Signature schemes, so if we intend to use this decorator with credentials, it wouldn't make sense to use it. However if we're looking to do just basic ed25519 signatures JWS would likely be the best format.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could support BLS signatures for both threshold and multisigs, or even a single signer because those signatures are 1/2 the size of ECC sigs. CL sigs wouldn't work for JWS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of CL signatures and other considered Credential signatures would it make sense to use this format anyways? If it doesn't I see value in moving this format to align with the JWS work to allow for us to integrate with other identity systems more easily. (E.g. OAuth and openID connect servers)

@mikelodder7
Copy link
Contributor

I could use some detail on the timestamp representation, "append timestamp as 8 bytes to the front of the message data". Is that a big-endian unsigned (long) int?

That's what I thought it was. I agree it should be clarified to state "This timestamp field is a 64-bit unsigned big-endian integer. It records the number of seconds elapsed between January 1, 1970 UTC and the time the token was created."

@kdenhartog
Copy link
Contributor Author

I could use some detail on the timestamp representation, "append timestamp as 8 bytes to the front of the message data". Is that a big-endian unsigned (long) int?

That's what I thought it was. I agree it should be clarified to state "This timestamp field is a 64-bit unsigned big-endian integer. It records the number of seconds elapsed between January 1, 1970 UTC and the time the token was created."

Thank you for clarifying. I hadn't gotten around to looking up what was being used in the standard. I'll add this detail to the HIPE.

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>
@kdenhartog
Copy link
Contributor Author

What's our consensus on moving this towards JWS? I'm in favor at this point.

@dhh1128
Copy link
Contributor

dhh1128 commented Jun 20, 2019

@kdenhartog Would you agree that this should now be moved over to aries-rfcs?

@kdenhartog
Copy link
Contributor Author

I'd actually like to deprecate and close it (supersede in favor of 0066 is fine as well). This moves in a different direction than 0066 does, and I'm not wanting to separate out the decorator portion from the cryptographic envelope portion.

This is superseded by Aries RFC #66

@kdenhartog kdenhartog closed this Jun 20, 2019
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

Successfully merging this pull request may close these issues.

7 participants