Add keypair manipulation functions.