avatar
Kuba Suder πŸ‡΅πŸ‡±πŸ‡ΊπŸ‡¦ @mackuba.eu

It's a good sign when you put something like this in cryptography code, right ??

def pkey_for_user(did) # I have no idea what this does, but it seems to be working (shrug emoticon)
sep 1, 2025, 9:08 pm β€’ 37 1

Replies

avatar
Kye Fox @kyefox.com

Looks like it matches a public SSH key to a did

sep 1, 2025, 10:16 pm β€’ 0 0 β€’ view
avatar
Kuba Suder πŸ‡΅πŸ‡±πŸ‡ΊπŸ‡¦ @mackuba.eu

Gets an encoded public key from user's DID doc and wraps it in some OpenSSL nonsense so it can be fed to the `jwt` gem which verifies the token. The OpenSSL part is what I have no idea why it is this way, because it's much more than just OpenSSL::Key.new(file)…

sep 1, 2025, 10:24 pm β€’ 1 0 β€’ view
avatar
Natanael, Tech janitor @natanael.bsky.social

OpenSSL is infamous for being complicated to use. It's not meant to be maneuvered by people who aren't experts.

sep 1, 2025, 10:58 pm β€’ 2 0 β€’ view
avatar
Kevin Riggle @kevinriggle.bsky.social

I just added this comment to my current project # Emerson! (β€œA foolish consistency is the hobgoblin of small minds.”

sep 1, 2025, 11:09 pm β€’ 0 0 β€’ view
avatar
Autocorrect Band Names @starfisher.bsky.social

I remember back in the day working with some shared secret crypto code from MIT that was sprinkled with /*XXX*/ which apparently meant β€œfix this later”

sep 1, 2025, 11:03 pm β€’ 4 0 β€’ view
avatar
Sergio @sergio.bsky.col.social

sep 1, 2025, 9:27 pm β€’ 1 0 β€’ view