You are only browsing one thread in the discussion! All comments are available on the post page.

Return

Crul , (edited )

EDIT: changed encryption / decryption to signing / veryfing. Thanks for the corrections

Not an expert, those who know more please correct me.

From what I understand, what they post is not a PGP key, but the same content published in clear text signed with their private key. That way anyone can verify it with the author’s public key to check it has been generated with the private one (that only one person should have).

dohpaz42 ,
@dohpaz42@lemmy.world avatar

You’ve got it backward. You encrypt with the public key, and decrypt with the private key. Otherwise, you’re spot on.

Crul ,

Isn’t that for when you want to send a message to someone so only the recipient can read it?

If I understand correctly, OP is asking about signatures to prove the posted content comes from a specific source.

Anyway, thanks for the review!

dohpaz42 ,
@dohpaz42@lemmy.world avatar

In a digital signature system, a sender can use a private key together with a message to create a signature. Anyone with the corresponding public key can verify whether the signature matches the message, but a forger who does not know the private key cannot find any message/signature pair that will pass verification with the public key

en.m.wikipedia.org/wiki/Public-key_cryptography

Crul ,

Sorry, but I still think I’m saying the same thing as in that paragraph:

[from your link] a sender can use a private key together with a message to create a signature

  • [from my post] the same content published in clear text encrypted with the[ir] private key

[from your link] Anyone with the corresponding public key can verify

  • [from my post] anyone can decrypt it with the author’s public key
dohpaz42 ,
@dohpaz42@lemmy.world avatar

You’re not though. You said encryption occurs with the public key and decryption occurs with the private. That’s the opposite of what happens and what the quoted text says.

From the same source:

In a public-key encryption system, anyone with a public key can encrypt a message, yielding a ciphertext, but only those who know the corresponding private key can decrypt

Crul ,

You said encryption occurs with the public key and decryption occurs with the private

I’m sad that I edited some typos on my original message because now you will probably think I changed it. But I said the opposite.

Anyway, there is probably some missunderstanding here and I don’t think this conversation is useful.

Thanks for the feedback.

dohpaz42 ,
@dohpaz42@lemmy.world avatar

Funny story: you didn’t change the wrong info. The sad part is that you’re spreading misinformation and unwilling to hear otherwise. This is more dangerous than helpful.

Crul ,

Sorry, I’m very confused. Both of us seem very confident in our positions, so clearly one of use is c/confidentlyincorrect…

I will wait until a third party helps us identify who is wrong and I will be very happy to correct any mistake if that’s the case.

uberrice ,

How is Crul wrong in anything other than the terminology? You sign a document with your private key - generating basically a hash of the document entangled with your key information. Anyone holding the public key can then verify that hash with the public key - that the document contents are intact and unchanged (from the hash), and generated by the person holding the private key (entangled key information)

Crul ,

Thanks for mediating!

What I’m getting from this dicussion is that, when signing, the operations are not encryption and decryption, but … hashing and hash-veryfing?

TauZero ,

To help you with the terminology, the names for the two operations are “signing” and “verifying”. That’s it.

What can you do with…

public keyprivate keyEncryption:encryptdecryptSignature:verifysign“Signing” is not at all the same as “encrypting” with the keys swapped. It is a separate specific sequence of mathematical operations you perform to combine two numbers (the private key and the message) to produce a third - the signature. Signing is not called “hashing”. A hash may be involved as part of the signature process, but it is not strictly necessary. It makes the “message” number smaller, but the algorithm can sign the full message without hashing it first, will just require computation for longer time. “Hash-verifying” isn’t a thing in this context, you made that name up, just use “verify”.

@dohpaz42 is mad because you messed up your terminology originally, and thought you were trying to say that you “encrypt” a message with the private key, which is totally backwards and wrong. He didn’t know that in your mind you thought you were talking about “signing” the message. Because honestly no one could have known that.

Crul ,

Thanks! re-corrected again.

TauZero ,

👍

sotolf ,
@sotolf@programming.dev avatar

Look at the words you used, encryption is not the same as a signature, with a signature you can prove that a person with access to the private key wrote the message.

What you’re talking about in your message is encryption, and you have it the wrong way around, messages gets encrypted with the public key, and can only be read with the private key.

Crul ,

We may be getting somewhere…

what they post is not a PGP key, but the same content published in clear text encrypted with their private key.

So they are not excrypting it, but do we agree that with signatures the author uses their private key + the clear message to generate “something”?

That way anyone can decrypt it with the author’s public key to check it has been encrypted with the private one (that only one person should have).

… so then anyone can use the author’s public key to check that “something” against the clear mesage to confirm the author’s identity?

If that’s the case, then my error is that the operation to generate the signature is not an encryption. So, may I ask… what is it? A special type of hash?

Thanks again. I will edit my original comment with the corrections once I understand it correctly.

sotolf ,
@sotolf@programming.dev avatar

So they are not excrypting it, but do we agree that with signatures the author uses their private key + the clear message to generate “something”?

Yeah sure, and I think the person you are arguing with is saying as much as well, it’s just that this is not encrypting it, when you encrypt something you obfuscate it in a way that is possible to deobfuscate, think the caesar cipher as a simple encryption, a hash/signature on the other hand is something that is generated from the clear text using your private key, which is not possible to decrypt, think very simplified that the person would just put the amount of each letter of the alphabet used in in the text, then add the length of the thread, and then multiplied by your private key. This way it’s proven that the holder of the private key is the person writing the text, and that the text hasn’t changed since the signature was generated.

… so then anyone can use the author’s public key to check that “something” against the clear mesage to confirm the author’s identity?

They can confirm that the person holding the private key (not identity, just that they have the key) and also that nobody changed it since they signed it (like the person adminning the forum or a moderator or something)

If that’s the case, then my error is that the operation to generate the signature is not an encryption. So, may I ask… what is it? A special type of hash?

It’s basically a hashing function yeah.

Crul ,

Thanks, now it’s clear.

I corrected my original comment.

4am ,
@4am@lemmy.world avatar

For signing, it’s backwards - you encrypt with the private key, and then everyone else can decrypt with the public key. If that doesn’t work, they know that the message wasn’t signed by the private key paired with the public key they have, and therefore is invalid and is not to be trusted.

Signing proves authenticity (only the private key holder can sign), encryption provides privacy (only the private key holder can read)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • All magazines