AES_GCM_inc32(J0); // the first ctr is used to compute the tag, only the second is used for decryption: https://en.wikipedia.org/wiki/Galois/Counter_Mode#/media/File:GCM-Galois_Counter_Mode_with_IV.svg
AES_GCM_inc32(J0); // the first ctr is used to compute the tag, only the second is used for decryption: https://en.wikipedia.org/wiki/Galois/Counter_Mode#/media/File:GCM-Galois_Counter_Mode_with_IV.svg
AES_GCM_GCTR(key,J0,ct,16,pt,s_te0,s_te1,s_te2,s_te3,s_te4); // decrypt the ciphertext
AES_GCM_GCTR(key,J0,ct,16,pt,s_te0,s_te1,s_te2,s_te3,s_te4); // decrypt the first block of ciphertext
AES_GCM_inc32(J0);
AES_GCM_GCTR(key,J0,ct2,16,pt2,s_te0,s_te1,s_te2,s_te3,s_te4); // decrypt the second block of ciphertext
//if((gid==0)&&(lid==0))printf("pt[0]=%08x\n",pt[0]); // should be 5b7b2274 or [{"type"
//if((gid==0)&&(lid==0))printf("pt[0]=%08x\n",pt[0]); // should be 5b7b2274 or [{"type"
if((gid==0)&&(lid==0))printf("pt2[0]=%08x%08x\n",pt2[0],pt2[1]); // should be 2054726565222c22 or Tree","