Score:0

Shortest encryption with URL-friendly character set

br flag
mnj

I need a way to encode a set of information in a way that the result would be as short as possible with a requirement of it being usable as part of URL string.

I don't really care that much about security, the encryption is applied mostly for the plain text to not be visible right away. At the same time, just encoding (like base64) is not enough, there needs to be at least minimal security, meaning I don't want someone to take the encoded string and decode it in 5 seconds with some online decoder :) Much more important than security is performance.

I've heard about Format-Preserving Encryption, it seems that it could be a good idea length-wise. However, would it be a good idea to also compress the string before encrypting it?

The text do encrypt/encode would look something like this: 3:dfsafdsfasd-d343dffdsf:20232233:20333421:a2c1,2:QLGHTYUDJD:Tables:23454545

DannyNiu avatar
vu flag
Your requirement sounds similar to [this](https://crypto.stackexchange.com/q/106283/36960), except they're signing/authenticating the URL. Since you said you "don't really care that much about security", I assume you mean you don't care much about the *secrecy*, but authentication may be a primary goal.
mnj avatar
br flag
mnj
Yes, I guess you are right
DannyNiu avatar
vu flag
Would you like to close your question as a duplicate?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.