A Synergistic Framework For Hardware Ip Privacy And Integrity Protection