GCM implementation

Fixes #17.