KR101952246B1 - System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization - Google Patents

System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization Download PDF

Info

Publication number
KR101952246B1
KR101952246B1 KR1020160179598A KR20160179598A KR101952246B1 KR 101952246 B1 KR101952246 B1 KR 101952246B1 KR 1020160179598 A KR1020160179598 A KR 1020160179598A KR 20160179598 A KR20160179598 A KR 20160179598A KR 101952246 B1 KR101952246 B1 KR 101952246B1
Authority
KR
South Korea
Prior art keywords
block data
bit
changed
data
lookup table
Prior art date
Application number
KR1020160179598A
Other languages
Korean (ko)
Other versions
KR20180075796A (en
Inventor
홍성민
임재형
박영준
유재희
Original Assignee
홍익대학교 산학협력단
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 홍익대학교 산학협력단 filed Critical 홍익대학교 산학협력단
Priority to KR1020160179598A priority Critical patent/KR101952246B1/en
Publication of KR20180075796A publication Critical patent/KR20180075796A/en
Application granted granted Critical
Publication of KR101952246B1 publication Critical patent/KR101952246B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

본 발명은 근사 기반 하드웨어 메모이제이션을 이용한 에너지 효율적인 이미지 암호화 시스템에 관한 기술로, 보다 상세하게는 연속적으로 들어오는 블록들 중에서 메모이제이션으로 적용시킬 블록들을 판별하고, 메모이제이션을 적용할 블록을 근사화 한 후, 그 암호화 결과값이 룩업 테이블에 저장되어 있는지 확인하고, 룩업 테이블에 저장되어 있는 값을 읽어 출력하는 기술에 관한 것이다.The present invention relates to an energy efficient image encryption system using approximate based hardware memoization, and more particularly, to a system and method for energy efficient image encryption using approximate based hardware memoization, more specifically, Checking whether the encryption result value is stored in the lookup table, reading the value stored in the lookup table, and outputting the read out value.

Description

근사 기반 하드웨어 메모이제이션을 이용한 에너지 효율적인 이미지 암호화 시스템 및 방법{System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization}TECHNICAL FIELD [0001] The present invention relates to an energy efficient image encryption system and method using approximate based hardware memoization,

본 발명은 이미지 암호화 시스템에 관한 것으로 상세하게는 회로가 간단하며 에너지 소모가 적은 메모이제이션(Memoization) 기법과 근사 컴퓨팅(Approximate Computing) 기법을 적용하여 이미지를 암호화하는 시스템에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention [0002] The present invention relates to an image encryption system, and more particularly, to a system for encrypting images by applying a memoization technique and an approximate computing technique with a simple circuit and low energy consumption.

광학기술과 사물인터넷의 발전으로 이미지 데이터가 많은 분야에서 사용되고 있으며, 우리 일상생활에서도 홈 씨씨티비(Home CCTV), 블랙박스(Black box) 등 개인 기기를 통해 무수히 많은 이미지 데이터가 생성되고 있다. 그에 따라 개인 데이터 유출 문제가 이슈화되고 있으며, 보안의 필요성이 높아지고 있다. 보안을 위해 개인의 사물인터넷 기기에 보안 모듈을 추가할 경우 에너지 효율성이 중요하다.Optical technology and objects With the development of the Internet, image data is used in many fields. In our daily lives, a large amount of image data is being generated through personal devices such as home CCTV and black box. As a result, the issue of personal data leakage has become an issue, and the need for security is increasing. For security, energy efficiency is important when adding security modules to your personal Internet devices.

보안을 위해 이미지 데이터를 암호화할 경우 많은 계산량을 필요로 하기 때문에 소프트웨어를 통해 이를 처리할 경우 속도 면에서 문제가 발생한다. 도 1을 보면 소프트웨어의 처리 속도가 하드웨어의 처리 속도보다 매우 느린 것을 확인할 수 있다. 따라서 이 문제를 해결하기 위해서는 고속의 하드웨어 처리가 필수적이다. 이러한 고속 암호화를 위해서 프로세스를 병렬화하는 등 다수의 기법들이 많이 소개되었다.Encryption of image data for security requires a lot of computation, which is problematic in terms of processing speed through software. 1, it can be seen that the processing speed of the software is much slower than the processing speed of the hardware. Therefore, high-speed hardware processing is essential to solve this problem. A number of techniques have been introduced, such as parallelizing processes for such high-speed encryption.

종래 기술인 한국등록특허 제10-1356949호 "멀티 코어 CPU에서 영상압축 및 암호화의 비대칭 부하 분산 방법 및 장치"는 멀티 코어 CPU에서 영상 압축 및 암호화를 처리하는 방법을 개시하고 있다. 복수의 코어 각각이 쉬고 있는 상태가 최소가 되도록 하는 멀티 코어 CPU에서 영상 압축 및 암호화의 비대칭 부하 분산 방법을 제시하여 연산시간을 줄일 뿐만 아니라 병렬처리의 효율성을 높일 수 있는 방법을 제공하고 있다.Korean Patent Registration No. 10-1356949 entitled " Method and Apparatus for Asymmetric Load Balancing of Image Compression and Encryption in Multicore CPU "discloses a method of processing image compression and encryption in a multi-core CPU. The present invention provides a method of not only reducing the computation time but also improving the efficiency of parallel processing by suggesting an asymmetric load balancing method of image compression and encryption in a multicore CPU that minimizes the state where each of the plurality of cores is resting.

하지만 단순히 하드웨어를 병렬화하여 처리 속도를 향상시킬 경우 회로가 커지고 에너지 소모가 증가하는 단점이 있다. 따라서. 단순한 하드웨어를 이용하여 에너지 소모를 최소화하면서도 고속의 이미지 암호화 처리가 가능하도록 하는 기술이 요구된다.However, if the processing speed is simply increased by parallelizing the hardware, there is a disadvantage that the circuit becomes large and the energy consumption increases. therefore. There is a need for a technology that enables high-speed image encryption processing while minimizing energy consumption by using simple hardware.

한국등록특허 제10-1356949호Korean Patent No. 10-1356949

본 발명은 근사 기반 하드웨어 메모이제이션을 이용한 이미지 데이터를 암호화 함으로써, 에너지 소모가 적고 효율적이며 고속의 데이터 처리가 가능하도록 하는 것을 목적으로 한다.An object of the present invention is to enable efficient and high-speed data processing with less energy consumption by encrypting image data using approximate-based hardware memoization.

본 발명은 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀의 색상의 근사치가 서로 동일한 경우에만 근사화 및 메모이제이션 기법을 적용하도록 함으로써, 이미지 내에서 세밀한 표현이 필요한 부분에서는 색상 정보의 손실을 최소화하고, 그렇지 않은 부분에서는 연산을 최소화함으로써, 최소한의 손실로 효율적인 이미지 암호화 처리가 가능하도록 하는 것을 목적으로 한다.The present invention applies the approximation and memoization techniques only when the color approximations of at least two or more pixels among the four pieces of pixel data constituting the block data are equal to each other. Thus, in a portion where detailed representation is required in the image, And minimizing the computation in a portion where the image encryption is not performed, thereby enabling efficient image encryption processing with a minimum loss.

본 발명은 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환함으로써, 이미지 원본의 화질을 최대한 유지하는 동시에 룩업 테이블의 재사용률을 증가시키는 것을 목적으로 한다.In the present invention, by replacing the lower three bits of 8-bit R, G, B, and alpha values of each pixel data of 128-bit block data with a binary number of 100, it is possible to maintain the image quality of the image source as much as possible, The purpose is to increase the usage rate.

메모이제이션을 이용한 에너지 효율적인 이미지 암호화 시스템은 R, G, B, 알파 각각 8비트로 구성되는 32비트의 픽셀 데이터 4개를 포함하는 128비트의 블록 데이터를 입력 받는 블록 데이터 입력부; 상기 128비트 블록 데이터를 암호화하는 암호화부; 상기 128비트의 블록 데이터를 근사치로 변경하여 처리할지 여부를 판단하는 판단부 상기 판단부에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 상기 128비트의 블록 데이터를 근사치로 변경하는 근사화 처리부; 상기 근사화 처리부에서 근사치로 변경된 블록 데이터 및 상기 암호화부에서 상기 변경된 블록 데이터를 암호화한 암호화 블록 데이터를 대응시켜 저장하는 룩업 테이블; 상기 판단부에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 상기 근사화 처리부에서 근사치로 변경된 블록 데이터를 상기 룩업 테이블에서 확인하고, 룩업 테이블에 상기 변경된 블록 데이터가 존재하는 경우, 상기 변경된 블록 데이터에 대응되는 상기 암호화 블록 데이터를 상기 룩업 테이블로부터 수신하고, 상기 룩업 테이블에 상기 변경된 블록 데이터가 존재하지 않는 경우, 상기 암호화부에 상기 변경된 블록 데이터를 전송하여 암호화 블록 데이터를 수신하고, 상기 변경된 블록 데이터 및 상기 암호화 블록 데이터를 대응시켜 상기 룩업 테이블에 저장하고, 상기 판단부에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하지 않는 경우, 상기 블록 데이터를 상기 암호화부에 전송하여, 암호화 블록 데이터를 수신하는 제어부; 및 상기 제어부로부터 상기 암호화 블록 데이터를 수신하여 출력하는 암호화 블록 데이터 출력부를 포함하여 구성된다.An energy efficient image encryption system using memoization includes: a block data input unit for receiving 128-bit block data including four 32-bit pixel data composed of 8 bits each of R, G, B, and alpha; An encryption unit for encrypting the 128-bit block data; A determination unit for determining whether to process the 128-bit block data by approximating the block data; and a determination unit for determining whether to process the 128-bit block data by approximating the 128-bit block data to an approximate value, A processor; A lookup table for storing block data changed to an approximate value in the approximation processing unit and the encrypted block data in which the changed block data is encrypted in the encrypting unit; Wherein the approximation processing unit checks block data that has been changed to an approximate value in the lookup table when the determination unit determines that the block data is to be changed to an approximate value and if the changed block data exists in the lookup table, Receiving the encrypted block data corresponding to the block data from the lookup table and transmitting the changed block data to the encryption unit when the changed block data does not exist in the lookup table to receive the encrypted block data, Wherein the control unit transmits the block data to the encryption unit and transmits the block data to the encryption unit when the determination unit does not determine that the block data should be changed to an approximate value for processing, Block Day Control unit for receiving; And an encrypted block data output unit for receiving and outputting the encrypted block data from the control unit.

또한, 상기 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 중 상위 5개 비트 값씩 총 20비트의 값을 서로 비교하여, 상기 128비트의 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀 데이터의 상기 20비트의 값이 서로 일치하는 경우에 상기 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 것을 포함하여 구성된다.Also, by comparing values of 20 bits in total by the upper 5 bits among 8 bits R, G, B, and alpha values of each pixel data of the 128-bit block data, And determining that the 128-bit block data should be changed to an approximate value when the 20-bit values of at least two pixel data in the pixel data match each other.

또한, 상기 근사화 처리부는 상기 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환하는 것을 포함하여 구성된다.The approximation processing unit may include replacing the lower 3 bits of the 8-bit R, G, B, and alpha values of each pixel data of the 128-bit block data with a binary number of 100.

본 발명은 근사 기반 하드웨어 메모이제이션을 이용한 이미지 데이터를 암호화 함으로써, 에너지 소모가 적고 효율적이며 고속의 데이터 처리가 가능하도록 하는 시스템을 제공한다.The present invention provides a system that enables efficient and fast data processing with low energy consumption by encrypting image data using approximate based hardware memoization.

본 발명은 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀의 색상의 근사치가 서로 동일한 경우에만 근사화 및 메모이제이션 기법을 적용하도록 함으로써, 이미지 내에서 세밀한 표현이 필요한 부분에서는 색상 정보의 손실을 최소화하고, 그렇지 않은 부분에서는 연산을 최소화함으로써, 최소한의 손실로 효율적인 이미지 암호화 처리가 가능한 시스템을 제공한다.The present invention applies the approximation and memoization techniques only when the color approximations of at least two or more pixels among the four pieces of pixel data constituting the block data are equal to each other. Thus, in a portion where detailed representation is required in the image, And minimizes the operation in the portion where it is not possible, thereby providing a system capable of efficient image encryption processing with a minimum loss.

본 발명은 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환함으로써, 이미지 원본의 화질을 최대한 유지하는 동시에 룩업 테이블의 재사용률을 증가시키는 시스템을 제공한다.In the present invention, by replacing the lower three bits of 8-bit R, G, B, and alpha values of each pixel data of 128-bit block data with a binary number of 100, it is possible to maintain the image quality of the image source as much as possible, Provides a system to increase utilization.

도 1은 본 발명의 일실시예에 따른 FPGA와 CPU의 AES 실행시간을 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 이미지 암호화 시스템의 전체 구성도를 도시한 도면이다.
도 3는 본 발명의 일실시예에 따른 AES 알고리즘과 ECB 모드 암호화의 구성을 도시한 도면이다.
도 4는 본 발명의 일실시예에 따른 픽셀 데이터의 8비트 값 각각의 하위 3개 비트 값을 치환하는 구성을 도시한 도면이다.
도 5은 본 발명의 시스템을 이용한 경우의 성능 및 에너지 효율성을 도시한 도면이다.
도 6은 본 발명의 일실시예에 따른 이미지 암호화 방법의 흐름을 세부적으로 도시한 순서도이다.
도 7은 본 발명의 일실시예에 따른 이미지 암호화 방법의 흐름을 개략적으로 도시한 순서도이다.
1 is a diagram illustrating AES execution time of an FPGA and a CPU according to an embodiment of the present invention.
2 is a diagram illustrating an overall configuration of an image encryption system according to an embodiment of the present invention.
3 is a diagram illustrating a configuration of an AES algorithm and ECB mode encryption according to an embodiment of the present invention.
4 is a diagram illustrating a configuration for replacing the lower 3 bit values of 8-bit values of pixel data according to an embodiment of the present invention.
5 is a graph showing performance and energy efficiency when the system of the present invention is used.
6 is a flowchart illustrating a flow of an image encryption method according to an embodiment of the present invention in detail.
7 is a flowchart schematically showing the flow of an image encryption method according to an embodiment of the present invention.

이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하기로 한다. 또한 본 발명의 실시예들을 설명함에 있어 구체적인 수치는 실시예에 불과하며 이에 의하여 발명의 범위가 제한되지 아니한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. Further, in describing the embodiments of the present invention, specific numerical values are merely examples and the scope of the invention is not limited thereby.

도 2는 본 발명의 일실시예에 따른 이미지 암호화 시스템의 전체 구성도를 도시한 도면이다.2 is a diagram illustrating an overall configuration of an image encryption system according to an embodiment of the present invention.

본 발명은 메모이제이션 기법을 이용할 수 있으며, 메모이제이션 기법은 계산량이 많은 연산시 그 결과를 룩업 테이블에 저장하고 같은 입력 값에 의해서 동일한 연산을 해야할 경우 연산을 하지 않고 룩업 테이블에서 이미 저장된 기존의 계산값을 가져오는 기법이다.The memoization technique can use the memoization technique. When the memoization technique has a large amount of calculation, the result is stored in the lookup table. If the same calculation is performed by the same input value, the conventional calculation It is a technique to get the value.

메모이제이션 기법을 본 발명에서 적용할 수 있는 이유는 이미지 데이터의 특성 상 인접한 픽셀간에 유사하거나 같은 R, G, B 값을 가져오는 경우가 많기 때문이다. 이는 128비트 단위로 암호화를 할 때 같은 블록들이 다수 존재한다는 것을 의미하며, 같은 블록을 암호화할 경우 그 결과 또한 동일함을 알 수 있다. 따라서 본 발명은 룩업 테이블을 이용하여 블록들의 암호화 결과 값들을 저장해두고 같은 값의 블록을 암호화해야 하는 상황에 계산을 하지 않고 룩업 테이블에서 결과를 가져오는 메모이제이션 기법을 적용할 수 있다.The reason why the memoization technique can be applied in the present invention is that, in view of the characteristics of image data, it is often the case that R, G, and B values are similar or similar among adjacent pixels. This means that there are many same blocks when encrypting in 128-bit units, and that the same result is obtained when encrypting the same block. Therefore, the present invention can apply the memoization technique that stores the encryption result values of the blocks using the lookup table, and obtains the results from the lookup table without calculating the situation where the blocks of the same value need to be encrypted.

하지만 메모이제이션 기법만을 적용하였을 경우 룩업 테이블의 재사용(Reuse) 값이 예상보다 높지 않다. 그 원인은 사람의 시각으로는 같은 색으로 보이는 블록들이 미묘하게 다른 값을 가지고 있어서 기존의 계산 값을 재사용할 수 없기 때문이다. 이에 본 발명에서는 근사 컴퓨팅(Approximate Computing) 기술을 적용시켜 룩업 테이블의 재사용률을 높였으며, 본 발명에서 적용한 근사화 기술은 블록 데이터가 시각적으로 같은 색의 블록이라는 판단이 될 때 같은 값으로 치환하여 룩업 테이블의 재사용률을 높일 수 있다.However, if only the memoization technique is applied, the reuse value of the lookup table is not higher than expected. The reason for this is that human eyes can not reuse existing computed values because blocks with the same color have slightly different values. In the present invention, the approximate computing technique is applied to increase the reuse ratio of the lookup table. In the present invention, the approximation technique is to replace the lookup table with the same value when the block data is judged to be a block of the same color visually, The reuse rate of the table can be increased.

재사용률을 높이기 위해 블록 데이터를 무분별하게 처리(Processing)한다면 원본 이미지의 화질을 파괴할 수 있기 때문에 본 발명에서는 SSIM을 참고하여 원본 이미지의 화질을 유지하는 선에서 재사용률을 높이는 처리(Processing)를 진행 할 수 있다.Since the image quality of the original image can be destroyed if the block data is indiscriminately processed in order to increase the reuse rate, the present invention uses the SSIM to process the processing for increasing the reuse ratio in the line that maintains the image quality of the original image Can proceed.

보다 구체적으로 살펴보면, 본 발명에 따른 근사 기반 하드웨어 메모이제이션을 이용한 에너지 효율적인 이미지 암호화 시스템은 블록 데이터 입력부(210), 암호화부(230), 판단부(220), 근사화 처리부(240), 룩업 테이블(250), 제어부(260), 암호화 블록데이터 출력부(270)를 포함하여 구성될 수 있다.More specifically, an energy efficient image encryption system using approximate based hardware memoization according to the present invention includes a block data input unit 210, an encryption unit 230, a determination unit 220, an approximation processing unit 240, a lookup table 250, a control unit 260, and an encryption block data output unit 270.

블록 데이터 입력부(210)는 R, G, B, 알파 각각 8비트로 구성되는 32비트의 픽셀 데이터 4개를 포함하는 128비트의 블록 데이터를 입력 받는다.The block data input unit 210 receives 128-bit block data including four 32-bit pixel data composed of 8 bits each of R, G, B, and alpha.

R(Red, 적색), G(Green, 녹색), B(Blue, 청색), 알파(Alpha, 투명도)는 각각에 대해 8비트씩 할당해서 이의 조합으로 여러 가지 색을 나타낼 수 있으며, 즉 비트 수로 색의 수를 표현할 수 있다. R, G, B, 알파에 각각 8비트를 할당하였으므로 총 32비트가 픽셀 데이터 1개가 되며, 픽셀 데이터 4개(즉 128비트)는 1개의 블록 데이터라 할 수 있다. 이러한 128비트의 1개의 블록 데이터를 블록 데이터 입력부(210)는 입력 받을 수 있다. 아래 암호화부(230)의 설명에서 설명하겠지만, 본 발명에서는 128비트 단위로 암호화를 처리하는 AES를 이용하여 암호화를 진행하기 때문에, 32비트 픽셀 데이터 4개를 묶은 128비트의 블록 데이터를 입력 단위로 적용하였다.8 bits can be allocated to each of R (Red, Red), G (Green, Green), B (Blue, Blue), and Alpha (Alpha, transparency) The number of colors can be expressed. 8 bits are allocated to R, G, B, and alpha, respectively, so that a total of 32 bits is one pixel data, and four pixel data (i.e., 128 bits) are one block data. The block data input unit 210 can receive one 128-bit block data. As will be described in the description of the encryption unit 230 described below, in the present invention, since encryption is performed using AES processing encryption in units of 128 bits, 128-bit block data of four 32- Respectively.

판단부(220)는 128비트의 블록 데이터를 근사치로 변경하여 처리할지 여부를 판단한다.The determination unit 220 determines whether to process the 128-bit block data by changing the block data to an approximate value.

근사치는 128비트의 블록 데이터 값과 비슷하지만 똑같지는 않은 값이며, 근사치로 변경할 수 있는지의 여부는 판단부(220)에서 판단 할 수 있다. 근사치로 변경된 블록 데이터는 같은 픽셀 4개로 이루어져 있다.The approximate value is similar to the block data value of 128 bits, but is not the same value, and the determination unit 220 can determine whether or not the value can be changed to an approximate value. The approximated block data consists of four identical pixels.

판단부(220)는 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 중 상위 5개 비트 값씩 총 20비트의 값을 서로 비교하여, 128비트의 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀 데이터의 20비트의 값이 서로 일치하는 경우에 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단한다.The determination unit 220 compares the total of 20 bits by the upper 5 bits among the 8 bits R, G, B, and alpha values of each pixel data of 128 bits of block data to construct 128-bit block data It is determined that block data of 128 bits should be changed to an approximate value and processed when the 20-bit values of at least two pixel data out of the four pixel data coincide with each other.

판단부(220)에서는 하나의 블록을 구성하는 4개의 픽셀 데이터 중 많은 수의 픽셀 데이터가 서로 같은 색상을 나타내는 경우, 해당 블록은 픽셀 간의 색상의 변화가 크지 않은 분야라고 판단할 수 있으며, 이 경우에는 이미지의 상세한 색상 표현이 중요하지 않은 경우가 대부분이다. 따라서, 이와 같이 4개의 픽셀 데이터 중 2개 이상의 픽셀 데이터가 동일한 색상을 가지는 경우, 픽셀 데이터의 값을 근사화 처리하여 효율적인 암호화가 가능하도록 할 수 있다.In the determination unit 220, when a large number of pixel data among the four pixel data constituting one block represent the same color, it can be determined that the corresponding block is an area in which the color change between pixels is not large. In this case, The detailed color representation of the image is not important. Therefore, when two or more pixel data among the four pixel data have the same color, the value of the pixel data can be approximated to enable effective encryption.

그러나, 판단부(220)에서 색상이 완전히 동일한 경우로 한정하여 처리할 경우, 이에 해당하는 경우가 극히 드물게 되기 때문에, 사람의 눈으로 구별하기 어려울 정도로 유사한 색상인 경우 색상의 큰 변화가 없는 것으로 보아 동일하게 처리하도록 할 수 있다. 따라서, 본 발명에서는 블록을 구성하는 4개의 픽셀의 색상이 완전히 동일한 경우뿐 아니라, 각 픽셀을 구성하는 R, G, B, 알파 값 중 상위 5개 비트의 값이 동일하여 시각적으로 거의 유사해 보이는 경우에도 근사화 처리를 함으로써, 암호화의 효율성을 높일 수 있다.However, when the determination unit 220 restricts the colors to be completely equal, it is extremely rare to deal with them. Therefore, in the case of similar colors that are difficult to distinguish from human eyes, The same processing can be performed. Therefore, in the present invention, not only when the colors of the four pixels constituting the block are completely the same, but also because the values of the upper five bits among the R, G, B, and alpha values constituting each pixel are the same, Even in this case, the efficiency of encryption can be increased by performing the approximation processing.

반면, 판단부(220)에서 판단한 결과, 블록을 이루는 4개의 픽셀 데이터의 색상 근사치가 서로 다른 경우에는 사람이 시각적으로 판단할 수 있을 정도로 각 픽셀 데이터의 색상 차이가 큰 경우이기 때문에, 이런 경우에는 보다 선명하게 이미지를 유지할 수 있도록 하기 위하여, 근사화 기술 및 메모이제이션 기술을 적용하지 않도록 판단하는 것이 바람직하다.On the other hand, as a result of the determination by the determination unit 220, when the color approximation values of the four pixel data constituting the blocks are different from each other, the color difference of each pixel data is large enough to allow the human being to visually judge. It is preferable to judge not to apply the approximation technique and the memoization technique in order to maintain the image more clearly.

암호화부(230)는 128비트 블록 데이터를 암호화한다.The encryption unit 230 encrypts the 128-bit block data.

AES(Advanced Encryption Standard)는 전세계적으로 가장 많이 사용되는 암호화 방식이며, AES는 128비트의 입출력을 가지며, 암호 키의 길이는 128비트, 192비트, 256비트를 지원해주는데 본 발명에서는 128비트로 사용하였으며, 그에 따라 라운드 횟수는 10회 수행 할 수 있다. AES의 전체 알고리즘은 도 3의 (a)와 같다. 각 라운드는 Substitute Byte, Shift Row, Mix Column, Add Round Key 4개의 연산을 수행해야 하는 복잡한 구조를 가지고 있으며, 본 발명은 AES를 피드백(feedback)구조로 설계하였기 때문에 1개의 라운드만 합성하여 피드백(feedback)으로 사용할 수 있다. 또한 본 발명의 블록 암호 모드(Block cipher mode)는 ECB 모드로 도 3의 (b)와 같다.The Advanced Encryption Standard (AES) is the most widely used encryption method in the world. AES has 128 bits of input / output, and 128 bits, 192 bits and 256 bits of encryption key length are used. , So that the number of rounds can be performed ten times. The overall algorithm of AES is shown in Fig. 3 (a). Each round has a complicated structure to perform four operations of Substitute Byte, Shift Row, Mix Column, and Add Round Key. Since the present invention is designed with AES feedback structure, only one round is synthesized and feedback feedback. The block cipher mode of the present invention is an ECB mode as shown in FIG. 3 (b).

근사화 처리부(240)는 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 128비트의 블록 데이터를 근사치로 변경한다.The approximation processing unit 240 changes the block data of the 128-bit block to an approximate value when it is determined that the block data is to be approximated by the determination unit 220 and processed.

근사화 처리부(240)는 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환한다.The approximation processor 240 replaces the lower 3 bits of each 8-bit R, G, B, and alpha values of each pixel data of 128-bit block data with a binary number of 100.

128비트의 블록 데이터는 1개 픽셀당 32비트인데, 우리의 눈은 32비트의 색깔을 전부 구별할 수 없고 이미지 전체의 픽셀 하나는 매우 작은 요소이기 때문에 소수의 픽셀 값이 변하더라도 그것을 인지할 수 없을 것이다. 그러나 우리의 눈으로는 비슷한 색깔로 보이더라도 R, G, B, 알파 픽셀 값이 미세하게 다른 블록 데이터들끼리는 같은 색이라고 인식하지 않을 것이다. 따라서, 블록 데이터를 근사화 처리를 한다면 우리의 눈으로 색깔의 변화를 인지할 수 없으나 룩업 테이블에서 근사화 처리된 블록 데이터를 확인하였을 경우 같은 블록 데이터의 사용하는 빈도가 높을 것이다.The 128-bit block data is 32 bits per pixel, because our eyes can not distinguish all 32 bits of color and one pixel in the entire image is very small, so even if a small number of pixel values change There will be no. However, our eyes will not recognize that the block data with the R, G, B, and alpha pixel values are the same color even though they look similar. Therefore, if we approximate the block data, we can not recognize the color change with our eyes. However, if the approximated block data is checked in the lookup table, the same block data will be used frequently.

예를 들면, 블록 데이터 '11111111', '11111000', '11111100' 3개가 있다고 한다. 3개의 블록 데이터는 다른 값이며, 같은 블록 데이터라고 룩업 테이블에서 인식하지 않는다. 그러나 3개의 블록 데이터를 근사화 처리하여 '11111100', '11111100', '11111100'이라는 값이 나올 수 있다. 근사화 처리하여 3개의 값이 같아졌으며, 룩업 테이블에서 값을 확인할 경우 3개를 동일한 블록 데이터로 인식하여 동일한 결과를 가져올 수 있다. 근사화 처리하기 이전에는 비슷한 블록 데이터 였으나 같은 픽셀 값이 같지 않기 때문에 같은 값으로 인식 할 수 없어 3번의 연산을 하여야 하였으나, 근사화 처리한 후에는 3개의 블록 데이터를 같은 값으로 인식하여 1번의 연산으로 룩업 테이블의 값을 재사용할 수 있게 되었다. 이처럼 근사화 처리를 하면 허용범위 내에서 작은 오차를 만들어 냄으로써 룩업 테이블의 재사용율을 높일 수 있다.For example, it is assumed that there are three block data '11111111', '11111000', and '11111100'. The three block data are different values, and are not the same block data and are not recognized in the lookup table. However, the values of '11111100', '11111100', and '11111100' can be obtained by approximating the three block data. When the values are checked in the lookup table, the three values are recognized as the same block data and the same result can be obtained. Before the approximation process, similar block data was used but since the same pixel values were not the same, it was not possible to recognize the same value. Therefore, three operations had to be performed. After the approximation process, three block data were recognized as the same value, The values in the table can now be reused. This approximation process can increase the reuse ratio of the lookup table by creating a small error within the allowable range.

근사화하는 방법으로는 하위 n개비트를 치환해야하는데, n을 어떤 값으로 치환할지가 문제가 된다. 이를 확인하기 위하여, 참조 이미지를 기반으로 룩업 테이블의 재사용률 및 이미지 화질의 감소를 실험하였는데, R, G, B, 알파를 나타내는 각 8비트의 데이터 중 하위 3개 비트를 치환하여 근사화 하는 경우에 높은 수준의 재사용률을 보이면서도 이미지 화질의 감소가 적은 것으로 나타났다.In order to approximate, it is necessary to replace the lower n bits. In order to confirm this, we experimented on the reduction of the reuse rate and the image quality of the lookup table based on the reference image. In the case of approximating the lower 3 bits of each 8-bit data representing R, G, The image quality is not reduced even though the reuse rate is high.

또한, 하위 3개 비트는 0 또는 다른 값으로 치환하는 것보다 중간값인 이진수 100으로 치환하는 경우에 원본 이미지의 화질을 최대한 유지할 수 있는 것으로 나타났다.In addition, it is shown that the image quality of the original image can be maintained as much as possible when replacing the lower three bits with a binary number 100, which is an intermediate value, rather than 0 or a different value.

이때 화질(Quality) 차이를 측정하기 위해 구조적 유사성(Structural Similarity, SSIM) 인덱스를 측정하였으며, 평균제곱오차(Mean Square Error, MSE)와 같은 지표가 아닌 SSIM을 측정한 이유는 MSE는 두 이미지의 데이터 값이 얼마나 다른지를 측정하는 지표이나 그와 달리 SSIM은 시각적으로 두 이미지의 사물이 얼마나 비슷한지를 측정하는 지표이기 때문에 근사 컴퓨팅(Approximate Computing) 기업의 목적에 가장 적합할 수 있다.룩업 테이블(250)은 근사화 처리부(240)에서 근사치로 변경된 블록 데이터 및 암호화부(230)에서 변경된 블록 데이터를 암호화한 암호화 블록 데이터를 대응시켜 저장한다.In order to measure the quality difference, Structural Similarity (SSIM) index was measured. The reason why the SSIM was measured rather than the mean square error (MSE) The look-up table 250 can be used as an indicator of how much the value is different or, alternatively, the SSIM is an indicator of how closely the objects in the two images are visually similar, The block data changed to the approximate value by the approximation processing unit 240 and the encrypted block data obtained by encrypting the block data changed by the encryption unit 230 are stored in association with each other.

룩업 테이블(250)(Lookup Table, LUT)은 자료를 다른 형태로 변환시키기 위한 컴퓨터 프로그램이 빠른 시간내에 접근이 가능하도록 만들어진 자료의 대역으로서, 각 레코드에 대해 특정 값을 대응시키는 키와 그에 관한 정보를 갖고 있는 표를 말하며, 영상값을 표시값으로 사용하기 위해 수치영상처리에서 사용되는 테이블일 수 있다.A Lookup Table (LUT) 250 is a band of data that is created so that a computer program for converting data into another form can be accessed in a short period of time. The lookup table 250 includes a key for associating a specific value with each record, And may be a table used in numerical image processing to use an image value as a display value.

근사화 처리부(240)에서 근사치로 변경된 블록 데이터를 룩업 테이블(250)에서 일치하는 값이 있는지 확인할 수 있다. 제어부(260)는 근사치로 변경된 블록 데이터가 룩업 테이블(250)에 없는 경우 암호화부(230)로 보낼 수 있으며, 암호화부(230)로 보내진 블록 데이터는 암호화부(230)에서 블록 데이터를 암호화 하여 블록 데이터를 암호화 블록 데이터를 생성할 수 있다. 암호화 블록 데이터를 룩업 테이블(250)에서 다시 수신하여 룩업 테이블(250)에 암호화 블록 데이터를 저장할 수 있다.The approximate processing unit 240 can check whether the block data changed to the approximate value is a matching value in the look-up table 250. The control unit 260 may send the block data to the encryption unit 230 when the block data changed to the approximate value is not in the lookup table 250. The encryption unit 230 encrypts the block data, Block data can be generated. The encryption block data may be received again in the lookup table 250 and the encryption block data may be stored in the lookup table 250. [

제어부(260)가 룩업 테이블(250)에서 근사치로 변경된 블록 데이터가 있는지 여부를 확인하며, 룩업 테이블(250)에 근사치로 변경된 블록 데이터가 없는 경우 암호화부(230)에서 변경된 암호화 블록 데이터를 저장할 수 있다. 연산을 빠르게 하기 위해 근사치로 변경된 블록 데이터를 룩업 테이블(250)에 저장하고, 이전과 동일한 근사치가 있는 경우 다시 연산을 하지 않고 룩업 테이블(250)에 저장된 계산 값인 암호화 블록 데이터를 가져 올 수 있다.The control unit 260 checks whether there is block data that has been changed to an approximate value in the lookup table 250. If there is no block data that has been changed to an approximate value in the lookup table 250, have. In order to speed up the computation, the approximated block data may be stored in the lookup table 250, and if there is an approximation similar to the previous one, the computation value stored in the lookup table 250 may be retrieved without further computation.

만약 룩업 테이블(250)에 근사치로 변경된 블록 데이터가 없는 경우 연속적으로 동일한 블록 데이터를 근사치로 변경할 때 마다 동일한 암호화를 하는 작업을 반복해야 할 것이다. 그러나 룩업 테이블(250)에 근사치로 변경된 블록 데이터가 있는 경우 근사치로 변경된 블록 데이터를 암호화한 암호화 블록 데이터와 대응시켜 저장되기 때문에 동일한 블록 데이터를 근사치로 변경할 경우 또다시 암호화하는 작업을 생략하고 바로 룩업 데이터에서 암호화한 블록 데이터를 대응 시켜 계산값을 가져올 수 있는 장점이 있다.If the lookup table 250 does not have block data changed to an approximate value, it is necessary to repeat the same encryption operation every time the same block data is successively changed to an approximate value. However, if there is block data that has been changed to the approximate value in the look-up table 250, since the block data changed to the approximate value is stored in association with the encrypted cipher block data, the operation of encrypting the same block data again is omitted, It is advantageous to obtain the calculated value by mapping the block data encrypted in the data.

제어부(260)는 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 근사화 처리부(240)에서 근사치로 변경된 블록 데이터를 룩업 테이블(250)에서 확인하고, 룩업 테이블(250)에 변경된 블록 데이터가 존재하는 경우, 변경된 블록 데이터에 대응되는 암호화 블록 데이터를 룩업 테이블(250)로부터 수신한다.If the determination unit 220 determines that the block data should be processed by the determination unit 220, the control unit 260 checks the approximated block data in the lookup table 250 in the approximation processing unit 240, ) From the look-up table 250, the encrypted block data corresponding to the changed block data is received.

판단부(220)에서는 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우와 근사치로 변경하여 처리하지 않을 것으로 판단하는 경우 두가지로 블록 데이터를 판단할 수 있으며, 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우에는 근사화 처리부(240)에서 근사치로 변경된 블록 데이터를 룩업 테이블(250)에서 확인할 수 있다. 제어부(260)는 룩업 테이블(250)에서 변경된 블록 데이터가 존재하는 경우(히트, Hit) 근사치로 변경된 블록 데이터에 해당하는 암호화 블록 데이터를 수신할 수 있다.The determination unit 220 can determine the block data in two cases when it is determined that the block data is to be changed to the approximate value, If it is determined that the process should be changed to an approximate value, the block data changed to the approximate value by the approximation processing unit 240 can be confirmed in the look-up table 250. The control unit 260 can receive the cipher block data corresponding to the block data changed to the approximate value (Hit, Hit) when the block data changed in the lookup table 250 exists.

예를 들면, 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하여 근사치로 변경한 128비트의 블록 데이터 A를 룩업 테이블(250)에서 찾아 확인한다. 룩업 테이블(250)에 블록 데이터 A 가 존재하면, 룩업 테이블(250)에는 블록 데이터 A 에 해당하는 암호화 블록 데이터가 존재할 것이다. 블록 데이터 A 에 해당하는 암호화 블록 데이터를 룩업 테이블(250)로부터 수신할 수 있다.For example, the determination unit 220 determines that the block data should be processed by changing the block data to an approximate value, and the block data A of 128 bits changed to an approximate value is found and checked in the look-up table 250. If the block data A is present in the lookup table 250, the lookup table 250 will have cipher block data corresponding to the block data A. Up block 250 can receive the encrypted block data corresponding to the block data A.

제어부(260)는 룩업 테이블(250)에 변경된 블록 데이터가 존재하지 않는 경우, 암호화부(230)에 변경된 블록 데이터를 전송하여 암호화 블록 데이터를 수신하고, 변경된 블록 데이터 및 암호화 블록 데이터를 대응시켜 룩업 테이블(250)에 저장한다.When the changed block data does not exist in the lookup table 250, the control unit 260 transmits the changed block data to the encryption unit 230, receives the encrypted block data, and associates the changed block data and the encrypted block data with each other, And stores it in the table 250.

판단부(220)에서는 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우와 근사치로 변경하여 처리하지 않을 것으로 판단하는 경우 두가지로 블록 데이터를 판단할 수 있으며, 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우에는 근사화 처리부(240)에서 근사치로 변경된 블록 데이터를 룩업 테이블(250)에서 확인할 수 있다. 제어부(260)는 룩업 테이블(250)에서 변경된 블록 데이터가 존재하지 않는 경우(미스, Miss) 근사치로 변경된 블록 데이터를 암호화부(230)에 전송한다. 암호화부(230)에서는 제어부(260)로부터 전송받은 근사치로 변경된 블록 데이터를 암호화하여 암호화 블록 데이터를 생성한다. 제어부(260)는 암호화부(230)에서 생성된 암호화 블록 데이터를 룩업 테이블(250)에서 수신할 수 있도록 하며, 수신한 암호화 블록 데이터와 근사치로 변경된 블록데이터를 대응시켜 암호화 암호화 블록 데이터를 룩업 테이블(250)로부터 수신할 수 있다.The determination unit 220 can determine the block data in two cases when it is determined that the block data is to be changed to the approximate value, If it is determined that the process should be changed to an approximate value, the block data changed to the approximate value by the approximation processing unit 240 can be confirmed in the look-up table 250. The control unit 260 transmits the changed block data to the encryption unit 230 when the changed block data does not exist in the lookup table 250 (Miss, Miss). The encryption unit 230 encrypts the block data changed from the control unit 260 to the approximate value to generate encrypted block data. The control unit 260 allows the cipher block data generated by the encryption unit 230 to be received in the lookup table 250. The control unit 260 associates the received cipher block data with the block data that has been changed to the approximate value, (250).

예를 들면, 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하여 근사치로 변경한 128비트의 블록 데이터 B 를 룩업 테이블(250)에서 찾아 확인한다. 제어부(260)는 룩업 테이블(250)에 블록 데이터 B 가 존재하지 않으면 B 는 암호화부(230)로 보낼 수 있다. 암호화부(230)로 보내진 블록 데이터 B 는 암호화되어 암호화 블록 데이터 B' 가 생성된다. 제어부(260)는 암호화 블록 데이터 B' 는 다시 룩업 테이블(250)로 보낼 수 있으며, 룩업테이블에 블록 데이터 B 와 암호화 블록 데이터 B' 가 대응되어 저장된다. 룩업 테이블(250)에 저장된 블록 데이터 B 와 대응되는 암호화 블록 데이터 B' 는 다시 룩업 테이블(250)에서 블록 데이터 B 를 확인하는 경우 동일한 연산을 하지 않고 바로 계산값인 암호화 블록 데이터 B' 를 수신할 수 있다.For example, the determination unit 220 determines that the block data should be processed by changing the block data to an approximate value, and the 128-bit block data B changed to an approximate value is found and checked in the look-up table 250. If the block data B does not exist in the lookup table 250, the control unit 260 can send B to the encryption unit 230. [ The block data B sent to the encryption unit 230 is encrypted to generate encrypted block data B '. The control unit 260 can send the encrypted block data B 'to the lookup table 250, and the block data B and the encrypted block data B' are stored in the lookup table. The ciphering block data B 'corresponding to the block data B stored in the lookup table 250 does not perform the same calculation when the block data B is checked in the lookup table 250 and receives the ciphering block data B' .

제어부(260)는 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하지 않는 경우, 블록 데이터를 암호화부(230)에 전송하여, 암호화 블록 데이터를 수신한다. 이 때, 전송 및 수신은 하드웨어 적으로 분리된 구성요소 사이에서 전기선 등을 이용하여 데이터가 오가는 것만을 의미하지는 않으며, 소프트웨어 모듈 사이에서 데이터가 송수신되는 것을 의미할 수 있다.If the determination unit 220 does not determine to change the block data to an approximate value, the control unit 260 transmits the block data to the encryption unit 230 and receives the encrypted block data. In this case, transmission and reception do not only mean that data is exchanged between hardware components separated by using an electric wire or the like, but may mean that data is transmitted and received between software modules.

판단부(220)에서는 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우와 근사치로 변경하여 처리하지 않을 것으로 판단하는 경우 두가지로 블록 데이터를 판단할 수 있으며, 블록 데이터를 근사치로 변경하여 처리하지 않는 경우에는 블록 데이터를 암호화부(230)에 바로 전송하여, 암호화부(230)에서 암호화한 암호화 블록 데이터를 수신 할 수 있다.If the determination unit 220 determines that the block data is changed to an approximate value and processes the block data, the block data may be judged to be processed. If the block data is judged not to be processed by changing the block data to an approximate value, Block data may be directly transmitted to the encrypting unit 230 and the encrypted block data encrypted by the encrypting unit 230 may be received.

암호화 블록 데이터 출력부(270)는 제어부(260)로부터 암호화 블록 데이터를 수신하여 출력한다.The encryption block data output unit 270 receives the encrypted block data from the control unit 260 and outputs the encrypted block data.

암호화 블록 데이터 출력부(270)는 제어부(260)로부터 128비트 암호화 블록 데이터를 수신할 수 있으며, 최종 결과인 암호화 블록 데이터가 출력할 수 있다.The encryption block data output unit 270 can receive the 128-bit encryption block data from the control unit 260 and output the final result of the encryption block data.

도 3는 본 발명의 일실시예에 따른 AES 알고리즘과 ECB 모드 암호화의 구성을 도시한 도면이다.3 is a diagram illustrating a configuration of an AES algorithm and ECB mode encryption according to an embodiment of the present invention.

암호화부(230)는 128비트 블록 데이터를 암호화한다.The encryption unit 230 encrypts the 128-bit block data.

AES(Advanced Encryption Standard)는 전세계적으로 가장 많이 사용되는 암호화 방식이며, AES는 128비트의 입출력을 가지며, 암호 키의 길이는 128비트, 192비트, 246비트를 지원해주는데 본 발명에서는 128비트로 사용하였으며, 그에 따라 라운드 횟수는 10회 수행 할 수 있다. AES의 전체 알고리즘은 도 3의 (a)와 같다. 각 라운드는 Substitute Byte, Shift Row, Mix Column, Add Round Key 4개의 연산을 수행해야 하는 복잡한 구조를 가지고 있으며, 본 발명은 AES를 피드백(feedback)구조로 설계하였기 때문에 1개의 라운드만 합성하여 피드백(feedback)으로 사용할 수 있다. 또한 본 발명의 블록 암호 모드(Block cipher mode)는 ECB 모드로 도 3의 (b)와 같다.The Advanced Encryption Standard (AES) is the most widely used encryption method in the world. AES has 128 bits of input / output, and 128 bits, 192 bits and 246 bits of encryption key length are used. , So that the number of rounds can be performed ten times. The overall algorithm of AES is shown in Fig. 3 (a). Each round has a complicated structure to perform four operations of Substitute Byte, Shift Row, Mix Column, and Add Round Key. Since the present invention is designed with AES feedback structure, only one round is synthesized and feedback feedback. The block cipher mode of the present invention is an ECB mode as shown in FIG. 3 (b).

도 4는 본 발명의 일실시예에 따른 픽셀 데이터의 8비트 값 각각의 하위 3개 비트 값을 치환하는 구성을 도시한 도면이다.4 is a diagram illustrating a configuration for replacing the lower 3 bit values of 8-bit values of pixel data according to an embodiment of the present invention.

판단부(220)는 128비트의 블록 데이터를 근사치로 변경하여 처리할지 여부를 판단한다.The determination unit 220 determines whether to process the 128-bit block data by changing the block data to an approximate value.

근사치는 128비트의 블록 데이터 값과 비슷하지만 똑같지는 않은 값이며, 근사치로 변경할 수 있는지의 여부는 판단부(220)에서 판단 할 수 있다. 근사치로 변경된 블록 데이터는 같은 픽셀 4개로 이루어져 있다.The approximate value is similar to the block data value of 128 bits, but is not the same value, and the determination unit 220 can determine whether or not the value can be changed to an approximate value. The approximated block data consists of four identical pixels.

근사화 처리부(240)는 판단부(220)에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 128비트의 블록 데이터를 근사치로 변경한다.The approximation processing unit 240 changes the block data of the 128-bit block to an approximate value when it is determined that the block data is to be approximated by the determination unit 220 and processed.

판단부(220)에서 4개의 픽셀 값 중 각각 R, G, B, 알파 값의 각각 상위 5비트를 포함하고 있는 4개의 픽셀 값 중 2개 이상의 픽셀 값이 동일한 경우 근사화 처리부(240)에서 128비트의 블록 데이터를 근사치로 변경 할 수 있다.If the determination unit 220 determines that two or more pixel values among the four pixel values including the upper five bits of the R, G, B, and alpha values of the four pixel values are equal to each other, the approximation processing unit 240 obtains 128 bits Can be changed to an approximate value.

근사화 처리부(240)는 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환한다.The approximation processor 240 replaces the lower 3 bits of each 8-bit R, G, B, and alpha values of each pixel data of 128-bit block data with a binary number of 100.

근사화를 위해 128비트의 블록 데이터를 구성하는 4개의 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개의 비트 값을 중간 값인 이진수 100으로 치환하여 근사치로 변경할 수 있다. 비트 값을 0 또는 다른 값으로 치환하는 것보다 중간 값으로 치환 했을 때 이미지 원본의 화질을 최대한 유지할 수 있으며, 이미지의 손상이 적다.For approximation, it is possible to replace the lower 3 bits of each of the 8-bit R, G, B, and alpha values of the four pixel data constituting the 128-bit block data with an intermediate value of 100 as the approximate value. It is possible to maintain the image quality of the image source to the maximum when replacing the bit value with an intermediate value rather than replacing it with 0 or another value, and the image is less damaged.

근사 컴퓨팅(Approximate Computing)이란 정확한 결과를 필요로 하지 않는 상황에서 근사화 된 결과를 만들어 냄으로써 에너지를 절약하는 기법이다. 여기에 가장 중요한 요소는 정확성을 요구하는 데이터에는 근사 컴퓨팅 기법을 적용하면 안된다는 것이며, 이 기법은 중요하지 않은 데이터에만 적용가능하며, 허용 범위 내에서의 작은 오차를 만들어 냄으로써 많은 에너지를 절약해야 한다.Approximate Computing is a technique that conserves energy by creating approximated results in situations that do not require accurate results. The most important factor here is that approximate computing techniques should not be applied to data that requires accuracy, and this technique is applicable only to non-critical data, and it should save a lot of energy by creating small errors within acceptable limits.

본 발명에서는 근사 컴퓨팅 기법을 픽셀 값이 적용할 수 있다. 각각의 픽셀은 32비트 R, G, B, 알파 포맷이며, 우리의 눈은 32비트 픽셀의 색깔을 전부 구별할 수 없고, 이미지 전체에서 픽셀 하나는 매우 작은 요소이기 때문에 소수의 픽셀 값이 변하더라도 그것을 인지할 수 없다.In the present invention, approximate computing techniques can be applied to pixel values. Each pixel is a 32 bit R, G, B, and alpha format, and our eyes can not distinguish the color of a 32 bit pixel at all, and one pixel in the entire image is a very small element, I can not recognize it.

우리가 근사 컴퓨팅 기법을 사용한 목적은 룩업 테이블(250)의 재사용(Reuse)을 높이기 위함이다. 룩업 테이블(250)의 재사용이 높기 위해서는 이미지 데이터를 암호화 하기 위해서 128비트의 블록 데이터 단위로 나누었을 때, 같은 값을 가지는 블록 데이터들이 많아야 한다. 하지만 실제로 128비트의 블록 데이터 단위로 나누어 블록 데이터들의 값을 보면, 사람의 시각에는 같은 색깔을 가지지만 R, G, B 값은 미세하게 달라서 재사용을 저해하는 요소가 된다. 우리는 이러한 상황을 개선하기 위해 근사 컴퓨팅 기법을 적용한다. 이미지 데이터를 암호화 하기 위해서 128비트의 블록 데이터 단위로 나누면, 하나의 블록 데이터는 4개의 픽셀을 가지게 된다. 직관적으로 생각했을 때 룩업 테이블(250)의 재사용을 높이기 위해서는 하나의 블록 데이터가 가지고 있는 4개의 픽셀은 전부 같은 값을 가져야 한다. 그래서 우리가 적용한 근사 컴퓨팅은 미세하게 다른 4개의 픽셀의 값을 가지는 블록 데이터를 찾아서 4개의 같은 픽셀 값으로 치환 시켜주는 것이다. 여기서 고려해야 할 요소는 두 가지가 있다. 얼마나 미세한 것까지 허용할 것인가 그리고 같은 4개의 픽셀값으로 치환할 때는 어떤 값으로 치환할 것인가 이다.The purpose of our approximate computing technique is to increase the reuse of the lookup table 250. In order to reuse the lookup table 250, it is necessary to have a large number of block data having the same value when dividing the image data into 128-bit block data units in order to encrypt the image data. However, when the block data is divided into 128-bit block data units, the values of R, G, and B are slightly different from each other, which is a factor that hinders reuse. We apply approximate computing techniques to improve this situation. To divide the image data into 128-bit block data units for encryption, one block data has four pixels. In order to enhance the reuse of the lookup table 250 when intuitively thinking, all four pixels of one block data must have the same value. So the approximate computing we applied is to find block data with four different pixel values and replace them with four identical pixel values. There are two factors to consider here. How small it will be allowed to be, and what value to replace with the same four pixel values.

얼마나 미세한 것까지 허용할 것인가를 판단하기 위해서 여러 가정이 있다. 4개의 픽셀이 전부 비슷한 경우, 3개의 픽셀이 비슷한 경우, 2개의 픽셀이 비슷한 경우가 있다. 그리고 R(Red, 적색), G(Green, 녹색), B(Blue, 청색), 알파(Alpha, 투명도) 각각 8비트를 가지는데, 8비트 전부를 고려하지 않고 하위 N bits를 제외하고 나머지 비트가 같을 때를 비슷하다는 기준으로 하였다. 같은 4개의 픽셀 값으로 치환하는 방법은 도 4와 같다. 무시하는 N bits를 중간 값으로 치환했다. 0으로 치환하거나 다른 값으로 치환하는 것보다 중간 값으로 치환했을 때 이미지의 Quality의 손상이 적기 때문이다.There are several assumptions to judge how small it will be. If all four pixels are similar, and if three pixels are similar, then two pixels may be similar. And 8 bits each of R (Red, Red), G (Green, Green), B (Blue, Blue) and Alpha (Alpha, Transparency). Were similar to each other. A method of substituting the same four pixel values is shown in FIG. N bits to be ignored are replaced with intermediate values. This is because the quality of an image is less damaged when it is replaced with an intermediate value than by replacing with 0 or replacing with another value.

참조 이미지(Reference Image)들을 가지고 근사치로 변경하는 모의실험(Simulation) 한 결과, 2개의 픽셀이 비슷한 경우가 가장 결과가 좋았으며, 비슷한 기준은 R, G, B, 알파 각각의 8비트 중에서 하위 3비트를 무시한 경우이다. 모의실험(Simulation)을 하여 측정한 측면은 두가지가 있으며, 첫째는 룩업 테이블(250)의 재사용율(Reuse rate)이고, 둘째는 원본 이미지와 근사화한 이미지의 화질(Quality) 차이다. As a result of simulating changes to approximate values with reference images, the best results were obtained when two pixels were similar, and the similar criterion was that of the 8 bits of R, G, B, The bit is ignored. There are two aspects measured by simulation: the first is the reuse rate of the look-up table 250, and the second is the quality difference between the original image and the approximated image.

이미지를 평가하는 지표인 영상 화질 평가(Image Quality Assessment, IQS)는 다양하게 존재한다. 예를 들어 Mean Error(ME), Mean Absoute Error(MAE), Mean Square Error(MSE), Peak Signal to Noise Ratio(PSNR)등이 있다. 하지만 이러한 IQS들은 픽셀 각각의 값을 비교 평가하는 지표로써 인지지각시스템(Human Visual System, HVS)평가에 적합하지 않다. HVS에 적합한 평가 방법으로 평균 평가점(Mean Opinion Score, MOS)이 있는데 이는 많은 사람들이 직접 눈으로 테스트(Eye Test)하여 평균을 내는 방법이다. 그러나 많은 사람들이 직접 눈으로 테스트하는 것은 쉽지 않은 방법으로 MOS와 유사한 평가 결과를 가지는 IQS를 필요로 한다. 그것이 바로 Structural Similarity Index(SSIM) 지표다. SSIM은 픽셀 각각의 값을 비교하는 것이 아닌 이미지 전체 형태를 비교하여 얼마나 유사한지를 측정하는 지표이다. SSIM은 MOS와 가장 유사한 경향의 결과를 얻을 수 있다. 따라서 본 발명에서는 SSIM을 이용한다.There are various Image Quality Assessments (IQS), which is an index for evaluating images. For example, Mean Error (ME), Mean Absolute Error (MAE), Mean Square Error (MSE), and Peak Signal to Noise Ratio (PSNR). However, these IQS are not suitable for human visual system (HVS) evaluation as an index to compare and evaluate the value of each pixel. There is a Mean Opinion Score (MOS) as an evaluation method suitable for HVS, which is a method by which many people make an eye test by eye test. However, many people require IQS with MOS-like evaluation results in a way that is not easy to test directly with eyes. That's the Structural Similarity Index (SSIM). SSIM is an index that measures the similarity of all image types, not comparing each pixel value. SSIM can obtain the most similar trend to MOS. Therefore, the present invention uses SSIM.

Figure 112016127699139-pat00001
Figure 112016127699139-pat00001

도 5은 본 발명의 시스템을 이용한 경우의 성능 및 에너지 효율성을 도시한 도면이다.5 is a graph showing performance and energy efficiency when the system of the present invention is used.

도 5(a)는 속도 증가를 나타낸 그래프이며, 도 5(b)는 에너지 효율성을 나타낸 그래프이다. 두 그래프 모두 기존의 방법을 이용하였을 경우의 속도와 에너지 효율성의 기준을 1로 보았으며, Lena, Peppers, Mandrill, Parrots의 이미지를 본 발명에서 제안하는 시스템을 이용하였을 경우의 속도 증가와 에너지 효율성을 그래프로 도시하였다. 도 5(a)와 도 5(b)에서 나타나는 바와 같이 본 발명에서 제안하는 시스템을 이용하면 평균적으로 23.98%의 속도가 증가와 14.88%의 에너지 효율성이 증가한 것을 알 수 있다.5 (a) is a graph showing an increase in speed, and FIG. 5 (b) is a graph showing energy efficiency. In both graphs, the speed and energy efficiency of the conventional method are set at 1, and the speed increase and energy efficiency of the Lena, Peppers, Mandrill, and Parrots images using the system proposed in the present invention Respectively. As shown in FIGS. 5 (a) and 5 (b), when the system proposed in the present invention is used, it can be seen that the average speed increased by 23.98% and the energy efficiency increased by 14.88%.

도 6은 본 발명의 일실시예에 따른 이미지 암호화 방법의 흐름을 세부적으로 도시한 순서도이다.6 is a flowchart illustrating a flow of an image encryption method according to an embodiment of the present invention in detail.

메모이제이션(Memoization) 기법은 계산량이 많은 연산을 여러 차례 수행할 때, 매번 연산을 수행하지 않고 룩업 테이블을 이용하여 연산을 줄이는 기법이다. 같은 입력 데이터에 대해서 같은 연산 처리를 한다면, 연산 결과 또한 당연히 같다. 그렇기 때문에 여러 입력 데이터를 연산 처리할 때, 재사용 될 가능성이 높은 입력 데이터의 연산 결과를 룩업 테이블에 저장해 두었다가 같은 입력 데이터를 연산 처리해야할 상황에 연산을 하지 않고, 룩업 테이블을 이용하여 재사용하는 방식으로 연산을 줄일 수 있다.Memoization technique is a technique that reduces the computation by using a lookup table without performing an operation each time when a calculation having a large amount of calculations is performed a plurality of times. If you perform the same operation on the same input data, the result of the operation is of course the same. Therefore, when various input data are processed, the operation result of the input data which is likely to be reused is stored in the lookup table, and the input data is reused by using the lookup table Operations can be reduced.

본 발명에서 이용하는 메모이제이션 시스템은 크게 3 단게 과정으로 이루어져 있다. 1단계는 연속적으로 들어오는 블록들 중에서 메모이제이션으로 적용시킬 블록 데이터를 판별한다. 2단계는 메모이제이션을 적용할 블록을 근사화 한 후, 그 암호화 결과 값이 룩업 테이블에 저장되어있는지 확인한다. 3단계는 룩업 테이블에 저장되어 있는 값을 읽어서 출력한다.The memoization system used in the present invention largely consists of three steps. In step 1, block data to be applied by memoization is determined among consecutive incoming blocks. Step 2 approximates the block to which the memoization is applied, and then checks whether the encryption result value is stored in the lookup table. Step 3 reads and outputs the values stored in the lookup table.

암호화에 사용하는 AES의 입력은 128 비트 블록 데이터이므로 이미지 데이터를 128비트 단위로 나누어야 한다. 이미지 데이터는 128비트의 수많은 블록으로 나누어지며, 각 블록에는 32비트의 R, G, B, 알파 포맷으로 4개의 픽셀을 가지고 있다. 따라서 암호화부로 4개의 픽셀로 이루어진 블록 데이터들이 차례로 들어온다.Since the input to AES used for encryption is 128-bit block data, the image data must be divided into 128-bit units. The image data is divided into a number of 128-bit blocks, each of which has four pixels in 32-bit R, G, B, and Alpha formats. Thus, the encryption unit sequentially receives block data consisting of four pixels.

본 시스템은 먼저 입력받는 블록 데이터들이 메모이제이션 후보(Memoization candidate)로서 적절한지 아닌지를 판단한다. 이를 위해 입력받는 4개의 픽셀 값들을 근사화한 후 이중 두개 이상의 픽셀 값이 동일한 경우 해당 블록 데이터는 메모이제이션에 적합하다고 판단할 수 있다. 4개의 픽셀 값들을 근사화하는 과정은 R, G, B, 알파 각각의 8 비트 중 하위 3비트를 제외한 상위 5비트 값씩 총 20비트를 블록 데이터를 구성하는 4개의 픽셀 데이터끼리 비교할 수 있다. 각 픽셀들은 적색(Red) 8비트, 녹색(Green) 8비트, 청색(Blue) 8비트, 알파(Alpha) 8비트 이렇게 32비트를 가지고 있으며 근사화를 위해 각 8비트 데이터의 하위 3비트를 중간 값으로 치환한다. 이러한 근사화 작업을 통해서 이미지 원본의 화질을 최대한 유지하는 동시에 룩업 테이블의 재사용률을 증가시킬 수 있다.The system first determines whether the block data received is appropriate as a memoization candidate. For this purpose, if the input four pixel values are approximated and two or more pixel values are the same, the corresponding block data can be determined to be suitable for memoization. In the process of approximating the four pixel values, a total of 20 bits including the upper 5 bits excluding the lower 3 bits out of the 8 bits of each of R, G, B, and alpha can be compared with the four pixel data constituting the block data. Each pixel has 32 bits, such as Red 8 bits, Green 8 bits, Blue 8 bits, Alpha 8 bits. To approximate the lower 3 bits of each 8-bit data, . Through this approximation, the image quality of the original image can be maximized while the reuse rate of the lookup table can be increased.

근사화된 블록 데이터는 같은 픽셀 4개로 이루어져 있으며 각 픽셀 R, G, B, 알파의 하위 3비트는 중간 값인 이진수 100으로 구성된다. 이에 의해 룩업 테이블에 접속(Access)하기 위한 인덱스(Index), 태그(Tag)를 만드는데 필요한 비트는 20비트다. 인덱스는 6비트로 구성되고 태그는 14비트로 구성된다. 이렇게 만들어진 인덱스와 태그에 의해 룩업 테이블에 접속할 때, 룩업 테이블에서는 히트(Hit) 또는 미스(Miss)가 발생하게 된다. 히트가 발생하는 경우 AES를 통한 암호화 과정을 생략하고 룩업 테이블에서 바로 암호화된 결과를 가져온다. 미스가 발생하는 경우 AES를 통한 암호화 과정을 진행하며, 이에 암호화된 결과를 출력하고 향후 재사용을 위해 룩업테이블에 저장하게 된다. 룩업 테이블에 저장할 때는 최저 사용 빈도 교체 기법(pseudo-LRU)을 이용하여 저장한다.The approximated block data consists of four identical pixels, and the lower 3 bits of each pixel R, G, B, and alpha are composed of an intermediate value of 100 binary numbers. Accordingly, the bits required to create an index and a tag for accessing the lookup table are 20 bits. The index consists of 6 bits and the tag consists of 14 bits. When a lookup table is connected to the lookup table by the created index and tag, a hit or a miss occurs in the lookup table. If a hit occurs, skip the encryption process through AES and get the encrypted result directly from the lookup table. If a miss occurs, the encryption process is performed through AES, and the encrypted result is output and stored in a lookup table for future reuse. When storing in the look-up table, it is stored using the pseudo-LRU.

본 발명에서 제안하는 하드웨어는 AES, 작은 제어 논리(Control Logic), 그리고 룩업 테이블로 이루어져 있으며, 룩업 테이블은 4-way Set-Associative 캐쉬 구조(총 64 Set)로 구성되어 있으며, 교체 정책(Replacement policy)은 유사-룩업 테이블(pseudo-LRU)을 이용한다.The hardware proposed in the present invention is composed of AES, a small control logic, and a lookup table. The lookup table is composed of a 4-way Set-Associative cache structure (64 sets in total) ) Uses a pseudo-LRU.

도 7은 본 발명의 일실시예에 따른 이미지 암호화 방법의 흐름을 개략적으로 도시한 순서도이다.7 is a flowchart schematically showing the flow of an image encryption method according to an embodiment of the present invention.

단계 S701은 R, G, B, 알파 각각 8비트로 구성되는 32비트의 픽셀 데이터 4개를 포함하는 128비트의 블록 데이터를 입력 받는다.In step S701, 128-bit block data including four 32-bit pixel data composed of 8 bits each of R, G, B, and alpha is input.

R(Red, 적색), G(Green, 녹색), B(Blue, 청색), 알파(Alpha, 투명도)는 각각에 대해 8비트씩 할당해서 이의 조합으로 여러 가지 색을 나타낼 수 있으며, 즉 비트 수로 색의 수를 표현할 수 있다. R, G, B, 알파에 각각 8비트를 할당하였으므로 총 32비트가 픽셀 데이터 1개가 되며, 픽셀 데이터 4개(즉 128비트)는 1개의 블록 데이터라 할 수 있다. 이러한 128비트의 1개의 블록 데이터를 단계 S701은 입력 받을 수 있다.8 bits can be allocated to each of R (Red, Red), G (Green, Green), B (Blue, Blue), and Alpha (Alpha, transparency) The number of colors can be expressed. 8 bits are allocated to R, G, B, and alpha, respectively, so that a total of 32 bits is one pixel data, and four pixel data (i.e., 128 bits) are one block data. This block data of 128 bits can be input in step S701.

단계 S702는 128비트의 블록 데이터를 근사치로 변경하여 처리할지 여부를 판단한다.In step S702, it is determined whether to process by changing the 128-bit block data to an approximate value.

근사치는 128비트의 블록 데이터 값과 비슷하지만 똑같지는 않은 값이며, 근사치로 변경할 수 있는지의 여부는 단계 S702에서 판단 할 수 있다. 근사치로 변경된 블록 데이터는 같은 픽셀 4개로 이루어져 있다.The approximate value is similar to the block data value of 128 bits but is not the same, and it can be judged in step S702 whether or not it can be changed to an approximate value. The approximated block data consists of four identical pixels.

단계 S702는 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 중 상위 5개 비트 값씩 총 20비트의 값을 서로 비교하여, 128비트의 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀 데이터의 20비트의 값이 서로 일치하는 경우에 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단한다.Step S702 compares 20-bit values in total, including the upper 5 bits among the 8-bit R, G, B, and alpha values of each pixel data of the 128-bit block data, It is determined that the 128-bit block data is changed to an approximate value and processed when the 20-bit values of at least two pixel data in the data coincide with each other.

단계 S702에서는 하나의 블록을 구성하는 4개의 픽셀 데이터 중 많은 수의 픽셀 데이터가 서로 같은 색상을 나타내는 경우, 해당 블록은 픽셀 간의 색상의 변화가 크지 않은 분야라고 판단할 수 있으며, 이 경우에는 이미지의 상세한 색상 표현이 중요하지 않은 경우가 대부분이다. 따라서, 이와 같이 4개의 픽셀 데이터 중 2개 이상의 픽셀 데이터가 동일한 색상을 가지는 경우, 픽셀 데이터의 값을 근사화 처리하여 효율적인 암호화가 가능하도록 할 수 있다.In step S702, when a large number of pixel data among the four pixel data constituting one block represent the same color, it can be determined that the corresponding block is an area in which the color change between pixels is not large. In this case, Most often the detailed color representation is not important. Therefore, when two or more pixel data among the four pixel data have the same color, the value of the pixel data can be approximated to enable effective encryption.

그러나, 단계 S702에서 색상이 완전히 동일한 경우로 한정하여 처리할 경우, 이에 해당하는 경우가 극히 드물게 되기 때문에, 사람의 눈으로 구별하기 어려울 정도로 유사한 색상인 경우 색상의 큰 변화가 없는 것으로 보아 동일하게 처리하도록 할 수 있다. 따라서, 본 발명에서는 블록을 구성하는 4개의 픽셀의 색상이 완전히 동일한 경우뿐 아니라, 각 픽셀을 구성하는 R, G, B, 알파 값 중 상위 5개 비트의 값이 동일하여 시각적으로 거의 유사해 보이는 경우에도 근사화 처리를 함으로써, 암호화의 효율성을 높일 수 있다.However, when the processing is limited to the case where the hues are completely equal in step S702, the case corresponding to this case is extremely rare. Therefore, in the case of similar colors that are difficult to distinguish from human eyes, . Therefore, in the present invention, not only when the colors of the four pixels constituting the block are completely the same, but also because the values of the upper five bits among the R, G, B, and alpha values constituting each pixel are the same, Even in this case, the efficiency of encryption can be increased by performing the approximation processing.

반면, 단계 S702에서 판단한 결과, 블록을 이루는 4개의 픽셀 데이터의 색상 근사치가 서로 다른 경우에는 사람이 시각적으로 판단할 수 있을 정도로 각 픽셀 데이터의 색상 차이가 큰 경우이기 때문에, 이런 경우에는 보다 선명하게 이미지를 유지할 수 있도록 하기 위하여, 근사화 기술 및 메모이제이션 기술을 적용하지 않도록 판단하는 것이 바람직하다.On the other hand, as a result of the determination in step S702, when the color approximation values of the four pixel data constituting the blocks are different from each other, since the color difference of each pixel data is large enough to allow a human to visually judge, In order to be able to maintain the image, it is preferable to judge not to apply the approximation technique and the memoization technique.

단계 S703는 128비트 블록 데이터를 암호화한다.Step S703 encrypts 128-bit block data.

AES(Advanced Encryption Standard)는 전세계적으로 가장 많이 사용되는 암호화 방식이며, AES는 128비트의 입출력을 가지며, 암호 키의 길이는 128비트, 192비트, 246비트를 지원해주는데 본 발명에서는 128비트로 사용하였으며, 그에 따라 라운드 횟수는 10회 수행 할 수 있다. AES의 전체 알고리즘은 도 3의 (a)와 같다. 각 라운드는 Substitute Byte, Shift Row, Mix Column, Add Round Key 4개의 연산을 수행해야 하는 복잡한 구조를 가지고 있으며, 본 발명은 AES를 피드백(feedback)구조로 설계하였기 때문에 1개의 라운드만 합성하여 피드백(feedback)으로 사용할 수 있다. 또한 본 발명의 블록 암호 모드(Block cipher mode)는 ECB 모드로 도 3의 (b)와 같다.The Advanced Encryption Standard (AES) is the most widely used encryption method in the world. AES has 128 bits of input / output, and 128 bits, 192 bits and 246 bits of encryption key length are used. , So that the number of rounds can be performed ten times. The overall algorithm of AES is shown in Fig. 3 (a). Each round has a complicated structure to perform four operations of Substitute Byte, Shift Row, Mix Column, and Add Round Key. Since the present invention is designed with AES feedback structure, only one round is synthesized and feedback feedback. The block cipher mode of the present invention is an ECB mode as shown in FIG. 3 (b).

단계 S704는 단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 128비트의 블록 데이터를 근사치로 변경한다.In step S704, when it is determined in step S702 that the block data is changed to an approximate value and processed, 128-bit block data is changed to an approximate value.

128비트의 블록 데이터는 1개 픽셀당 32비트인데, 우리의 눈은 32비트의 색깔을 전부 구별할 수 없고 이미지 전체의 픽셀 하나는 매우 작은 요소이기 때문에 소수의 픽셀 값이 변하더라도 그것을 인지할 수 없을 것이다. 그러나 우리의 눈으로는 비슷한 색깔로 보이더라도 R, G, B, 알파 픽셀 값이 미세하게 다른 블록 데이터들끼리는 같은 색이라고 인식하지 않을 것이다.The 128-bit block data is 32 bits per pixel, because our eyes can not distinguish all 32 bits of color and one pixel in the entire image is very small, so even if a small number of pixel values change There will be no. However, our eyes will not recognize that the block data with the R, G, B, and alpha pixel values are the same color even though they look similar.

블록 데이터를 근사화 처리를 한다면 우리의 눈으로 변화를 인지할 수 없으나 룩업 테이블에서 근사화 처리된 블록 데이터를 확인하였을 경우 같은 블록 데이터의 사용하는 빈도가 높을 것이다.If the block data is approximated, we can not recognize the change with our eyes. However, if the approximated block data in the lookup table is checked, the same block data will be used frequently.

예를 들면, 블록 데이터 '11111111', '11111000', '11111100' 3개가 있다고 한다. 3개의 블록 데이터는 다른 값이며, 같은 블록 데이터라고 룩업 테이블에서 인식하지 않는다. 그러나 3개의 블록 데이터를 근사화 처리하여 '11111100', '11111100', '11111100'이라는 값이 나올 수 있다. 근사화 처리하여 3개의 값이 같아졌으며, 룩업 테이블에서 값을 확인할 경우 3개를 동일한 블록 데이터로 인식하여 동일한 결과를 가져올 수 있다. 근사화 처리하기 이전에는 비슷한 블록 데이터 였으나 같은 픽셀 값이 같지 않기 때문에 같은 값으로 인식 할 수 없어 3번의 연산을 하여야 하였으나, 근사화 처리한 후에는 3개의 블록 데이터를 같은 값으로 인식하여 1번의 연산으로 룩업 테이블의 값을 재사용할 수 있게 되었다. 이처럼 근사화 처리를 하면 허용범위 내에서 작은 오차를 만들어 냄으로써 룩업 테이블의 재사용율을 높일 수 있다.For example, it is assumed that there are three block data '11111111', '11111000', and '11111100'. The three block data are different values, and are not the same block data and are not recognized in the lookup table. However, the values of '11111100', '11111100', and '11111100' can be obtained by approximating the three block data. When the values are checked in the lookup table, the three values are recognized as the same block data and the same result can be obtained. Before the approximation process, similar block data was used but since the same pixel values were not the same, it was not possible to recognize the same value. Therefore, three operations had to be performed. After the approximation process, three block data were recognized as the same value, The values in the table can now be reused. This approximation process can increase the reuse ratio of the lookup table by creating a small error within the allowable range.

근사화하는 방법으로는 하위 n개비트를 치환해야하는데, n을 어떤 값으로 치환할지가 문제가 된다. 이를 확인하기 위하여, 참조 이미지를 기반으로 룩업 테이블의 재사용률 및 이미지 화질의 감소를 실험하였는데, R, G, B, 알파를 나타내는 각 8비트의 데이터 중 하위 3개 비트를 치환하여 근사화 하는 경우에 높은 수준의 재사용률을 보이면서도 이미지 화질의 감소가 적은 것으로 나타났다.In order to approximate, it is necessary to replace the lower n bits. In order to confirm this, we experimented on the reduction of the reuse rate and the image quality of the lookup table based on the reference image. In the case of approximating the lower 3 bits of each 8-bit data representing R, G, The image quality is not reduced even though the reuse rate is high.

또한, 하위 3개 비트는 0 또는 다른 값으로 치환하는 것보다 중간값인 이진수 100으로 치환하는 경우에 원본 이미지의 화질을 최대한 유지할 수 있는 것으로 나타났다.In addition, it is shown that the image quality of the original image can be maintained as much as possible when replacing the lower three bits with a binary number 100, which is an intermediate value, rather than 0 or a different value.

이때 화질(Quality) 차이를 측정하기 위해 구조적 유사성(Structural Similarity, SSIM) 인덱스를 측정하였으며, 평균제곱오차(Mean Square Error, MSE)와 같은 지표가 아닌 SSIM을 측정한 이유는 MSE는 두 이미지의 데이터 값이 얼마나 다른지를 측정하는 지표이나 그와 달리 SSIM은 시각적으로 두 이미지의 사물이 얼마나 비슷한지를 측정하는 지표이기 때문에 근사 컴퓨팅(Approximate Computing) 기업의 목적에 가장 적합할 수 있다. 룩업 테이블은 단계 S704에서 근사치로 변경된 블록 데이터 및 단계 S703에서 변경된 블록 데이터를 암호화한 암호화 블록 데이터를 대응시켜 저장한다.In order to measure the quality difference, Structural Similarity (SSIM) index was measured. The reason why the SSIM was measured rather than the mean square error (MSE) The SSIM is an indicator that measures how much the value is different, but SSIM is most suitable for the purpose of Approximate Computing companies because it visually measures how similar things are in two images. The lookup table stores the block data changed to the approximate value in step S704 and the encrypted block data in which the block data changed in step S703 is encrypted.

룩업 테이블(Lookup Table, LUT)은 자료를 다른 형태로 변환시키기 위한 컴퓨터 프로그램이 빠른 시간내에 접근이 가능하도록 만들어진 자료의 대역으로서, 각 레코드에 대해 특정 값을 대응시키는 키와 그에 관한 정보를 갖고 있는 표를 말하며, 영상값을 표시값으로 사용하기 위해 수치영상처리에서 사용되는 테이블일 수 있다.A lookup table (LUT) is a band of data that is made available to a computer program for quickly converting data into a different format. It has a key for associating a specific value with each record, and information about the key Table, and may be a table used in numerical image processing to use an image value as a display value.

단계 S704에서 근사치로 변경된 블록 데이터를 룩업 테이블에서 일치하는 값이 있는지 확인할 수 있다. 단계 S705는 근사치로 변경된 블록 데이터가 룩업 테이블에 없는 경우 단계 S707로 보낼 수 있으며, 단계 S707로 보내진 블록 데이터는 단계 S707에서 블록 데이터를 암호화 하여 블록 데이터를 암호화 블록 데이터를 생성할 수 있다. 단계 S708은 암호화 블록 데이터를 룩업 테이블에서 다시 수신하여 룩업 테이블에 암호화 블록 데이터를 저장할 수 있다.It is possible to check whether the block data changed to the approximate value in step S704 has a matching value in the lookup table. The step S705 may send the block data to the step S707 if the block data changed to the approximate value is not in the lookup table, and the block data sent to the step S707 may generate the block data by encrypting the block data in the step S707. Step S708 may receive the encrypted block data again in the look-up table and store the encrypted block data in the look-up table.

단계 S705가 룩업 테이블에서 근사치로 변경된 블록 데이터가 있는지 여부를 확인하며, 룩업 테이블에 근사치로 변경된 블록 데이터가 없는 경우 단계 S707에서 변경된 암호화 블록 데이터를 저장할 수 있다. 연산을 빠르게 하기 위해 근사치로 변경된 블록 데이터를 룩업 테이블에 저장하고, 이전과 동일한 근사치가 있는 경우 다시 연산을 하지 않고 룩업 테이블에 저장된 계산 값인 암호화 블록 데이터를 가져 올 수 있다.Step S705 checks whether there is block data that has been changed to an approximate value in the lookup table. If there is no block data that has been changed to an approximate value in the lookup table, the changed cryptographic block data can be stored in step S707. In order to speed up the computation, the block data changed to the approximate value is stored in the lookup table, and if there is the same approximate value as before, the encryption block data, which is a calculation value stored in the lookup table, can be fetched without further calculation.

만약 단계 S705에서 룩업 테이블에 근사치로 변경된 블록 데이터가 없는 경우 연속적으로 동일한 블록 데이터를 근사치로 변경할 때 마다 동일한 암호화를 하는 작업을 반복해야 할 것이다. 그러나 단계 S705에서 룩업 테이블에 근사치로 변경된 블록 데이터가 있는 경우 근사치로 변경된 블록 데이터를 암호화한 암호화 블록 데이터와 대응시켜 저장되기 때문에 동일한 블록 데이터를 근사치로 변경할 경우 또다시 암호화하는 작업을 생략하고 바로 룩업 데이터에서 암호화한 블록 데이터를 대응 시켜 계산값을 가져올 수 있는 장점이 있다.If there is no approximated block data in the look-up table in step S705, the same encryption operation is repeated every time the same block data is successively changed to an approximate value. However, if there is block data that has been changed to an approximate value in the look-up table in step S705, the block data changed to the approximate value is stored in association with the encrypted cryptographic block data. Therefore, if the same block data is changed to an approximate value, It is advantageous to obtain the calculated value by mapping the block data encrypted in the data.

단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 단계 S704에서 근사치로 변경된 블록 데이터를 룩업 테이블에서 확인하고, 룩업 테이블에 변경된 블록 데이터가 존재하는 경우, 변경된 블록 데이터에 대응되는 암호화 블록 데이터를 룩업 테이블로부터 수신한다.If it is determined in step S702 that the block data is to be changed to an approximate value, the block data changed to the approximate value is checked in the lookup table in step S704. If there is changed block data in the lookup table, And receives block data from the look-up table.

단계 S702에서는 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우와 근사치로 변경하여 처리하지 않을 것으로 판단하는 경우 두가지로 블록 데이터를 판단할 수 있으며, 단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우에는 단계 S704에서 근사치로 변경된 블록 데이터를 룩업 테이블에서 확인할 수 있다. 단계 S705에서 룩업 테이블에서 변경된 블록 데이터가 존재하는 경우(히트, Hit) 근사치로 변경된 블록 데이터에 해당하는 암호화 블록 데이터를 수신(단계 S706)할 수 있다.If it is determined in step S702 that the block data is to be changed to an approximate value and processed, or if it is determined that the block data is not to be changed by approximation, the block data can be judged in two ways. In step S702, the block data is changed to an approximate value The block data changed to the approximate value in step S704 can be confirmed in the look-up table. In step S705, the encrypted block data corresponding to the block data changed to the approximate value (hit, Hit) when the changed block data exists in the lookup table can be received (step S706).

예를 들면, 단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하여 근사치로 변경한 128비트의 A라는 블록 데이터를 룩업 테이블에서 찾아 확인한다. 룩업 테이블에 A라는 블록 데이터가 존재하면, 룩업 테이블에는 A라는 블록 데이터에 해당하는 암호화 블록 데이터가 존재할 것이다. A라는 블록 데이터에 해당하는 암호화 블록 데이터를 룩업 테이블로부터 수신할 수 있다.For example, in step S702, it is determined that block data is changed to an approximate value, and 128-bit block data of A, which is changed to an approximate value, is found and checked in a look-up table. If block data of A exists in the lookup table, there will be cipher block data corresponding to the block data of A in the lookup table. The encryption block data corresponding to the block data A can be received from the lookup table.

단계 S705는 룩업 테이블에 변경된 블록 데이터가 존재하지 않는 경우, 단계 S707에 변경된 블록 데이터를 전송하여 암호화 블록 데이터를 수신하고, 변경된 블록 데이터 및 암호화 블록 데이터를 대응시켜 룩업 테이블에 저장(단계 S708)한다.In step S705, if there is no changed block data in the lookup table, the changed block data is transmitted in step S707 to receive the encrypted block data, and the changed block data and encrypted block data are stored in the lookup table in association with each other (step S708) .

단계 S702에서는 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우와 근사치로 변경하여 처리하지 않을 것으로 판단하는 경우 두가지로 블록 데이터를 판단할 수 있으며, 단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우에는 단계 S704에서 근사치로 변경된 블록 데이터를 룩업 테이블에서 확인할 수 있다. 단계 S705는 룩업 테이블에서 변경된 블록 데이터가 존재하지 않는 경우(미스, Miss) 근사치로 변경된 블록 데이터를 단계 S707에 전송한다. 단계 S707에서는 제어부로부터 전송받은 근사치로 변경된 블록 데이터를 암호화하여 암호화 블록 데이터를 생성한다. 단계 S707에서 생성된 암호화 블록 데이터를 단계 S708에서 수신할 수 있도록 하며, 수신한 암호화 블록 데이터와 근사치로 변경된 블록데이터를 대응시켜 암호화 암호화 블록 데이터를 룩업 테이블로부터 수신할 수 있다.If it is determined in step S702 that the block data is to be changed to an approximate value and processed, or if it is determined that the block data is not to be changed by approximation, the block data can be judged in two ways. In step S702, the block data is changed to an approximate value The block data changed to the approximate value in step S704 can be confirmed in the look-up table. In step S705, the block data changed to the (Miss, Miss) approximate value is sent to step S707 when there is no changed block data in the lookup table. In step S707, the block data changed to the approximate value transmitted from the control unit is encrypted to generate encrypted block data. The cipher block data generated in step S707 can be received in step S708 and the encrypted cipher block data can be received from the lookup table by associating the received cipher block data with the block data that has been changed to an approximate value.

예를 들면, 단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하여 근사치로 변경한 128비트의 B라는 블록 데이터를 룩업 테이블에서 찾아 확인한다. 제어부는 룩업 테이블에 B라는 블록 데이터가 존재하지 않으면 B라는 블록 데이터는 단계 S707로 보낼 수 있다. 단계 S707로 보내진 B라는 블록 데이터는 암호화되어 단계 S703는 B'라는 암호화 블록 데이터가 생성된다. 제어부는 B'라는 암호화 블록 데이터는 다시 룩업 테이블로 보낼 수 있으며, 룩업테이블에 B라는 블록 데이터와 B'라는 암호화 블록 데이터가 함께 저장된다. 룩업 테이블에 저장된 B라는 블록 데이터와 대응되는 B'라는 암호화 블록 데이터는 다시 룩업 테이블에서 B라는 블록 데이터를 확인하는 경우 동일한 연산을 하지 않고 바로 계산값인 B' 암호화 블록 데이터를 수신할 수 있다.For example, in step S702, it is determined that block data is changed to an approximate value, and block data of 128 bits, which is changed to an approximate value, is found and checked in the look-up table. If there is no block data of B in the lookup table, the controller may send block data of B to step S707. The block data B sent to step S707 is encrypted and the encrypted block data of B 'is generated in step S703. The control unit can send the cipher block data of B 'again to the lookup table, and the block data of B and the cipher block data of B' are stored together in the lookup table. The encryption block data B 'corresponding to the block data B stored in the lookup table can directly receive the B' encryption block data, which is the calculated value, without performing the same operation when the block data B is checked in the lookup table.

제어부는 단계 S702에서 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하지 않는 경우, 블록 데이터를 단계 S703에 전송하여, 암호화 블록 데이터를 수신한다.If the control unit does not decide to change the block data to an approximate value in step S702, the control unit transmits the block data to step S703 to receive the encrypted block data.

단계 S702에서는 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우와 근사치로 변경하여 처리하지 않을 것으로 판단하는 경우 두가지로 블록 데이터를 판단할 수 있으며, 블록 데이터를 근사치로 변경하여 처리하지 않는 경우에는 블록 데이터를 단계 S703에 바로 전송하여, 단계 S703에서 암호화한 암호화 블록 데이터를 수신 할 수 있다.If it is determined in step S702 that the block data is changed to an approximate value and processed, or if it is determined that the block data is not changed by approximation, it is possible to determine the block data in two ways. If the block data is not approximated The block data is directly transmitted to step S703, and the encrypted block data encrypted in step S703 can be received.

단계 S709는 제어부로부터 암호화 블록 데이터를 수신하여 출력한다.Step S709 receives the encrypted block data from the control unit and outputs the encrypted block data.

단계 S709는 제어부로부터 128비트 암호화 블록 데이터를 수신할 수 있으며, 최종 결과인 암호화 블록 데이터가 출력할 수 있다.Step S709 can receive the 128-bit cipher block data from the control unit and output the final result of the cipher block data.

본 발명의 일실시예에 따른 근사 기반 하드웨어 메모이제이션을 이용한 에너지 효율적인 이미지 암호화 방법 은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The energy efficient image encryption method using approximate based hardware memoization according to an embodiment of the present invention can be implemented in a form of a program command which can be executed through various computer means and recorded in a computer readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. This is possible.

그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the equivalents of the claims, as well as the claims.

210: 블록 데이터 입력부 220: 판단부
230: 암호화부 240: 근사화 처리부
250: 룩업 테이블 260: 제어부
270: 출력부
210: block data input unit 220:
230: encryption unit 240: approximation processing unit
250: look-up table 260:
270: Output section

Claims (7)

R, G, B, 알파 각각 8비트로 구성되는 32비트의 픽셀 데이터 4개를 포함하는 128비트의 블록 데이터를 입력 받는 블록 데이터 입력부;
상기 128비트 블록 데이터를 암호화하는 암호화부;
상기 128비트의 블록 데이터를 근사치로 변경하여 처리할지 여부를 판단하는 판단부
상기 판단부에서 상기 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 상기 128비트의 블록 데이터를 근사치로 변경하는 근사화 처리부;
상기 근사화 처리부에서 근사치로 변경된 블록 데이터 및 상기 암호화부에서 상기 변경된 블록 데이터를 암호화한 암호화 블록 데이터를 대응시켜 저장하는 룩업 테이블;
상기 판단부에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 상기 근사화 처리부에서 근사치로 변경된 블록 데이터를 상기 룩업 테이블에서 확인하고, 룩업 테이블에 상기 변경된 블록 데이터가 존재하는 경우, 상기 변경된 블록 데이터에 대응되는 상기 암호화 블록 데이터를 상기 룩업 테이블로부터 수신하고,
상기 룩업 테이블에 상기 변경된 블록 데이터가 존재하지 않는 경우, 상기 암호화부에 상기 변경된 블록 데이터를 전송하여 암호화 블록 데이터를 수신하고, 상기 변경된 블록 데이터 및 상기 암호화 블록 데이터를 대응시켜 상기 룩업 테이블에 저장하고,
상기 판단부에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하지 않는 경우, 상기 블록 데이터를 상기 암호화부에 전송하여, 암호화 블록 데이터를 수신하는 제어부; 및
상기 제어부로부터 상기 암호화 블록 데이터를 수신하여 출력하는 암호화 블록 데이터 출력부
를 포함하는 이미지 암호화 시스템.
A block data input unit for receiving 128-bit block data including four 32-bit pixel data composed of 8 bits each of R, G, B and alpha;
An encryption unit for encrypting the 128-bit block data;
A determination unit for determining whether to process the 128-bit block data by changing the block data to an approximate value,
An approximation processing unit for changing the 128-bit block data to an approximate value when it is determined that the 128-bit block data is to be approximated by the determination unit;
A lookup table for storing block data changed to an approximate value in the approximation processing unit and the encrypted block data in which the changed block data is encrypted in the encrypting unit;
Wherein the approximation processing unit checks block data that has been changed to an approximate value in the lookup table when the determination unit determines that the block data is to be changed to an approximate value and if the changed block data exists in the lookup table, From the look-up table, the cipher block data corresponding to the block data,
If the changed block data does not exist in the lookup table, transmits the changed block data to the encryption unit to receive the encrypted block data, stores the changed block data and the encrypted block data in the lookup table ,
A control unit for transmitting the block data to the encryption unit and receiving encrypted block data when the determination unit does not determine to change the block data to an approximate value and perform processing; And
An encryption block data output unit for receiving the encrypted block data from the control unit and outputting the encrypted block data,
The image encryption system comprising:
제1항에 있어서,
상기 판단부는
상기 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 중 상위 5개 비트 값씩 총 20비트의 값을 서로 비교하여,
상기 128비트의 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀 데이터의 상기 20비트의 값이 서로 일치하는 경우에 상기 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 것
을 특징으로 하는 이미지 암호화 시스템.
The method according to claim 1,
The determination unit
Bit values of the 8 bits of R, G, B, and alpha values of the pixel data of the 128-bit block data,
When the 20-bit values of at least two pixel data among the four pixel data constituting the 128-bit block data coincide with each other, it is determined that the 128-bit block data is changed to an approximate value and processed
The image encryption system.
제1항에 있어서,
상기 근사화 처리부는
상기 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환하는 것
을 특징으로 하는 이미지 암호화 시스템.
The method according to claim 1,
The approximation processor
Replacing the lower three bit values of each of the 8-bit R, G, B, and alpha values of each pixel data of the 128-bit block data with a binary number of 100
The image encryption system.
R, G, B, 알파 각각 8비트로 구성되는 32비트의 픽셀 데이터 4개를 포함하는 128비트의 블록 데이터를 입력 받는 블록 데이터 입력 단계;
상기 128비트 블록 데이터를 암호화하는 암호화 단계;
상기 128비트의 블록 데이터를 근사치로 변경하여 처리할지 여부를 판단하는 판단 단계
상기 판단 단계에서 상기 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 상기 128비트의 블록 데이터를 근사치로 변경하는 근사화 처리 단계;
상기 근사화 처리 단계에서 근사치로 변경된 블록 데이터 및 상기 암호화 단계에서 상기 변경된 블록 데이터를 암호화한 암호화 블록 데이터를 대응시켜 룩업 테이블에 저장하는 룩업 테이블 저장 단계;
상기 판단 단계에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 경우, 상기 근사화 처리 단계에서 근사치로 변경된 블록 데이터를 상기 룩업 테이블에서 확인하고, 룩업 테이블에 상기 변경된 블록 데이터가 존재하는 경우, 상기 변경된 블록 데이터에 대응되는 상기 암호화 블록 데이터를 상기 룩업 테이블로부터 수신하고,
상기 룩업 테이블에 상기 변경된 블록 데이터가 존재하지 않는 경우, 상기 변경된 블록 데이터를 암호화하여 암호화 블록 데이터를 생성하고, 상기 변경된 블록 데이터 및 상기 암호화 블록 데이터를 대응시켜 상기 룩업 테이블에 저장하고,
상기 판단 단계에서 상기 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하지 않는 경우, 상기 블록 데이터를 상기 암호화 단계에 전송하여, 암호화 블록 데이터를 수신하는 제어 단계; 및
상기 제어 단계에서 수신한 상기 암호화 블록 데이터를 출력하는 암호화 블록 데이터 출력 단계
를 포함하는 이미지 암호화 방법.
A block data input step of receiving 128-bit block data including 4 pieces of 32-bit pixel data composed of 8 bits each of R, G, B and alpha;
An encryption step of encrypting the 128-bit block data;
A determination step of determining whether to process the 128-bit block data by changing the block data to an approximate value
An approximation processing step of changing the 128-bit block data to an approximate value when it is determined in the determining step that the 128-bit block data is changed to an approximate value and processed;
A lookup table storing step of storing block data changed to an approximate value in the approximation processing step and encrypted block data encrypted with the changed block data in the encrypting step in correspondence with each other in a lookup table;
Wherein if the block data is determined to be processed by changing the block data in the determining step, block data changed to an approximate value in the approximation processing step is confirmed in the lookup table, and if the changed block data exists in the lookup table, From the lookup table, the cipher block data corresponding to the changed block data,
If the changed block data does not exist in the lookup table, encrypting the changed block data to generate encrypted block data, storing the changed block data and the encrypted block data in the lookup table,
A control step of transmitting the block data to the encrypting step and receiving the encrypted block data if the block data is judged to be changed by approximating the block data in the determining step; And
A cryptographic block data output step of outputting the cryptographic block data received in the control step
/ RTI >
제4항에 있어서,
상기 판단 단계는
상기 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 중 상위 5개 비트 값씩 총 20비트의 값을 서로 비교하여,
상기 128비트의 블록 데이터를 구성하는 4개의 픽셀 데이터 중 적어도 2개 이상의 픽셀 데이터의 상기 20비트의 값이 서로 일치하는 경우에 상기 128비트의 블록 데이터를 근사치로 변경하여 처리할 것으로 판단하는 것
을 특징으로 하는 이미지 암호화 방법.
5. The method of claim 4,
The determining step
Bit values of the 8 bits of R, G, B, and alpha values of the pixel data of the 128-bit block data,
When the 20-bit values of at least two pixel data among the four pixel data constituting the 128-bit block data coincide with each other, it is determined that the 128-bit block data is changed to an approximate value and processed
And encrypting the encrypted image.
제4항에 있어서,
상기 근사화 처리 단계는
상기 128비트의 블록 데이터의 각 픽셀 데이터의 8비트 R, G, B, 알파 값 각각의 하위 3개 비트 값을 이진수 100으로 치환하는 것
을 특징으로 하는 이미지 암호화 방법.
5. The method of claim 4,
The approximation processing step
Replacing the lower three bit values of each of the 8-bit R, G, B, and alpha values of each pixel data of the 128-bit block data with a binary number of 100
And encrypting the encrypted image.
제4항 내지 제6항 중의 어느 한 항의 방법을 실행하기 위한 컴퓨터로 읽을 수 있는 프로그램을 기록한 기록매체.
A recording medium on which a computer-readable program for executing the method of any one of claims 4 to 6 is recorded.
KR1020160179598A 2016-12-27 2016-12-27 System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization KR101952246B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160179598A KR101952246B1 (en) 2016-12-27 2016-12-27 System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160179598A KR101952246B1 (en) 2016-12-27 2016-12-27 System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization

Publications (2)

Publication Number Publication Date
KR20180075796A KR20180075796A (en) 2018-07-05
KR101952246B1 true KR101952246B1 (en) 2019-02-26

Family

ID=62920070

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160179598A KR101952246B1 (en) 2016-12-27 2016-12-27 System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization

Country Status (1)

Country Link
KR (1) KR101952246B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3817273A1 (en) * 2019-10-31 2021-05-05 Siemens Aktiengesellschaft Performance improvement of a cryptographic module of an integrated circuit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005525616A (en) 2001-12-03 2005-08-25 イマジネイション テクノロジーズ リミテッド Data compression and method and apparatus for decompressing compressed data
KR100697879B1 (en) 2005-08-17 2007-03-23 백기영 Method for Encryption and Decryption of Data using pixel
KR101444828B1 (en) 2014-04-30 2014-09-26 동국대학교 산학협력단 Method for storing encrypted image and searching the image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101356949B1 (en) 2012-08-03 2014-01-29 고려대학교 산학협력단 Asymmetric load balancing method of video compression and encryption on multi-core cpus and apparatus thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005525616A (en) 2001-12-03 2005-08-25 イマジネイション テクノロジーズ リミテッド Data compression and method and apparatus for decompressing compressed data
KR100697879B1 (en) 2005-08-17 2007-03-23 백기영 Method for Encryption and Decryption of Data using pixel
KR101444828B1 (en) 2014-04-30 2014-09-26 동국대학교 산학협력단 Method for storing encrypted image and searching the image

Also Published As

Publication number Publication date
KR20180075796A (en) 2018-07-05

Similar Documents

Publication Publication Date Title
US20130156180A1 (en) Method And Device For Securing Block Ciphers Against Template Attacks
JP6127226B1 (en) Image processing apparatus, image processing method, and program
EP3756130B1 (en) Image hidden information detector
CN110533117B (en) Image comparison method, device, equipment and storage medium
US20200250786A1 (en) System and method for encoding and authenticating a digital image
Wang et al. I mage encryption scheme based on Chaos and DNA plane operations
Wang et al. A high capacity data hiding scheme based on re-adjusted GEMD
TW201931309A (en) A color image authentication method and computer program product based on palette compression technique
KR101952246B1 (en) System and Method of Energy efficient Image Encryption using Approximation based Hardware Memoization
CN113055153B (en) Data encryption method, system and medium based on fully homomorphic encryption algorithm
Aldin et al. Quad-color image encryption based on Chaos and Fibonacci Q-matrix
CN111260532B (en) Privacy image encryption method, device, electronic equipment and computer readable storage medium
CN110990846B (en) Information storage method, device and computer readable storage medium
Arun et al. High security cryptographic technique using steganography and chaotic image encryption
CN111414500A (en) Steel wire rope breakage early warning system based on block chain and BIM
CN112149141A (en) Model training method, device, equipment and medium
CN114969796A (en) Image steganography method and system combining QR (quick response) code and S-box chaotic scrambling
CN114448597A (en) Data processing method and device, computer equipment and storage medium
Hong et al. Enabling energy efficient image encryption using approximate memoization
Chavali et al. Comparative Study of Image Encryption and Image Steganography Using Cryptographic Algorithms and Image Evaluation Metrics
Cao et al. Texture driven adaptive multi-level block selection based reversible data hiding in encrypted image
CN106341572B (en) The colour switching of method for supporting to(for) pre-multiplied data
Tafti et al. Active image forgery detection using cellular automata
Han A Hash‐Based Fast Image Encryption Algorithm
Ren et al. A novel reversible data hiding method in encrypted images using efficient parametric binary tree labeling

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant