key management less re-encryption functionality

everything but the re-encryption task is part of this pull request