key regenerates pubkey after setting privkey