be more mindful of algorithm and usage flag interaction

Fixes #895
move can.*() methods to CanonicalizedPublicKey, where they belong
fix method visibility for tests