encoding: Implement encode/decode of Signature and KeyLocator.