Get basic core encryption funcionality up, still needs to be hooked up to UI and actual usage

Good basis for e.g. the history branch to use