Recommended Posts

So I'm just trying to educate myself and can't seem to find an answer online.  I have my wife's public PGP key imported onto my laptop, but not her private key.  If I encrypt a file with her public key, in theory, nobody should be able to decrypt it except the person with her private key, so her, however, I am able to decrypt the file even if I delete the original unencrypted copy of the file.  How is this working?  I'm using the built-in seahorse encryption tools in Debian Linux.

Link to comment
https://www.neowin.net/forum/topic/1409550-asymmetric-encryption-question/
Share on other sites

39 minutes ago, BudMan said:

Normally when you encrypt something  to someones public key, you also encrypt it with your own public key - so you can decrypt it, since you have your private key.

I set up a clean VM and imported only one secret key and was able to decrypt a file that I encrypted with the other person's public key, so that makes sense.  It also explains why our PGP encrypted chat app lets me see all the messages I sent regardless of what device I sent it from.  Interesting how a file can basically be encrypted twice with two different keys and not affect the file size in any meaningful way though.image.png.511753f9fd455cc586b5499db68732b0.png

Well the file is not really encrypted multiple times.. What happens is the session key used to actually encrypt the data which would be symmetric, and and included in the message is encrypted with the recipients public key.. So they can decrypt the symmetric key and use that to decrypt the actual data you wanted to encrypt.

 

This is included in the header of the file..

 

But yeah it is really interesting/cool! ;)

On 11/07/2021 at 08:13, BudMan said:

Well the file is not really encrypted multiple times.. What happens is the session key used to actually encrypt the data which would be symmetric, and and included in the message is encrypted with the recipients public key.. So they can decrypt the symmetric key and use that to decrypt the actual data you wanted to encrypt.

 

This is included in the header of the file..

 

But yeah it is really interesting/cool! ;)

This prompted me to go do some reading and I didn't know that's how PGP worked.  I was under the impression that when you encrypted a file or something, it was actually encrypting the entire message with the public keys, so encrypting to multiple recipients would mean encrypting the file multiple times with different keys.  Doing things the way you described makes a lot more sense because symmetric encryption is faster, and this provides a method for sharing the symmetric key in a secure manner, kinda like how https/tls works when browsing the web.  I'm curious what actual encryption algorithm and strength is used then because you could have a really strong PGP key, but if the randomized symmetric key algorithm is weak, then an attacker wouldn't have to break RSA or Elgamal or whatever, they would just have to break the weaker symmetric algorithm that was used to encrypt the actual message.

5 hours ago, Good Bot, Bad Bot said:

Are you really using PGP to communicate with your wife? Why not just use Signal?

We do, it's our default fallback and where we have all our friends and family, but we also like experimenting with other options and found a very nice Android XMPP app called Conversations that supports either OMEMO or PGP encryption, so I decided to try out the PGP functionality. One of the down sides to Signal is that it's tied to a phone number, so my kids couldn't use it without me having to actually get them their own phone numbers. Having an independent registration method like Session Private Messenger or an XMPP server is kinda nice.

6 hours ago, Gerowen said:

We do, it's our default fallback and where we have all our friends and family, but we also like experimenting with other options and found a very nice Android XMPP app called Conversations that supports either OMEMO or PGP encryption, so I decided to try out the PGP functionality. One of the down sides to Signal is that it's tied to a phone number, so my kids couldn't use it without me having to actually get them their own phone numbers. Having an independent registration method like Session Private Messenger or an XMPP server is kinda nice.

it seems like a lot of work to keep "Buy some milk on the way home" secret unless you and the wife work for an alphabet agency or something.  I use SMS with my wife LOL but can't use iMessage and won't use WhatsApp. I do use Signal for certain communications with some contacts. Phone numbers are free and easy to get.

1 hour ago, Good Bot, Bad Bot said:

it seems like a lot of work to keep "Buy some milk on the way home" secret unless you and the wife work for an alphabet agency or something.  I use SMS with my wife LOL but can't use iMessage and won't use WhatsApp. I do use Signal for certain communications with some contacts. Phone numbers are free and easy to get.

I'm just a firm believer in encryption/security by default. Too many companies and agencies see it as their right to collect and monetize as much as possible, so we both deleted our Facebook accounts and told people if they want to get in touch with us to use Signal. There's nothing we talk about that's that interesting, but for us it's a matter of principal. If I call her while she's away on the weekend visiting her family and we decide to talk politics, I don't want somebody keeping recordings of our conversations and trying to either monetize it or use it against us at some point in the future. In a world where people like the NSA have stated their goal is to store all communications indefinitely and people are more politically divided than ever, it's more important than perhaps it has ever been to establish a secure enclave for your family to communicate without snooping and manipulation by third parties, no matter how innocent you might think your conversations are.

12 minutes ago, Gerowen said:

I'm just a firm believer in encryption/security by default. Too many companies and agencies see it as their right to collect and monetize as much as possible, so we both deleted our Facebook accounts and told people if they want to get in touch with us to use Signal. There's nothing we talk about that's that interesting, but for us it's a matter of principal. If I call her while she's away on the weekend visiting her family and we decide to talk politics, I don't want somebody keeping recordings of our conversations and trying to either monetize it or use it against us at some point in the future. In a world where people like the NSA have stated their goal is to store all communications indefinitely and people are more politically divided than ever, it's more important than perhaps it has ever been to establish a secure enclave for your family to communicate without snooping and manipulation by third parties, no matter how innocent you might think your conversations are.

I agree. Though I didn't get anybody on signal, but I did get my mom, dad, friend, sister and neice and nephew over to telegram from Facebook messenger.

 

It started when I drew my parents a picture of this and sent it to them on facebook messenger. 

 

image.png.223b24f7cb9277944cc2c4826a77e239.png

 

Then about an hour later I was seeing ads for this on Facebook

 

53152900_2336259906404558_4436535216282009600_n.thumb.jpg.486fa82772f9e0d67bf8b226de18a447.jpg

20 minutes ago, Gerowen said:

I'm just a firm believer in encryption/security by default. Too many companies and agencies see it as their right to collect and monetize as much as possible, so we both deleted our Facebook accounts and told people if they want to get in touch with us to use Signal. There's nothing we talk about that's that interesting, but for us it's a matter of principal. If I call her while she's away on the weekend visiting her family and we decide to talk politics, I don't want somebody keeping recordings of our conversations and trying to either monetize it or use it against us at some point in the future. In a world where people like the NSA have stated their goal is to store all communications indefinitely and people are more politically divided than ever, it's more important than perhaps it has ever been to establish a secure enclave for your family to communicate without snooping and manipulation by third parties, no matter how innocent you might think your conversations are.

I agree in a perfect world all communication would be E2EE and I could chat with anyone will any client but that is not possible. Principle is great and all but I need to communicate with others. Telling everyone it's Signal or nothing is not a real solution. Yes, no Facebook and more sensitive communication is via E2EE but I do compromise on regular everyday communication. The NSA can store those messages forever if they like. LOL What's next? We have cameras everyone so will we need to whisper to people we are talking to in public while covering our mouths as to not have our lip movements recorded?

30 minutes ago, Good Bot, Bad Bot said:

I agree in a perfect world all communication would be E2EE and I could chat with anyone will any client but that is not possible. Principle is great and all but I need to communicate with others. Telling everyone it's Signal or nothing is not a real solution. Yes, no Facebook and more sensitive communication is via E2EE but I do compromise on regular everyday communication. The NSA can store those messages forever if they like. LOL What's next? We have cameras everyone so will we need to whisper to people we are talking to in public while covering our mouths as to not have our lip movements recorded?

I made a Facebook post 30 days before deleting my account explaining my decision and gave people ways to contact me, then posted again about 2 weeks out. I figured anybody who values talking to me will respect my choices and if they don't, they obviously didn't value me enough to be slightly inconvenienced. I've even got the people at work to start using Signal to talk to me. It took about 6 months of them trying and failing to get me back on Facebook before they finally caved because they couldn't send large files or images over SMS. I don't personally think it should be so taboo to want privacy in your day to day personal communications. I do compromise and agree to use SMS occasionally for people that I don't talk to often, but if I talk to somebody on a regular basis and especially if they're a family member that wants pictures of my kids or something, I insist that they use Signal or some other E2EE means of communication and right now Signal is the easiest to get people on board with. I can't protect everything, but that doesn't mean I shouldn't make a reasonable effort to do what I can to protect myself and my family from unlawful spying that we know is taking place at the hands of corrupt, power hungry government officials, identity thieves, etc.

I haven't been big into pgp for years and years..  But my understanding the symmetrical key normally stronger.  Keep in mind the weakest link in the chain is what to worry about.. Be it the public asymmetrical or the session key (symmetrical).. But even if they break the session key used.  That would be different for every single message, so at best if they did break the session they would just have access to that message.  Since every time you encrypt something the session key would be different.

 

And your correct is somewhat like https/tls - where a secure method is used to exchange the key to be used for that session. 

  • 3 weeks later...
On 13/07/2021 at 09:29, warwagon said:

I agree. Though I didn't get anybody on signal, but I did get my mom, dad, friend, sister and neice and nephew over to telegram from Facebook messenger.

 

It started when I drew my parents a picture of this and sent it to them on facebook messenger. 

 

snipped

 

Then about an hour later I was seeing ads for this on Facebook

 

snipped

That's creepy as hell.  My wife and I deleted our Facebook accounts a few years ago.  It was a lot of things really; being sold as a product to advertising companies, intentionally spying on users, storing passwords in plain text, allowing third parties access to user information without their informed consent.  My wife actually deleted hers first.  I gave everybody a 30 day heads up, made a couple of posts explaining our decision, made a backup of my profile data and then deleted my account.  It's still kinda weird because I'll occasionally talk to somebody who wants to message me on Facebook or something and I have to explain to them that I don't have an account and refuse to make a new one even just for messenger when there are better options available.  I finally got all the guys at work on Signal because I just straight up refused to install Facebook Messenger.  My brother and I experimented with "Session" for a while because it's not tied to your phone number, so it's a bit more portable, but I haven't really made any real attempts to move people anywhere else except for our inter-family conversations my wife and I bounce between Signal and "Conversations.im" with our personal PGP keys.  We have actually noticed that even though it's based around the same protocols, the audio calls on conversations are more reliable than on Signal.  On Signal sometimes if she's out of the service area Signal will still report that a phone is ringing, when in fact it's not.  With conversations.im it "discovers devices" first and if it can't ping her phone, it tells me as much instead of letting me sit there listening to a ring tone as if her phone is ringing when it's not.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Posts

    • UK funds £60M AI labs to challenge US tech dominance with open-source models by Paul Hill The UK government has awarded £60 million to Oxford University and University College London to help keep the country in the AI race by focusing on open-source, low-hardware alternatives. This is in stark contrast to the expensive, closed-source, and high-hardware-requirement models being created in the United States and elsewhere. The money will be shared among two new academic research labs over six years to help them redesign the fundamental mathematics and architectures of AI to help the UK reduce its reliance on a handful of US tech firms. Commenting on the development, AI Minister Kanishka Narayan said: Initially, the government planned to fund just one lab with a £40 million investment, but with this update, two labs will now get access to a larger pool of funds. The labs are expected to invest in the top AI researchers at every career stage, with £2 million per lab being set aside for hiring at least ten doctoral students. The government hopes that this will grow the UK’s talent in the field of AI. The labs are also expected to work closely with the leaders in British AI research, such as the Alan Turing Institute and UKRI’s AI research hubs. This will allow the various teams to collaborate and create new solutions faster than they could alone. This development is pretty interesting for a number of reasons, chiefly that it could create a long-term challenge for US tech firms if these labs successfully scale these open-source architectures that bypass the proprietary ecosystems. It could also give British businesses and public sector organizations access to AI features without paying high licensing fees to foreign providers or needing to invest in specialized server infrastructure.
    • If I were them, I'm gonna hold out until the prices of these semiconductor parts normalize. $1,049 for a ~5 year old hardware is DoA, more so for gamers. On a deeper note, if Steam Machine is priced like this, we are soo effed up for the next gen Xbox console and PS6. With great AAA titles releasing at the end of the year, this just creates more demand...and more tears for me. Lol.
    • I suspect one reason its hard to justify subsidising is that it's not a locked down device like a traditional console is. In this climate sadly if it was a "good deal" you'd get people hoarding them for anything but gaming. The Lenovo Legion Go 2 with the Ryzen Z2 Extreme is £1300 here ($1720) for some context on how other SteamOS like devices are now priced. I got the older Z1 Extreme model for £300 with a dock, just shows how insane prices have got recently.
    • If you have an account with any of Meta's services, you technically have an account with all of their services. You may not use it, but it exists.
  • Recent Achievements

    • One Month Later
      nates earned a badge
      One Month Later
    • Week One Done
      Almohandis earned a badge
      Week One Done
    • Rookie
      dorf went up a rank
      Rookie
    • First Post
      mike_rumble earned a badge
      First Post
    • Dedicated
      tuben earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      469
    2. 2
      +Edouard
      185
    3. 3
      PsYcHoKiLLa
      93
    4. 4
      Michael Scrip
      87
    5. 5
      neufuse
      67
  • Tell a friend

    Love Neowin? Tell a friend!