The BCCLA has obtained the CBSA guidelines regarding access to digital devices. Unfortunately the PDF appears to be a bitmap rather than text so I can't copy and paste from it without OCRing it. However, some relevant excerpts:
Although there is no defined threshold for grounds to examine such
devices, CBSA's current policy is that such examinations should not be
conducted as a matter of routine; they may only be conducted if there
is a multiplicity of indicators that evidence of contraventions may
be found on the digital device or media.
CBSA officers shall only examine what is stored within the device.
Officers are not to read emails on digital devices and media unless
the information is already downloaded and has been opened (usually
marked as read).
In instances where access to digital devices and media are password
protected, officers are to request the password to access the device
and record it, as well as any alternate passwords provided, in their
Passwords are not to be sought to gain access to any type of account
(including any social, professional, corporate, or user accounts),
files or information that might potentially be stored remotely or
If a traveller refuses to provide a password to allow examination of
the digital device, media or the documents contained therein, of if
there are technical difficulties that prevent a CBSA officer from
examining the digital device or media, the device or media may be
detained by the CBSA officer under the authority of Section 101 of the
Customs Act... for examination by a CBSA expert trained on digital
Until further instructions are issued, CBSA officers shall not arrest
a traveller for hindering or for obstruction solely for refusing to
provide a password. Though such actions appear to be legally
supported, a restrained approach will be adopted until the matter is
settled in ongoing proceedings.
You would need a lawyer to give you legal advice, but from a cursory examination of the guidelines, it would appear that you should be unlikely to be requested to provide passwords without good reason, and that you may refuse to provide them and would not be arrested for doing so, however your devices may be confiscated, and you may also be refused entry.