Add rekeying functionality