In the United States, you can't get into trouble just for possessing encrypted files. There is nothing illegal about encryption, and in fact most security experts recommend it for border crossings. You could, however, get "into trouble" if you refuse to decrypt it for them on request. It has happened that they have taken it to the courts and got the judge to force them to enter their password.

Considering that news sources and civil rights organisations alike recommend encrypting your data, it doesn't seem likely to me that you will get in trouble for encrypting it, or even that the border agents would be that surprised by it (it's such common advice now that at least a significant percentage of tech-savvy people are probably doing it)

The US Customs and Border Patrol has a document explaining their policies regarding the search of information and it mentions that they will take steps to ask other agencies to help decrypt files, that is, if you don't help them first. It's still an open question on whether they can force you to or not, for example in this recent case a woman was compelled to do it, but as they state in the article, it's by no means a settled question yet. So it's still worth it to encrypt your files.