Hardware Obfuscation and Logic Locking: A Tutorial Introduction