It very much depends on your local laws. Despite the current administration, the law in the US, for example, is that you do not have to divulge passwords (a Fifth Amendment right to silence). You can hand over your entire encrypted database intact, no destruction needed, and unless the authorities can decrypt it, it’s useless evidence in court. Prosecutors may still try to build a case without that evidence (as you pointed out by getting decrypted correspondence with an accomplice), but it’s not illegal to hand over encrypted data, even if they demand that you decrypt it; you are under no legal obligation to help incriminate yourself.
That right may not exist in other countries, so as always, one should know their individual rights and threat model.
It very much depends on your local laws. Despite the current administration, the law in the US, for example, is that you do not have to divulge passwords (a Fifth Amendment right to silence). You can hand over your entire encrypted database intact, no destruction needed, and unless the authorities can decrypt it, it’s useless evidence in court. Prosecutors may still try to build a case without that evidence (as you pointed out by getting decrypted correspondence with an accomplice), but it’s not illegal to hand over encrypted data, even if they demand that you decrypt it; you are under no legal obligation to help incriminate yourself.
That right may not exist in other countries, so as always, one should know their individual rights and threat model.