-Meaningful logos or random sequences have been used in the current digital watermarking techniques of 2D bar code. The meaningful logos can not only be created by copyright holders based on their unique information, but are also very effective when representing their copyrights. The random sequences enhance the security of the watermark for verifying one's copyrights against intentional or unintentional attacks. In this paper, we propose a new watermarking technique taking advantage of Data Matrix as well as encryption keys. The Data Matrix not only recovers the original data by an error checking and correction algorithm, even when its high-density data storage and barcode are damaged, but also encrypts the copyright verification information by randomization of the barcode, including ownership keys. Furthermore, the encryption keys and the patterns are used to localize the watermark, and make the watermark robust against attacks, respectively. Through the comparison experiments of the copyright information extracted from the watermark, we can verify that the proposed method has good quality and is robust to various attacks, such as JPEG compression, filtering and resizing.