Salta al contenuto
Citiverse è uno spazio aperto a tutte le comunità. Se vuoi aprire un gruppo locale o una sezione per la tua organizzazione, puoi contattare gli amministratori: pagina dei contatti.

End-to-end Encryption (E2EE) over ActivityPub

  • @silverpill

    Of an envelope. If actor being changed mid-transit isn't a problem, then omit it from the aad. Including the from/to as part of the AAD binds the ciphertext to the origin/recipient (the HPKE ciphertext does not carry any of this information).

    It is worth noting that, as the FEP is specified now, using the sender and recipient's keypairs to do HPKE will result in the same shared secret being generated for every message. This is catastrophic to security as the nonce for the symmetric portion of the HPKE encryption is deterministic (RFC 9180 5.1).

    This can be avoided by either: having the sender generate an ephemeral keypair (include the public key envelope), or using a unique HPKE info per envelope. The former is better as it gives imperfect forward secrecy (sender identity key compromise does not reveal past plaintexts), the latter is cheaper to do.

    @greyarea

    having the sender generate an ephemeral keypair (include the public key envelope)

    So the recipient will need to encrypt to this ephemeral key when replying?

  • @greyarea

    having the sender generate an ephemeral keypair (include the public key envelope)

    So the recipient will need to encrypt to this ephemeral key when replying?

    @silverpill

    No, the recipient would also generates an ephemeral key, and uses that when replying.

    So it's always a one shot ephemeral (sender)/static (recipient) HPKE exchange, with sender authenticity guaranteed by the signature. Could also use the shared secret from the original post but force a different IV, but "replies are just the sender and receiver being flipped, code path is the same" is easier.

  • @silverpill

    No, the recipient would also generates an ephemeral key, and uses that when replying.

    So it's always a one shot ephemeral (sender)/static (recipient) HPKE exchange, with sender authenticity guaranteed by the signature. Could also use the shared secret from the original post but force a different IV, but "replies are just the sender and receiver being flipped, code path is the same" is easier.

    @greyarea I assume this is "Authentication Using an Asymmetric Key" (https://www.rfc-editor.org/rfc/rfc9180.html#name-authentication-using-an-asy)?

    Because in "Encryption to a Public Key" mode, sender's key is not used.

    If I understand the idea correctly, the ephemeral key would need to be added to fep0806:cipherData. That is, instead of encap_key | ciphertext it will be ephemeral_key_pub | encap_key | ciphertext.

  • @greyarea I assume this is "Authentication Using an Asymmetric Key" (https://www.rfc-editor.org/rfc/rfc9180.html#name-authentication-using-an-asy)?

    Because in "Encryption to a Public Key" mode, sender's key is not used.

    If I understand the idea correctly, the ephemeral key would need to be added to fep0806:cipherData. That is, instead of encap_key | ciphertext it will be ephemeral_key_pub | encap_key | ciphertext.

    @silverpill

    If the signature in proof covers fep0806:cipherData, you can do ephemeral_key_pub | ciphertext. and use Encryption to a Public Key.

  • @silverpill

    If the signature in proof covers fep0806:cipherData, you can do ephemeral_key_pub | ciphertext. and use Encryption to a Public Key.

    @greyarea Yes, proof covers all properties of the activity. But I can't omit encap_key, it is required by SetupBaseR function defined in section 5.1.1

    I've read a bit more about DHKEM and now I am even more confused. Isn't encap_key an ephemeral key? The library I am using describes it as such:

    https://docs.rs/hpke/latest/hpke/trait.Kem.html#tymethod.encap_with_rng

    Derives a shared secret and an ephemeral pubkey that the owner of the reciepint’s pubkey can use to derive the same shared secret.

    This "ephemeral pubkey" is what I labeled as encap_key. It is later included in fep0806:cipherData

    -----

    I think it's okay to have no forward secrecy, the goal of this FEP is to describe a simple encryption mechanism that anyone can implement. I'll just warn readers about its weakness.

  • @greyarea Yes, proof covers all properties of the activity. But I can't omit encap_key, it is required by SetupBaseR function defined in section 5.1.1

    I've read a bit more about DHKEM and now I am even more confused. Isn't encap_key an ephemeral key? The library I am using describes it as such:

    https://docs.rs/hpke/latest/hpke/trait.Kem.html#tymethod.encap_with_rng

    Derives a shared secret and an ephemeral pubkey that the owner of the reciepint’s pubkey can use to derive the same shared secret.

    This "ephemeral pubkey" is what I labeled as encap_key. It is later included in fep0806:cipherData

    -----

    I think it's okay to have no forward secrecy, the goal of this FEP is to describe a simple encryption mechanism that anyone can implement. I'll just warn readers about its weakness.

    @silverpill

    Ah , mea culpa, you're right. 5.1.1 avoids the nonce reuse issue and provides imperfect forward secrecy. I've been fighting u-boot on "new" exotic target the last day so my thinking isn't as sharp as it should be.

    Replies should go through the same process (avoids sender having to store the shared secret, less state is more better in this case).

  • @silverpill

    Ah , mea culpa, you're right. 5.1.1 avoids the nonce reuse issue and provides imperfect forward secrecy. I've been fighting u-boot on "new" exotic target the last day so my thinking isn't as sharp as it should be.

    Replies should go through the same process (avoids sender having to store the shared secret, less state is more better in this case).

    @silverpill

    Think 5.1.3 (AuthEncap) is better since it still uses an ephemeral key, but does an extra DH to authenticate the sender. 5.1.1 (Encap) is simpler, but unless the aad contains at least the sender's identity, there is nothing preventing someone from extracting a ciphertext, and re-signing it (forging the origin).

    Having a trivial amount of AAD is computationally cheaper than doing the extra DH, but the extra DH would be sub 100 usec, so this is "pick something to taste".

    ps: Spent the day chasing LLVM bugs, errors in this would be all mine.

  • @silverpill

    Think 5.1.3 (AuthEncap) is better since it still uses an ephemeral key, but does an extra DH to authenticate the sender. 5.1.1 (Encap) is simpler, but unless the aad contains at least the sender's identity, there is nothing preventing someone from extracting a ciphertext, and re-signing it (forging the origin).

    Having a trivial amount of AAD is computationally cheaper than doing the extra DH, but the extra DH would be sub 100 usec, so this is "pick something to taste".

    ps: Spent the day chasing LLVM bugs, errors in this would be all mine.

    @greyarea Alright, I implemented the auth mode. It's not difficult, but it requires the actor of outer activity to be the same as the actor of inner (plaintext) activity. With base mode (5.1.1), the actor of outer activity could be different, which means we can hide the real sender.

    Do you think it's worth doing this?

    I think authentication of the sender at the HPKE level shouldn't be necessary because the inner activity is self-authenticating (includes integrity proof).

  • @greyarea Alright, I implemented the auth mode. It's not difficult, but it requires the actor of outer activity to be the same as the actor of inner (plaintext) activity. With base mode (5.1.1), the actor of outer activity could be different, which means we can hide the real sender.

    Do you think it's worth doing this?

    I think authentication of the sender at the HPKE level shouldn't be necessary because the inner activity is self-authenticating (includes integrity proof).

    @silverpill

    Do you think it's worth doing this?

    Identity hiding is a useful property (especially in the current environment), and simpler is better. Especially if the inner activity is self-authenticating.

    ps: I should look more into the fediverse protocol, but from what I remember from peeking at it a long time ago it was a giant mess of w3c specs.

  • @silverpill

    Do you think it's worth doing this?

    Identity hiding is a useful property (especially in the current environment), and simpler is better. Especially if the inner activity is self-authenticating.

    ps: I should look more into the fediverse protocol, but from what I remember from peeking at it a long time ago it was a giant mess of w3c specs.

    @greyarea

    I can think of two scenarios where HPKE-level sender authentication or aad binding might be important:

    1. The sender creates an activity that is attributed to somebody else, encrypts it, and sends to the recipient. This shouldn't be a problem, because the inner activity MUST be portable, and therefore required to have an integrity proof. A compliant recipient can't be fooled into thinking that misattributed activity is real.
    2. Somebody (e.g. server operator) takes the fep0806:cipherText out of EncryptedActivity, and creates a new activity with the same fep0806:cipherText but different id, actor and/or to. This shouldn't be a problem either. In the worst case, the activity will be delivered to somebody else who will not be able to decrypt it. Replacing id and actor may be even a good thing (obfuscation).

    it was a giant mess of w3c specs.

    It's an ever-expanding mess of W3C specs, RFCs and FEPs.

    Integrity proofs are relatively new, they are described in Data Integrity W3C spec: https://www.w3.org/TR/vc-data-integrity/

  • 0 Votazioni
    36 Post
    1 Visualizzazioni
    jdp23@neuromatch.socialJ
    Unfortunately, most laws are either worded so vaguely that it's up to the regulator's discreation (the Online Services Act in the UK for example) or explicitly apply to sites of all sizes and maybe have some handwaving language along the lines of requiring networks to deploy age verification methods that are "commercially reasonable".It's certainly not a good situation, and anxiety is very warranted, but I don't think we're necessarily doomed. In the short term, VPNs are a thing and can buy us some time (although as we're seeing in the UK, age-limiting VPNs is the next step). What I do think is that we have to mobilize to fight these kinds of bad internet bills more effectively. Here's a thread with some initial thoughts and a request for other suggestions - https://neuromatch.social/@jdp23/116967043175194824@joergi @_elena
  • 0 Votazioni
    13 Post
    2 Visualizzazioni
    T
    @pfefferle @django fyi, this is probably an issue worth you both knowing about for wordpress activitypub.
  • 1 Votazioni
    1 Post
    7 Visualizzazioni
    Nessuno ha risposto
  • 0 Votazioni
    5 Post
    10 Visualizzazioni
    julian@activitypub.spaceJ
    @evan@cosocial.ca trick question it can be both, as I discovered
  • is https://ghost.org on #ActivityPub yet?

    Mondo activitypub ghost
    4
    2
    0 Votazioni
    4 Post
    0 Visualizzazioni
    julian@activitypub.spaceJ
    @bengo@mastodon.social yeah, I think Ghost hasn't quite figured out that making your URLs loadable via AP is table stakes for full fediverse integration.
  • 0 Votazioni
    5 Post
    0 Visualizzazioni
    sindum@mstdn.dkS
    @django Made from scratch with good help from Claude Code
  • 0 Votazioni
    1 Post
    19 Visualizzazioni
    Nessuno ha risposto
  • 1 Votazioni
    3 Post
    142 Visualizzazioni
    macfrancM
    @team@blog.purewebhosting.nz @gwilymgj@mastodon.social Standardising Public Information Publishing I think you should discuss this with the @swf@socialwebfoundation.org group. The issue of standardization is one of the most delicate in the relationship between the fediverse and the mastosphere, and will likely be resolved in different ways based on the so-called "doocracy." It will be important for it to adhere as closely as possible to W3C standards and be conceived in simple terms. Some platforms like Friendica have already solved the formatting of georeferencing and event data. (cc @heluecht@pirati.ca is right?) Should an entity run it’s own presence much like they run their own website or email? It depends a lot on the type of organization. A nonprofit organization could simply choose to be hosted by a federated social network in its own country. A public institution could do the same, but first consider opening a proprietary instance, since, depending on the institution's importance, the traffic flow could become problematic. A private company, on the other hand, has the obligation to create its own instance. If I were to manage an organization's faith migration, I would make these assessments by evaluating the TOSs of the instances in my country and, if I found one suitable, I would agree on my inclusion in advance with the instance administrators. I also remember that careful management of a federated WordPress or Ghost server is already an interesting solution, just as a federated NodeBB forum allows you to wonderfully control the moderation of your audience of interested users. Possible disadvantages Here we must be realistic: using commercial social media for your organization's communication is NEVER perceived as a problem! It will be difficult to obtain the exact costs of managing a social media account, and the employees (or vendors) who manage an organization's social media account are resistant to change. My advice is to find out in advance whether the organization already uses automated publishing systems, whether these systems include at least the Mastodon API, and whether these systems include engagement measurement systems; If they don't use automatic publishing, you can find a system that helps them manage everything more easily. I may be unpopular, but an organization shouldn't be forced to do without commercial social media! Any organization's social media strategy should have three ethical obligations: Maintain a presence on the most popular commercial social media platforms that are consistent with its audience, to ensure maximum reach. Maintain a presence on an open-source social network that allows users to follow the organization and interact with it without being tracked, profiled, or having their data transferred to problematic countries, because this is a guarantee for its customers/users. Prioritize communication on the open social network, publishing content on the federated account earlier and more carefully, and possibly attempting to move communication to the federated account.

Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy

Il server utilizzato è quello di Webdock, in Danimarca. Se volete provarlo potete ottenere il 20% di sconto con questo link e noi riceveremo un aiuto sotto forma di credito da usare proprio per mantenere Citiverse.