anaylysis of KEY_FLAG