Score:0

Authenticate people online with simple public / private key scheme or similar

bz flag

How can I ensure that person X on website A is the same person who contacts me? Here is my use case.

On website A I post message asking username X to contact me. Someone send me an email - how do I ensure it is the same person? Website A does not have a private messaging functionality and all posts are public and visible for everyone.

I was thinking about most obvious way to do it when username X posts his public key and then I encrypt code word with it and send him, but it requires knowledge of public/private keys, the keys themselves and the keys are really long usually.

Is there an easier way to authenticate people, maybe some website where you can use short words as public / private key or something like that? There is a lot of webservices where you can generate RSA keys and do all (d)encryption stuff, but as I've said it will not work for me.

Maarten Bodewes avatar
in flag
Stupid idea: let them give you a base 64 encoded 8-16 byte output of a password hash (PBKDF) and then have them include the password in the mail (you could use the user's name as salt)? This is not super-secure, a weak password could be brute forced. Note that a small EC public key only needs to be about 32 bytes. That's not that huge.
Lofter avatar
bz flag
That is actually a great idea my friend, with the only caveat that it is one-time thing, so you can not use same string multiple times, but thanks for that. Instead of base-64 you can actually use SHA or MD5 hash, there are plenty of online encoders for that.
Maarten Bodewes avatar
in flag
SHA-1 and MD5 actually also just output bytes, which are often **shown/encoded/represented as hexadecimals**. Base64 uses 6 bits per character rather than 4 for hex, so it is more compact. A password hash also uses a salt / iteration count (or work factor) to make it harder to perform dictionary attacks. Do not just use a cryptographic hash unless the password is really strong (i.e. computer generated, humans are not good at this).
Lofter avatar
bz flag
So there are online tools to generate hash from text, but where can I do what you described? Do you know any online tool for that?
Score:1
cn flag

Signatures are generally used for authentication of the sender, with such programs as GNU Privacy Guard, which you can download for free (you will need to make a public key and a private key, before you can do any signing/verifying, and so will the sender): e.g. gpg -a --detach-sig myfile.txt and gpg --verify myfile.txt.asc myfile.txt. They also do the work of a hash: If the file is altered, then the verification will fail. They don't verify the filename or the creation date, though (just the contents).

To make a public/private key, either do gpg --full-generate-key or gpg --gen-key.

Encrypted messages in and of themselves don't authenticate the sender, unless the sender signs it. The sender uses the sender's own secret key to sign the message, and the sender uses the recipient's public key to encrypt the message. The recipient uses the sender's public key to verify the signature, and the recipient's private key to decrypt the message.

Without the sender signing, even though no one else can read the message but you, you don't know who sent it to you for sure.

You can enarmor encrypted files to turn them into plain text in order to post them somewhere that doesn't allow for private messaging. It would be kind of weird, but you can do it. You can enarmor the signatures, too, as I did above.

Using online tools to handle all the decryption for you probably isn't a good idea, from a security standpoint. I mean, if you're not the only one who has charge of your own private key, then you're just trusting the online service (and anyone who hacks them) not to abuse it. Even if you still have to enter your keyring passphrase, they could just take the passphrase when you enter it (beause it's their website and they could easily have access to any data you enter on it).

To automate part of the process, you (or some programmer) can write one or more scripts to do it, which call gpg with the right arguments. Then, give others the script(s) to help them.

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.