Implemented GCM.

Added GCM functionality. Needs more work.