I'm looking for an attachment that happens to be a password-protected PDF file (you need to type the password to open it). Is there a way to search Gmail for such files?
You can search for PDF attachments, certainly. But Gmail has no idea whether a PDF is password-protected or not.
should return all of your conversations with a PDF attachment.
If the sender mentioned that it was password-protected in the body of the message, this might be helpful:
filename:pdf has:attachment password