GMAC
GCMの入力をAADのみにして本文の暗号出力を省略した形
GHASHに初期化手順を足した程度で作れる?
ブロック暗号(AES)はGHASHの初期値計算に使われるだけ
H = AES(key, 0)
ハッシュ計算(ブロック単位)
$ Y_n = GF(2^{128})((Y_{n-1}⊕IN)・H)
GF GFH = new GF(H) // 高速に計算するためHのシフト結果を貯めておき
Y = GFH.mul(Y XOR IN)
sign でAADの終了、本文なしで終了とすれば完了 GCMとGMACで同じ結果になれば成功か
RFC 4543 The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AH
RFC 5084 Using AES-CCM and AES-GCM Authenticated Encryption in the Cryptographic Message Syntax (CMS)
RFC 9044 Using the AES-GMAC Algorithm with the Cryptographic Message Syntax (CMS)