Improve privkey generation test