fix lack of rigor in keyPair, now almost identical to redback