Test cases and documentation for PublicKey and PrivateKey classes