JP4804556B2 - Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program - Google Patents

Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program Download PDF

Info

Publication number
JP4804556B2
JP4804556B2 JP2009093001A JP2009093001A JP4804556B2 JP 4804556 B2 JP4804556 B2 JP 4804556B2 JP 2009093001 A JP2009093001 A JP 2009093001A JP 2009093001 A JP2009093001 A JP 2009093001A JP 4804556 B2 JP4804556 B2 JP 4804556B2
Authority
JP
Japan
Prior art keywords
value
dct block
bit
dct
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009093001A
Other languages
Japanese (ja)
Other versions
JP2010245876A (en
Inventor
淳 片山
亮 北原
春美 川村
秀樹 小池
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2009093001A priority Critical patent/JP4804556B2/en
Publication of JP2010245876A publication Critical patent/JP2010245876A/en
Application granted granted Critical
Publication of JP4804556B2 publication Critical patent/JP4804556B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はデジタル画像の処理技術に関し、特に改ざんを検出するための電子透かし埋め込み、該電子透かしを用いて改ざんを検出する技術に関する。   The present invention relates to a digital image processing technique, and more particularly to a technique for embedding a digital watermark for detecting tampering and a technique for detecting tampering using the digital watermark.

近年、デジタルカメラやカメラ付き携帯電話機の普及により、誰もが手軽にデジタル写真を撮影できるようになった。デジタルカメラやカメラ付き携帯電話機でのデジタル画像の保持方式はその圧縮率の高さと画質のトレードオフ性が良好であることから、JPEG符号化形式がデファクトスタンダードとなっている。一部の機種ではJPEG2000符号化や非圧縮画像形式で保持することができるものもあるが、最も普及しているのはJPEG符号化方式である。   In recent years, with the widespread use of digital cameras and camera-equipped mobile phones, anyone can easily take digital photographs. The digital image holding method in a digital camera or a camera-equipped mobile phone has a high compression ratio and a good trade-off between image quality, so the JPEG encoding format has become the de facto standard. Some models can be stored in JPEG2000 encoding or uncompressed image format, but the most popular is the JPEG encoding method.

そして、デジタルカメラ、特にカメラ付き携帯電話機は手軽に撮影可能なため、これを用いて撮影したデジタル画像を動産担保の証拠としたり、交通事故の証拠としたり、建築現場での工程証明としたり、ゴミ処理場で正しく処理した証明としたりしたいというニーズがある。また、デジタルカメラではないが類似するものとしてはドライブレコーダーがあり、撮影された映像(画像列)は交通事故の参考証拠として用いられる。   And since digital cameras, especially camera-equipped mobile phones, can be taken easily, digital images taken using them can be used as evidence of personal property, as evidence of traffic accidents, or as process proofs at construction sites, There is a need to make a proof that it has been properly processed at the garbage disposal site. Moreover, although it is not a digital camera, there is a drive recorder that is similar, and the captured video (image sequence) is used as reference evidence of a traffic accident.

ところが、デジタル画像は編集が容易であるという性質があるために、改ざんされていないかを証明するのが難しく、法律上は参考証拠に留まっており、決定的な証拠にはなり得ないおそれがある。そこで、証拠性を高めるために、デジタル画像に電子透かしを付加し、電子透かしが壊れずに入っているか否かで、画像の信憑性を高める技術が特許文献1で提案されている。   However, because digital images are easy to edit, it is difficult to prove that they have not been tampered with, and the law remains reference evidence, which may not be definitive evidence. is there. Therefore, in order to enhance the evidence, Japanese Patent Application Laid-Open No. H10-228707 proposes a technique for adding a digital watermark to a digital image and improving the authenticity of the image depending on whether the digital watermark is not broken.

特開平10−308943JP 10-308943 A

三谷政昭著 ”やり直しのための工業数学,情報通信と信号解析・暗号,誤り訂正符号,積分変換” CQ出版社,ISBN4−7898−3318−6Masaaki Mitani “Industrial Mathematics for Redoing, Information Communication and Signal Analysis / Cryptography, Error Correcting Code, Integral Transformation” CQ Publishing Co., Ltd., ISBN 4-7898-3318-6 青木和麻呂他著 ”128ビットブロック暗号Camelliaアルゴリズム仕様書 第2.0版” 日本電信電話株式会社,三菱電機株式会社,2001年9月26日Kazutaro Aoki et al. "128-bit block cipher Camellia algorithm specification version 2.0" Nippon Telegraph and Telephone Corporation, Mitsubishi Electric Corporation, September 26, 2001 “Announcing the ADVACED ENCRYPTION STANDARD(AES)”,Federal Information Processing Standards Publication 197,November 26,2001“Announcing the ADVACED ENCRYPTION STANDARD (AES)”, Federal Information Processing Standards Publication 197, November 26, 2001. “SECURE HASH STANDARD”,Federal Information Processing Standards Publication 180−2,August 1 2002“SECURE HASH STANDARD”, Federal Information Processing Standards Publication 180-2, August 1 2002 結城浩著 ”暗号技術入門” ソフトバンククリエイティブ株式会社,ISBN4−7973−2297−7Hiroshi Yuki “Introduction to Cryptographic Technology” SoftBank Creative Corp., ISBN 4-7773-2297-7

しかしながら、特許文献1の方法では、量子化係数のゼロラン部直前に値の大きな透かしデータを埋め込むため、透かし埋め込みによる画質劣化が大きくなるおそれがある。このように画質劣化が大きいと証拠写真としての信憑性が下がるため望ましくない
本発明は、上述のような従来技術の問題点を解決するためになされたものであり、画質劣化を抑えつつ改ざんを検出する技術を提供することを解決課題とする。
However, in the method of Patent Document 1, since watermark data having a large value is embedded immediately before the zero-run portion of the quantization coefficient, image quality degradation due to watermark embedding may increase. Such a large deterioration in image quality is undesirable because it reduces the credibility of evidence photographs .
The present invention has been made to solve the above-described problems of the prior art, and an object of the present invention is to provide a technique for detecting tampering while suppressing image quality deterioration.

本発明に係る改ざん検出技術は、検出用の電子透かしを画像に埋め込む装置と、該電子透かしを用いて画像の改ざんを検出する装置とをコンビネーションとして利用する。ここではJPEG符号化・復号化の原理が密接に関連する。   The falsification detection technique according to the present invention uses, as a combination, a device that embeds a digital watermark for detection in an image and a device that detects falsification of an image using the digital watermark. Here, the principle of JPEG encoding / decoding is closely related.

JPEG符号化は、図1(a)に示すように、入力画像(S01)をYCbCr変換し(S02)、Cb(青系統の色相・彩度を表す信号),Cr(赤系統の色相・彩度を表す信号)のダウンンプリング(S03)した後に、サンプリング画素(8×8画素)のブロック単位で離散コサイン変換(DCT:Discrete Cosine Transform)を行う(S04)。 In JPEG encoding, as shown in FIG. 1A, an input image (S01) is subjected to YCbCr conversion (S02), Cb (a signal indicating hue / saturation of a blue system), Cr (hue / saturation of a red system). after down sampling (S03) signal) representative of the degree, discrete cosine transform in block units of the sampling pixels (8 × 8 pixels) (DCT: performing discrete cosine transform) (S04).

この変換データを量子化によって情報を落としてから(S05)、ハフマン符号によるエントロピー符号化がなされ圧縮が行われ(S06)、JFIF形式に整形される(S09)。   After the information is dropped by quantizing the converted data (S05), entropy coding using Huffman code is performed and compression is performed (S06), and the data is shaped into the JFIF format (S09).

JPEG復号化は、図1(b)に示すように、入力されたJPEG画像(S11)をJFIF形式からデータ列へ整形し(S12)、エントロピー復号化(S13)後に逆量子化される(S14)。この後に逆DCTを施し(S15)、必要があれば色空間変換が行われる(S16)。   In the JPEG decoding, as shown in FIG. 1B, the input JPEG image (S11) is shaped from a JFIF format into a data string (S12), and dequantized after entropy decoding (S13) (S14). ). Thereafter, inverse DCT is performed (S15), and if necessary, color space conversion is performed (S16).

本発明では、入力画像を8×8サンプリング画素のブロック(DCTブロックと呼ぶ)に分けるときに、各々のブロックに1bitを割り当てて、電子透かしデータを誤り検出符号化かつ暗号化したbitを埋め込む。   In the present invention, when an input image is divided into blocks of 8 × 8 sampling pixels (referred to as DCT blocks), 1 bit is assigned to each block and a bit obtained by error detection coding and encryption of digital watermark data is embedded.

このとき電子透かしデータのbitは直接DCTブロックへは対応させずに、一度誤り検出符号化して冗長性を持たせてから対応させる。このように誤り検出符号を用いることにより、何も埋め込んでいないのに偶然埋め込んだことと同じ結果が得られることを防ぎ、また復号時に元の電子透かしデータを知ることなく誤り(改ざん)の有無を知得する効果が得られる。   At this time, the bit of the digital watermark data is not made to correspond directly to the DCT block, but is made to correspond after error detection coding is performed once to provide redundancy. By using an error detection code in this way, it is possible to prevent obtaining the same result as if it was accidentally embedded without embedding anything, and whether or not there was an error (falsification) without knowing the original digital watermark data at the time of decoding The effect of knowing is obtained.

また、画像に含まれるDCTブロックの総数は一般に大きい(VGA画像の輝度成分で4800個以上)ので、DCTブロックをグループに分けて1グループ中で独立に誤り検出符号化するようにする。これにより誤りがあった場合はその誤りが含まれるグループを特定でき、誤り(改ざん)の場所を知るという効果が得られる
さらに、DCTブロック内の量子化係数の変調方法では、量子化係数の絶対値の最大値Aと、乱数発生手段から得た乱数と量子化係数をハッシュ処理した値とから所定の演算を経て得られる値Bを用いる。
Further, since the total number of DCT blocks included in an image is generally large (4800 or more luminance components of a VGA image), DCT blocks are divided into groups and error detection coding is performed independently in one group. As a result, if there is an error, it is possible to specify a group including the error, and the effect of knowing the location of the error (falsification) is obtained. Further, in the modulation method of the quantization coefficient in the DCT block, the absolute value of the quantization coefficient is obtained. A value B obtained through a predetermined calculation from the maximum value A, a random number obtained from the random number generation means, and a value obtained by hashing the quantization coefficient is used.

ここではAに「−K」、「0」、「K(K=任意の正奇数)」を加算することでBとの差分の偶奇を調整する。これにより元々値の大きい係数Aに小変分のみが与えられるため、量子化係数の変化が少なく、埋め込み後の美観に与える影響が最小限に抑えられる。DCTブロック内の量子化係数を変調する方式は、非特許文献1のものも含めて複数あるが、いずれも変調による量子化係数の変化が大きく、美観的には不利となる。   Here, “−K”, “0”, and “K (K = any positive / odd number)” are added to A to adjust the even / odd difference of B. As a result, only a small variation is given to the coefficient A that originally has a large value, so that the change of the quantization coefficient is small, and the influence on the aesthetics after embedding is minimized. Although there are a plurality of methods for modulating the quantization coefficient in the DCT block, including those of Non-Patent Document 1, the change in the quantization coefficient due to the modulation is large, which is aesthetically disadvantageous.

本発明によれば、画質劣化を抑えつつ電子透かしを埋め込んで、改ざんを検出することができる。   According to the present invention, it is possible to detect falsification by embedding a digital watermark while suppressing deterioration in image quality.

(a)は通常のJPEG符号化のチャート図、(b)は通常のJPEG復号化のチャート図。(A) is a chart diagram of normal JPEG encoding, and (b) is a chart diagram of normal JPEG decoding. 本発明の実施形態に係る改ざん検出用電子透かしの埋め込み装置の構成図。1 is a configuration diagram of a tamper detection digital watermark embedding apparatus according to an embodiment of the present invention. FIG. 同 全体処理のチャート図。The chart of the whole process. 同 DCTブロックのブループ分割を示すフローチャート。The flowchart which shows the group division | segmentation of the DCT block. 同 DCTブロックへ暗号化符号化データを埋め込む処理を示すフローチャート。The flowchart which shows the process which embeds encryption encoding data in the DCT block. 同 絶対値の最大値Aの選択処理を示すフローチャート。The flowchart which shows the selection process of the maximum value A of the same absolute value. 同 B値の算出処理を示す概略図。The schematic which shows the calculation process of B value. 同 埋め込みビットにより最大値Aの調整を示すフローチャート。The flowchart which shows adjustment of the maximum value A with the said embedding bit. 同 量子化係数の一例図。The example figure of the same quantization coefficient. 同 偶数行パリティビットの付加の一例図。The same figure of an example of addition of the even-numbered row parity bit. 同 DCTブロックグループ分けの一例図。The same figure of DCT block group division. 図9の逆ジグザグスキャンを示す一例図。FIG. 10 is a diagram illustrating an example of the reverse zigzag scan of FIG. 9. 図9のラスタースキャンを示す一例図。FIG. 10 is a diagram illustrating an example of a raster scan in FIG. 9. 本発明の実施形態に係る改ざん検出装置の構成図。The block diagram of the tampering detection apparatus which concerns on embodiment of this invention. 同 DCTブロックから暗号化済み符合データを検出する処理を示すフローチャート。The flowchart which shows the process which detects the encryption code data from the DCT block. 誤りが検出されなかった状態を示す一例図。An example figure which shows the state by which the error was not detected. 改ざん箇所の表示状態を示す一例図。An example figure which shows the display state of the alteration location. 埋め込みデータのフォーマット例を示す図。The figure which shows the example of a format of embedded data. 検出用電子透かしの埋め込み装置の他例の構成図。The block diagram of the other example of the embedding apparatus of the electronic watermark for a detection. 同 全体処理のチャート図。The chart of the whole process.

以下、図面に基づき本実施形態に係る電子透かしの埋め込み装置と電子透かしを用いた改ざん検出装置とを説明する。ここではデジタル映像(Motion JPEG)を処理対象とする。   Hereinafter, a digital watermark embedding device and a tamper detection device using a digital watermark according to the present embodiment will be described with reference to the drawings. Here, digital video (Motion JPEG) is the processing target.

1.電子透かしの埋め込み装置
図2は、本発明の実施形態に係る改ざん検出用電子透かしの埋め込み装置を示している。この埋め込み装置1は、例えばデジタルカメラ,デジタルビデオカメラ,カメラ付き携帯電話などのデジタル映像記録装置に内蔵されたコンピュータで構成されている。
1. Digital Watermark Embedding Device FIG. 2 shows a tamper detection digital watermark embedding device according to an embodiment of the present invention. The embedding device 1 is composed of a computer incorporated in a digital video recording device such as a digital camera, a digital video camera, or a camera-equipped mobile phone.

ここでは前記埋め込み装置1は、前記映像記憶装置の映像取得手段2が撮影した映像、即ちフレーム画像列をJPEG符号化すると同時に改ざん検出用の電子透かしを埋め込んでいる。この映像取得手段2は、例えばCCDやCMOSなどの光学部(光学センサ)で構成されている。   Here, the embedding device 1 JPEG-encodes a video image taken by the video acquisition means 2 of the video storage device, that is, a frame image sequence, and simultaneously embeds a digital watermark for tampering detection. This video acquisition means 2 is composed of an optical part (optical sensor) such as a CCD or CMOS.

具体的には、前記埋め込み装置1は、コンピュータのハードウェアリソース(例えば画像処理プロセッサなど)とソフトウェアリソース(OSやアプリケーション)との協働の結果、前処理手段3,電子透かし入力手段4,電子透かしデータ誤り訂正符号化手段5,暗号化手段6,DCTブロックグループ分割手段7,最大値Aの選択手段8,B値算出手段9,乱数発生器10,暗号化済み符号データ埋め込み手段11,最終DCTブロック演算値ヘッダー保存手段12,エントロピー圧縮手段13,JFIF形式整形手段14として機能する。 Specifically, the embedding device 1 has a pre-processing unit 3, a digital watermark input unit 4, an electronic component as a result of cooperation between computer hardware resources (for example, an image processor) and software resources (OS and application). Watermark data error correction encoding means 5, encryption means 6, DCT block group dividing means 7, maximum value A selecting means 8, B value calculating means 9, random number generator 10, encrypted code data embedding means 11, final It functions as a DCT block operation value header storage unit 12, an entropy compression unit 13, and a JFIF format shaping unit 14.

前記前処理手段3には、前記映像取得手段2の撮影したフレーム画像列が伝送される。ここで伝送される各フレーム画像は、前記光学部から出力されたアナログデータをA/D変換したデジタルデータとする。このとき前記前処理手段3は、各フレーム画像に対して、通常のJPEG符号化のDCT係数量子化までの処理を行う。   The pre-processing unit 3 is transmitted with the frame image sequence captured by the video acquisition unit 2. Each frame image transmitted here is digital data obtained by A / D converting analog data output from the optical unit. At this time, the preprocessing means 3 performs processing up to DCT coefficient quantization of normal JPEG encoding for each frame image.

前記電子透かし入力手段4には、前記各フレーム画像に埋め込む電子透かしデータ(例えばカレンダーの日付など)を入力するためのボタン(キー)などが該当する。   The digital watermark input means 4 corresponds to a button (key) for inputting digital watermark data (for example, calendar date) to be embedded in each frame image.

前記電子透かしデータ誤り訂正符号化手段5は、入力された前記電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする。前記暗号化手段6は、前記誤り検出符号化データを所定の暗号化手法により暗号化済み符号データとする。 The digital watermark data error correction encoding means 5 gives the input digital watermark data redundancy to the data by a predetermined error detection encoding method to obtain error detection code data. The encryption unit 6 converts the error detection encoded data into code data that has been encrypted by a predetermined encryption method.

前記DCTブロックグループ分割手段7は、前記各フレーム画像を構成するY,Cb,Crの3種類の色成分のDCTブロックを暗号化済み符号化データのbit数と同じ個数ずつのグループに分けるものとする。   The DCT block group dividing means 7 divides the DCT blocks of three types of color components Y, Cb, and Cr constituting each frame image into groups of the same number as the number of bits of encoded data. To do.

前記最大値Aの選択手段8は、各グループの1つのDCTブロックの量子化係数の中から絶対値が最大のA値を選択する。前記B値算出手段9は、乱数発生手段10から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ値とから演算した結果に基づくB値を算出する。   The maximum value A selecting means 8 selects the A value having the maximum absolute value from the quantization coefficients of one DCT block of each group. The B value calculation means 9 calculates a B value based on a result calculated from a random value obtained from the random number generation means 10 and a hash value of a numerical value obtained by concatenating the quantization coefficient of each DCT block.

前記暗号化済み符号データ埋め込み手段11は、A値に−K,0,K(Kは任意の正奇数)のいずれかを加える暗号化済み符号データ埋め込む。ここではDCTブロックに暗号化済み符号データの「bit 0」を埋め込むときには、当該DCTブロックのA値とB値との差が偶数になるようにする。一方、DCTブロックに暗号化済み符号データの「bit 1」を埋め込むときには、当該DCTブロックの値Aと値Bとの差が奇数になるようにする。   The encrypted code data embedding unit 11 embeds encrypted code data that adds any of −K, 0, K (K is an arbitrary positive / odd number) to the A value. Here, when “bit 0” of the encoded code data is embedded in the DCT block, the difference between the A value and the B value of the DCT block is set to an even number. On the other hand, when “bit 1” of the encoded code data is embedded in the DCT block, the difference between the value A and the value B of the DCT block is set to an odd number.

前記最終DCTブロック演算値ヘッダー保存手段12は、(最終グループ番号−1)グループの最終DCTブロックのA値変更済の係数を連結した数値のハッシュ値と、該最終DCTブロックのひとつ前のDCTブロック係数値を演算した値との排他的論理和を取り、その結果を所定の暗号化方法により暗号化した値をJPEGフォーマットのヘッダー内におけるコメント欄に保存する。   The final DCT block operation value header storage means 12 is a numerical hash value obtained by concatenating the A value changed coefficients of the final DCT block of the (final group number-1) group, and the DCT block immediately before the final DCT block. The exclusive OR of the coefficient value and the calculated value is calculated, and the result obtained by encrypting the result by a predetermined encryption method is stored in the comment field in the header of the JPEG format.

前記エントロピー圧縮手段13と前記JFIF形式整形手段14とは、埋め込み完了後の量子化係数を通常のJPEG符号化工程と同様に、エントロピー圧縮・JPEGフォーマットに適合するように整形し、JPEG符号化を完了させる。以下、図3のチャート図に基づき前記埋め込み装置1の具体的な処理内容を説明する。   The entropy compression means 13 and the JFIF format shaping means 14 shape the quantized coefficients after embedding so as to conform to the entropy compression / JPEG format in the same manner as in the normal JPEG encoding process, and perform JPEG encoding. Complete. Hereinafter, specific processing contents of the embedding apparatus 1 will be described with reference to the chart of FIG.

S21〜S25:前記映像取得手段2にて対象を撮影すると(S21)、撮影映像のフレーム画像が連続的に前記前処理手段3に伝送される。ここでは前記前処理手段3は、各フレーム画像に対して通常のJPEG符号化の工程と同じ処理を進める。すなわち、デジタル映像の各フレーム画像にYCbCr変換(S22)とダウンサンプリング(S23)とDCT(S24)を経てDCT係数の量子化(S25)までを実行する。   S21 to S25: When an object is photographed by the video acquisition means 2 (S21), frame images of the photographed video are continuously transmitted to the preprocessing means 3. Here, the pre-processing means 3 advances the same process as the normal JPEG encoding process for each frame image. That is, each frame image of digital video is subjected to YCbCr conversion (S22), downsampling (S23), and DCT (S24) to DCT coefficient quantization (S25).

この量子化(S25)後は、図9に示すように、各DCTブロック内では「8×8=64個」の量子化係数が存在する状態になる。ここでは量子化係数はY,Cb,Crの色成分毎に存在する。   After this quantization (S25), as shown in FIG. 9, “8 × 8 = 64” quantization coefficients exist in each DCT block. Here, the quantization coefficient exists for each color component of Y, Cb, and Cr.

また、前記ダウンサンプリング(S23)の際には、Y成分(輝度信号)よりCb(青系統の色相・彩度を表す信号),Cr成分(赤系統の色相・彩度を表す信号)の方を粗くサンプリングするのが一般的であるので、DCTブロックの数はY成分が最も多くなる。Y,Cb,Crのいずれの場合であっても、DCTブロックの中には8×8の量子化係数が含まれる。   At the time of downsampling (S23), the Cb (a signal representing the hue / saturation of the blue system) and the Cr component (a signal representing the hue / saturation of the red system) than the Y component (luminance signal). Is generally sampled, the number of DCT blocks has the largest Y component. In any case of Y, Cb, and Cr, 8 × 8 quantization coefficients are included in the DCT block.

S26:前記電子透かし入力手段4により電子透かしデータを取得する。取得した電子透かしデータは、S27.S28にて処理が施される。ここでは一例として電子透かしデータは、448bitであるとする。この448bitというのは任意に決定可能であり、S27の誤り検出符号化により冗長化した結果のbit数が、S29の分割された1グループ内のDCTブロック数と同じになる条件下で任意に選び得る。   S26: The digital watermark data is obtained by the digital watermark input means 4. The acquired digital watermark data is S27. Processing is performed in S28. Here, as an example, the digital watermark data is assumed to be 448 bits. This 448 bits can be arbitrarily determined, and can be arbitrarily selected under the condition that the number of bits resulting from redundancy by the error detection coding in S27 is the same as the number of DCT blocks in one group divided in S29. obtain.

S27:前記透かしデータ誤り検出符号化手段5は、電子透かしデータに冗長性を付与するために、誤り検出符号化を施す。ここでは誤り検出符号に偶数行パリティを選択した事例を説明する。   S27: The watermark data error detection encoding means 5 performs error detection encoding in order to provide redundancy to the digital watermark data. Here, a case where even-numbered row parity is selected as the error detection code will be described.

すなわち、図10に示すように、電子透かしデータの448bitを7列64行に並べ、各行の末尾に偶数パリティbitを1個付加する。偶数パリティbitとは、パリティbitを含めた各行の8個のデータbitの中で1となる個数が偶数個となるようにパリティbitの値を1か0に定める方法である。   That is, as shown in FIG. 10, 448 bits of digital watermark data are arranged in 7 columns and 64 rows, and one even parity bit is added to the end of each row. The even parity bit is a method of setting the value of the parity bit to 1 or 0 so that the number of 1s in 8 data bits of each row including the parity bit is an even number.

各行に偶数パリティbitを付加した結果、誤り検出符号化されたデータは64個のパリティbitが加わり全体で448+64=512bitとなる。誤り検出符号は偶数行パリティに限らず、これ以外の検出符号(非特許文献1参照)を用いてもよい。   As a result of adding even parity bits to each row, 64 parity bits are added to the data subjected to error detection coding, and the total becomes 448 + 64 = 512 bits. The error detection code is not limited to even-numbered row parity, and other detection codes (see Non-Patent Document 1) may be used.

S28:前記暗号化手段6では、誤り検出符号化された512bitのデータを暗号化して、512bitの暗号化済み符号データを生成する。ここでは一例として暗号にcamellia暗号(非特許文献2参照)を用いる。   S28: The encryption means 6 encrypts the 512-bit data that has been subjected to error detection coding, and generates 512-bit encrypted code data. Here, as an example, the Camellia cipher (see Non-Patent Document 2) is used as the cipher.

Camellia暗号は、128bitのブロック暗号であり、128bitのデータの並びを別の128bitのデータの並び(暗号化済み符号化データ)に変換する。変換するときには、128/192/256bitの暗号鍵を必要とする。暗号化済み符号化データを復号して元のデータ符号を得るには、暗号化時と同じ暗号鍵を使ってcamellia復号処理を行う。Camellia暗号は、128bitのブロック暗号であるので、512bitの誤り検出符号を暗号化する場合は512/128=4回の処理を必要とする。暗号化方法はcamellia暗号に限らず、これ以外の暗号方法を用いてもよい。   The Camellia cipher is a 128-bit block cipher, and converts a sequence of 128-bit data into another sequence of 128-bit data (encoded encoded data). When converting, an encryption key of 128/192/256 bits is required. In order to decrypt the encoded data and obtain the original data code, a camellia decryption process is performed using the same encryption key as that used for encryption. Since the Camellia cipher is a 128-bit block cipher, when a 512-bit error detection code is encrypted, 512/128 = 4 processes are required. The encryption method is not limited to camellia encryption, and other encryption methods may be used.

S29:前記DCTブロックグループ分割手段7は、画像フレーム中のDCTブロックのグループ分割を行う。グループ分割の処理手順を図4のフローチャートに基づき説明する。   S29: The DCT block group dividing means 7 performs group division of the DCT block in the image frame. The group division processing procedure will be described with reference to the flowchart of FIG.

ここでは、まずY色成分とCb色成分とCr色成分のDCTブロックをこの順番につなげて1列に並べる(S41)。つぎに、この列の若い方から数えて暗号化済み符号化データのbit数(ここでは512)ずつDCTブロックを取り出し第1グループとする(S42〜S45)。   Here, first, the DCT blocks of the Y color component, the Cb color component, and the Cr color component are connected in this order and arranged in one row (S41). Next, DCT blocks are extracted for each bit number (512 in this case) of the encoded data counted from the youngest in this column, and set as the first group (S42 to S45).

このときグループには先頭の512個を第1グループ、次の512個を第2グループと連続したグループ番号を付与する。最後に512個に満たないDCTブロックが残った場合はそれらを最終グループとする(S46)。グループ分けの様子を図11に示す。   At this time, the group number is assigned to the group, the first 512 being the first group and the next 512 being the second group. If less than 512 DCT blocks remain at the end, they are set as the final group (S46). The state of grouping is shown in FIG.

S30:各グループに含まれるDCTブロックへ暗号化済み符号データを埋め込む。ここでは暗号化済み符号データ埋め込みは、グループ毎に独立して行なわれる。図5のフローチャートに基づき具体的な処理内容を説明する。この処理は全DCTブロックが終了するまで行われるものとする(S51)。   S30: The encoded code data is embedded in the DCT block included in each group. Here, embedding of the encoded code data is performed independently for each group. Specific processing contents will be described based on the flowchart of FIG. This process is performed until all DCT blocks are completed (S51).

(1)絶対値の最大値A選択(S52)
まず、前記最大値選択手段8は、64個の量子化係数の中から絶対値の最大値Aを探索する。ここでは量子化係数は、図9に示すように、8×8の正方形に並んでおり、左上が直流成分であり右下に行くほど高周波成分を表す。絶対値の最大値が複数個ある場合は次のようにして定める。
(1) Maximum value A selection of absolute value (S52)
First, the maximum value selection means 8 searches for the maximum value A of the absolute value from the 64 quantization coefficients. Here, as shown in FIG. 9, the quantization coefficients are arranged in an 8 × 8 square, and the upper left is a DC component, and the higher the frequency is, the lower the right. If there are multiple absolute maximum values, they are determined as follows.

すなわち、最大値が複数ある場合は、図12の逆ジグザグスキャン(通常のJPEGのジグザグスキャンの逆順)の順序で最初に出現したものを最大値とする。ここで同値のものがあった場合、逆ジグザグスキャンで先に出現したものを採用する理由は、透かし埋め込みに用いる量子化係数をなるべく高周波成分側に持って行き、目立ちにくくするためである。このように選んだ最大値をAとする。   That is, when there are a plurality of maximum values, the first value that appears in the reverse zigzag scan order (reverse order of normal JPEG zigzag scan) in FIG. Here, when there are equivalent ones, the reason why the one appearing earlier in the reverse zigzag scan is adopted is to bring the quantization coefficient used for watermark embedding to the high frequency component side as much as possible and make it less noticeable. Let A be the maximum value selected in this way.

このアルゴリズムをフローチャートにしたものを図6に示す。ここではA=0を初期値として(S61)、量子化係数を逆ジグザグスキャンにより進み係数αを取得する(S62)。   FIG. 6 shows a flowchart of this algorithm. Here, A = 0 is set as an initial value (S61), and the quantization coefficient is advanced by inverse zigzag scanning to acquire the coefficient α (S62).

つぎに、|α|>Aが成立するか否かを確認する(S63)。成立する場合にはA=|α|として(S64)、量子化係数を全スキャンしたか否かを確認し(S65)、全スキャンが完了している場合には最大値A=|α|として処理を終了する。   Next, it is confirmed whether or not | α |> A is satisfied (S63). If true, A = | α | is determined (S64), and it is confirmed whether or not the quantization coefficient has been fully scanned (S65). If all scans have been completed, the maximum value A = | α | The process ends.

一方、全スキャンしていない場合にはS62に戻って逆ジグザグスキャンを再開する。このときAの値が更新されているため(S64)、次回以降のスキャンで同値の量子化係数αが読み取られても、S63の|α|>Aが成立することはなく、そのままS65の確認処理に進む。これにより逆ジグザグスキャンの順序で最初にスキャンされた量子化係数αが最大値Aとされる。   On the other hand, if the entire scan has not been performed, the process returns to S62 to resume the reverse zigzag scan. At this time, since the value of A is updated (S64), even if the same quantization coefficient α is read in the next and subsequent scans, | α |> A of S63 does not hold, and the confirmation of S65 is performed as it is. Proceed to processing. As a result, the quantization coefficient α first scanned in the reverse zigzag scan order is set to the maximum value A.

(2)B値の算出(S53)
前記B値算出手段9のB値算出方法を図7に示す。B値は、各DCTブロックにつき1個算出する。Bの値は0か1を取る。ここではB値を算出するために、乱数発生器10から得られた乱数のハッシュ値を用いる(非特許文献5 p.162〜p.175参照)。ハッシュ関数により算出されるハッシュ値のbit長をHとする。Hは使用するハッシュ関数により異なるが、ここでは一例としてSHA−1ハッシュ関数(非特許文献4.非特許文献5のp.176〜p.184参照)を用いるので、H=160とする。なお、SHA−1以外のハッシュ関数を用いてもよい。
(2) Calculation of B value (S53)
The B value calculation method of the B value calculation means 9 is shown in FIG. One B value is calculated for each DCT block. The value of B takes 0 or 1. Here, in order to calculate the B value, the hash value of the random number obtained from the random number generator 10 is used (see Non-Patent Document 5, p. 162 to p. 175). Let H be the bit length of the hash value calculated by the hash function. H varies depending on the hash function to be used, but here, as an example, the SHA-1 hash function (see Non-Patent Document 4. Non-Patent Document 5, p. 176 to p. 184) is used, so that H = 160. A hash function other than SHA-1 may be used.

具体的には、第1番目のDCTブロックのBの値は、図7に示すように、前記乱数発生器10により発生した乱数のハッシュ値の最下位bitとする。また、第n番目のDCTブロックのB値は、ひとつ前(n−1)のB値算出に使用した160bitのハッシュ値と、ひとつ前(n−1)のブロックにS54のA値調整を加えた後のDCT係数をラスタースキャン(図13参照)順に並べた数値のハッシュ値とのbit毎に排他的論理和(XOR)を取った値を、最下位bitから数えて第n番目のbit値とする。   Specifically, the value B of the first DCT block is the least significant bit of the hash value of the random number generated by the random number generator 10, as shown in FIG. The B value of the nth DCT block is the 160-bit hash value used to calculate the previous (n-1) B value, and the A value adjustment in S54 is added to the previous (n-1) block. The value obtained by calculating the exclusive OR (XOR) for each bit with the hash value of the numerical value obtained by arranging the DCT coefficients in the order of the raster scan (see FIG. 13) is counted from the least significant bit to the nth bit value. And

このときDCTブロック個数(n)が、乱数のハッシュ値bit長Hより大きい場合は「n≦H」となるまでnからHを減じた値を用いる。例えば、DCTブロック個数nが160を越える場合に、第160bitまでB値算出に使用したら次ブロック以降は最下位のbitに戻って算出するものとする。   At this time, when the number of DCT blocks (n) is larger than the hash value bit length H of the random number, a value obtained by subtracting H from n until “n ≦ H” is used. For example, when the number n of DCT blocks exceeds 160, when the B value is calculated up to the 160th bit, the next block and subsequent bits are returned to the least significant bit for calculation.

また、前記ヘッダー保存手段12は、(最終−1)グループの最終DCTブロックのB値算出に使用した160bitのハッシュ値と、同ブロックの前記A値調整後のDCT係数をラスタースキャン順に並べた数値とのbit毎の排他的論理和(XOR)を取った値を、暗号化後にJPEGヘッダーのコメント欄に保存する。   The header storage means 12 is a numerical value in which the 160-bit hash value used for calculating the B value of the final DCT block of the (final-1) group and the DCT coefficient after the A value adjustment of the block are arranged in raster scan order. A value obtained by taking an exclusive OR (XOR) for each bit is stored in the comment field of the JPEG header after encryption.

この値には、128bitの倍数長となるように最下位bitの右側に「0」を付加(パディング)して加えられているものとする。また、暗号化は、誤り検出符号を暗号化した方法と同じ128bitブロック暗号方法および同じ暗号鍵を用いているものとする。   It is assumed that “0” is added (padded) to the right side of the least significant bit so as to be a multiple length of 128 bits. Further, it is assumed that the encryption uses the same 128-bit block encryption method and the same encryption key as the method of encrypting the error detection code.

なお、前記乱数発生器10は、乱数の種(初期値)が同一ならば同じ乱数列が得られる方法、例えば線形合同法を用いる。もっとも、乱数発生方法は線形合同法に限らず、乱数の種を決定すれば出力される乱数列が決定論的に決まるような他の方法を使用してもよい。   The random number generator 10 uses a method of obtaining the same random number sequence if the seeds (initial values) of the random numbers are the same, for example, a linear congruence method. However, the random number generation method is not limited to the linear congruential method, and other methods may be used in which the random number sequence to be output is determined deterministically by determining the seed of the random number.

(3)A値の調整(S54)
前記暗号化済み符号データ埋め込み手段11は、埋め込むbitによりA値を調整する。すなわち、S28で生成された暗号化済み符号データのbit「1」を埋め込むDCTブロックであれば「A−B=奇数」となるように調整する一方、該暗号化済み符号データのbit「0」を埋め込むDCTブロックであれば「A−B=偶数」となるようにAを調整する。
(3) A value adjustment (S54)
The encrypted code data embedding unit 11 adjusts the A value by the embedding bit. In other words, if the DCT block embeds the bit “1” of the encrypted code data generated in S28, the adjustment is made so that “AB = odd number”, while the bit “0” of the encrypted code data is adjusted. If the DCT block embeds A, A is adjusted so that “AB = even number”.

具体的には、A値の調整は、(イ)任意正奇数を減じる、(ロ)任意正奇数を加える、(ハ)何もしないかの三つの手法から選択するものとする。任意正奇数は、より小さい値を使う方が埋め込み後の美観は有利となる。図8のフローチャートに基づき前記調整方法の具体的処理内容を説明する。   Specifically, the adjustment of the A value is selected from three methods: (b) subtracting arbitrary positive / odd numbers, (b) adding arbitrary positive / odd numbers, and (c) doing nothing. Arbitrary positive / odd numbers have a better aesthetic appearance after embedding if a smaller value is used. The specific processing content of the adjustment method will be described based on the flowchart of FIG.

最初に「A−B=偶数」が成立するか否かを確認する(S81)。例えば「A=15,B=0」の場合にデータ「1」を埋め込みたいとする。この場合には「A−B=15」で既に奇数であるから、S82に進む。ここでは「埋め込みビット=0」が確認される(S82)。この事例では「1」を埋め込みたいので、「(ハ)何もしない」が選択される。   First, it is confirmed whether or not “AB = even number” is established (S81). For example, assume that data “1” is to be embedded when “A = 15, B = 0”. In this case, since “A−B = 15” is already an odd number, the process proceeds to S82. Here, “embedding bit = 0” is confirmed (S82). In this example, since “1” is to be embedded, “(c) do nothing” is selected.

「A=15,B=1」の場合には、「A−B=14」で偶数であるから、S83へ進む。S83でも「埋め込みビット=0」が確認される。ここでは「1」を埋め込みたいので、S84に進む。S84では「A≧0」が成立するか否か、即ちAの正負が確認される。この場合は正値であるので、「(ロ)任意正奇数を加える」が選択され、「A=A+1」の演算が行われる(S85)。この事例では、A=15+1=16に調整される。   In the case of “A = 15, B = 1”, since “A−B = 14” is an even number, the process proceeds to S83. Also in S83, “embedding bit = 0” is confirmed. Since “1” is to be embedded here, the process proceeds to S84. In S84, it is confirmed whether or not “A ≧ 0” is satisfied, that is, whether A is positive or negative. In this case, since it is a positive value, “(b) Add arbitrary positive / odd” is selected, and an operation of “A = A + 1” is performed (S85). In this case, A = 15 + 1 = 16 is adjusted.

また、「A=−18,B=1」の場合にデータ「0」を埋め込みたいとする。この場合は、「A−B=−19」で奇数であるから、S82に進む。ここでは「0」を埋め込みたいので、S84に進み、Aの正負が確認される。この場合は、Aが負値であるから、「(イ)任意正奇数を減じる」が選択され、「A=A−1」の演算が行われる(S86)。この事例では、A=−18−1=−19に調整される。もし、「A=−18,B=0」の場合は、「A−B=−18」で偶数なため、S81.S83に従って「(ハ)何もしない」が選択される。   Further, it is assumed that data “0” is to be embedded when “A = −18, B = 1”. In this case, since “A−B = −19” is an odd number, the process proceeds to S82. Since it is desired to embed “0” here, the process proceeds to S84 and the sign of A is confirmed. In this case, since A is a negative value, “(A) subtract arbitrary positive / odd number” is selected, and an operation of “A = A−1” is performed (S86). In this case, A = −18−1 = −19. If “A = −18, B = 0”, since “A−B = −18” is an even number, S81. According to S83, “(c) Do nothing” is selected.

このように前記暗号化済み符号データ埋め込み手段11が、第1グループ内の各DCTブロックに暗号済み符号データのbitを埋め込んだ後に、第2グループ〜(最終−1)グループまでについても同様に暗号済み符号データを埋め込む。ここで最終グループには第1グループと同じ値を埋め込み、足りないDCTブロックについては無視するものとする。暗号化済み符号データは、全てのグループで同じデータでもよく、また各グループで異なってもよい。暗号化済みデータが各グループで同じか、あるいは異なるかはアプリケーションの都合により決めてもよい。   As described above, after the encrypted code data embedding unit 11 embeds the bit of the encrypted code data in each DCT block in the first group, the encryption is similarly performed from the second group to the (final-1) group. Embedded code data. Here, the same value as that of the first group is embedded in the final group, and the missing DCT block is ignored. The encrypted code data may be the same data in all groups or may be different in each group. Whether the encrypted data is the same or different in each group may be determined by the convenience of the application.

S31.S32:S30にて全グループについて暗号化済み符号データbitの埋め込みが終了した後には、通常のJPEG符号化の工程と同様にエンピロー圧縮(S31)、JFIF形式に適合するようにデータ整形(S32)を実行し、JPEG列の映像として出力する。出力された映像はメモリカードなどの保存手段に記憶されるものとする。   S31. S32: After embedding of the encoded code data bits for all groups is completed in S30, data is shaped so as to conform to Empiro compression (S31) and JFIF format in the same manner as in the normal JPEG encoding process (S32). Is output as a JPEG sequence video. Assume that the output video is stored in a storage means such as a memory card.

ここで出力される映像は、電子透かしを量子化係数に埋め込むにあたって、S54に示すように、絶対値の最大な量子化係数Aに最小の正奇数(1.0.−1)が変数に与えられているにすぎないことから、美感を損ねることなく電子透かしが埋め込まれ、これにより画質劣化が最小限に抑えられ、証拠としての信憑性などが向上する。   In embedding a digital watermark into a quantization coefficient, the output video is given a variable with the smallest positive / odd number (1.0.-1) as the maximum absolute quantization coefficient A as shown in S54. Therefore, the digital watermark is embedded without impairing the aesthetics, thereby minimizing image quality degradation and improving the credibility as evidence.

このとき埋め込む電子透かしデータは、S28で暗号化されているばかりか、埋め込むアルゴリズム(S53.S54)にも乱数を利用して埋め込む数値を定めていることから、暗号化手段6の暗号鍵および乱数発生器10の初期値を知得していなければ、前記埋め込み装置1のアルゴリズムを熟知した者でも偽造することが難しい。   The digital watermark data to be embedded at this time is not only encrypted in S28, but also the embedded algorithm (S53.S54) defines a numerical value to be embedded using a random number. If the initial value of the generator 10 is not known, it is difficult for a person who is familiar with the algorithm of the embedding device 1 to forge.

したがって、暗号鍵と乱数の初期値を秘密にしておけば、偽の映像を真正な映像と偽る攻撃を防ぐことができる。この場合に乱数により決まる埋め込み数値が画像の内容によっても変化するため、複数の埋め込み済み画像を解析して、前記埋め込み装置1の乱数生成パターンを推定して電子透かしを偽造しようとする攻撃者に対しても乱数生成パターンの推定を困難とさせる効果が生じる。   Therefore, if the encryption key and the initial value of the random number are kept secret, it is possible to prevent an attack that makes a false image a genuine image. In this case, since the embedding numerical value determined by the random number also changes depending on the content of the image, an attacker who analyzes a plurality of embedded images and estimates the random number generation pattern of the embedding device 1 to try to forge a digital watermark In contrast, the effect of making it difficult to estimate the random number generation pattern occurs.

また、電子透かしを複数の色成分に埋め込むことにより、同一の画像位置に複数の電子透かしを埋め込み可能なため、前記埋め込み装置1の電子透かしを偽造しようとする攻撃者は、複数の色成分の電子透かしを両方とも矛盾のないように偽造する必要があり、この点でも偽造難易度が増加する。   In addition, since a plurality of digital watermarks can be embedded at the same image position by embedding a digital watermark in a plurality of color components, an attacker who attempts to forge the digital watermark of the embedding device 1 has a plurality of color components. Both digital watermarks must be counterfeited so that there is no contradiction, and this also increases the difficulty of counterfeiting.

2.改ざん検出装置
図14は、本発明の実施形態に係る改ざん検出装置を示している。この検出装置20は、前記埋め込み装置1で電子透かしを埋め込まれたJPEG画像列の改ざんの有無を検出する。
2. Tamper Detection Device FIG. 14 shows a tamper detection device according to an embodiment of the present invention. The detection device 20 detects whether the JPEG image sequence embedded with the digital watermark by the embedding device 1 is falsified.

前記検出装置20は、前記映像記録装置に内蔵されていてもよく、また別個の装置、例えばパーソナルコンピュータ(PC)などにより構成してもよい。具体的には、前記検出装置20は、コンピュータのハードウェアリソース(例えば前記映像記憶装置の画像処理プロセッサや、パーソナルコンピュータのCPUなど)とソフトウェアリソース(OSやアプリケーション)との協働の結果、JPEG符号化映像データ入力手段21,前処理手段22,DCTブロックグループ分割手段,最大値Aの選択手段8,B値の算出手段9,乱数発生手段10,ビットデータ取得手段23,暗号復号化手段24,比較手段25,誤り検出復号手段26,逆量量子化手段27,逆DCT手段28,色空間変換手段29,誤り発生箇所重畳表示手段30として機能している。 The detection device 20 may be built in the video recording device, or may be configured by a separate device such as a personal computer (PC). Specifically, the detection device 20 detects the JPEG as a result of cooperation between hardware resources of a computer (for example, an image processor of the video storage device and a CPU of a personal computer) and software resources (OS and applications). Encoded video data input means 21, preprocessing means 22, DCT block group dividing means 7 , maximum value A selecting means 8, B value calculating means 9, random number generating means 10, bit data obtaining means 23, encryption / decryption means 24, comparison means 25, error detection decoding means 26, inverse quantity quantization means 27, inverse DCT means 28, color space conversion means 29, and error occurrence location superimposing display means 30.

ここでは前記検出装置20のDCTブロックグループ分割手段7,乱数発生器10,暗号復号化手段24,誤り検出復号手段26は、前記埋め込み装置1で電子透かしを埋め込む際に使用したDCTブロックグループ分割形状、誤り検出符号化方法と暗号化方法とその暗号鍵、乱数発生方法と乱数発生の初期値のそれぞれの情報を既知なものとする。   Here, the DCT block group dividing means 7, random number generator 10, encryption / decryption means 24, and error detection / decryption means 26 of the detection device 20 are the DCT block group division shapes used when embedding the electronic watermark in the embedding device 1. The error detection encoding method, the encryption method, the encryption key, the random number generation method, and the initial value of the random number generation are known.

このような前記検出装置20の検出処理手順を説明すれば、まず前記映像データ入力手段21は、前記メモリカードなどの保存手段に記憶されたJPEG列の映像を読み込んで取得する。ここで取得されたデジタル映像データは、前記前処理手段22を通じて通常のJPEG複号化工程を経る。すなわち、各JPEG画像フレームが、JFIF形式からデータ列に整形され、該データ列がエントロピー復号化され、DCTブロックの量子化係数まで変換される。   The detection processing procedure of the detection device 20 will be described. First, the video data input means 21 reads and acquires the video of the JPEG sequence stored in the storage means such as the memory card. The acquired digital video data is subjected to a normal JPEG decoding process through the preprocessing means 22. That is, each JPEG image frame is shaped into a data string from the JFIF format, the data string is entropy-decoded and converted to a DCT block quantization coefficient.

つぎに、前記DCTブロックグループ分割手段7により、埋め込み時と同一のDCTブロックのグループ分け(図11参照)が行われる。この各グループのDCTブロックについて、暗号化済み符号データのbit(1 or 0)を検出する。   Next, DCT block grouping means 7 performs the same DCT block grouping (see FIG. 11) as that used for embedding. Bits (1 or 0) of encrypted code data are detected for the DCT blocks of each group.

この検出処理を図15のフローチャートに基づき説明する。この処理は各グループで独立に行われる。最初に前記最大値Aの選択手段8が、最初のDCTブロックについて64個の量子化係数値を吟味して絶対値の最大値Aを決める(S152)。このAを決める方法は埋め込み時(図6参照)と全く同じである。つぎにB値算出手段9が埋め込み時と同じ手法でB値を決める(S153)。このとき用いる乱数発生器10の構成と初期値は埋め込み時と同一とする。なお、前記各手段7〜10は、前記埋め込み装置1と同様な処理を実行するため、前記検出装置20を前記映像記録装置に内蔵する場合は前記埋め込み装置1と兼用してもよい。   This detection process will be described based on the flowchart of FIG. This process is performed independently for each group. First, the selecting unit 8 for the maximum value A examines 64 quantization coefficient values for the first DCT block and determines the maximum value A of the absolute value (S152). The method for determining A is exactly the same as that for embedding (see FIG. 6). Next, the B value calculation means 9 determines the B value by the same method as that used for embedding (S153). The configuration and initial value of the random number generator 10 used at this time are the same as those at the time of embedding. Each of the means 7 to 10 executes the same processing as that of the embedding device 1, and therefore may be used as the embedding device 1 when the detection device 20 is built in the video recording device.

前記ビットデータ取得手段23は、S152.S153で定めたAとBを吟味し(S154)、A−Bが偶数ならば「0」を取得する(S155)一方、A−Bが奇数なら「1」を取得する(S156)。このS152〜S156を全ブロックに施して検出処理を終了する(S151)。   The bit data acquisition means 23 is S152. A and B determined in S153 are examined (S154), and if A-B is an even number, "0" is acquired (S155), whereas if A-B is an odd number, "1" is acquired (S156). S152 to S156 are applied to all blocks, and the detection process is terminated (S151).

そして、前記暗号符号化手段24は、S155.S156にて1グループ内の全てのDCTブロックから埋め込みbit(1 or 0)を取得(本例では全部で512bit)した後に、取得データに対して暗号の復号化を行う。この復号時には埋め込み時と同じ暗号方法および暗号鍵を用いる。これにより得られた512bitの復号化データ符号に対し、誤り検出復号手段26にて誤り検出復号化処理を行う。その結果、誤りの有無が検出され、誤りがなければ448bitの埋め込み透かしデータが得られる一方、誤りがあれば誤りを含むグループを示す情報が得られる。   Then, the encryption encoding unit 24 performs S155. In S156, after acquiring embedded bits (1 or 0) from all DCT blocks in one group (in this example, 512 bits in total), the acquired data is decrypted. At the time of decryption, the same encryption method and encryption key as at the time of embedding are used. The error detection decoding means 26 performs an error detection decoding process on the 512-bit decoded data code obtained as described above. As a result, the presence or absence of an error is detected, and if there is no error, 448-bit embedded watermark data is obtained, while if there is an error, information indicating a group including the error is obtained.

第1グループの改ざん検出後に、第2グループ〜(最終−1)グループまで同一の処理手順で改ざん検出を行う。最終グループでは検出されたビット列の並びが第1グループと同一であるか否かを確認し、同一であれば誤りが無いものと判断する。最終グループはDCTブロック数が512個に満たないため、第1グループと比較する際に不足する分が生じるがそれは無視する。   After detection of falsification of the first group, falsification is detected in the same processing procedure from the second group to the (final-1) group. In the final group, it is confirmed whether or not the sequence of detected bit strings is the same as that in the first group, and if it is the same, it is determined that there is no error. Since the number of DCT blocks in the final group is less than 512, a shortage occurs when compared with the first group, but this is ignored.

また、前記比較手段25は、次の処理手順を実行する。すなわち、(最終−1)グループの最終DCTブロックのB値算出に使用した160bitのハッシュ値と同DCTブロックのDCT係数をラスタースキャン順に並べた数値とのbit毎の排他的論理和(XOR)を取った値を求める。   The comparison means 25 executes the following processing procedure. That is, the exclusive OR (XOR) for each bit of the 160-bit hash value used for calculating the B value of the final DCT block of the (final-1) group and the numerical value in which the DCT coefficients of the DCT block are arranged in raster scan order. Find the value taken.

この値に128の倍数長となるように最下位bitの右側に「0」を付加(パディング)して加えた数値を、誤り検出符号を符号化した方法と同一の128bitブロック暗号方法および同一の暗号鍵により暗号化する。この暗号化後にJPEGヘッダーのコメント欄の数値と比較する。   The same 128-bit block encryption method and the same method as the method of encoding the error detection code are added to the value obtained by adding (padding) “0” to the right side of the least significant bit so as to be a multiple of 128. Encrypt with encryption key. After this encryption, it is compared with the numerical value in the comment field of the JPEG header.

また、前記コメント欄の数値を、誤り検出符号の符号化方法と同一の128bitブロック暗号方法および同一の暗号鍵により復号化し、前記排他的論理和の値と比較してもよい。   Further, the numerical value in the comment field may be decrypted with the same 128-bit block encryption method and the same encryption key as the error detection code encoding method and compared with the exclusive OR value.

比較の結果が同一であれば誤りは無く、違っていれば(最終−1)グループに誤りがあると判別する。この処理は冗長ではあるが、(最終−1)グループの最終DCTブロックは偽造に対して最も脆弱なため、この処理により偽造耐性が頑健とされる。   If the comparison results are the same, there is no error, and if they are different, it is determined that there is an error in the (final-1) group. Although this process is redundant, the final DCT block of the (final-1) group is most vulnerable to forgery, and this process makes forgery resistance robust.

その後に前記逆量子化手段27・前記逆DCT手段28にて、通常のJPEG復号化の手順と同様に各DCTブロックの量子化係数を逆量子化しDCT係数に戻し、それに対し逆DCTを行う。さらに前記色空間変換手段29にて色空間変換を行い映像とする。   After that, the inverse quantization means 27 and the inverse DCT means 28 inversely quantize the quantized coefficients of each DCT block into the DCT coefficients in the same manner as the normal JPEG decoding procedure, and perform inverse DCT on the quantized coefficients. Further, the color space conversion means 29 performs color space conversion to produce an image.

したがって、前記検出装置20の処理手順によれば、誤り検出復号手段26にて検出された誤りの有無、誤りグループ、埋め込み透かしデータを用いて、以下のように改ざんの有無と改ざん場所を判別することができる。すなわち、図16に示すように、全てのグループから誤りが検出されなかった場合は、その映像は透かし埋め込み後からの改ざんは行われていないものと判断される。   Therefore, according to the processing procedure of the detection device 20, the presence / absence of falsification and the falsification location are determined using the presence / absence of error detected by the error detection / decoding means 26, error group, and embedded watermark data as follows. be able to. That is, as shown in FIG. 16, if no error is detected from all the groups, it is determined that the video has not been altered after watermark embedding.

一方、誤りが検出されたグループ内の映像は、改ざんされているものと判断される。この場合には、図17に示すように、グループを構成するDCTブロックが占めるエリア内のいずれかに改ざん可能性がある。   On the other hand, it is determined that the video in the group in which the error is detected has been tampered with. In this case, as shown in FIG. 17, there is a possibility of falsification in any of the areas occupied by the DCT blocks constituting the group.

ここで透かしが壊れていることを誤り検出符号により検出した場合には、壊れた透かしデータが含まれる映像グループ(=映像範囲)が改ざんされたものと判断できる。これにより映像のどの場所が透かし埋め込み後に改ざんされたかを知る手段が提供される。   Here, when it is detected by the error detection code that the watermark is broken, it can be determined that the video group (= video range) including the broken watermark data is falsified. This provides a means of knowing which part of the video has been tampered with after watermark embedding.

このように誤りが検出された箇所、即ち改ざんされた映像グループを前記重畳表示手段30にてモニタなどに出力するものとする。ここではJPEG復号化された映像に改ざんされたグループの位置をあらわす目印が重畳表示され、この点で改ざん箇所が容易に把握できる。   The location where the error is detected in this way, that is, the altered video group is output to the monitor or the like by the superimposed display means 30. Here, a mark indicating the position of the falsified group is superimposed on the JPEG-decoded video, and the falsified location can be easily grasped at this point.

3.変形例(バリエーション)
本発明は、上記実施形態に限定されるものではなく、埋め込む電子透かしデータのbit数の多寡、誤り検出符号の種類、暗号化方法の種類、乱数発生方法の種類などを、以下の態様などに変更することで多種多様なバリエーションが得られる。なお、本発明はデジタル映像のみならず、静止画像にも適用することができる。
3. Variation (variation)
The present invention is not limited to the above-described embodiment, and the number of bits of digital watermark data to be embedded, the type of error detection code, the type of encryption method, the type of random number generation method, and the like are as follows. Various variations can be obtained by changing. Note that the present invention can be applied not only to digital video but also to still images.

<埋め込み電子透かしデータbit数>
(1)S26の電子透かしデータのbit数は、誤り検出符号の面からすれば誤り検出符号が構成できる条件で任意の値を取り得る。例えば最小としたいのなら、データ1bitとパリティ1bitとなる。最大値の方は映像の大きさで決まる。例えば640×480画素のVGA画像を用いる場合は、Y成分とCb成分とCr成分を合わせたDCT個数は7200個であるから、この場合のデータbit数の最大値、誤り検出符号を加えて7200以下ということになる。
(2)暗号化方式の面からは、暗号化方式の選び方でbit数が制約を受ける。前述のようにcamellia暗号はブロック暗号と呼ばれ、128bit長を1ブロックとしたデータを、128bitの暗号化された符号データに変換する。この場合、誤り検出符号を加えたbit数はブロック長128の倍数であることが望ましい。ここで必須ではなく望ましい理由としては、128の倍数でなくても、bit数が足りない分は0か1のデータを付加(パディング)することにより128の倍数に出来るからである。もっとも、パディングにより無意味なデータを付加するよりは、何かしら意味のあるデータを付加した方がアプリケーション面では有利と言える。
(3)埋め込むデータを何にするかはアプリケーションに依存するが、例えば映像を証拠に利用する場合は、カメラ固有ID、撮影時刻(あればカメラ内時計より取得する)、撮影場所(GPS等により取得する)を埋め込んでもよい。また、改ざん場所を特定するためには、映像をグループ分けしたそれぞれのグループに0あるいは1から通し番号を振り、それを埋め込んでもよい。埋め込むデータフォーマットの例を図18に示す。埋め込むデータとフォーマットはこの例に限らずアプリケーションの要求により任意に設計し得る。
<Number of embedded watermark data bits>
(1) The number of bits of the digital watermark data in S26 can take an arbitrary value under the condition that the error detection code can be configured in terms of the error detection code. For example, if it is desired to minimize the data, the data is 1 bit and the parity is 1 bit. The maximum value is determined by the size of the image. For example, when a 640 × 480 pixel VGA image is used, the total number of DCTs including the Y component, the Cb component, and the Cr component is 7200. Therefore, the maximum number of data bits and the error detection code in this case are added to 7200. It becomes the following.
(2) From the aspect of the encryption method, the number of bits is restricted by how the encryption method is selected. As described above, the Camellia cipher is called a block cipher, and converts data having a 128-bit length into one block into 128-bit encrypted code data. In this case, the number of bits including the error detection code is preferably a multiple of the block length 128. The reason why this is not essential and desirable is that even if it is not a multiple of 128, it can be made a multiple of 128 by adding (padding) data of 0 or 1 to the extent that the number of bits is insufficient. However, it can be said that it is more advantageous in terms of application to add some meaningful data than to add meaningless data by padding.
(3) What data to embed depends on the application. For example, when using video as evidence, the camera-specific ID, the shooting time (obtained from the camera clock, if any), the shooting location (by GPS, etc.) May be embedded). Further, in order to specify the alteration location, a serial number from 0 or 1 may be assigned to each group in which the video is grouped and embedded. An example of the data format to be embedded is shown in FIG. The data and format to be embedded are not limited to this example, and can be arbitrarily designed according to application requirements.

<誤り検出符号の種類>
(1)行パリティ
まず、S27で誤り検出符合に使用する行パリティを補足説明する。この行パリティは、最も簡単な誤り検出符号であり、図10に示すように、元bitデータを行列の形に並べ、各行にパリティbitを1bit付加したものである。偶数パリティならば、パリティbitも含めた各行の1の数が偶数個になるようにパリティbitを選択する。奇数パリティであれば、1の数が奇数個になるようにパリティbitを選択する。パリティbitを付加した分、全体のbit数が増える。詳細な説明では元データ448bitを64行に並べていたため、総bitは64bit増えて448+64=512bitとなる。行パリティと類似するものに列パリティがある。パリティの付加を列単位に行うことのみ異なり、他は行パリティと同じである。S27などの誤り検出符合には、列パリティのほかに次のものが使用できる。
<Types of error detection codes>
(1) Row Parity First, a supplementary description will be given of the row parity used for the error detection code in S27. This row parity is the simplest error detection code. As shown in FIG. 10, the original bit data is arranged in a matrix form, and 1 bit of parity bit is added to each row. If the parity is even, the parity bit is selected so that the number of 1s in each row including the parity bit is an even number. For odd parity, the parity bit is selected so that the number of 1s is odd. By adding the parity bit, the total number of bits increases. In the detailed description, since the original data 448 bits are arranged in 64 rows, the total bits increase by 64 bits to become 448 + 64 = 512 bits. Similar to row parity is column parity. The only difference is that the addition of parity is performed in units of columns, and the others are the same as row parity. In addition to column parity, the following can be used for error detection codes such as S27.

(2)行列パリティ
行列パリティは、元bitデータを行列の形に並べ、各行と各列にパリティbitを付加したものである。垂直水平パリティとも呼ばれる。この行列パリティは、行パリティ・列パリティ単独よりも付加するパリティbitは増えるが、これを本発明に採用すれば、誤り検出の精度はより高くなる。
(2) Matrix parity Matrix parity is obtained by arranging original bit data in the form of a matrix and adding a parity bit to each row and each column. Also called vertical and horizontal parity. This matrix parity adds more parity bits than the row parity and column parity alone, but if this is adopted in the present invention, the accuracy of error detection becomes higher.

(3)ハミング符号
ハミング符号(非特許文献1 p47〜p53)によれば、元データbitをk個、検査bit(冗長bit)をm個とすると、2m−m≧k+1の関係となる。例えば総bit数が500bit程度と仮定するとm=9,k=502の組み合わせがある。すなわち、元データが502bitで、検査bitが9bit、総bitが511bitである。なお、ハミング符号は誤り検出だけでなく誤り訂正も可能であるが、本発明では誤り訂正機能を使用しない。
(3) Hamming code According to the Hamming code (Non-patent Document 1, p47 to p53), if the original data bits are k pieces and the check bits (redundant bits) are m pieces, the relationship is 2 m −m ≧ k + 1. For example, assuming that the total number of bits is about 500 bits, there are combinations of m = 9 and k = 502. That is, the original data is 502 bits, the inspection bit is 9 bits, and the total bit is 511 bits. Although the Hamming code can not only detect errors but also correct errors, the present invention does not use an error correction function.

(4)巡回符号(CRC符号)
巡回符号(非特許文献1 p54〜p65)は、ハードウェア化しやすいという特徴を持つ。この巡回符号も誤り検出だけでなく誤り訂正が可能であるが、本発明では誤り訂正機能を使用しない。
(4) Cyclic code (CRC code)
The cyclic code (Non-Patent Document 1 p54 to p65) has a feature that it is easily implemented as hardware. Although this cyclic code can correct not only errors but also errors, the present invention does not use an error correction function.

(5)BCH符号
BCH符号(非特許文献1 p66〜p75)は、巡回符号の一種でランダム誤りの訂正能力が高い。もっとも、本発明では誤り訂正機能を使用しないため、BCH符号を採用するのは、既にBCH符号化モジュールが存在しており、それを流用することでコスト的な利点があるときに限られる。
(5) BCH code A BCH code (Non-patent Document 1, p66 to p75) is a kind of cyclic code and has a high ability to correct random errors. However, since the error correction function is not used in the present invention, the BCH code is used only when the BCH encoding module already exists and there is a cost advantage by diverting it.

(6)RS符号(リードソロモン符号)
RS符号(非特許文献1 p76〜p81)は、巡回符号の一種でバースト誤りの訂正能力が高い。もっとも、本発明では誤り訂正機能を使用しないため、RS符号を採用するのは、既にRS符号化モジュールが存在しており、それを流用することでコスト的な利点があるときに限られる。
(6) RS code (Reed-Solomon code)
The RS code (Non-Patent Document 1 p76 to p81) is a kind of cyclic code and has high burst error correction capability. However, since the error correction function is not used in the present invention, the RS code is used only when the RS encoding module already exists and there is a cost advantage by using it.

<暗号化方法の種類>
まず、S28などの暗号化に使用されるcamellia暗号を補足説明する。Camellia暗号は共通鍵方式128bitブロック暗号であり、暗号化と復号化には共通の鍵を用いる。ここで128bitブロック暗号とは、128bitの元データを128bitの暗号化データに暗号化及び128bitの暗号化データを128bitの元データに復号化できることを示す。暗号化と復号化の際には共通鍵が必要である。共通鍵は128bit長、196bit長、256bit長のいずれかを使うことができる。鍵長が長いほど暗号強度(暗号の破られ難さ)が高い。S28などの暗号化には、camellia暗号に限られず、例えばAES暗号も使用することができる。
<Type of encryption method>
First, a supplementary description of the Camellia cipher used for encryption such as S28 will be given. Camellia cipher is a common key 128-bit block cipher, and a common key is used for encryption and decryption. Here, the 128-bit block cipher means that 128-bit original data can be encrypted into 128-bit encrypted data, and 128-bit encrypted data can be decrypted into 128-bit original data. A common key is required for encryption and decryption. The common key can be 128-bit length, 196-bit length, or 256-bit length. The longer the key length, the higher the cryptographic strength (hardness to break the encryption). The encryption such as S28 is not limited to camellia encryption, and for example, AES encryption can also be used.

AES暗号(非特許文献3参照)は、共通鍵方式128bitブロック暗号であり、暗号化と復号化には共通の鍵を用いる。128bitブロック暗号とは128bitの元データを128bitの暗号化データに暗号化及び128bitの暗号化データを128bitの元データに復号化できることを示す。   The AES cipher (see Non-Patent Document 3) is a common key 128-bit block cipher, and a common key is used for encryption and decryption. The 128-bit block cipher indicates that 128-bit original data can be encrypted into 128-bit encrypted data, and 128-bit encrypted data can be decrypted into 128-bit original data.

暗号化と復号化の際には共通鍵が必要である。共通鍵は128bit長、196bit長、256bit長のいずれかを使うことができる。鍵長が長いほど暗号強度(暗号の破られ難さ)が高い。   A common key is required for encryption and decryption. The common key can be 128-bit length, 196-bit length, or 256-bit length. The longer the key length, the higher the cryptographic strength (hardness to break the encryption).

<乱数発生方法の種類>
前記乱数発生器10に用いる線形合同法を具体的に説明する。線形合同法は、擬似乱数列を生成するアルゴリズムである。アルゴリズムは漸化式Xn+1=(A*Xn+B)mod Mにて与えられる。A,B,Mは定数でM>A,M>B,A>0,B>0である。X0が乱数の種であり、これを決めると以降のX1,X2,...が再現可能な形で得られる。前記乱数発生器10では、M,A,Bは予め適当な値を決めておき、その情報を埋め込み側と検出側で共有するものとする。乱数の種X0も適当な値を決めておいて、埋め込み側と検出側で共有しておけば良いが、前記乱数発生器10では暗号鍵に使った値をそのまま用いるのが簡単である。ここでは線形合同法以外に例えば混合合同法などが用いられる。
<Type of random number generation method>
The linear congruence method used for the random number generator 10 will be specifically described. The linear congruential method is an algorithm that generates a pseudo-random number sequence. The algorithm is given by the recurrence formula Xn + 1 = (A * Xn + B) mod M. A, B, and M are constants, and M> A, M> B, A> 0, and B> 0. X 0 is a seed of random numbers, and when this is determined, X 1 , X 2 ,. . . Is obtained in a reproducible form. In the random number generator 10, appropriate values for M, A, and B are determined in advance, and the information is shared between the embedding side and the detection side. The random number seed X 0 may be determined as an appropriate value and shared between the embedding side and the detection side, but the random number generator 10 can easily use the value used for the encryption key as it is. Here, in addition to the linear congruent method, for example, a mixed congruent method is used.

混合合同法は、擬似乱数列を生成するアルゴリズムである。このアルゴリズムでは整数の初期値aと値b.cを決定し、ab+c=a’の式に代入する。求まったa’の中央からaと同じ桁だけ数を抜き出し乱数を得る。その後、再び上記の式のaに得られた乱数を代入する作業を繰り返して擬似乱数列を得る。初期値aが乱数の種となる。乱数の種は適当な値を決めておいて、埋め込み側と検出側で共有しておけばよいが、前記乱数発生器10では暗号鍵に使った値をそのまま用いるのが簡単である。   The mixed congruential method is an algorithm for generating a pseudo-random number sequence. In this algorithm, integer initial value a and value b. c is determined and substituted into the formula ab + c = a ′. A random number is obtained by extracting the same number of digits as a from the center of the obtained a '. Thereafter, the operation of substituting the random number obtained in the above equation a again is repeated to obtain a pseudo-random number sequence. The initial value a is a seed for random numbers. An appropriate value for the seed of the random number may be determined and shared between the embedding side and the detecting side, but the random number generator 10 can easily use the value used for the encryption key as it is.

<装置構成のバリエーション>
デジタルカメラなどのデジタル映像記憶装置には、前記画像取得手段2(光学センサなどの光学部)と電子回路とが一体化されたカメラモジュールを使用して製造されたタイプがある。この映像記憶装置によれば、前記画像取得手段2の光学部で受光した映像の各フレーム画像は、カメラモジュールからJPEGフォーマットデータとして出力される。この場合にはJPEG符号化途中(S22〜S25)のDCT係数を外へ取り出して加工を施すことできない。そこで、図19及び図20に示すように、前処理手段40のJPEGフォーマットデータ(S22〜S32の処理後)を前処理手段41に伝送し、該前処理手段41を通じてJFIF形式からのデータ整形・エントロピー復号(S33.S34)を行ってDCT係数を得る。以後は、図3のフローチャートと同様に図20のS26以降の処理ステップを実行する。この埋め込み装置1の構成変更によれば、図2の装置構成と同様にDCT係数を変更することが可能となる。
<Variation of equipment configuration>
A digital video storage device such as a digital camera includes a type manufactured using a camera module in which the image acquisition means 2 (an optical unit such as an optical sensor) and an electronic circuit are integrated. According to this video storage device, each frame image of the video received by the optical unit of the image acquisition means 2 is output from the camera module as JPEG format data. In this case, the DCT coefficients in the middle of JPEG encoding (S22 to S25) cannot be taken out and processed. Therefore, as shown in FIGS. 19 and 20, the JPEG format data of the preprocessing unit 40 (after the processing of S22 to S32) is transmitted to the preprocessing unit 41, and the data shaping / formatting from the JFIF format is performed through the preprocessing unit 41. Entropy decoding (S33.S34) is performed to obtain DCT coefficients. Thereafter, similarly to the flowchart of FIG. 3, the processing steps after S26 of FIG. 20 are executed. According to the configuration change of the embedding device 1, it is possible to change the DCT coefficient similarly to the device configuration of FIG.

本発明は、前記埋め込み装置1としてコンピュータを機能させるための改ざん検出用電子透かしの埋め込み用プログラムとしても構築することができる。このプログラムは、前記埋め込み装置1の各手段2〜14,2.4〜14.40.41の全部あるいは一部として機能させるものでもよい。このプログラムによれば、前記埋め込み装置1のS21〜S32.S41〜S46.S51〜S54.S61〜S65.S81〜S8などの各種処理の全部あるいは一部をコンピュータに実行させる。 The present invention can also be constructed as a falsification detecting digital watermark embedding program for causing a computer to function as the embedding device 1. This program may be made to function as all or part of the respective means 2 to 14 and 2.4 to 14.40.41 of the embedding apparatus 1. According to this program, S21 to S32. S41-S46. S51-S54. S61-S65. S81~S8 executing 6 all or part of various processes such as a computer.

また、本発明は、前記検出装置20としてコンピュータを機能させるための電子透かしを用いた改ざん検出用プログラムとしても構築することができる。このプログラムは、前記検出装置20の各手段21〜30の全部として機能させるものでよく、あるいはその一部として機能させるものでもよい。このプログラムによれば、S151〜S156などの各種処理の全部あるいは一部をコンピュータに実行させる。   The present invention can also be constructed as a falsification detection program using a digital watermark for causing a computer to function as the detection device 20. This program may function as all of the means 21 to 30 of the detection apparatus 20, or may function as a part thereof. According to this program, the computer executes all or part of various processes such as S151 to S156.

前記各プログラムは、ウェブサイトや電子メールなどネットワークを通じて提供することができる。また、前記各プログラムは、CD−ROM,DVD−ROM,CD−R,CD−RW,DVD−R,DVD−RW,MO,HDD,Blu−ray Disk(登録商標)などの記録媒体に記録して、保存・配布することも可能である。この記録媒体は、記録媒体駆動装置(光学ドライブなど)を利用して読み出され、そのプログラムコード自体が前記実施形態の処理を実現するので、該記録媒体も本発明を構成する。   Each program can be provided through a network such as a website or e-mail. Each program is recorded on a recording medium such as a CD-ROM, DVD-ROM, CD-R, CD-RW, DVD-R, DVD-RW, MO, HDD, Blu-ray Disk (registered trademark). It can also be stored and distributed. This recording medium is read using a recording medium driving device (such as an optical drive), and the program code itself realizes the processing of the above-described embodiment, so that the recording medium also constitutes the present invention.

1…改ざん検出用電子透かしの埋め込み装置
2…映像取得手段(撮影手段)
3.22.40.41…前処理手段
4…電子透かしデータ入力手段
5…誤り検出符号化手段
6…暗号化手段
7…DCTブロックグループ分割手段(グループ分割手段)
8…最大値Aの選択手段(最大値A選択手段)
9…B値算出手段(値B算出手段)
10…乱数発生器(乱数発生手段)
11…暗号化済み符合データ埋め込み手段(埋め込み手段)
12…最終DCTブロック演算値ヘッダー保存手段(ヘッダー保存手段)
13…エントロピー圧縮手段(圧縮手段)
14…JFIF形式整形手段(整形手段)
23…ビットデータ取得手段
24…暗号復号化手段
25…比較手段
26…誤り検出復号化手段
27…逆量子化手段
28…逆DCT手段
29…色空間変換手段
30…誤り発生箇所重畳表示手段
DESCRIPTION OF SYMBOLS 1 ... Digital watermark embedding apparatus for alteration detection 2 ... Video acquisition means (photographing means)
3.22.40.41 Pre-processing means 4 Digital watermark data input means 5 Error detection encoding means 6 Encryption means 7 DCT block group dividing means (group dividing means)
8: Maximum value A selection means (maximum value A selection means)
9: B value calculating means (value B calculating means)
10 ... Random number generator (random number generator)
11: Encoded code data embedding means (embedding means)
12 ... Final DCT block calculation value header storage means (header storage means)
13: Entropy compression means (compression means)
14 ... JFIF format shaping means (shaping means)
DESCRIPTION OF SYMBOLS 23 ... Bit data acquisition means 24 ... Encryption / decryption means 25 ... Comparison means 26 ... Error detection decoding means 27 ... Inverse quantization means 28 ... Inverse DCT means 29 ... Color space conversion means 30 ... Error occurrence location superimposition display means

Claims (8)

撮影手段をもって撮影した画像をJPEG符号化すると同時に該撮影画像に改ざん検出用電子透かしを埋め込む方法であって、
前処理手段が、前記撮影画像にYCbCr変換・ダウンサンプリング・離散コサイン変換・DCT係数の量子化を施し、各DCTブロック内に量子化係数が存在する状態に処理する第1ステップと、
誤り符号化手段が、前記電子透かしデータのbit数に冗長性を付与した誤り検出符号化データを生成する第2ステップと、
暗号化手段が、前記誤り検出符号化データに暗号化を施した暗号化済み符合データを生成する第3ステップと、
グループ分割手段が、前記各DCTブロックをY,Cb,Cr色成分に応じて、前記暗号化済み符号データのbit数と同一個数ごとのグループに分割し、各グループに連続番号を付与する第4ステップと、
最大値A選択手段が、前記各DCTブロック内の量子化係数のうち絶対値が最大の値Aを選択する第5ステップと、
値B算出手段が、乱数発生手段から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ関数のハッシュ値とから演算した結果に基づきB値を算出する第6ステップと、
埋め込み手段が、前記DCTブロックに埋め込む前記暗号化済み符合データのbit値(0 or 1)に応じて前記値Aと前記値Bの差を偶数あるいは奇数とするために前記値Aに「K,0,−K」のいずれかを加算して前記値Aを調整する第7ステップと、
圧縮・整形手段が、前記暗号化済み符合データのbit値を埋め込んだ各DCTブロックの量子化係数を、エントロピー圧縮およびJFIF形式整形する第8ステップと、を有し、
前記第6ステップは、n番目のDCTブロックの前記B値を算出するにあたって、n−1番目のDCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を最下位ビットから数えて第n番目のビット値を前記B値とするステップと、
(最終の連続番号−1)グループの最終DCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を暗号化後にJPEGフォーマットのヘッダー内のコメント欄に保存するステップと、
を有することを特徴とする改ざん検出用電子透かしの埋め込み方法。
A method of embedding a digital watermark for tampering detection in the photographed image at the same time as JPEG encoding of the image photographed by the photographing means,
A first step in which preprocessing means performs YCbCr transformation, downsampling , discrete cosine transformation, and DCT coefficient quantization on the captured image, and performs processing so that a quantization coefficient exists in each DCT block;
A second step an error coding means for generating an error detection coding data assigned with redundancy to bit number of the electronic watermark data,
A third step in which an encryption means generates encrypted code data obtained by encrypting the error detection encoded data;
Group dividing means divides each DCT block into groups of the same number as the number of bits of the encrypted code data according to Y, Cb, and Cr color components, and assigns a serial number to each group . Steps,
A fifth step in which a maximum value A selection means selects a value A having the maximum absolute value among the quantized coefficients in each DCT block;
A sixth step in which the value B calculating means calculates a B value based on a result calculated from a random value obtained from the random number generating means and a hash value of a hash function of a numerical value obtained by concatenating the quantization coefficients of the respective DCT blocks; ,
The embedding means sets the value A to “K” in order to make the difference between the value A and the value B even or odd according to the bit value (0 or 1) of the encoded code data to be embedded in each DCT block. , 0, −K ”is added to adjust the value A ;
The compression / shaping means has an eighth step of entropy compression and JFIF format shaping of the quantization coefficient of each DCT block in which the bit value of the encoded code data is embedded;
In the sixth step, when calculating the B value of the nth DCT block, the hash value of the hash function used to calculate the B value of the (n−1) th DCT block, and the DCT block A value obtained by calculating an exclusive OR for each bit with a hash value of a numerical value obtained by concatenating the adjusted quantization coefficients of the value A, from the least significant bit, and setting the nth bit value as the B value; ,
(Final sequence number- 1) a hash value of the hash function used to calculate the B value of the final DCT block of the group, and a numerical value obtained by concatenating the adjusted quantization coefficient of the value A to the DCT block and storing the XOR took the value of each bit of the hash value in the comments in the header of the JPEG format after encryption,
A method of embedding a digital watermark for tampering detection, comprising:
撮影手段をもって撮影されたJPEGフォーマット画像に改ざん検出用の電子透かしを埋め込む方法であって、
前処理手段が、前記JPEGフォーマット画像にJFIF形式からのデータ整形とエンピロー復号とを施し、各DCTブロックに量子化係数が存在する状態に処理する第1ステップと、
誤り符号化手段が、前記電子透かしデータのbit数に冗長性を付与した誤り検出符号化データを生成する第2ステップと、
暗号化手段が、前記誤り検出符号化データを暗号化した暗号化済み符合データを生成する第3ステップと、
グループ分割手段が、前記各DCTブロックをY,Cb,Cr色成分に応じて、前記暗号化済み符号データのbit数と同一個数ごとのグループに分割し、各グループに連続番号を付与する第4ステップと、
最大値A選択手段が、前記各DCTブロック内の量子化係数のうち絶対値が最大の値Aを選択する第5ステップと、
値B算出手段が、乱数発生手段から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ関数のハッシュ値とから演算した結果に基づきB値を算出する第6ステップと、
埋め込み手段が、前記DCTブロックに埋め込む前記暗号化済み符合データのbit値(0 or 1)に応じて前記値Aと前記値Bの差を偶数あるいは奇数とするために前記値Aに「K,0,−K」のいずれかを加算して前記値Aを調整する第7ステップと、
圧縮・整形手段が、前記暗号化済み符合データのbit値を埋め込んだ各DCTブロックの量子化係数を、エントロピー圧縮およびJFIF形式整形する第8ステップと、を有し、
前記第6ステップは、n番目のDCTブロックの前記B値を算出するにあたって、n−1番目のDCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を最下位ビットから数えて第n番目のビット値を前記B値とするステップと、
(最終の連続番号−1)グループの最終DCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を暗号化後にJPEGフォーマットのヘッダー内のコメント欄に保存するステップと、
を有することを特徴とする改ざん検出用電子透かしの埋め込み方法。
A method of embedding a digital watermark for falsification detection in a JPEG format image photographed by a photographing means,
A first step in which preprocessing means performs data shaping and Empiror decoding from the JFIF format on the JPEG format image, and processes each DCT block with a quantized coefficient;
A second step an error coding means for generating an error detection coding data assigned with redundancy to bit number of the electronic watermark data,
A third step in which an encryption means generates encrypted code data obtained by encrypting the error detection encoded data;
Group dividing means divides each DCT block into groups of the same number as the number of bits of the encrypted code data according to Y, Cb, and Cr color components, and assigns a serial number to each group . Steps,
A fifth step in which a maximum value A selection means selects a value A having the maximum absolute value among the quantized coefficients in each DCT block;
A sixth step in which the value B calculating means calculates a B value based on a result calculated from a random value obtained from the random number generating means and a hash value of a hash function of a numerical value obtained by concatenating the quantization coefficients of the respective DCT blocks; ,
The embedding means sets the value A to “K” in order to make the difference between the value A and the value B even or odd according to the bit value (0 or 1) of the encoded code data to be embedded in each DCT block. , 0, −K ”is added to adjust the value A ;
The compression / shaping means has an eighth step of entropy compression and JFIF format shaping of the quantization coefficient of each DCT block in which the bit value of the encoded code data is embedded;
In the sixth step, when calculating the B value of the nth DCT block, the hash value of the hash function used to calculate the B value of the (n−1) th DCT block, and the DCT block A value obtained by calculating an exclusive OR for each bit with a hash value of a numerical value obtained by concatenating the adjusted quantization coefficients of the value A, from the least significant bit, and setting the nth bit value as the B value; ,
(Final sequence number- 1) a hash value of the hash function used to calculate the B value of the final DCT block of the group, and a numerical value obtained by concatenating the adjusted quantization coefficient of the value A to the DCT block and storing the XOR took the value of each bit of the hash value in the comments in the header of the JPEG format after encryption,
A method of embedding a digital watermark for tampering detection, comprising:
請求項1または2のいずれか1項に記載の方法をもって電子透かしを埋め込んだJPEG画像の改ざんを検出する方法であって、
前処理手段が、入力されたJPEG符号化画像にJFIF形式からのデータ整形とエンピロー復号とを施し、各DCTブロックに量子化係数が存在する状態に処理する第1ステップと、
グループ分割手段が、前記各DCTブロックをY,Cb,Cr色成分に応じて、前記電子透かしの埋め込み時に使用した暗号化済み符合データのbit数と同一個数ごとのグループに分割し、各グループに前記電子透かしの埋め込み時と同様な連続番号を付与する第2ステップと、
最大値A選択手段が、前記電子透かしの埋め込み時と同様に前記各DCTブロック内の量子化係数のうち絶対値が最大の値Aを選択する第3ステップと、
B値算出手段が、前記電子透かしの埋め込み時と同様に乱数発生手段から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ関数のハッシュ値とから演算した結果に基づきB値を算出する第4ステップと、
ビットデータ取得手段が、前記各DCTブロックに埋め込まれた前記暗号化済み符号データのビット値(0 or 1)を、前記値Aと前記値Bのが偶数か奇数に応じて取得する第5ステップと、
暗号復号化手段が、前記第5ステップの取得値(0 or 1)に対して、前記暗号化済み符合データの埋め込み時と同一の暗号手法および暗号鍵を用いて暗号を復号化する第6ステップと、
誤り検出復号化手段が、前記第6ステップで暗号復号化されたデータに誤り復号化処理を施し、誤りの有無・誤りの発生したDCTブロックを含むグループを検出する第7ステップと、
ヘッダー保存値比較手段が、(最終の連続番号−1)グループの最終DCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を求める第8ステップと、
ヘッダー保存値比較手段が、前記第8ステップで求めた値を前記JPEGフォーマットのヘッダー内におけるコメント欄の保存値と同一手法で暗号化し、該暗号化されたと前記保存値とを比較することにより、(最終の連続番号−1)グループの最終DCTブロックの誤りを検出する第9ステップと、
逆量子化・逆DCT・色空間変換手段が、第9ステップ後に前記各DCTブロックの量子化係数を逆量子化してDCT係数に戻し、逆DCTと色空間変換を経てJPEG復号化する第10ステップと、
誤り発生箇所表示手段が、前記第7ステップおよび前記第9ステップで検出した誤りの有無・誤りの発生したDCTブロックを含むグループの位置を表示させる第11ステップと、
を有することを特徴とする電子透かしを用いた改ざん検出方法。
A method for detecting falsification of a JPEG image in which a digital watermark is embedded by the method according to claim 1,
A first step in which preprocessing means performs data shaping and Empiror decoding from the JFIF format on the input JPEG encoded image, and processes each DCT block to have a quantized coefficient;
Group dividing means, each of said DCT blocks Y, Cb, depending on Cr color component is divided into groups for each bit number and the same number of encrypted tally data used during embedding of the electronic watermark, to each group A second step of assigning a serial number similar to that at the time of embedding the digital watermark ;
A third step in which a maximum value A selection means selects a value A having the maximum absolute value among the quantized coefficients in each DCT block in the same manner as when the digital watermark is embedded ;
Based on the result calculated by the B value calculation means from the random value obtained from the random number generation means in the same way as when the digital watermark is embedded and the hash value of the hash function of the numerical value obtained by concatenating the quantization coefficient of each DCT block. A fourth step of calculating a B value;
Bit data acquisition means acquires a bit value (0 or 1) of the encrypted code data embedded in each DCT block according to whether the difference between the value A and the value B is even or odd. Steps ,
A sixth step in which the encryption / decryption means decrypts the cipher using the same encryption method and encryption key as those used when the encoded code data is embedded with respect to the obtained value (0 or 1) in the fifth step. When,
Error detection decoding means, wherein applying error decoding process on the decryption data in the sixth step, a seventh step of detecting a group containing the generated DCT blocks of the presence or absence and error of an error,
The header stored value comparison means uses the hash value of the hash function used to calculate the B value of the final DCT block of the ( final sequence number- 1) group, and the adjusted quantum of the value A in the DCT block. An eighth step of obtaining a value obtained by performing exclusive OR for each bit with the hash value of the numerical value obtained by concatenating the quantization coefficients;
The header stored value comparing means encrypts the value obtained in the eighth step by the same method as the stored value in the comment field in the header of the JPEG format, and compares the encrypted value with the stored value. Accordingly, a ninth step of detecting an error (final sequence number -1) final DCT block of the group,
The inverse quantization and inverse DCT-color space conversion unit, the following ninth step back to DCT coefficients by inverse quantizing the quantized coefficients of each DCT block, the 10 steps of JPEG decoding through an inverse DCT and color space conversion When,
An eleventh step in which the error occurrence location display means displays the presence / absence of the error detected in the seventh step and the ninth step and the position of the group including the DCT block in which the error has occurred;
A tamper detection method using a digital watermark characterized by comprising:
撮影手段をもって撮影した画像をJPEG符号化すると同時に該撮影画像に改ざん検出用電子透かしを埋め込む装置であって、
前記撮影画像にYCbCr変換・ダウンサンプリング・離散コサイン変換・DCT係数の量子化を施し、各DCTブロック内に量子化係数が存在する状態に処理する前処理手段と、
前記電子透かしデータのbit数に冗長性を付与した誤り検出符号化データを生成する誤り符号化手段と、
前記誤り検出符号化データに暗号化を施した暗号化済み符合データを生成する暗号化手段と、
前記各DCTブロックをY,Cb,Cr色成分に応じて、前記暗号化済み符合データのbit数と同一個数ごとのグループに分割し、各グループに連続番号を付与するグループ分割手段と、
前記各DCTブロック内の量子化係数のうち絶対値が最大の値Aを選択する最大値A選択手段と、
乱数発生手段から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ関数のハッシュ値とから演算した結果に基づきB値を算出する値B算出手段と
前記DCTブロックに埋め込む前記暗号化済み符合データのbit値(0 or 1)に応じて前記値Aと前記値Bの差を偶数あるいは奇数とするために前記値Aに「K,0,−K」のいずれかを加算して前記値Aを調整する埋め込み手段と、
前記暗号化済み符合データのbit値を埋め込んだ各DCTブロックの量子化係数を、エントロピー圧縮およびJFIF形式整形する圧縮・整形手段と、を備え、
前記値B算出手段は、n番目のDCTブロックの前記B値を算出するにあたって、n−1番目のDCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を最下位ビットから数えて第n番目のビット値を前記B値とし、
(最終の連続番号−1)グループの最終DCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を暗号化後にJPEGフォーマットのヘッダー内のコメント欄に保存する
ことを特徴とする改ざん検出用電子透かしの埋め込み装置。
An apparatus that embeds a digital watermark for falsification detection in the photographed image at the same time as JPEG encoding of the image photographed by the photographing means,
Preprocessing means for subjecting the captured image to YCbCr transformation, downsampling , discrete cosine transformation, and DCT coefficient quantization, and processing in a state where quantization coefficients exist in each DCT block;
An error coding means for generating error detection coding data assigned with redundancy to bit number of the electronic watermark data,
Encryption means for generating encrypted code data obtained by encrypting the error detection encoded data;
Group dividing means for dividing each DCT block into groups of the same number as the number of bits of the encoded code data according to Y, Cb, Cr color components, and assigning a serial number to each group ;
Maximum value A selection means for selecting a value A having the maximum absolute value among the quantization coefficients in each DCT block;
A value B calculating means for calculating a B value based on a result calculated from a random number value obtained from the random number generating means and a hash value of a numerical hash function obtained by concatenating the quantization coefficients of the respective DCT blocks ;
In order to make the difference between the value A and the value B even or odd according to the bit value (0 or 1) of the encoded code data embedded in each DCT block, the value A is set to “K, 0, − An embedding unit that adjusts the value A by adding any of K ” ;
Compression / shaping means for entropy compression and JFIF format shaping of the quantization coefficient of each DCT block in which the bit value of the encoded code data is embedded,
The value B calculating means calculates the B value of the n-th DCT block, the hash value of the hash function used to calculate the B value of the (n−1) -th DCT block, and the DCT block A value obtained by calculating an exclusive OR for each bit with a hash value obtained by concatenating the adjusted quantization coefficients of the value A is counted from the least significant bit, and the nth bit value is defined as the B value.
(Final sequence number- 1) a hash value of the hash function used to calculate the B value of the final DCT block of the group, and a numerical value obtained by concatenating the adjusted quantization coefficient of the value A to the DCT block A digital watermark embedding device for alteration detection, wherein a value obtained by exclusive ORing each bit with a hash value is encrypted and stored in a comment field in a header of a JPEG format.
撮影手段をもって撮影されたJPEGフォーマット画像に改ざん検出用の電子透かしを埋め込む装置であって、
前記JPEGフォーマット画像にJFIF形式からのデータ整形とエンピロー復号とを施し、各DCTブロックに量子化係数が存在する状態に処理する前処理手段と、
前記電子透かしデータのbit数に冗長性を付与した誤り検出符号化データを生成する誤り符号化手段と、
前記誤り検出符号化データを暗号化した暗号化済み符合データを生成する暗号化手段と、
前記各DCTブロックをY,Cb,Cr色成分に応じて、前記暗号化済み符合データのbit数と同一個数ごとのグループに分割し、各グループに連続番号を付与するグループ分割手段と、
前記各DCTブロック内の量子化係数のうち絶対値が最大の値Aを選択する最大値A選択手段と、
乱数発生手段から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ関数のハッシュ値とから演算した結果に基づきB値を算出する値B算出手段と
前記DCTブロックに埋め込む前記暗号化済み符合データのbit値(0 or 1)に応じて前記値Aと前記値Bの差を偶数あるいは奇数とするために前記値Aに「K,0,−K」のいずれかを加算して前記値Aを調整する埋め込み手段と、
前記暗号化済み符合データのbit値を埋め込んだ各DCTブロックの量子化係数を、エントロピー圧縮およびJFIF形式整形する圧縮・整形手段と、を備え、
前記値B算出手段は、n番目のDCTブロックの前記B値を算出するにあたって、n−1番目のDCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を最下位ビットから数えて第n番目のビット値を前記B値とし、
(最終の連続番号−1)グループの最終DCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を暗号化後にJPEGフォーマットのヘッダー内のコメント欄に保存する
ことを特徴とする改ざん検出用電子透かしの埋め込み装置。
An apparatus for embedding a digital watermark for falsification detection in a JPEG format image photographed by photographing means,
A preprocessing unit for the JPEG format images subjected to the data shaping and Enpiro decoding from JFIF format to be processed in a state where there is quantized coefficients to each DCT block,
An error coding means for generating error detection coding data assigned with redundancy to bit number of the electronic watermark data,
Encryption means for generating encrypted code data obtained by encrypting the error detection encoded data;
Group dividing means for dividing each DCT block into groups of the same number as the number of bits of the encoded code data according to Y, Cb, Cr color components, and assigning a serial number to each group ;
Maximum value A selection means for selecting a value A having the maximum absolute value among the quantization coefficients in each DCT block;
A value B calculating means for calculating a B value based on a result calculated from a random number value obtained from the random number generating means and a hash value of a numerical hash function obtained by concatenating the quantization coefficients of the respective DCT blocks ;
In order to make the difference between the value A and the value B even or odd according to the bit value (0 or 1) of the encoded code data embedded in each DCT block, the value A is set to “K, 0, − An embedding unit that adjusts the value A by adding any of K ” ;
Compression / shaping means for entropy compression and JFIF format shaping of the quantization coefficient of each DCT block in which the bit value of the encoded code data is embedded,
The value B calculating means calculates the B value of the n-th DCT block, the hash value of the hash function used to calculate the B value of the (n−1) -th DCT block, and the DCT block A value obtained by calculating an exclusive OR for each bit with a hash value obtained by concatenating the adjusted quantization coefficients of the value A is counted from the least significant bit, and the nth bit value is defined as the B value.
(Final sequence number- 1) a hash value of the hash function used to calculate the B value of the final DCT block of the group, and a numerical value obtained by concatenating the adjusted quantization coefficient of the value A to the DCT block A digital watermark embedding device for alteration detection, wherein a value obtained by exclusive ORing each bit with a hash value is encrypted and stored in a comment field in a header of a JPEG format.
請求項またはのいずれか1項に記載の装置をもって電子透かしを埋め込んだJPEG画像の改ざんを検出する装置であって、
入力されたJPEG符号化画像にJFIF形式からのデータ整形とエンピロー復号とを施し、各DCTブロックに量子化係数が存在する状態に処理する前処理手段と、
前記各DCTブロックをY,Cb,Cr色成分に応じて、前記電子透かしの埋め込み時に使用した暗号化済み符合データのbit数と同一個数ごとのグループに分割し、各グループに前記電子透かしの埋め込み時と同様な連続番号を付与するグループ分割手段と、
前記電子透かしの埋め込み時と同様に前記各DCTブロック内の量子化係数のうち絶対値が最大の値Aを選択する最大値A選択手段と、
前記電子透かしの埋め込み時と同様に乱数発生手段から得られた乱数値と、各DCTブロックの量子化係数を連結した数値のハッシュ関数のハッシュ値とから演算した結果に基づきB値を算出するB値算出手段と、
前記各DCTブロックに埋め込まれた前記暗号化済み符号データのビット値(0 or 1)を、前記値Aと前記値Bのが偶数か奇数に応じて取得するビットデータ取得手段と、
前記取得値(0 or 1)に対して、前記暗号化済み符合データの埋め込み時と同一の暗号手法および暗号鍵を用いて暗号を復号化する暗号復号化手段と、
該暗号復号化されたデータに誤り復号化処理を施し、誤りの有無・誤りの発生したDCTブロックを含むグループを検出する誤り検出復号化手段と、
最終の連続番号−1)グループの最終DCTブロックの前記B値を算出するために用いたハッシュ関数のハッシュ値と、該DCTブロックに前記値Aの調整済みの量子化係数を連結した数値のハッシュ値とのbit毎の排他的論理和を取った値を、記JPEGフォーマットのヘッダー内におけるコメント欄の保存値と同一手法で暗号化し、該暗号化されたと前記保存値とを比較することにより、DCTブロックの誤りを検出するヘッダー保存値比較手段と、
前記各DCTブロックの量子化係数を逆量子化してDCT係数に戻し、逆DCTと色空間変換を経てJPEG復号化する逆量子化・逆DCT・色空間変換手段と、
前記検出した誤りの有無・誤りの発生したDCTブロックを含むグループの位置を表示させる誤り発生箇所表示手段と、
を備えることを特徴とする電子透かしを用いた改ざん検出装置。
An apparatus for detecting tampering of JPEG image watermarked with a device according to any one of claims 4 or 5,
Subjected to a data shaping and Enpiro decoding from JFIF format to the inputted JPEG encoded image, a pre-processing means for processing the conditions existing quantization coefficient to each DCT block,
Each DCT block is divided into groups of the same number as the number of bits of the encoded code data used when embedding the digital watermark according to the Y, Cb, and Cr color components, and the digital watermark is embedded in each group Group dividing means for assigning serial numbers similar to the time ,
Maximum value A selection means for selecting the value A having the maximum absolute value among the quantized coefficients in each DCT block as in the case of embedding the digital watermark ;
B value is calculated based on the result calculated from the random number value obtained from the random number generation means and the hash value of the hash function of the numerical value obtained by concatenating the quantization coefficient of each DCT block as in the case of embedding the digital watermark. A value calculating means;
Bit data acquisition means for acquiring the bit value (0 or 1) of the encrypted code data embedded in each DCT block according to whether the difference between the value A and the value B is even or odd ;
Encryption / decryption means for decrypting a cipher using the same encryption method and encryption key as those used when the encoded code data is embedded with respect to the acquired value (0 or 1);
Error detection decoding means for performing error decoding processing on the decrypted data and detecting a group including a DCT block in which an error exists and an error has occurred;
( Final sequence number- 1) a hash value of the hash function used to calculate the B value of the final DCT block of the group, and a numerical value obtained by concatenating the adjusted quantization coefficient of the value A to the DCT block a value taking the exclusive OR of each bit of the hash value, serial encrypted with the stored value and the same techniques comment field in JPEG format in the header, comparing the stored value and dark Goka value by a header stored value comparison means for detecting an error in the DCT block,
Inverse quantization / inverse DCT / color space conversion means for dequantizing the quantization coefficient of each DCT block to return it to DCT coefficients, and performing JPEG decoding via inverse DCT and color space conversion ;
Error occurrence location display means for displaying the presence / absence of the detected error and the position of the group including the DCT block in which the error has occurred ;
A tamper detection device using a digital watermark, comprising:
請求項4または5のいずれか1項に記載の改ざん検出用電子透かしの埋め込み装置を構成する各手段として、コンピュータを機能させるためのプログラム。   The program for functioning a computer as each means which comprises the electronic watermark embedding apparatus for falsification detection of any one of Claim 4 or 5. 請求項6記載の電子透かしを用いた改ざん検出装置を構成する各手段として、コンピュータを機能させるためのプログラム。   The program for functioning a computer as each means which comprises the tampering detection apparatus using the electronic watermark of Claim 6.
JP2009093001A 2009-04-07 2009-04-07 Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program Active JP4804556B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009093001A JP4804556B2 (en) 2009-04-07 2009-04-07 Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009093001A JP4804556B2 (en) 2009-04-07 2009-04-07 Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program

Publications (2)

Publication Number Publication Date
JP2010245876A JP2010245876A (en) 2010-10-28
JP4804556B2 true JP4804556B2 (en) 2011-11-02

Family

ID=43098407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009093001A Active JP4804556B2 (en) 2009-04-07 2009-04-07 Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program

Country Status (1)

Country Link
JP (1) JP4804556B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559676A (en) * 2013-10-11 2014-02-05 西安电子科技大学 Method for preventing color image blind watermarking from being printed and scanned based on DCT coefficient statistical property
CN108900845A (en) * 2018-07-16 2018-11-27 东莞理工学院 The reversible insertion of metadata and extracting method and device in digital video information
JP6464309B2 (en) * 2018-10-02 2019-02-06 日本放送協会 Encryption device and decryption device
CN109729233B (en) * 2018-11-29 2020-09-25 东软集团股份有限公司 Information hiding method and device based on image, storage medium and electronic equipment
CN113034334B (en) * 2021-03-22 2023-07-14 绍兴聚量数据技术有限公司 Method and device for hiding reversible information of encrypted image by combining JPEG (joint photographic experts group) and Huffman (human field) codes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008283479A (en) * 2007-05-10 2008-11-20 Fujifilm Software Co Ltd Method, program and device for inserting reversible watermark data and image processing system

Also Published As

Publication number Publication date
JP2010245876A (en) 2010-10-28

Similar Documents

Publication Publication Date Title
Haddad et al. Joint watermarking-encryption-JPEG-LS for medical image reliability control in encrypted and compressed domains
US7360093B2 (en) System and method for authentication of JPEG image data
US8670560B2 (en) Encryption method
Cem kasapbaşi et al. New LSB-based colour image steganography method to enhance the efficiency in payload capacity, security and integrity check
US8280098B2 (en) Digital watermarking CMOS sensor
US7313696B2 (en) Method for authentication of JPEG image data
JP4625841B2 (en) System and method for digital content security
EP3820150A1 (en) Method and device for steganographic processing and compression of image data
JP4804556B2 (en) Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program
JP4261724B2 (en) Signature data generation apparatus and image verification apparatus
JP4948551B2 (en) Electronic watermark embedding detection method and apparatus, program, and recording medium
JP4999877B2 (en) Falsification detection authentication code embedding method and apparatus and program thereof, falsification detection method and apparatus and program thereof
A Mahdi An improved method for combine (LSB and MSB) based on color image RGB
US7493489B2 (en) System and method for authentication of JPEG image data
JP2003298579A (en) Information processing apparatus, information processing method, program, and recording medium
US7627761B2 (en) System for authentication of JPEG image data
WO2007085632A1 (en) Method of watermarking digital data
JP2010016529A (en) Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein
Ananth et al. Performance analysis of a combined cryptographic and steganographic method over thermal images using barcode encoder
EP3602478B1 (en) Video watermarking
Wang et al. A data hiding scheme based on single pixel modification with modulus operation
JP2010074490A (en) Method, device and program for embedding digital watermark for tampering detection, method, device and program for detecting tampering using the digital watermark, and recording medium with the program recorded therein
Gopinathan et al. A study of image compression and SHA 256 encryption algorithms for secure transmission
TURAB et al. A new robust approach for securing data transmission
JP2007028402A (en) Image processing method, apparatus, program and recording medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110531

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110707

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110802

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110809

R150 Certificate of patent or registration of utility model

Ref document number: 4804556

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140819

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350