This is not a Zero Knowledge Protocol because the other party has the same information as you do.
Furthermore, this algorithm is equivalent to a DH key exchange between A and B followed by a HMAC(key,M), with the advantage that message size is not limited to the group size.