Added functions to generate and verify authentication tags for the given gadget