closure does not have to be a cstring
input validation and new dhe skey in rekey