I'm not against regenerating the pubkey actually, it's the usage of the private API that doesn't look good to me.