I'm going to go with yes, it's legal but it's not advised. But first, allow me to explain:
I believe the contents of the file will be what determines whether or not you break the law. Whilst you may be the intended recipient of this encrypted file, the subject of "how" you access it will not the issue. Yes, you could crack the password on it but if you are only gaining access to an empty folder then you could argue that you have not gained unauthorised access to anything. If the folder happens to contain some confidential information from Area 51 (obviously as an example), then you have accessed data you are not authorised to access.
Now, you could argue that you cracked the password but didn't access any files within the folder. You can't say that just because you have access to something that you definitely used it - after all people have knives in their kitchens but they don't go stabbing people every day.
My opinion is that it's best to ask your friend what exactly the data is within this file. Until then, you risk infringing data protection laws. If you do crack the file, you are riding the edge of a very fine knife.