Counterfeiting and theft have always been problems that incur high costs and result in considerable losses for international markets. In this research paper, we address the issue of counterfeiting while using radio frequency identification RFID technology in retail systems or other industries by presenting a new anti-counterfeiting and anti-theft system for the retail market. This system addresses the two abovementioned issues and provides a solution that can save retail systems millions of dollars yearly. The proposed system achieves the objective of preventing or minimising the counterfeiting and theft of tagged products. At the same time, it provides a strong indication of suspiciously sold or obtained items. Furthermore, we conducted a security analysis to prove the correctness of our protocol on the basis of the strand spaces.