Refactored existing code and added support for symmetric encryption.

I prefer starting sentences with capitals and ending with periods on all comments, though I know that's not currently consistent with a lot of our Go code.