• 0

Asymmetric Encryption Question


 Share

Question

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
Share on other sites

13 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0

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! ;)

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
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?

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0

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. 

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Usama Jawad96
      Chrome 93 is landing today, removes 3DES encryption support in TLS, adds WebOTP on desktop
      by Usama Jawad

      Chrome 92 made its way to the Stable channel back in July, deprecating payment handler configurations and enhancing Progressive Web Apps (PWAs), among many other things. Today, Chrome 93 will be landing for the public. Apart from the features and enhancements that it brings, this Chrome release is also significant because it's the last version in Google's regular release cadence. Starting with Chrome 94 next month, the company will shift to a four-week release cycle.



      Starting with deprecations, Chrome 93 is removing support for the 3DES cipher block chaining (CBC) cipher suite in Transport Layer Security (TLS). Google has cited a number of reasons for this including the fact that newer and better AES-based replacements have been available for the past couple of decades. 3DES is also vulnerable to the Sweet32 attack, and is extremely slow, battery-consuming, and CPU-intensive, especially on mobile platforms. Furthermore, many of its implementations leak the cache and timing side channels. In the same vein, Google is also blocking connections to HTTP, HTTPS, and FTP servers on port 989 and 990. This is because of security reasons and is a mitigation to the ALPACA attack.

      Google is further enhancing Chrome by allowing web apps to identify themselves as note-taking apps when needed, which will also allow for OS-level integrations. The Multi-Screen Window Placement API is being enhanced to cater to productivity use-cases where having Chrome utilized across multiple screens will result in a better experience. Support for the WebOTP API has been initiated for Chrome on desktop too, as it will allow developers to retrieve one-time passwords (OTP) sent via SMS in a specific format and sync them across Chrome on Android and desktop, provided that you are signed in to the same Google account. Given the increasing popularity of SVG images, the Clipboard API now supports this format too. Similarly, with browser vendors now adding playback speed controls in their offerings, Chrome is giving companies a way to enable and disable this control when playing media on their website.

      Apart from all of the above, Google has a ton of developer-facing capabilities present in Chrome 93 too. A CSS property is being added to change the color of form controls, the "style" keyword is being added to the "contain" property again, support for CSS Module Scripts is being added, the AbortSignal.abort() static factory method is being introduced to make the life of developers easier, and the meta element's "media" attribute will now be honored so developers can shift between the theme colors of their website using a media query. In the same vein, the CSS flex box and flex items will obey the keywords for positional alignment put forward in the W3C document here.

      Furthermore, a new boolean property called Object.hasOwn is being introduced which is an easier-to-use implementation of the Object.prototype.hasOwnProperty static method. Chrome 93 will also utilize the ICU LocaleMatcher to implement the BestFitMatcher which is used in JavaScript engine v8 to match locale data. Similarly, the Error() constructor now has an optional parameter called "cause" which will allow errors to be chained without requiring much development effort. Finally, a set of new HTTP Client Hints headers are being offered across the user media preference features, allowing websites to make "smarter" choices regarding the visual properties of the website based on headers.

      Chrome 93 is expected to roll out later today. If it does not update to version 93 automatically for you throughout the course of the day, head over to Help > About Google Chrome to trigger the update once it becomes available. Next up is Chrome 94 which is currently in the Beta channel with a Stable release expected on September 21, which is in three weeks' time. With Chrome 94, Google will be moving to a four-week release cycle for subsequent Chrome releases.

    • By zikalify
      Messenger will now encrypt your voice and video calls
      by Paul Hill



      Facebook has begun the rollout of end-to-end (E2E) encrypted voice and video calls, which it has been testing for a while, on its Messenger service. Messenger already provides E2E encryption on any written messages you send but this latest update will help secure the audio and visual aspect of your communications. Also included in this update are revamped controls for disappearing messages so users have a greater choice over how long they’d like their messages to stick around for.

      To be clear, Facebook doesn’t encrypt your normal messages, instead, you need to tap the ‘i’ in the current chat and press ‘Go to secret conversation’; any messages sent there are encrypted. From today, these secret conversation windows will come with a call option and a video option, you must select these items from a secret conversation to benefit from the E2E encryption.

      Facebook launched secret conversations five years ago but due to COVID-19, it has seen an uptick in the number of audio and video calls being made. For this reason, it decided it would be worthwhile offering these services from the secret conversation window to give users greater privacy and help people gain more trust in the Facebook brand.

      Disappearing messages is another option unique to secret conversations. With today’s update, users will be given greater choice over how long they’d like to have a message stick around; you can now choose to have messages disappear from anywhere between five seconds and 24 hours.

      In coming updates, Facebook will enable end-to-end encrypted group chats and calls in Messenger as well as opt-in end-to-end encryption for Instagram DMs. Some users may see these options before they’re released publicly and could begin showing up in just a matter of weeks.

    • By Usama Jawad96
      Apple reveals more details about its child safety photo scanning technologies
      by Usama Jawad

      Apple has been the target of criticism since it revealed that it will be introducing some child safety features into its ecosystem which would allow scanning of Child Sexual Abuse Material (CSAM). An open letter demanding that Apple halts the deployment of this technology already has thousands of signatories. The firm had internally acknowledged that some people are worried about the new features, but said that this is due to misunderstandings that it will be addressing in due course. Today, it has made good on its promise.



      In a six-page FAQs document that you can view here, Apple has emphasized that its photo scanning technology is split into two distinct use-cases.

      The first has to do with detecting sexually explicit photos sent or received by children 12 years of age or younger via the Messages app. This capability uses on-device machine learning to automatically blur problematic images, inform children that they do not have to view the content, provide them guidance, and inform their parents if they still opt to view such images. In the same scenario, children aged 13-17 will be provided similar guidance but their parents will not be informed. In order for this flow to function, child accounts need to be set up in family settings on iCloud, the feature should be opted in to, and parental notifications need to be enabled for children.

      No other entity including Apple or a law enforcement authority is informed if a child sends or receives sexually explicit images. As such, this does not break any existing privacy assurances or end-to-end encryption. Apple has emphasized that the feature is applicable to Messages only, which means that if a child is being abused, they can still still reach out for help via text or other communication channels.

      The second prong of Apple's child safety approach is about keeping CSAM off iCloud Photos. In this case, hashes of iCloud images will be compared against known CSAM images, and the company will be notified if a match is detected. This feature does not work for private on-device images or if iCloud Photos is disabled.

      The firm has emphasized that it does not download any CSAM images on your device to compare against. Instead, it computes hashes of your images and compares it to known CSAM content to determine a hit. Apple went on to say that:

      The company has revealed other details about its end-to-end process for detecting CSAM images as well. It has stated that its system does not work for anything other than CSAM media, as even the possession of such images is illegal in many countries. That said, authorities are not automatically informed. If there is a match, Apple first conducts a human review before notifying authorities.

      The Cupertino tech giant has bluntly stated that it will not add non-CSAM images to its repository for comparison, even if there is pressure from certain governments. In the same vein, Apple itself does not add hashes on top of known CSAM images, and since these are all stored on an OS-level, this means that specific individuals can't be targeted via misuse of the technology.

      Finally, Apple has boasted that its system is extremely accurate and that the likelihood of a false positive is less than one per trillion images per year. Even in the worst case, there is a human reviewer in place as a safety net who performs a manual review of a flagged account before it is reported to the National Center for Missing and Exploited Children (NCMEC).

    • By Usama Jawad96
      Apple VP on iCloud Photos scanning: We know people have misunderstandings and are worried
      by Usama Jawad



      Apple recently announced that it is introducing new child safety features to its ecosystem, including the ability to scan photos uploaded to iCloud using on-device machine learning and comparing their hashes to known images of child sexual abuse material (CSAM) from the National Center for Missing and Exploited Children's (NCMEC) repository. Another feature may also inform parents if their child - who is below 13 years old - shares or receives sexually explicit content.

      The move has drawn criticism from a lot of tech experts and entities such as the Head of WhatsApp, the Electronic Frontier Foundation (EFF), Edward Snowden, and more, who call it a breach of privacy despite being well-intentioned. Apple is fully aware of the the debate it has created, as can be seen in an internal company memo.

      The document in question was obtained by 9to5Mac and contains words from Apple's Software VP Sebastien Marineau-Mes. An excerpt from the memo reads:

      The attached note from NCMEC congratulates Apple for its efforts and says that "we know that the days to come will be filled with the screeching voices of the minority".

      Overall, it's clear that Apple is aware that it has opened up a somewhat difficult topic since it involves scanning photos of its users, computing hashes, and then comparing them against CSAM databases. While the company claims that it is doing this in a privacy-protective manner using on-device machine learning, many are understandably concerned about the potential for misuse. Marineau-Mes does say that the firm will be explaining the features in more detail "in the next few months", so it will be interesting to see whether it can tackle the concerns that are being raised by the public.

      Source: 9to5Mac

    • By Usama Jawad96
      Zoom agrees to pay $86 million to settle class-action lawsuit
      by Usama Jawad

      While online collaboration and communication platforms have boomed in the past year or so due to the ongoing pandemic, Zoom has been facing an uphill battle In April 2020, a vulnerability in the software allowed attackers to steal Windows credentials, and many companies such as SpaceX, Google, and Standard Chartered banned its use. Although Zoom did fix the issues eventually, the damage had already been done and the company was sued by multiple entities. Now, it has reached a settlement in one such class-action lawsuit in the U.S.

      Image via Zoom The BBC reports that the lawsuit in question claimed that Zoom did not safeguard the privacy of its users and shared their data with firms like Google, Facebook, and LinkedIn. It also took shots at the software's security features, saying that zoombombing was a serious issue and end-to-end encryption doesn't work either. It was filed on behalf of all paid and free subscribers in the U.S.

      While Zoom did not admit to wrongdoing in any of the aforementioned accusations, it still reached a settlement worth $86 million with the plaintiffs. It also agreed to enhance its security features and to provide its staff trainings on best practices when handling sensitive data. Yet another provision is that the subscribers included in the class action should be offered 15% refunds on their subscriptions or $25, whichever is greater. A Zoom representative stated that:

      It is important to note that the settlement has not been approved yet by U.S. District Judge Lucy Koh yet. The lawyers from the plaintiffs' side have also stated that they plan to seek a further $21.3 million from Zoom in lieu of legal fees.