Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

support did-jwt ? #157

@bblfish

Description

@bblfish

The current HttpSig spec proposal suggests that did:key can be used as a keyId. There is an open issue whether did:keys refer to just the cryptographic key or more.

@David-Chadwick in his response to issue 156 points to the work on did+jwt, which looks like it contains the other parameters needed for HttpSignature. (For some reason it is not called did:jwt but did:ethr) My guess is that a signature containing the key would then need to also sign the header containing the did:ethr. Such a header would look something like this:

GET /events/party HTTP/1.1
Accept: */*
Authorization: HttpSig sig="sig1"
Signature-Input: sig1=("@request-target");\
    keyid="did:ethr:0xf3beac30c498d9e26865f34fcaa57dbb935b0d74'";\
    created=1402170695
Signature: sig1=:QaVaWYfF2da6tG66Xtd0GrVFChJ0fOWUe/C6kaYESPiYYwnMH9eg\
    OgyKqgLLY9NQJFk7bQY834sHEUwjS5ByEBaO3QNwIvqEY1qAAU/2MX14tc9Yn7ELB\
    naaNHaHkV3xVO9KIuLT7V6e4OUuGb1axfbXpMgPEql6CEFrn6K95CLuuKP5/gOEcB\
    tmJp5L58gN4VvZrk2OVA6U971YiEDNuDa4CwMcQMvcGssbc/L3OULTUffD/1VcPtd\
    GImP2uvVQntpT8b2lBeBpfh8MuaV2vtzidyBYFtAUoYhRWO8+ntqA1q2OK4LMjM2X\
    gDScSVWvGdVd459A0wI9lRlnPap3zg==:

As I understand "Signing HTTP Messages" always signs the Signature-Input header, so that should make it impossible to change the did:ethr key.

But then I am not sure what the problems with adding the key parameters to the header in Signing Http Messages were, when they write for the previous rsa-256 algorithm (and all other previous ones for that matter)

Status: Deprecated; specifying signature algorithm enables attack vector.

My guess is that this means that there is a place between the end of the ssl connection and the web server where traffic could be in the open, where such headers could be replaced, the hash sum changed to something easy to forge like SHA1 and a new forged signature placed in its stead.

If this is the right guess - cryptographers seem to secretly believe in security through obscurity, as they rarely state things clearly - then this could still happen with a did-jws URL, I guess. Unless the did:jwt URL is itself signed with its own private key? Would that be possible without using SHA if the URL is short enough?

Another option would be to consider introducing pure cryptographic signatures say rsa on the HttpSig headers, where no use of hashes is made. Would that be possible? Could we suggest that to the IETF working group?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions