Merge pull request #817 from antonio-nino-diaz-arm/an/timingsafe

Import constant-time bcmp() and use it where necessary