Skip to content
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

fedi wiki

  1. Home
  2. Fediverse Enhancement Proposals
  3. silverpill:

silverpill:

Scheduled Pinned Locked Moved Fediverse Enhancement Proposals
125 Posts 14 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

    Hello!

    This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

    Summary

    This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

    HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

    Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

    silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
    silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
    silverpill@socialhub.activitypub.rocks
    wrote last edited by
    #101

    This is great news! I'll add Fedify to implementation list

    1 Reply Last reply
    0
    • ? Guest

      Hey @silverpill, thanks a ton for shifting towards the new DataIntegrityProof work! I noted above that you plan to create a suite for RSA. I'd strongly advise against doing that for the reasons included here:

      https://blog.trailofbits.com/2019/07/08/fuck-rsa/

      New applications SHOULD NOT be using RSA unless there is a very good reason (like being compatible w/ broadly deployed systems in ways that makes it impossible to upgrade to more modern cryptography).

      If FIPS HSM support isn't an issue (and I don't think it is for activitypub), then you should be using EdDSA ("cryptosuite": "jcs-eddsa-2022"). Also note that we might change the "jcs" name to something else.

      silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
      silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
      silverpill@socialhub.activitypub.rocks
      wrote last edited by
      #102

      RSA was chosen to make implementation process easier for developers. Today the de-facto standard for server-to-server authentication in Fediverse is HTTP signatures with RSASSA-PKCS1-v1_5 algorithm. Every interoperating server already stores an RSA key for each user and knows how to verify those signatures. In order to implement FEP-8b32, developers only need to find some JCS library and adjust their activity construction and validation procedures. And while I understand that jcs-eddsa-2022 is preferable, implementing it would require more effort and that may discourage people. Of course, this is just a guess, and the recommendation will be revised based on a feedback from developers.

      helge@socialhub.activitypub.rocksH 1 Reply Last reply
      0
      • ? Guest

        Is there more on the client+relay model posted anywhere? I wonder if this helps support a model where private keys are held client-side.

        silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
        silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
        silverpill@socialhub.activitypub.rocks
        wrote last edited by
        #103

        This post was inspired by various discussions about Nostr protocol where identities are key-based and client+relay model is used. Client-side identity is possible in Fediverse too, and I even created a proof of concept, which makes use of FEP-8b32 and FEP-c390 extensions. I talked about this in Nomadic Identity thread:https://socialhub.activitypub.rocks/t/nomadic-identity-for-the-fediverse/2101/14

        I'm still not entirely convinced that client+relay model makes sense. But this is something we can explore -- all building blocks already exist.

        1 Reply Last reply
        0
        • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

          I don't know how much you have in common with Friendica, but they had a similar problem: https://github.com/friendica/friendica/issues/12815#issuecomment-1685307304

          ? Offline
          ? Offline
          Guest
          wrote last edited by
          #104

          Thanks, have managed to make our parser happy... Now the only thing left is Mastodon refusing to accept LDsigned relayed messages with https://w3id.org/security/data-integrity/v1 in the context and proof in the activity

          1 Reply Last reply
          0
          • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

            Hello!

            This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

            Summary

            This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

            HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

            Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

            silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
            silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
            silverpill@socialhub.activitypub.rocks
            wrote last edited by
            #105

            https://github.com/w3c/vc-di-eddsa/issues/41

            1 Reply Last reply
            0
            • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

              Looks like there is a flaw in eddsa-jcs-2022 cryptosuite and that might lead to its deprecation and replacement with a new version: https://github.com/w3c/vc-data-integrity/issues/225

              No action is needed right now, just something that we should be aware of.

              helge@socialhub.activitypub.rocksH This user is from outside of this forum
              helge@socialhub.activitypub.rocksH This user is from outside of this forum
              helge@socialhub.activitypub.rocks
              wrote last edited by
              #106
              silverpill:

              Looks like there is a flaw in eddsa-jcs-2022 cryptosuite

              As far as I understood it, I would actually see this as a "FEATURE NOT A BUG".

              Basically, it's a consequence of eddsa-jcs-2022 signing the underlying json and not the "linked data". This means that eddsa-jcs-2022 is

              1. Tolerant towards poor quality json-ld. For example, if there is a key not defined in the @context, eddsa-jcs-2022 can handle it. A pure ld implementation would run into trouble.
              2. Not invariant under json-ld transformation, e.g. adding something non conflicting to the context, or anything in json-ld-api.

              As a Fediverse developer with mixed feelings towards json-ld, I consider 1 more important to 2.

              Question to the group: Do you agree 1 is more important for us than 2? If yes, I'll probably post this to the appropriate w3c github.

              Further note: I also think that the AS extension proposal turning the AS context into something evolving will break any reliance on multiple contexts for the Fediverse (think adding proof to the AS context). So for me this means that json-ld and the usage of @context is not sufficiently understood and the rules are not sufficiently agreed on, to make decisions based on them. (cc @codenamedmitri )

              I can state again here, that I am of the opinion that json-ld and its ecosystem is not ready to be used. I could suggest a few fixes for the situation now, e.g. versioning the AS @context. The experience is just not there to know if what I suggest is good.

              I also think that cryptographic signatures are a sufficient mess to understand, that they are a poor place to introduce higher quality json-ld.

              ? 1 Reply Last reply
              0
              • ? Guest
                Great questions. (re whether the authentication or assertionMethod purpose is more appropriate). I think we should go with assertionMethod (when signing activities), and reserve authentication just for logging in with DID Auth ceremonies.
                silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                silverpill@socialhub.activitypub.rocks
                wrote last edited by
                #107
                FEP-8b32 was updated too: https://codeberg.org/fediverse/fep/pulls/133/files. proofPurpose being assertionMethod is a MUST now. In other news, JCS seems to be finally taking off. For each major ActivityPub server implementation, there’s a JCS library written in the same language: https://github.com/cyberphone/json-canonicalization#implementations
                1 Reply Last reply
                0
                • helge@socialhub.activitypub.rocksH helge@socialhub.activitypub.rocks

                  Thanks, for this FEP being adopted.

                  Suggestions

                  [] Include test cases of activities that should be valid using various algorithm pairings. This would at least help me, if I wanted to implement this. [] Specify behavior if Authentication is missing, e.g.

                  A server MAY require Authentication. In this case a request lacking authentication MUST be answered with HTTP 401.

                  [] Discuss behavior for AP S2S 7.1.2 Forwarding from Inbox, e.g.

                  A forwarded activity MAY be used without further verification, i.e. no GET is necessary from the original host.

                  [] Discuss public key caching. This probably goes beyond the scope of this FEP. So, one might one want add something like This section is non-normative. to it.

                  silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                  silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                  silverpill@socialhub.activitypub.rocks
                  wrote last edited by
                  #108
                  helge:

                  Include test cases of activities that should be valid using various algorithm pairings. This would at least help me, if I wanted to implement this.

                  Only a small number of proof suites (methods) has been standardized so far: https://w3c-ccg.github.io/vc-extension-registry/#proof-methods. I'm mostly improvising and inventing my own suites. If you want to create an interoperable implementation, we can discuss it here or somewhere else, but I don't want to include non-standard proof suites in the proposal (JcsRsaSignature2022 is used in the example but without it proposal would be incomplete).

                  helge:

                  Specify behavior if Authentication is missing, e.g.

                  Some servers may process activities in background and respond with 200/202 before authentication is performed.

                  helge:

                  Discuss behavior for AP S2S 7.1.2 Forwarding from Inbox, e.g.

                  Should this be a separate section in the proposal? Efficient forwarding is not the only use case of object integrity proofs, so if we talk about this we may as well mention other use cases.

                  helge:

                  Discuss public key caching. This probably goes beyond the scope of this FEP. So, one might one want add something like This section is non-normative. to it.

                  That's a good idea. This FEP can include recommendations for dealing with rotated/revoked keys: https://socialhub.activitypub.rocks/t/reuse-of-identity-channel-addresses-revocation-reissue-of-keys/2888

                  helge@socialhub.activitypub.rocksH 1 Reply Last reply
                  0
                  • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                    Hello!

                    This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                    Summary

                    This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                    HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                    Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                    silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                    silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                    silverpill@socialhub.activitypub.rocks
                    wrote last edited by
                    #109

                    Looks like there is a flaw in eddsa-jcs-2022 cryptosuite and that might lead to its deprecation and replacement with a new version: https://github.com/w3c/vc-data-integrity/issues/225

                    No action is needed right now, just something that we should be aware of.

                    helge@socialhub.activitypub.rocksH 1 Reply Last reply
                    0
                    • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks
                      hongminhee:

                      In the future, would it be possible to send activities using only Object Integrity Proofs and not rely on HTTP Signatures? Or are Object Integrity Proofs just a complement to HTTP Signatures?

                      In theory, yes, but I'd agree with @bumblefudge that HTTP Signatures are here to stay. However, there are other uses for integrity proofs:

                      • Forwarding from inbox
                      • Efficient Announce with signed embedded object (recipients don't need to fetch it from origin)
                      • Federated groups (for example, FEP-8b32 is used in Conversation Containers).
                      • Data portability.
                      ? Offline
                      ? Offline
                      Guest
                      wrote last edited by
                      #110
                      silverpill:

                      However, there are other uses for integrity proofs:

                      • Forwarding from inbox
                      • Efficient Announce with signed embedded object (recipients don’t need to fetch it from origin)
                      • Federated groups (for example, FEP-8b32 is used in Conversation Containers ).
                      • Data portability.

                      IMHO, it would be better if the FEP-8b32 specification includes these use cases as well!

                      silverpill@socialhub.activitypub.rocksS 1 Reply Last reply
                      0
                      • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                        Hello!

                        This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                        Summary

                        This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                        HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                        Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                        helge@socialhub.activitypub.rocksH This user is from outside of this forum
                        helge@socialhub.activitypub.rocksH This user is from outside of this forum
                        helge@socialhub.activitypub.rocks
                        wrote last edited by
                        #111
                        After updating “json-eddsa-2022” to “jcs-eddsa-2022” my tests pass with the new feature. I just realized Gherkin might not be as well-known as I expected. Have you integrated something like cucumber-rs into Mitra to run this test? The essential point for me to use Gherkin is that the feature files can be shared across implementations. So in an ideal world, everybody runs the same tests [1]. This will lead to greater interoperability, simply by eliminating one of the points where applications c…
                        silverpill@socialhub.activitypub.rocksS ? 2 Replies Last reply
                        0
                        • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                          Hello!

                          This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                          Summary

                          This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                          HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                          Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                          silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                          silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                          silverpill@socialhub.activitypub.rocks
                          wrote last edited by
                          #112
                          Upcoming changes to the Data Integrity spec which are relevant to FEP-8b32 and FEP-c390 discussions: Adding “expires” attribute to proof configuration Renaming jcs-eddsa-2022 cryptosuite to eddsa-jcs-2022
                          1 Reply Last reply
                          0
                          • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                            Hello!

                            This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                            Summary

                            This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                            HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                            Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                            silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                            silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                            silverpill@socialhub.activitypub.rocks
                            wrote last edited by
                            #113

                            I'm updating the FEP: https://codeberg.org/fediverse/fep/pulls/232

                            Added a warning about eddsa-jcs-2022 stability and clarified how integrity proofs and linked data signatures can be used together.

                            @Mario Have you figured out why Mastodon is refusing to accept your messages? If you're going to open an issue in their bug tracker, please let me know and I'll mention it in the FEP.

                            ? 1 Reply Last reply
                            0
                            • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                              Hello!

                              This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                              Summary

                              This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                              HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                              Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                              ? Offline
                              ? Offline
                              Guest
                              wrote last edited by
                              #114

                              I am in the process of implementing this FEP in Hubzilla. Regarding backward compatibility: can you provide an example on how to double sign (identity proofs and ld signatures) activities?How should such messages be verified?

                              I do not want to ditch ld signatures yet since they are required by Mastodon and Friendica to accept relayed messages. AFAIK both projects have not implemented this FEP yet.

                              Thanks!

                              silverpill@socialhub.activitypub.rocksS 1 Reply Last reply
                              0
                              • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                                I'm updating the FEP: https://codeberg.org/fediverse/fep/pulls/232

                                Added a warning about eddsa-jcs-2022 stability and clarified how integrity proofs and linked data signatures can be used together.

                                @Mario Have you figured out why Mastodon is refusing to accept your messages? If you're going to open an issue in their bug tracker, please let me know and I'll mention it in the FEP.

                                ? Offline
                                ? Offline
                                Guest
                                wrote last edited by
                                #115
                                silverpill:

                                Have you figured out why Mastodon is refusing to accept your messages?

                                Sorry for the late reply... Nope, no progress so far. Have not opened an issue yet. Will post here if i do...

                                1 Reply Last reply
                                0
                                • trwnh@socialhub.activitypub.rocksT trwnh@socialhub.activitypub.rocks
                                  silverpill:

                                  Several solutions were proposed - embeddedObjects

                                  This sounds a lot like JSON-LD @included:

                                  { "@context": "https://www.w3.org/ns/activitystreams", "id": "https://activity.example/", "actor": "https://actor.example/", "type": "Announce", "object": "https://object.example/", "@included": [ { "id": "https://actor.example/", "name": "Someone", "type": "Person" }, { "id": "https://object.example/", "type": "Article", "name": "Top 10 AS2 examples -- number 3 will surprise you!" } ]}

                                  If you ignore all the JSON-LD stuff, the "plain JSON" document is just this:

                                  { "id": "https://activity.example/", "actor": "https://actor.example/", "type": "Announce", "object": "https://object.example/",}

                                  If you flatten the first example or convert it to N-Quads, the @included block goes away. The @included block is just a framing tool so that the "plain JSON" can match a specific schema (say one where actor and object are required to be JSON strings). It's broadly similar to JSON:API's concept of "included", as JSON-LD 1.1 points out... except it keys off of @id only (instead of both type and id).

                                  A canonicalization scheme could define that included blocks are stripped before hashing and signing, and that therefore the information included in an included block is not trustworthy on its own without its own signatures. I guess you could profile JCS if you wanted to depend on the JSON serialization, or profile RDFC if you wanted to depend on the N-Quads dataset (minus the included statements).

                                  silverpill:
                                  Claire:

                                  how would you “make sure” the object is indeed a <https://www.w3.org/ns/activitystreams#object> while keeping the object’s JSON representation intact? Off the top of my head, I see no way to do that safely.

                                  If I understand the question correctly, this problem also arises in client-to-server context. An object published by a client can be parsed differently by the originating and receiving servers due to JSON-LD/JSON differences. This could cause security issues, and I have lately come to the conclusion that JSON-LD and JSON cannot coexist in the same network.

                                  The way you "make sure" that object is specifically is via one of the following mechanisms:

                                  • JSON-LD @context expansion. A JSON-LD processor loads the declared contexts (modulo other document loader safety concerns) and normalizes everything to its full IRI reference.
                                  • IANA media type signaled via HTTP Content-Type header is application/activity+json or equivalent. Per definition, that media type includes the semantics that the object key is defined as . For JSON-LD compatibility, this is also achieved via "context injection", i.e. when you encounter this specific IANA media type, you can convert it to an application/ld+json document by tacking on "https://www.w3.org/ns/activitystreams" as the end of the @context array in case it is missing.

                                  The latter is the closed-world / centralized variant of the former. They clearly already co-exist in the same network. The issue arises when you use terms that aren't defined by application/activity+json or its equivalent JSON-LD @context, but this isn't JSON-LD's fault -- the issue's real cause is that people can and will disagree on what terms mean, as with any other matters of language. You can't assume everyone always agrees with everything you do or say 100%. The point of having keys and terms be expandable to IRI references is that http(s): IRIs conveniently include an authority component, so you can workaround the lack of authority in the data model and disambiguate two different definitions of the same term. Having a way to detect that there is a conflict does not create the conflict; the conflict is still there even if you don't have a way of detecting it.

                                  tl;dr,

                                  Claire:

                                  how one is expected to handle proofs of embedded objects

                                  depends on canonicalization. Embedding an object from one document into another document should be done with the recognition that documents and objects are not the same thing, and that embedded information about an object is necessarily scoped to the current document in which that information is presented.

                                  For example:

                                  GET /foo HTTP/1.1Host: domain.exampleAccept: application/activity+json
                                  HTTP/1.1 200 OKContent-Type: application/activity+json{ "id": "https://domain.example/foo", "type": "Activity", "object": { "id": "https://domain.example/bar", "type": "Object" }}

                                  Here, the statement that /bar is an Object is a statement being made within /foo. You can GET /bar and obtain different information (e.g. that /bar is a Tombstone). That doesn't make the statement in /foo incorrect; it could be that statements in /foo and statements in /bar were made at different times.

                                  When signing or verifying objects, it's crucial to consider what you're signing. As the author of /foo I can sign my own statement about /bar within /foo, and this is different than a signed statement about /bar from the author of /bar within /bar. If you don't distinguish or qualify statements by their source[^1], you will get confused.

                                  [^1]: This is what quads are supposed to be in RDF -- they contextualize triples by the graph they came from. But you don't need to use quads, you just need to use some kind of contextualizing thing, like an HTTP resource; the statements in that resource can still be modeled as triples, while you reason about them as quads in order to explicitly consider who said something, or when they said it, or whether or how much you trust that statement.

                                  I can't get too much into this further, since anything else depends heavily on what your trust model is. But for the purposes of signatures, you have to look to the current document (and possibly infer additional information from HTTP headers).

                                  silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                                  silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                                  silverpill@socialhub.activitypub.rocks
                                  wrote last edited by
                                  #116
                                  Claire:

                                  I am looking at implementing this into Mastodon, and I’m unable to verify the test vectors in https://codeberg.org/fediverse/fep/src/branch/main/fep/8b32/fep-8b32.feature although I’m able to verify these: https://www.w3.org/TR/vc-di-eddsa/#representation-eddsa-jcs-2022

                                  @Claire I added intermediary outputs to fep-8b32.feature: canonicalized document, canonicalized proof config and the combined hash:

                                  https://codeberg.org/fediverse/fep/src/commit/90444d8d5e880f2511e09efd8c142e4f0e13e4f6/fep/8b32/fep-8b32.feature#L31-L39

                                  (PR: https://codeberg.org/fediverse/fep/pulls/871)

                                  1 Reply Last reply
                                  0
                                  • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks
                                    Claire:

                                    I am looking at implementing this into Mastodon, and I’m unable to verify the test vectors in https://codeberg.org/fediverse/fep/src/branch/main/fep/8b32/fep-8b32.feature although I’m able to verify these: https://www.w3.org/TR/vc-di-eddsa/#representation-eddsa-jcs-2022

                                    This might be due to the presence of floating numbers in fep-8b32.feature document. Some JCS libraries don't handle those correctly. Which one do you use?

                                    Claire:

                                    Additionally, I’m not sure how one is expected to handle proofs of embedded objects: indeed, if you consider the whole document as JSON-LD, the JSON-LD API does not give you much to unambiguously access a precise attribute other than expanding, compacting, or framing the document, but all these operations may change the JSON representation and thus break the signature.

                                    A similar concern was raised by @helge in another thread: https://socialhub.activitypub.rocks/t/use-cases-of-fep-8b32-object-integrity-proofs/3249/10. Several solutions were proposed - embeddedObjects, re-defining object as @json, etc.

                                    Later, I opened an issue in w3c/vc-di-eddsa bug tracker - https://github.com/w3c/vc-di-eddsa/issues/81. They said it is fine to embed a signed object and I didn't ask any more questions.

                                    Claire:

                                    E.g., in https://codeberg.org/fediverse/fep/src/branch/main/fep/8b32/fep-8b32.md#signed-activity-with-embedded-signed-object, how would you “make sure” the object is indeed a <https://www.w3.org/ns/activitystreams#object> while keeping the object’s JSON representation intact? Off the top of my head, I see no way to do that safely.

                                    If I understand the question correctly, this problem also arises in client-to-server context. An object published by a client can be parsed differently by the originating and receiving servers due to JSON-LD/JSON differences. This could cause security issues, and I have come to the conclusion that JSON-LD and JSON cannot coexist in the same network.

                                    ? Offline
                                    ? Offline
                                    Guest
                                    wrote last edited by
                                    #117
                                    silverpill:

                                    This might be due to the presence of floating numbers in fep-8b32.feature document. Some JCS libraries don’t handle those correctly. Which one do you use?

                                    That was it, thanks! We use the \json-canonicalization\ gem that we already had an indirect dependency on.

                                    The next non-patch version of Mastodon should support incoming top-level Object Integrity Proofs using \eddsa-jcs-2022\. We are also looking at supporting \mldsa44-jcs-2024\ defined in https://www.w3.org/TR/2026/WD-vc-di-quantum-resistant-1.0-20260616 , it's very similar, though the proof config handling of \@context\ is different, and it mandates Base64 instead of Base58-btc. This is fine for us as our Multibase implementation supports deconding both anyway.

                                    For embedded objects, I still have to read up on the recent suggestions, but I'm afraid this is going to be quite complex even though this would be valuable to us (for instance, to bundle quoted objects with a short-lived proof that they have been accepted, and avoid the costly and failure prone initial round-trip).

                                    Talking about short-lived proof, is there any recommendation as to what to do with \created\, or support for \expires\?

                                    silverpill@socialhub.activitypub.rocksS 1 Reply Last reply
                                    0
                                    • ? Guest
                                      silverpill:

                                      This might be due to the presence of floating numbers in fep-8b32.feature document. Some JCS libraries don’t handle those correctly. Which one do you use?

                                      That was it, thanks! We use the \json-canonicalization\ gem that we already had an indirect dependency on.

                                      The next non-patch version of Mastodon should support incoming top-level Object Integrity Proofs using \eddsa-jcs-2022\. We are also looking at supporting \mldsa44-jcs-2024\ defined in https://www.w3.org/TR/2026/WD-vc-di-quantum-resistant-1.0-20260616 , it's very similar, though the proof config handling of \@context\ is different, and it mandates Base64 instead of Base58-btc. This is fine for us as our Multibase implementation supports deconding both anyway.

                                      For embedded objects, I still have to read up on the recent suggestions, but I'm afraid this is going to be quite complex even though this would be valuable to us (for instance, to bundle quoted objects with a short-lived proof that they have been accepted, and avoid the costly and failure prone initial round-trip).

                                      Talking about short-lived proof, is there any recommendation as to what to do with \created\, or support for \expires\?

                                      silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                                      silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                                      silverpill@socialhub.activitypub.rocks
                                      wrote last edited by
                                      #118

                                      I think expires is a good way to make a short-lived proof, although I'm not sure if any existing FEP-8b32 implementations support it.

                                      Verifiers should probably treat expired proofs in the same way as proofs with unsupported algorithms and try other authentication methods on verification failure (e.g. fetch object by its id).

                                      I opened a PR that adds the following text:

                                      If a verifier encounters an integrity proof that uses a verification method that it can't resolve, or uses a cryptosuite that is not supported, or the proof has expired (as indicated by the expires property), the verifier SHOULD ignore the proof and try other authentication methods.

                                      The PR also adds Mastodon to the implementation list and adds "Quantum-resistant cryptosuites" to future work.

                                      1 Reply Last reply
                                      0
                                      • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                                        Hello!

                                        This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                                        Summary

                                        This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                                        HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                                        Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                                        ? Offline
                                        ? Offline
                                        Guest
                                        wrote last edited by
                                        #119

                                        I see no issue with handling \expires\, so I added that to Mastodon (both for Object Identity Proofs and Linked Data Signatures—although for the latter you do need to take some care because the old security context actually has multiple aliases for the same property…)

                                        Reading back the discussion, I don't see any good solution for embedded proofs using JCS… this is a bit disheartening, as I was looking forward to using embedded signed objects for approval stamps. We could still do that using eddsa-rdfc-2022, which I guess would make sense since we are dealing with JSON-LD to begin with. but I definitely see the value of avoiding the RDF Dataset Canonicalization algorithm if we can.

                                        1 Reply Last reply
                                        0
                                        • silverpill@socialhub.activitypub.rocksS silverpill@socialhub.activitypub.rocks

                                          Hello!

                                          This is a discussion thread for the proposed FEP-8b32: Object Integrity Proofs.Please use this thread to discuss the proposed FEP and any potential problemsor improvements that can be addressed.

                                          Summary

                                          This proposal describes how ActivityPub servers and clients could create self-authenticating activities and objects.

                                          HTTP signatures are often used for authentication during server-to-server interactions. However, this ties authentication to activity delivery, and limits the flexibility of the protocol.

                                          Integrity proofs are sets of attributes that represent digital signatures and parameters required to verify them. These proofs can be added to any activity or object, allowing recipients to verify the identity of the actor and integrity of the data. That decouples authentication from the transport, and enables various protocol improvements such as activity relaying, embedded objects and client-side signing.

                                          silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                                          silverpill@socialhub.activitypub.rocksS This user is from outside of this forum
                                          silverpill@socialhub.activitypub.rocks
                                          wrote last edited by
                                          #120
                                          Claire:

                                          Reading back the discussion, I don’t see any good solution for embedded proofs using JCS… this is a bit disheartening, as I was looking forward to using embedded signed objects for approval stamps.

                                          Do you think embedded signed objects will cause problems in real-world situations?

                                          @hongminhee implemented FEP-8b32 in Hollo, which is one of the ActivityPub servers that actually does JSON-LD processing, and didn't encounter any issues (as far as I know).

                                          ? 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post