Skip to content
  • 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

NodeBB

  1. Home
  2. General Discussion
  3. 🆕 blog!

🆕 blog!

Scheduled Pinned Locked Moved General Discussion
activitybotactivitypubmastodonphp
57 Posts 32 Posters 121 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.
  • edent@mastodon.socialE edent@mastodon.social

    I'm going to try and keep a record of all the bugs, errors, and inconsistencies I've reported in #ActivityPub and #Mastodon documentation.

    First up, how big are the limits on what you can federate?

    Mastodon lists some limits in KB/MB, but others are just raw numbers. That might make sense for an ASCII world - but emoji complicate everything.

    https://github.com/mastodon/mastodon/issues/40290

    edent@mastodon.socialE
    edent@mastodon.socialE
    edent@mastodon.social
    wrote last edited by
    #48

    Next is slightly more trivial - a broken internal link in the Mastodon documentation.

    https://github.com/mastodon/documentation/issues/1947

    edent@mastodon.socialE 1 Reply Last reply
    0
    • edent@mastodon.socialE edent@mastodon.social

      Next is slightly more trivial - a broken internal link in the Mastodon documentation.

      https://github.com/mastodon/documentation/issues/1947

      edent@mastodon.socialE
      edent@mastodon.socialE
      edent@mastodon.social
      wrote last edited by
      #49

      I think the #RFC9421 HTTP Signature algorithm should be explicitly included in #Mastodon's requests.

      Feedback welcome - especially those explaining politely why I'm a wrong about this.

      https://github.com/mastodon/mastodon/issues/29905#issuecomment-5440336919

      dave@upp2.comD fentiger@zotum.netF 2 Replies Last reply
      0
      • edent@mastodon.socialE edent@mastodon.social

        I think the #RFC9421 HTTP Signature algorithm should be explicitly included in #Mastodon's requests.

        Feedback welcome - especially those explaining politely why I'm a wrong about this.

        https://github.com/mastodon/mastodon/issues/29905#issuecomment-5440336919

        dave@upp2.comD
        dave@upp2.comD
        dave@upp2.com
        wrote last edited by
        #50

        @Edent Currently on vacation so I might misremember, but afair the algorithm is already determined by the key used. So including it would do no harm, but is kind of redundant.

        edent@mastodon.socialE 1 Reply Last reply
        0
        • dave@upp2.comD dave@upp2.com

          @Edent Currently on vacation so I might misremember, but afair the algorithm is already determined by the key used. So including it would do no harm, but is kind of redundant.

          edent@mastodon.socialE
          edent@mastodon.socialE
          edent@mastodon.social
          wrote last edited by
          #51

          @dave I'm not sure I understand.
          The *digest* says what algorithm it uses, but it isn't a given that the same algo will be used for the signature, right?

          I can't find another reference to the algorithm in the public key.

          Very happy to be told I'm missing something obvious 🙂

          dave@upp2.comD 1 Reply Last reply
          0
          • edent@mastodon.socialE edent@mastodon.social

            @dave I'm not sure I understand.
            The *digest* says what algorithm it uses, but it isn't a given that the same algo will be used for the signature, right?

            I can't find another reference to the algorithm in the public key.

            Very happy to be told I'm missing something obvious 🙂

            dave@upp2.comD
            dave@upp2.comD
            dave@upp2.com
            wrote last edited by
            #52

            @Edent RFC9421 only lists a handful of possible algorithms. IIRC if your key is ed25519 only one of them applies, similarly if the key is ecdsa. I think there are two possibilities for RSA keys, but we only support one for legacy reasons and do not plan to encourage future use of RSA so will likely never implement the other. So in practice looking at the key type should be sufficient to determine the algorithm used.

            edent@mastodon.socialE 1 Reply Last reply
            0
            • dave@upp2.comD dave@upp2.com

              @Edent RFC9421 only lists a handful of possible algorithms. IIRC if your key is ed25519 only one of them applies, similarly if the key is ecdsa. I think there are two possibilities for RSA keys, but we only support one for legacy reasons and do not plan to encourage future use of RSA so will likely never implement the other. So in practice looking at the key type should be sufficient to determine the algorithm used.

              edent@mastodon.socialE
              edent@mastodon.socialE
              edent@mastodon.social
              wrote last edited by
              #53

              @dave ah, I think i get it.

              Enjoy your holiday 😄

              1 Reply Last reply
              0
              • edent@mastodon.socialE edent@mastodon.social

                I think the #RFC9421 HTTP Signature algorithm should be explicitly included in #Mastodon's requests.

                Feedback welcome - especially those explaining politely why I'm a wrong about this.

                https://github.com/mastodon/mastodon/issues/29905#issuecomment-5440336919

                fentiger@zotum.netF
                fentiger@zotum.netF
                fentiger@zotum.net
                wrote last edited by
                #54
                @Terence Eden If the verifier chooses which algorithm to use from this header, without double-checking it against the key, there's a chance it'll be vulnerable to an "algorithm confusion attack".

                Here's what that looks like in the case of JWTs; the same problem could happen with RFC9421.

                The safe way to work out which algorithm to use is to dereference the keyid and then choose the algorithm which matches the type of the returned key.
                edent@mastodon.socialE 1 Reply Last reply
                0
                • fentiger@zotum.netF fentiger@zotum.net
                  @Terence Eden If the verifier chooses which algorithm to use from this header, without double-checking it against the key, there's a chance it'll be vulnerable to an "algorithm confusion attack".

                  Here's what that looks like in the case of JWTs; the same problem could happen with RFC9421.

                  The safe way to work out which algorithm to use is to dereference the keyid and then choose the algorithm which matches the type of the returned key.
                  edent@mastodon.socialE
                  edent@mastodon.socialE
                  edent@mastodon.social
                  wrote last edited by
                  #55

                  @fentiger I think that's where I'm getting confused.

                  I'm getting the public key from the Mastodon user - but how do tell what algorithm the key itself uses?

                  fentiger@zotum.netF 1 Reply Last reply
                  0
                  • edent@mastodon.socialE edent@mastodon.social

                    @fentiger I think that's where I'm getting confused.

                    I'm getting the public key from the Mastodon user - but how do tell what algorithm the key itself uses?

                    fentiger@zotum.netF
                    fentiger@zotum.netF
                    fentiger@zotum.net
                    wrote last edited by
                    #56
                    @Terence Eden You should be able to find out from your crypto library after you've decoded the key from PEM.

                    (I don't think anyone uses anything other than RSA in the publicKeyPem field, but I'm not sure it's safe to assume that.)
                    edent@mastodon.socialE 1 Reply Last reply
                    0
                    • fentiger@zotum.netF fentiger@zotum.net
                      @Terence Eden You should be able to find out from your crypto library after you've decoded the key from PEM.

                      (I don't think anyone uses anything other than RSA in the publicKeyPem field, but I'm not sure it's safe to assume that.)
                      edent@mastodon.socialE
                      edent@mastodon.socialE
                      edent@mastodon.social
                      wrote last edited by
                      #57

                      @fentiger
                      If I decode the PEM, all I get is
                      Type: RSA Public Key
                      Key Size: 2048 bits

                      Nothing to say which algorithm it uses.

                      Feel free to tell me what incredibly obvious thing I'm missing 😅

                      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
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups