Theory and application of cellular automata for authentication and watermarking