GCM written in C++.