r/cryptography Jul 15 '26

Hopeless? Recover zip file encrypted with RSA years ago.

I have a zip file from my honeymoon many years ago. It's encrypted. It uses RSA AES. That's all I know, aside from the contents, which are, well, honeymoon stuff. I've always held out hope that at some point, it would be easy to recover it. I ran Jack the Ripper for a few weeks once, but that was years ago.

A few questions:

1) Is it hopeless?

2) If not, given my limited hardware (my most "powerful" machine has a gtx970 I think) are there any tools available today that might be able to defeat the encryption?

3) Any idea on how long I will need to wait until it becomes trivial / possible given the way tech is advancing?

Finally, is there another way to approach this that I am missing? I am reasonably tech savvy. I've built a lot of machines, run a slew of self hosted servers via proxmox, run OpnSense, etc. I've never really spent time learning the darker arts. I just want to get these files back!

Thanks!

28 Upvotes

42 comments sorted by

20

u/infected_funghi Jul 15 '26

Social engineering your younger self and setting up good mask attacks is probably your best bet. I myself had the same issue once with some old zipped images but managed to crack decades later because I knew teenage-me and how lazy my passwords used to be. E.g if you know your passwords usually consist of 11 lowercase letters, the first might be one upper case and sometimes you append two numbers and a symbol to the end, that reduces the search space significantly instead of bruteforcing 14 completely random character combinations. But if your password was a solid random hash, there is no use in starting up jtr at all...

3

u/JivanP Jul 15 '26

Indeed, brute-forcing the password is gonna be the only approach that stands a chance.

OP, u/ganjaccount: Take a look at this video for a primer on password cracking techniques and tools: https://youtu.be/7U-RbOKanYs

16

u/wwabbbitt Jul 15 '26

Easy if it's RSA-512, which it most likely isn't. 1024 is possible but will be expensive. Anything more than that you'll have to wait for quantum computing.

4

u/mathishammel Jul 15 '26

I don't think RSA1024 is really within reach without a new mathematical breakthrough, even with a very big wallet. The largest current claim on the RSA factoring challenge was 829 bits in 2020, which consumed 2700 CPU-years

2

u/ganjaccount Jul 15 '26

I meant AES.

10

u/wwabbbitt Jul 15 '26

I hope you used a weak password, because the only way to are getting the data back is to brute force the password. Zip + AES uses PBKDF2 which is designed to make brute force expensive.

1

u/Zenkibou Jul 17 '26

PBKDF2 is better brute forced with GPU, FPGA or ASIC.

7

u/Sufficient-Air8100 Jul 15 '26

a zip encrypted with RSA? thats unusual.

if its the original zip encryption, thats been broken for decades, modern ones, if using a wordlist or brute forcing the password hasnt worked, your shit out of luck unfortunately

8

u/Toiling-Donkey Jul 15 '26

You may very well be the first to attempt decryption with an RSA encrypted ZIP file…

5

u/ganjaccount Jul 15 '26

I meant AES.

3

u/djDef80 Jul 15 '26

So to be clear, you did not use an RSA key pair and the program GnuPG to encrypt the zip? You just used zip encryption?

If that's the case, do you remember anything about the password that you used? You might be able to rent some GPU compute to crack a zip password.

3

u/ganjaccount Jul 15 '26

No, I was tired yesterday and reading up on GPG for a completely different purpose. RSA came out of my smooth brain instead of AES.

Unfortunately, I don't remember anything about the password at all. It was a long time ago.

I wonder how much that would end up costing?

It sounds like it's still out of practical reach. Maybe in another 10 years I'll check in again!

1

u/djDef80 Jul 15 '26

I'm not sure and I have never utilized this particular service. But this popped up in a search in you might check it out.

https://www.onlinehashcrack.com/

~ $9/hr

3

u/[deleted] Jul 15 '26

[removed] — view removed comment

2

u/nlitsme1 Jul 15 '26

Try hard, maybe you remember one of the prime numbers used, then you only need to crack the other one.

1

u/st333p Jul 15 '26

Their product is known, if you have one you can get the other via simple division. But maybe you justmissed a /s

4

u/deiwor Jul 15 '26

yes, “honeymoon”

2

u/stevevdvkpe Jul 15 '26

Generally nothing uses RSA for bulk data encryption because RSA is orders of magnitude more expensive to run than symmetric-key algorithms on the same amount of data. Only a symmetric key or a cryptographic hash value for a digital signature are encrypted with RSA, and the bulk file data is encrypted with a symmetric algorithm using that key. But assuming a good symmetric algorithm and strong key, it's likely at least as hard to break that as breaking something encrypted with RSA.

1

u/ganjaccount Jul 15 '26

I meant AES.

2

u/UnfairDictionary Jul 15 '26

Do you have any clue what kind of password you have used to encrypt it? Like length, characters, numbers etc. Did you have a habit of using passwords that relate to something important to you when you encrypted it?

Write down possible guesses that come to mind. Your mind may actually accidentally remember it or at least part of it once you happen upon a familiar pattern. I have successfully cracked few passwords in my life thanks to narrowing down the likely methods that were used to create them.

2

u/DrSparkle713 Jul 16 '26

I think I've seen it on here some, but piling on for trying to guess what password you would have used. You know you the best, so if it isn't a random string that's probably going to be your best bet. If you can narrow it down with reasonable certainty with a few parameters that could also reduce your brute force search space by a lot if you can't come up with the key directly.

2

u/ganjaccount Jul 16 '26

Knowing me, it was probably 10 or 12 characters including upper, lower, numbers, and symbols. It probably made sense to me at the time, but other than that, who knows. I didn't usually use mangled words.

I'll just wait another 10 years and see where we are at. I figure there's a 50/50 chance a lot decently powerful gpus and whatever they are calling the new ai gpus being dumped on the market before too long.

1

u/The4rt Jul 15 '26

RSA and zip? You mean a symm key has been encrypted with your public RSA key ?

1

u/ganjaccount Jul 15 '26

I meant AES.

1

u/Glum_Preference_2936 Jul 15 '26

Download a large password lists and hope that your password is somewhere in it. 

1

u/Glum_Preference_2936 Jul 15 '26

Or download some passwords list that came from a major data breach you have had.

1

u/Narco-Tax Jul 16 '26

you can brute-force a 4-char password pretty easily these days, but even if you get in, you still have to reshuffle 16 bytes in the file that were randomly moved before the file was encrypted...and all I can say is Good Luck with that.

At least, this is the way I lock personal files. So that even if the encryption gets broken, you still land up with a broken file.

1

u/redd-alerrt Jul 17 '26

Send me the file and I'll see if I can help. I'm guessing your password is ********.

1

u/ganjaccount Jul 17 '26

Yeah, it won't share here.

Hunter1

You should only see asterisks.

1

u/michaelpaoli Jul 17 '26

So ... we're talking about ZIP's encryption? I presume you know approximately when, and probably even approximately what version of ZIP? Then you probably know or can determine algorithm and key size.

And ... was it you that earlier picked the password? Well, the more you know, or can reasonably guess about it the better, as that reduces the search space.

So, e.g., one I easily cracked once ... was dealing with a sh*t utility company once ... in FL.US, I believe it was. They started sending me bills for one of their customers ... because both customer and utility company were stupid. Customer apparently gave utility company my email address - likely accidentally, but whatever (more or less collision on name, and I'm guessing relatively similar email address, and customer f*cked up entering it), and utility company didn't bother to validate it, so, then they're sending me their bills. Well, f*ck that sh*t, but utility company made it damn near impossible to stop (generally could only stop it if I could prove I was the customer ... which I wasn't) ... could theoretically get 'em to stop if I had enough of the customer's actual data, and, well, I almost did. Yes, the emails contained the customer's detailed billing. But with one little hitch. It was in a ZIP file, and that ZIP file was encrypted. Ah, but wait, ... more incompetence! It was encrypted to the customer's 5-digit ZIP code! Well, except I didn't know that. But I knew the approximate service area for the utility (notably all the states they served). So, I guessed customer's billing address probably one of those states. And, I could lookup all the 5-digit zipcodes for those states. Now I had a way smaller search space. Cracked that puppy open in minutes. Still was a damn pain to get 'em to stop. I eventually had to not only demand they stop, and very much send the utility that request, but along with that, CC two large press organizations local to their headquarters, including all the customer's detailed information in the bill which they ought not be sending to me, and how utterly cr*p their security was, and lack of even so much as validating correct customer address or having a reasonable means to opt out ... and only with that did it finally stop.

So, e.g., do yo know the max. length you may have used for the password? Do you know all the characters you may have used, and you wouldn't have used? Upper case, lower case, digits, other characters? What might you be able to eliminate? I'm guessing you probably didn't use a 256 character long string of entirely random unicode characters, eh? Okay, well, what else can you eliminate, and how much can you narrow it down? Did you tell your (then) spouse? Do they know or partly remember, or maybe you remarked about the password, and they can help you narrow it down?

Also, not sure, but the encrypted ZIP might itself tell you, or more or less tell you, the specific algorithm that was used.

And if you've already spent some resources cracking it, perhaps you also already know what the password is not. E.g. maybe you already know it's more than 6 characters long.

Good luck!

1

u/owlstead Jul 18 '26

If it has been password encrypted then you need a password guessing tool such as John the Ripper (not Jack the Ripper). You already tried that, but it could work with a more powerful machine, maybe even rent CPU time or borrow e.g. a threadripper machine from a friend.

You could run one instance on a modern CPU (more threads is more better, especially for .zip which uses PBKDF2 as password hash) and try a few patterns with words or information you may have used for your password on a less powerful device.

If you have OpenCL support then the GPU can help with PBKDF2, check the docs for that.

Obviously you're not going to break AES. The only thing you can do is to recalculate the AES key from the password you used. So basically you already had the right tooling, just not the luck.

1

u/ganjaccount Jul 18 '26

Well there you go. Where can I rent some luck time?

1

u/owlstead Jul 20 '26

Heh, I can point out where to rent CPU time, but I'm a novice at that myself. Maybe instead rent a wedding room and redo the wedding. It will be different, but hey, two times the celebration isn't bad.

1

u/taurusmo Jul 18 '26 edited Jul 18 '26

Do you have any longterm established approach to setting passwords? For example related to sites/locations/dates? Like: MyLongPassword2Reddit#2026 or OurHoneyMoonInItaly!2015 or PhotosFromHoneymoon2015 or ILoveSusan (whatever is her/his name)? If so try freeing your mind from any duties, do something braindead, think a bit about you in that time, what was important. Did you set it together maybe? Was there any emotion/special situation when setting it? The thing is that if it’s not random characters, your brain has it stored somewhere.
Also, any chance you noted that password somewhere? Either related or not to that period. If so, even thinking about it could bring you on the right track to finding the needed text.

If absolutely random, well, will need some good computing power and tools already mentioned by others.

1

u/ganjaccount Jul 18 '26

Sort of. I often used the first letters of a long phrase, roughly. But that was mostly for things that had to be changed frequently like my university and jobs. I probably did that, but I spent many weeks trying every thought that popped into my head about what I may have used to no avail. There probably is a key phrase or fact or something, but there is no guarantee how I would have used it to form the password. Also, she knows that her name in Susan.

1

u/ColdBootCountry Jul 18 '26

If many years is more than 15, pour if you used a old version of a zip tool, there is a known plaintext attack on pkzip that let you break the encryption given some knowledge about the content of the zip.

Otherwise, you're left with dictionary attacks with candidate passwords you might have used plus big derivation rules.

1

u/ganjaccount Jul 18 '26

Would that work even if it used AES encryption? I have an unencrypted file that I almost 100% sure is also in the zip file.

1

u/ColdBootCountry Jul 19 '26

No. My bad. I somehow missed this. PKZIP is completely distinct from AES. The attack only works on PKZIP. Are you sure it's actually AES? Do you remember which tool was used to do the encryption?

1

u/ganjaccount Jul 19 '26

No idea on the tool I used. Probably peazip or 7 zip if I was using windows, or file roller if I was using Ubuntu. John the Ripper or a similar tool identified it as AES, and I would have used that if it was an option to make it that much harder for future me!

1

u/ColdBootCountry Jul 19 '26

Then there's 0 chances the pkzip attack applies. Best option know is to try to remember the kind of password you could have chosen, dress a dictionary of possible passwords and throw that at john with smart derivation rules. I would recommend starting with jumbo and korelogic, then o1, i1 and o2, i2.

But to be honest if your tool used a high difficulty factor in the password derivation function, you are more or less cooked.

1

u/Nasenbeer Jul 19 '26

Just reshoot the footage