CRC validation function