added encrypt and decrypt functions to the keys. preliminary code for first go at encryption

Ignore-this: 949afc7c5481c9945611b1673364fbc5

darcs-hash:20130721034015-c21fe-0652be20b3a70dc0916b4277b4b2f84864ccea7b