The post this replies to couldn't be fetched from mastodon.social.
Open the original postReplying to a post on 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.
Replying to @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.
Replying to @grishka@mastodon.social
@silverpill @mariusor OpenSSL ain't having any of it either
Replying to @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.
Replying to @grishka@mastodon.social
@silverpill @mariusor at last, I did it




