this post was submitted on 10 Nov 2025
6 points (100.0% liked)
Secure Coms
83 readers
1 users here now
This is a community for enthusiest who love to ponder new ways for Alice to communicate with Bob in a world where global passive adversarys probably record every bit that ever crosses the wire.
Discuss cryptography, secure key exchange, private messangers, radios, encoding, networking tools, authentication mechanisms and anything relevant to coming up for ways to Alice to get a message to Bob.
founded 1 month ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments


In binary mode, why are we base64-encoding the raw JPEG data before encrypting? It ought to be quite a bit more space efficient if no base64-encoding is done before encrypting.
Your right. That isn't doing anything except effectively lowering image quality potential since it's just adding extra data for no reason.
I should update so it's only running base64 after...that's just so it's easily copypastable
I think misconceptions about base64 are surprisingly common. Both the misconception that it adds security (people confusing it with an encryption algorithm) and the misconception that it reduces size (like compression does).
HTTP Basic auth, for instance, uses base64, and I think people see that and think it's for security. I guess it kinda is in that it's a pretty weak mitigation against shoulder surfing. But people see that and think base64 is encryption. I've unironically heard coworkers use the term "base64 encryption", which always makes me wince.
And I've definitely corrected coworkers in the past who thought that base64 would just magically make binary data smaller. It does make binary data smaller than base16 encoding does (while still letting you put binary data in places not meant for binary data -- URLs, for instance). Maybe that's part of where people's misconception about base64 reducing sizes comes from?
Who knows. Who knows.
Edit: Oh! You're the author. I didn't catch that until after I typed up this reply since you aren't the OP for this thread.
I'm definitely in that category of misconception where I would assume adding extra bits of information before encryption may help the strength of the encryption somehow but it really doesn't at all I guess.
Yeah I don't know who the poster is, but the original is posted on the lemmy.ml instance. I think it's a bot maybe attempting to federate non federated content or something? I don't really understand how it ends up on the programming.dev instance.