Unless of course they just happen to see something during a legal search, then they can collect that evidence too, even if it's not related to the warrant.
It's not a grey area. They absolutely cannot have a broad search for your house and then say "Oh, here's safe. It's used to hold things secret. He MUST have something in there he doesn't want us to see. I'll bet there's all sorts of fun stuff in there! 'Sir, open the safe too'..."
They have to know, with absolute certainty that there's directly-related, incriminating evidence contained in that safe before they ask to open it.
If they're searching your house for a murder weapoon or drug parephenalia, and demand you open the safe and you do, and they find documents implicating tax evasion, they can't then decide to throw in charges for that along with the others you're accused of.
Likewise, if they are looking for a murder weapon, demand you open the safe, and inside they find an encrypted USB thumbdrive in the safe and demand the password, you don't have to provide that decryption passphrase at all.
There's already legal precedent here backing this up, until they decide to invalidate that with NSL and FISA orders, of course.