How does cartridge protection distinguish an original vs fake cartridge? [on hold]

Based on what is explained in How to disable HP Cartridge Protection, genuine ink cartridges may come with cartridge protection embedded in their chip. Once an ink cartridge is installed, printer will mark it as protected.

What is embedded in the chip?

How can we make sure that it is original and not duplicated with a 3rd party?

Is this a safe and well-known offline security protocol? (It will be great if someone can point me to a reference about it.)