security: In PublicKey, implement toDer.