There is no need to allocate a temporary buffer and build GHASH input data into it. Instead, ghash() is trivial to split into update part that can be called separately for each segment. Signed-hostap: Jouni Malinen <j@w1.fi>