In this paper, a new fragile watermarking is proposed. It is different from most existing schemes to resist the famous birthday
attack. The classic NPC problem knapsack problem in algorithm is introduced. It uses a random sequence to encrypt the bit
planes of image pixels and regard the encrypted result as the indicative vector for knapsack set. The NP computation of knapsack
problem is applied to make the fragile watermarking system secure.This scheme can effectively resist the birthday attack with
a higher resolution than the algorithm before. Theoretical analysis and experimental results demonstrate its effectiveness
in resisting the birthday attack and good property of localization.