“But unfortunately, the US border isn’t technically the US, and you don’t have either of these rights at the border.” False. Your Constitutional rights are NOT contingent on your geographical position. If US border patrol agents approach you ANYWHERE, your rights are the same. Because they are there at the border to specifically to enforce importation/exportation laws and immigration laws, they have somewhat broader search powers, but you are NEVER obliged to give up your passwords without a court order, signed by a judge, requiring you to do so. And even then, I’d ask to contact the judge independently to verify his signature.
Police of all stripes lie routinely. They are trained to do so. Do not answer questions without an attorney present, and they will grow tired of asking and send you on your way.