Generate public key from private key