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. Technical Discussion
  3. I'm adding support for multiple public keys per actor in Smithereen for future-proofing purposes.

I'm adding support for multiple public keys per actor in Smithereen for future-proofing purposes.

Scheduled Pinned Locked Moved Technical Discussion
activitypubmastodev
33 Posts 4 Posters 9 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@mitra.socialS silverpill@mitra.social

    @mariusor @grishka Lol, true. But this is not the only reason for writing FEP-521a.

    publicKey was marked as deprecated upstream and now more fine-grained properties are recommended

    mariusor@metalhead.clubM This user is from outside of this forum
    mariusor@metalhead.clubM This user is from outside of this forum
    mariusor@metalhead.club
    wrote last edited by
    #21

    @silverpill I see... Got a link to that, I should update my stuff...

    @grishka

    mariusor@metalhead.clubM 1 Reply Last reply
    0
    • mariusor@metalhead.clubM mariusor@metalhead.club

      @silverpill I see... Got a link to that, I should update my stuff...

      @grishka

      mariusor@metalhead.clubM This user is from outside of this forum
      mariusor@metalhead.clubM This user is from outside of this forum
      mariusor@metalhead.club
      wrote last edited by
      #22

      @silverpill nevermind, I found it in the FEP.

      @grishka

      1 Reply Last reply
      0
      • silverpill@mitra.socialS silverpill@mitra.social

        @grishka @mariusor My actor has an ed25519 key. Check out FEP-521a - that's what Mastodon is implementing.

        grishka@mastodon.socialG This user is from outside of this forum
        grishka@mastodon.socialG This user is from outside of this forum
        grishka@mastodon.social
        wrote last edited by
        #23

        @silverpill @mariusor ok, so after actually reading the FEP, I see that the encoded representation of each key has a variable-length integer prefix specifying which kind of key it is. And it's also encoded into "base-58-btc" so that... implementers suffer? I don't get it. Why not just use base64, that seems like an unnecessary nuisance

        silverpill@mitra.socialS grishka@mastodon.socialG 2 Replies Last reply
        0
        • grishka@mastodon.socialG grishka@mastodon.social

          @silverpill @mariusor ok, so after actually reading the FEP, I see that the encoded representation of each key has a variable-length integer prefix specifying which kind of key it is. And it's also encoded into "base-58-btc" so that... implementers suffer? I don't get it. Why not just use base64, that seems like an unnecessary nuisance

          silverpill@mitra.socialS This user is from outside of this forum
          silverpill@mitra.socialS This user is from outside of this forum
          silverpill@mitra.social
          wrote last edited by
          #24

          @grishka @mariusor

          Why would anyone suffer from base-58-btc? IMO it's nice.

          base-58-btc is used in eddsa-jcs-2022 cryptosuite, in did:key and in other places. I don't know why, but it makes sense to use the same encoding everywhere.

          IIRC newer specs from Verifiable Credentials group allow both base-58-btc and base-64-url.

          grishka@mastodon.socialG 1 Reply Last reply
          0
          • silverpill@mitra.socialS silverpill@mitra.social

            @grishka @mariusor

            Why would anyone suffer from base-58-btc? IMO it's nice.

            base-58-btc is used in eddsa-jcs-2022 cryptosuite, in did:key and in other places. I don't know why, but it makes sense to use the same encoding everywhere.

            IIRC newer specs from Verifiable Credentials group allow both base-58-btc and base-64-url.

            grishka@mastodon.socialG This user is from outside of this forum
            grishka@mastodon.socialG This user is from outside of this forum
            grishka@mastodon.social
            wrote last edited by
            #25

            @silverpill @mariusor well, because it's not part of the Java standard library so I'll have to implement it myself

            1 Reply Last reply
            0
            • silverpill@mitra.socialS silverpill@mitra.social

              @grishka @mariusor My actor has an ed25519 key. Check out FEP-521a - that's what Mastodon is implementing.

              grishka@mastodon.socialG This user is from outside of this forum
              grishka@mastodon.socialG This user is from outside of this forum
              grishka@mastodon.social
              wrote last edited by
              #26

              @silverpill @mariusor huh, interesting, I tried fetching your actor and it turns out one of the contexts uses a JSON-LD version that's too new for my JLD processor... Also probably the first time ever I'm seeing @ graph used in the wild.

              Not really a problem for me as I was going to put these two contexts into my resources anyway and I could as well edit them.

              grishka@mastodon.socialG 1 Reply Last reply
              0
              • grishka@mastodon.socialG grishka@mastodon.social

                @silverpill @mariusor ok, so after actually reading the FEP, I see that the encoded representation of each key has a variable-length integer prefix specifying which kind of key it is. And it's also encoded into "base-58-btc" so that... implementers suffer? I don't get it. Why not just use base64, that seems like an unnecessary nuisance

                grishka@mastodon.socialG This user is from outside of this forum
                grishka@mastodon.socialG This user is from outside of this forum
                grishka@mastodon.social
                wrote last edited by
                #27

                @silverpill @mariusor so the prefix is always 2, which corresponds to "identity", which is quite useless, it could as well not be there

                grishka@mastodon.socialG 1 Reply Last reply
                0
                • grishka@mastodon.socialG grishka@mastodon.social

                  @silverpill @mariusor so the prefix is always 2, which corresponds to "identity", which is quite useless, it could as well not be there

                  grishka@mastodon.socialG This user is from outside of this forum
                  grishka@mastodon.socialG This user is from outside of this forum
                  grishka@mastodon.social
                  wrote last edited by
                  #28

                  @silverpill @mariusor the example key from the FEP also uses 2 for that... The FEP itself says "Implementers can use cryptographic keys of any type for which a Multicodec prefix is registered.", I'm very confused. There's 0x1205 for RSA public keys and 0xed for ed25519 ones for example.

                  grishka@mastodon.socialG 1 Reply Last reply
                  0
                  • grishka@mastodon.socialG grishka@mastodon.social

                    @silverpill @mariusor huh, interesting, I tried fetching your actor and it turns out one of the contexts uses a JSON-LD version that's too new for my JLD processor... Also probably the first time ever I'm seeing @ graph used in the wild.

                    Not really a problem for me as I was going to put these two contexts into my resources anyway and I could as well edit them.

                    grishka@mastodon.socialG This user is from outside of this forum
                    grishka@mastodon.socialG This user is from outside of this forum
                    grishka@mastodon.social
                    wrote last edited by
                    #29

                    @silverpill @mariusor what is even going on here. It's definitely not base58 decoding since I tried several different decoders and they all gave the same result.

                    1 Reply Last reply
                    0
                    • grishka@mastodon.socialG grishka@mastodon.social

                      @silverpill @mariusor the example key from the FEP also uses 2 for that... The FEP itself says "Implementers can use cryptographic keys of any type for which a Multicodec prefix is registered.", I'm very confused. There's 0x1205 for RSA public keys and 0xed for ed25519 ones for example.

                      grishka@mastodon.socialG This user is from outside of this forum
                      grishka@mastodon.socialG This user is from outside of this forum
                      grishka@mastodon.social
                      wrote last edited by
                      #30

                      @silverpill @mariusor what is even going on here. It's definitely not base58 decoding since I tried several different decoders and they all give the same result.

                      The first key is from the Multikey array, the second one is the regular publicKey after base64 decoding.

                      grishka@mastodon.socialG 1 Reply Last reply
                      0
                      • grishka@mastodon.socialG grishka@mastodon.social

                        @silverpill @mariusor what is even going on here. It's definitely not base58 decoding since I tried several different decoders and they all give the same result.

                        The first key is from the Multikey array, the second one is the regular publicKey after base64 decoding.

                        grishka@mastodon.socialG This user is from outside of this forum
                        grishka@mastodon.socialG This user is from outside of this forum
                        grishka@mastodon.social
                        wrote last edited by
                        #31

                        @silverpill @mariusor OpenSSL ain't having any of it either

                        grishka@mastodon.socialG 1 Reply Last reply
                        0
                        • grishka@mastodon.socialG grishka@mastodon.social

                          @silverpill @mariusor OpenSSL ain't having any of it either

                          grishka@mastodon.socialG This user is from outside of this forum
                          grishka@mastodon.socialG This user is from outside of this forum
                          grishka@mastodon.social
                          wrote last edited by
                          #32

                          @silverpill @mariusor ughhhhhhhh. So that's what the "multibase" thing is.... There's ANOTHER spec (https://www.w3.org/TR/cid/#multibase-0) that says that the first character of the string specifies which encoding it uses because it can be different (but not for this FEP). Amazing format. Very convenient to debug.

                          After that change, it turns out that the RSA key is encoded as "the weird Misskey format" that Java can't parse natively, but I already have the code to handle that at least.

                          grishka@mastodon.socialG 1 Reply Last reply
                          0
                          • grishka@mastodon.socialG grishka@mastodon.social

                            @silverpill @mariusor ughhhhhhhh. So that's what the "multibase" thing is.... There's ANOTHER spec (https://www.w3.org/TR/cid/#multibase-0) that says that the first character of the string specifies which encoding it uses because it can be different (but not for this FEP). Amazing format. Very convenient to debug.

                            After that change, it turns out that the RSA key is encoded as "the weird Misskey format" that Java can't parse natively, but I already have the code to handle that at least.

                            grishka@mastodon.socialG This user is from outside of this forum
                            grishka@mastodon.socialG This user is from outside of this forum
                            grishka@mastodon.social
                            wrote last edited by
                            #33

                            @silverpill @mariusor at last, I did it

                            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