Four months ago I lost all my data after an iTunes update automatically restored my phone to factory defaults. I lost all the pictures of my newborn.

I understand that when you do a factory reset the decryption key is discarded so the data is unretrievable. There's nothing I can do now. But is there any chance I'll be able to recover the pictures in the future? I have kept the phone in my drawer.

I have created a group with so many moms like me; we all lost photos of our little one due to unexpected factory resets. It's not an isolated issue.

**This question is about iPhone data decryption in the future but not how should I find my lost data with my laptop, backup file, etc. I have tried all methods.

  • 34
    Sorry about that, what you want is the same power as three-word agencies. It is better you inform your group to keep backup of your lovely ones photos.
    – kelalaka
    Commented Jan 4, 2021 at 10:00
  • 19
    I'm sorry that this happened to you. Unfortunately you've learned the hard way that backups are a necessity. There are many, many causes of data loss: hardware failure, software errors, human errors, natural disasters, malicious software... Plan and implement a backup strategy for all your important data on all devices as soon as possible. Otherwise it's a matter of time until this happens again.
    – gronostaj
    Commented Jan 4, 2021 at 12:11
  • 29
    Wait wait wait. iPhones automatically back up photos to iCloud and iPhone updates have been delivered OTA for years (can you even do an update via iTunes anymore)? Even when you did do updates via iTunes I don’t recall it ever doing a factory reset on your phone without manually forcing it.
    – Darren
    Commented Jan 4, 2021 at 15:48
  • 28
    I'm curious that nobody's addressing the premise: an iTunes update resetting the phone to factory settings, really? And simultaneously removing everything from iCloud, really? 🤔 Commented Jan 5, 2021 at 3:52
  • 8
    @AsteroidsWithWings iTunes would not do a reset automatically on an update, but if the update fails it will prompt you with a "You can try restoring a backup, or factory reset" option. And iPhones are not automatically backed up to iCloud. You have limited space there. My backup is on my PC, and backed up to my server.
    – Logarr
    Commented Jan 5, 2021 at 6:25

7 Answers 7


Modern encryption is strong enough that there is no way to retrieve the lost data without the key. Although it's possible that it could be doable in the future in theory, consider that even the cipher 3DES, a trivial modification to a cipher designed nearly half a century ago in the 1970s, cannot be broken in the manner you want, and that was cryptography in its infancy. Modern iPhones use AES which has held up to 20 years of analysis and is showing no signs of meaningfully weakening.

Ciphers are never secure one day and fatally broken the next. There is virtually never a massive breakthrough that renders a cipher useless, as attacks are improved incrementally. If AES ever gets broken badly enough that you would be able to recover the encrypted data without the key, there would have been decades of slow improvements to the attack and we would all have known for years that it's too weak to even consider using. If that were the case now, I'd tell you to wait a few decades and maybe, just maybe, a key recovery attack would be released, but that's not the case.

The data is gone. Plan for keeping backups in the future to avoid a repeat of this issue.

  • 2
    @Vivi You are correct. The ciphers used are strong enough that there is effectively no chance to recover it. There is a lot of research that is constantly going on into breaking strong ciphers like AES and despite all that, it has held up since it was first created.
    – forest
    Commented Jan 4, 2021 at 3:31
  • 7
    @Vivi There's nothing wrong with keeping it in a drawer, but a break of AES to the extent that you would need is incredibly unlikely. AES is designed to be secure enough that one can trust their life with it. Maybe in the 22nd or 23rd century, but certainly not anytime in the foreseeable future.
    – forest
    Commented Jan 4, 2021 at 3:38
  • 50
    I would add a human comment here. No more tech. I believe that keeping the phone in a drawer for decades will just hurt feelings with false hopes. It's bad to lose unique moments. Whoever suffered a data loss knows that. From the psychological/social point of view, it could be better to focus on future moments than past. Maybe recreating some, even for purpose of fun. I was trying to find record of someone who did. Commented Jan 4, 2021 at 11:49
  • 5
    I'd like to add that in the unlikely event AES is broken, it would completely turn the cybersecurity world on its head and cause absolute chaos across the technology field. Most of the strategies we have for ensuring privacy and confidentiality rely on that algorithm, or ones like it. It would be a very bad thing.
    – Seth R
    Commented Jan 4, 2021 at 15:40
  • 7
    @SethR The key is not generated from the short PIN. The key is held in the Trusted Execution Environment and is a randomly generated 128 or 256 bit number (can't recall which). Access to this key (well, more strictly speaking, access to the decryption function which uses the key) is controlled by the PIN. When you do a factory reset the key itself is erased, so even if the OP knew the PIN and the algorithms used to protect the key, she could still not recover the data. The data is gone. Take your phone out of the drawer and use it again.
    – throx
    Commented Jan 4, 2021 at 22:08

Every time I updated my iPhone with iTunes, iTunes automatically made a backup of the iPhone. These backups can be checked in:

iTunes >> Edit Menu >> Preference >> Devices >> Device backups

(Some backups might even be automatically moved to the Recycle bin)

Isn't it possible to use one of these backups to restore to a (new) iPhone as described by Apple Support?


Modern smartphones encrypt data backed by Trusted Execution Environment (TEE). TEE stores keying material that is used together with master key and screen lock code to derive a key that encrypts and decrypts keys for device encryption. This is one possible way of protecting device encryption keys using TEE, Apple's implementation can be slightly different. On factory reset, TEE flushes master key and regenerates new key on first boot.

There are no scalable and affordable techniques to extract data out of TEE. If their Evaluation Assurance Level (EAL) is 4+, they can be as secure as smart card which is tamper resistant by design. If there would be such a forensic tool in future that could recover deleted keys from TEE, you might be able to decrypt recovered data if it's not already overwritten at present. You will be needing electron microscope for this.

  • 1
    If in the first part of the answer you said that keys are flushed from the TEE after the reset, why do you still talk about methods to extract keys from the TEE?
    – J. Doe
    Commented Jan 5, 2021 at 0:10
  • @ J. Doe If it was possible to read flash storage of TEE and Secure Element (SE), it would be possible to recover deleted keys as well if it's not already overwritten. OP is asking for future technology, it might become possible but might not be affordable.
    – defalt
    Commented Jan 5, 2021 at 4:58
  • Well today any TEE can be broken with a scanning electronic microscope for example. TEE are meant to be secure against thefts not advanced attackers.
    – J. Doe
    Commented Jan 8, 2021 at 13:13
  • 1
    @J. Doe That's not true. Samsung Electronics' Secure Element S3FV9RR chip has EAL 6+ which is in Samsung S20 and it is as secure as extracting keys from smart card. Google Titan M chip and Apple T2 chip EAL certification is not known but it has to be atleast 4+ to be certified as Secure Element.
    – defalt
    Commented Jan 8, 2021 at 14:05
  • 1
    @J.Doe You can potentially extract existing keys, not keys that have been wiped.
    – forest
    Commented Jan 9, 2021 at 22:07

An absolutely true, correct and technical answer is yes, there is hope, and even a certainty that one day that will be possible. A practical answer is that your iPhone will be hit by an asteroid, before your newborn will get to see those pictures.

Apart from the obvious issue with decryption being difficult, even if technology appears in 30 years, it is unlikely that there will be readily available technology to read that iPhone then. And even if you also store a PC with all the necessary software by then, the storage in your phone is not meant to last 30 years, even if not used. Electrons are lost slowly but surely until all your data is spread in the universe. If you'd want to slow this process, you should keep the phone charged in a cold and dry environment, and still take the phone out once in a while to recharge it. Even like this, it is still more likely that by the time the technology will be available, the information will be corrupted beyond repair.

Disclaimer: Never believe when people tell you what the future will be like. 30 years ago really smart people thought we'd have holograms and that 640KB is enough memory for anyone in the world (corrected based on comment). We're still working on those holograms, and your iPhone has a million times more memory than 640KB (ok, only the most expensive one).

The lesson is, as many people already said, but it's a lesson worth repeating:

Remember to always back up!

  • 1
    Even the falsely attributed quotes about 640KB do not, as far as I know, propose that quantity of storage for the entire world.
    – Ben Voigt
    Commented Jan 6, 2021 at 19:36
  • @BenVoigt I don't know why you say it's falsely attributed, but indeed the claim is wrong, the original claim was that 640KB is enough for any individual in the world, not all the individuals in the entire world, which is different, but captures the same idea. Nevertheless, I corrected this. Thanks.
    – Andrei
    Commented Jan 7, 2021 at 17:02
  • skeptics.stackexchange.com/q/2863/2954
    – Ben Voigt
    Commented Jan 7, 2021 at 17:12

There is some chance that quantum computing will be able to crack these keys. I would bet it will be at least 2-3 decades from now.

Note, you still have no chance to access the raw, block-level data of your iPhone. It is because Apple cheated you - you bought the iPhone thinking that it will be yours and you will be able to do this what you want to. Truth is that you still can do with your iPhone what Apple allows. They don't allow you to access the flash on the block level.

Beside the appearance of the practically usable quantum computers capable to break strong AES, you will also need to crack your own phone, in order to access your own data. Doing that is not yet a criminal offense in the USA, hopefully it won't be even in this far future.

Many encrypted hard disks, with lost keys, but with important data, are waiting for that, around the world. :-)

The hope looks today still small, but this is the one what we have.

  • 2
    Incorrect, iPhones use 256-bit AES, which quantum computers will not be able to crack
    – nobody
    Commented Jan 6, 2021 at 10:55
  • @nobody Thanks. But it only says that it is impossible with Grovel's algorithm. There is no proof that it is impossible with QC. It is a very hot CS topic, having an $O(\sqrt{n})$ crack by QC means that having, maybe a yet better crack will be once available.
    – peterh
    Commented Jan 6, 2021 at 11:00
  • Well, for that matter there is no proof that the algorithm can't be cracked on a classical computer (since a significant cryptanalytic breakthrough is possible albeit unlikely). However, Grover's Algorithm is optimal and bruteforcing a 256 bit key on quantum computers is infeasible.
    – nobody
    Commented Jan 6, 2021 at 11:05
  • @nobody Is there a proof that there is no better QC algorithm?
    – peterh
    Commented Jan 6, 2021 at 11:34
  • For bruteforcing black box function, its been proven asymptotically optimal. Any better algorithm would have to rely on weaknesses in the internal structure of the encryption algorithm (but that amounts to cryptanalysis of the algorithm, which is possible even without quantum computers but currently doesn't seem likely in the near future)
    – nobody
    Commented Jan 6, 2021 at 11:42

Short answer: as others have said, no. However, depending on the iPhone hardware version, iOS version, and any future discovery of weaknesses in the methods they used for generating keys, there is a small to moderate likelihood that recovery may be possible in the forseeable future. That doesn't imply it will be easy or accessible to people without access to specialized tools or funds to pay people who have sufficient knowledge and access.

  • 8
    I know you're just hedging with "small to moderate likelihood," but it seems unkind to give false hope here. Given our current understanding of technology and physics "negligible to minuscule likelihood" seems more realistic. Breaking AES would have world-changing implications, probably won't happen in our lifetimes, and even if it did happen--say 30 years from now when the newborn is grown up--the iPhone memory might already be toast by then. The photos are gone. Commented Jan 6, 2021 at 4:26
  • @GrandOpener I think he's talking about weakness in the hardware random generator, not in the cipher. However even in that case it's exceedingly unlikely. It would have to have a very bad bug, since creating a few hundred bits of entropy is not that difficult.
    – forest
    Commented Jan 9, 2021 at 22:04

There is zero chance that you can break encryption. A factory reset overwrites the two copies of the master key stored on an iPhone. Without that there is zero chance of decrypting the phone (256 bit keys).

There is a chance that your photos are stored somewhere in the cloud. If you have your Apple ID and password, or your Apple ID and a phone used for 2FA, then make an appointment with the nearest Apple Store, and there is a chance they might recover it. As long as it is just a user problem snd not sn encryption problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .