KR102546008B1 - Method for parallel processing of encription algorithm using multi cpu and gpu - Google Patents

Method for parallel processing of encription algorithm using multi cpu and gpu Download PDF

Info

Publication number
KR102546008B1
KR102546008B1 KR1020160065272A KR20160065272A KR102546008B1 KR 102546008 B1 KR102546008 B1 KR 102546008B1 KR 1020160065272 A KR1020160065272 A KR 1020160065272A KR 20160065272 A KR20160065272 A KR 20160065272A KR 102546008 B1 KR102546008 B1 KR 102546008B1
Authority
KR
South Korea
Prior art keywords
gpu
cpu
processing
parallel processing
degree
Prior art date
Application number
KR1020160065272A
Other languages
Korean (ko)
Other versions
KR20170133892A (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 KR1020160065272A priority Critical patent/KR102546008B1/en
Publication of KR20170133892A publication Critical patent/KR20170133892A/en
Application granted granted Critical
Publication of KR102546008B1 publication Critical patent/KR102546008B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3877Concurrent instruction execution, e.g. pipeline, look ahead using a slave processor, e.g. coprocessor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • 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/002Countermeasures against attacks on cryptographic mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2211/00Indexing scheme relating to details of data-processing equipment not covered by groups G06F3/00 - G06F13/00
    • G06F2211/007Encryption, En-/decode, En-/decipher, En-/decypher, Scramble, (De-)compress
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

본 발명에 따른 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템의 병렬 처리 방법은 암호화 알고리즘의 처리 구간 중 병렬 처리가 가능한 병렬화 구간을 산출하는 단계; 단일 CPU 또는 단일 GPU 기반으로 상기 병렬 처리가 가능한 병렬화 구간에 대한 순차 처리 시간을 산출하는 단계; 각 CPU 및 GPU에 대하여 순차 처리 대비 속도 향상 정도에 대한 정보를 산출하는 단계; 및 상기 각 CPU 및 GPU에 대한 순차 처리 대비 속도 향상 정도에 대한 정보를 기반으로, 각 CPU 및 GPU에 대한 작업량을 할당하는 단계를 포함한다.A parallel processing method of a multi-CPU and GPU-based encryption algorithm parallel processing system according to the present invention includes calculating a parallelization section capable of parallel processing among processing sections of an encryption algorithm; Calculating sequential processing time for the parallelization section in which the parallel processing is possible based on a single CPU or single GPU; Calculating information about the degree of speed improvement compared to sequential processing for each CPU and GPU; and allocating a workload to each of the CPUs and GPUs based on the information about the degree of speed improvement compared to sequential processing for each of the CPUs and GPUs.

Description

다중 CPU 및 GPU를 이용한 암호화 알고리즘의 병렬처리 방법{METHOD FOR PARALLEL PROCESSING OF ENCRIPTION ALGORITHM USING MULTI CPU AND GPU}Parallel processing method of encryption algorithm using multiple CPUs and GPUs {METHOD FOR PARALLEL PROCESSING OF ENCRIPTION ALGORITHM USING MULTI CPU AND GPU}

본 발명은 다중 CPU 및 GPU를 이용한 암호화 알고리즘의 병렬처리 방법에 관한 것이다. The present invention relates to a parallel processing method of an encryption algorithm using multiple CPUs and GPUs.

최근 방대한 데이터들을 처리하고 전송하는 과정에서 외부 공격자로부터 정보를 보호하는 처리는 매우 중요한 기술이슈가 되고 있으며, 데이터의 보호 기밀성 보장은 물론, 가용성을 높이기 위해 다수의 알고리즘이 개발되고 있다. Recently, processing to protect information from external attackers has become a very important technical issue in the process of processing and transmitting huge amounts of data, and a number of algorithms are being developed to increase availability as well as guarantee protection and confidentiality of data.

본 발명에서는 이러한 알고리즘의 병렬 처리를 위해 다중 CPU(Central processing unit) 및 GPU(Graphical processing unit) 구조를 활용하고자 한다. 이러한 방법에서의 효율적 활용도를 증대하기 위해서는 하드웨어적인 측면의 성능 향상도 고려할 수 있으나, 다중 CPU와 GPU에 대하여 적절한 작업량을 배치하는 문제는 먼저 해결되어야 할 연구과제이다. 현재까지 알려진 처리 속도를 향상 시키는 방법으로는 프로그램 내에서 병렬처리가 가능한 부분만을 추출하여 태스크로 만드는 분할 기법과 스케줄링 기법 등이 있다.In the present invention, a multi-CPU (Central Processing Unit) and GPU (Graphical Processing Unit) structure is intended to be used for parallel processing of such an algorithm. In order to increase efficient utilization in this method, performance improvement in terms of hardware can be considered, but the problem of arranging appropriate workload for multiple CPUs and GPUs is a research task to be solved first. Methods for improving the processing speed known so far include a division technique and a scheduling technique that extracts only the parts capable of parallel processing within a program and turns them into tasks.

이와 관련하여, 한국공개특허공보 제2012-0091550호(발명의 명칭: 범용 그래픽 처리장치의 병렬 프로세서를 이용한 고속 영상 처리 장치 및 방법)는 GPU가 탑재된 범용 비디오카드를 이용하여 병렬 처리함으로써 대용량의 데이터 변환에 소요되는 연산속도를 향상시키기 위한 기술을 개시하고 있다.In this regard, Korean Patent Publication No. 2012-0091550 (Title of Invention: High-speed image processing apparatus and method using a parallel processor of a general-purpose graphic processing unit) is a high-capacity image processing device by parallel processing using a general-purpose video card equipped with a GPU. Disclosed is a technique for improving an operation speed required for data conversion.

본 발명은 전술한 종래 기술의 문제점을 해결하기 위한 것으로서, 본 발명의 일부 실시예는 다중 CPU와 GPU를 활용하여 데이터 암호화 알고리즘을 효율적으로 병렬처리할 수 있는 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 방법을 제공하는 것을 목적으로 한다.The present invention is to solve the above-mentioned problems of the prior art, and some embodiments of the present invention utilize multiple CPUs and GPUs to efficiently process data encryption algorithms in parallel using multiple CPUs and GPUs-based encryption algorithm parallel processing. It aims to provide a method.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 일측면에 따른 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템의 병렬 처리 방법은 암호화 알고리즘의 처리 구간 중 병렬 처리가 가능한 병렬화 구간을 산출하는 단계; 단일 CPU 또는 단일 GPU 기반으로 상기 병렬 처리가 가능한 병렬화 구간에 대한 순차 처리 시간을 산출하는 단계; 각 CPU 및 GPU에 대하여 순차 처리 대비 속도 향상 정도에 대한 정보를 산출하는 단계; 및 상기 각 CPU 및 GPU에 대한 순차 처리 대비 속도 향상 정도에 대한 정보를 기반으로, 각 CPU 및 GPU에 대한 작업량을 할당하는 단계를 포함한다.As a technical means for achieving the above-described technical problem, the parallel processing method of the multiple CPU and GPU-based encryption algorithm parallel processing system according to one aspect of the present invention calculates a parallelization section capable of parallel processing among the processing sections of the encryption algorithm step; Calculating sequential processing time for the parallelization section in which the parallel processing is possible based on a single CPU or single GPU; Calculating information about the degree of speed improvement compared to sequential processing for each CPU and GPU; and allocating a workload to each of the CPUs and GPUs based on the information about the degree of speed improvement compared to sequential processing for each of the CPUs and GPUs.

전술한 본 발명의 과제 해결 수단에 의하면, 다중 CPU와 GPU를 활용하여 데이터 암호화 알고리즘을 효율적으로 병렬처리할 수 있어, 암호화 알고리즘에 소요되는 시간을 절감할 수 있다.According to the above-described problem solving means of the present invention, it is possible to efficiently parallelize data encryption algorithms by utilizing multiple CPUs and GPUs, thereby reducing the time required for encryption algorithms.

도 1은 본 발명의 일실시예에 따른 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템을 도시한 블록도이다.
도 2는 본 발명의 일 실시예에 따른 CPU와 GPU의 데이터 복사를 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따른 처리 장치별 속도 향상 정도에 따른 작업량 산출의 예시를 도시한 도면이다.
도 4는 본 발명의 일 실시예가 적용되는 LEA 알고리즘을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템의 병렬 처리 과정을 도시한 순서도이다.
1 is a block diagram illustrating a multi-CPU and GPU-based encryption algorithm parallel processing system according to an embodiment of the present invention.
2 is a diagram for explaining data copying between a CPU and a GPU according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating an example of calculation of workload according to speed improvement degree for each processing device according to an embodiment of the present invention.
4 is a diagram for explaining an LEA algorithm to which an embodiment of the present invention is applied.
5 is a flowchart illustrating a parallel processing process of a multi-CPU and GPU-based encryption algorithm parallel processing system according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail so that those skilled in the art can easily practice the present invention with reference to the accompanying drawings. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. And in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is said to be "connected" to another part, this includes not only the case where it is "directly connected" but also the case where it is "electrically connected" with another element interposed therebetween. . In addition, when a certain component is said to "include", this means that it may further include other components without excluding other components unless otherwise stated.

도 1은 본 발명의 일실시예에 따른 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템을 도시한 블록도이다.1 is a block diagram illustrating a multi-CPU and GPU-based encryption algorithm parallel processing system according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 암호화 알고리즘 병렬 처리 시스템 (100)은 복수의 CPU(120, 122), 복수의 GPU(130, 132) 및 각 CPU(120, 122)와 GPU(130, 132)를 제어하는 제어부(110)를 포함한다. Encryption algorithm parallel processing system 100 according to an embodiment of the present invention includes a plurality of CPUs 120 and 122, a plurality of GPUs 130 and 132, and each CPU 120 and 122 and GPUs 130 and 132. It includes a control unit 110 for controlling.

참고로, 본 발명의 실시예에 따른 도 1에 도시된 구성 요소들은 소프트웨어 또는 FPGA(Field Programmable Gate Array) 또는 ASIC(Application Specific Integrated Circuit)와 같은 하드웨어 구성 요소를 의미하며, 소정의 역할들을 수행한다.For reference, the components shown in FIG. 1 according to an embodiment of the present invention mean software or hardware components such as FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit), and perform predetermined roles. .

그렇지만 '구성 요소들'은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 각 구성 요소는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다.However, 'components' are not meant to be limited to software or hardware, and each component may be configured to be in an addressable storage medium or configured to reproduce one or more processors.

따라서, 일 예로서 구성 요소는 소프트웨어 구성 요소들, 객체지향 소프트웨어 구성 요소들, 클래스 구성 요소들 및 태스크 구성 요소들과 같은 구성 요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다.Thus, as an example, a component includes components such as software components, object-oriented software components, class components, and task components, processes, functions, properties, procedures, sub routines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays and variables.

구성 요소들과 해당 구성 요소들 안에서 제공되는 기능은 더 작은 수의 구성 요소들로 결합되거나 추가적인 구성 요소들로 더 분리될 수 있다.Components and the functionality provided within them may be combined into fewer components or further separated into additional components.

제어부(110)는 다중 CPU 및 GPU 환경에서 암호화 처리 알고리즘을 병렬처리하는 동작을 수행한다. 이러한 병렬 처리 수행을 위해, 암호화 처리 알고리즘에서 병렬처리가 가능한 병렬화 구간을 파악하고, 병렬처리에 소요되는 수행시간을 산출해야 한다. 이를 위해, 제어부(110)는 전체 CPU들의 작업 수행시간(

Figure 112016051058651-pat00001
), 전체 GPU들의 작업 수행시간(
Figure 112016051058651-pat00002
) 및 동시처리 수행시간(
Figure 112016051058651-pat00003
)을 이용하여 병렬처리 수행 시간(
Figure 112016051058651-pat00004
)을 산출한다. 이때, 병렬처리 수행시간은 CPU와 GPU의 병렬화 구간에서의 수행시간을 의미하며, 그 수식은 수학식 1과 같다.The control unit 110 performs parallel processing of encryption processing algorithms in a multi-CPU and GPU environment. To perform such parallel processing, it is necessary to identify the parallelization section where parallel processing is possible in the encryption processing algorithm, and calculate the execution time required for parallel processing. To this end, the control unit 110 determines the task execution time of all CPUs (
Figure 112016051058651-pat00001
), task execution time of all GPUs (
Figure 112016051058651-pat00002
) and concurrent processing time (
Figure 112016051058651-pat00003
) using parallel processing time (
Figure 112016051058651-pat00004
) is calculated. At this time, the parallel processing execution time means the execution time in the parallelization section of the CPU and GPU, and the formula is the same as Equation 1.

Figure 112016051058651-pat00005
Figure 112016051058651-pat00005

Figure 112016051058651-pat00006
Figure 112016051058651-pat00006

한편, 수학식 2와 같이

Figure 112016051058651-pat00007
는 병렬처리 부적합 구간을 나타낸다.On the other hand, as shown in Equation 2
Figure 112016051058651-pat00007
represents an unsuitable section for parallel processing.

전체 CPU들과 전체 GPU들의 수행시간은 순차처리 대비 속도향상 정도(S)와 작업량(W)에 의하여 결정되며, 구체적인 수식은 암달의 법칙에 근거하여 다음 수학식 3과 같이 정의된다.The execution time of all CPUs and all GPUs is determined by the degree of speed improvement (S) and workload (W) compared to sequential processing, and the specific formula is defined as Equation 3 below based on Amdahl's law.

Figure 112016051058651-pat00008
Figure 112016051058651-pat00008

이때,

Figure 112016051058651-pat00009
Figure 112016051058651-pat00010
는 순차처리 대비 속도향상 정도를 나타내고,
Figure 112016051058651-pat00011
Figure 112016051058651-pat00012
는 각각의 작업량을 나타낸다.At this time,
Figure 112016051058651-pat00009
and
Figure 112016051058651-pat00010
Represents the degree of speed improvement compared to sequential processing,
Figure 112016051058651-pat00011
and
Figure 112016051058651-pat00012
represents the amount of work for each.

예를 들어, 전체 작업 중 30%를 담당하고, 같은 클록의 멀티코어(2-core)를 사용한다면 속도향상은 2배가 되며 이를 해당 수식으로 나타내면 0.3/2로 표현할 수 있다.For example, if you are responsible for 30% of the total work and use a multi-core (2-core) of the same clock, the speed improvement is doubled, and this can be expressed as 0.3/2 in the corresponding formula.

Figure 112016051058651-pat00013
는 데이터 복사 시간을 의미한다. 도면을 참조하여 데이터 복사를 살펴보기로 한다.
Figure 112016051058651-pat00013
is the data copy time. Let's take a look at data copying with reference to the drawing.

도 2는 본 발명의 일 실시예에 따른 CPU와 GPU의 데이터 복사를 설명하기 위한 도면이다.2 is a diagram for explaining data copying between a CPU and a GPU according to an embodiment of the present invention.

도 2에 도시된 바와 같이, 데이터 복사는 CPU(Host)에서 GPU(Device)로의 GPU메모리 할당과 메모리 복사, 연산실행 명령 데이터를 전송하는 과정과, 이를 전송 받은 GPU(Device)가 데이터를 로딩하고 연산한 결과를 CPU(host)로 전송하는 과정을 포함한다. 이러한 데이터 복사 과정에서 발생하는 각 과정에 소요되는 시간이 데이터 복사 시간이다.As shown in FIG. 2, data copy is a process of allocating GPU memory from a CPU (Host) to a GPU (Device), copying memory, and transmitting operation execution command data, and the GPU (Device) that receives the data loads the data and It includes the process of transmitting the calculated result to the CPU (host). The time required for each process occurring in the data copying process is the data copying time.

한편, CPU/GPU에 대한 최적의 수행 시간(RT)에 대한 조건을 살펴보면, 모든 처리장치들의 작업 처리가 동시에 종료되었을 때 각 처리 장치가 수행한 시간을 최적의 수행 시간이라고 나타낼 수 있다. 즉, CPU와 GPU의 수행 시간이 같을 때를 의미한다. 이를 위해 처리장치(

Figure 112016051058651-pat00014
)의 전체 속도 향상 정도(S)를 산출하고, 이에 따른 병렬화 구간에서의 작업량(
Figure 112016051058651-pat00015
)을 통해 최적의 수행 시간(RT)을 산출한다. 아래 수학식 4는 최적의 수행 시간이 산출되는 조건을 의미하고, 수학식 5는 최적의 수행 시간을 산출하는 수식이다.On the other hand, looking at the conditions for the optimal execution time (RT) for the CPU/GPU, the optimal execution time can be the time each processing unit performed when the job processing of all the processing units ended at the same time. That is, when the execution time of CPU and GPU is the same. For this purpose, the processing device (
Figure 112016051058651-pat00014
), calculate the overall speed improvement degree (S), and the amount of work in the parallelization section (
Figure 112016051058651-pat00015
) to calculate the optimal execution time (RT). Equation 4 below means a condition for calculating an optimal execution time, and Equation 5 is an equation for calculating an optimal execution time.

Figure 112016051058651-pat00016
Figure 112016051058651-pat00016

Figure 112016051058651-pat00017
Figure 112016051058651-pat00017

이 때, CPU/GPU 작업 할당 부분(

Figure 112016051058651-pat00018
)에 관한 식은 다음과 같이 나타낼 수 있다.At this time, the CPU / GPU task allocation part (
Figure 112016051058651-pat00018
) can be expressed as:

Figure 112016051058651-pat00019
Figure 112016051058651-pat00019

Figure 112016051058651-pat00020
(for all )
Figure 112016051058651-pat00020
(for all)

앞서, 수학식 5를 통해 산출된 결과인 최적의 수행 시간(RT)를 이용하여 각 처리장치(

Figure 112016051058651-pat00021
)에 분배되는 작업량(
Figure 112016051058651-pat00022
)을 도출할 수 있다.Previously, using the optimal execution time (RT), which is the result calculated through Equation 5, each processing device (
Figure 112016051058651-pat00021
) distributed over the amount of work (
Figure 112016051058651-pat00022
) can be derived.

도 3은 본 발명의 일 실시예에 따른 처리 장치별 속도 향상 정도에 따른 작업량 산출의 예시를 도시한 도면이다.FIG. 3 is a diagram illustrating an example of calculation of workload according to speed improvement degree for each processing device according to an embodiment of the present invention.

암호화 처리 알고리즘의 전체 데이터 영역(TOTAL DATA) 중 병렬 처리가 부적합한 구간(25%)을 제외한 부분인 작업 부하 데이터(WORK LOAD DATA)(75%)는 병렬 처리 적합 구간을 나타낸다.Among the total data areas (TOTAL DATA) of the encryption processing algorithm, the WORK LOAD DATA (75%), which is the part excluding the section (25%) for which parallel processing is inappropriate, represents the section suitable for parallel processing.

이때, 각 처리 장치의 속도 향상 정도가 각각 도면에서와 같이 특정되었을 때, 즉 S1=3, S2=4, S3=7, S4=6 이라 한다면, 작업량 분배량은 각각 W1=11.25%, W2=15%, W3=26.25%, W4=22.5% 로 산출된다.At this time, when the degree of speed improvement of each processing device is specified as shown in the drawing, that is, if S1 = 3, S2 = 4, S3 = 7, S4 = 6, the amount of work distribution is W1 = 11.25%, W2 = It is calculated as 15%, W3=26.25%, W4=22.5%.

도 4는 본 발명의 일 실시예가 적용되는 LEA 알고리즘을 설명하기 위한 도면이다. 4 is a diagram for explaining an LEA algorithm to which an embodiment of the present invention is applied.

다수의 암호화 처리 알고리즘으로서 표준으로 널리 이용되는 3-DES, AES등이 알려져있고, 최근에는 이러한 알고리즘을 대체할 LEA 기법이 발표되었는데, LEA(Lightweight Encryption Algorithm)는 AES보다 처리속도가 100배 정도 빠른 것으로 알려져 있다.As a number of encryption processing algorithms, 3-DES and AES, which are widely used as standard, are known. Recently, LEA technique to replace these algorithms was announced. LEA (Lightweight Encryption Algorithm) has a processing speed about 100 times faster than AES. It is known.

LEA는 빅데이터, 클라우드 등 고속 환경 및 모바일 기기 등 경량 환경에서 기밀성을 제공하기 위해 2013년에 개발된 128 비트 블록 암호 알고리즘이다. 임의 입력 길이의 데이터를 암호화 및 복호화 하기 위해서 운영모드를 필요로 하는데, 그 중 CBC모드와 CTR모드를 결합한 LEA-CCM(Counter with CBC-MAC)모드는 인증과 암호화를 처리하며, 수행 속도가 빠르다는 이점으로 널리 이용되고 있다.LEA is a 128-bit block encryption algorithm developed in 2013 to provide confidentiality in high-speed environments such as big data and cloud and lightweight environments such as mobile devices. An operating mode is required to encrypt and decrypt data of arbitrary input length. Among them, LEA-CCM (Counter with CBC-MAC) mode, which combines CBC mode and CTR mode, handles authentication and encryption and has a high execution speed. is widely used for its advantages.

도면에서는 암호화 라운드 함수를 도시한 것으로, 도시된 바와 같이, 입력된 데이터를 복수의 블록 데이터로 구분하고, 라운드 키(RK)와 조합하여 내부 연산을 수행한다.In the figure, an encryption round function is shown. As shown, input data is divided into a plurality of block data, and an internal operation is performed by combining with a round key (RK).

이때, 라운드 함수의 입출력 길이는 128 비트이고, 라운드 키의 길이는 192 비트이다. 라운드 함수 입력값은 32 비트 단위 배열 형태로 내부 연산에 사용된다. 라운드 함수를 구성하는 내부 연산으로서

Figure 112016051058651-pat00023
는 32비트 덧셈 연산을 나타내고,
Figure 112016051058651-pat00024
는 비트단위 배타적 논리합(XOR)을 나타내고, RORn은 n비트 우측 회전 연산을, ROLn은 n 비트 좌측 회전 연산을 나타낸다.At this time, the input/output length of the round function is 128 bits, and the length of the round key is 192 bits. The round function input value is used for internal operation in the form of a 32-bit unit array. As the internal operations that make up the round function
Figure 112016051058651-pat00023
represents a 32-bit addition operation,
Figure 112016051058651-pat00024
denotes a bitwise exclusive OR (XOR), RORn denotes an n-bit right rotation operation, and ROLn denotes an n-bit left rotation operation.

기존에 공개된 기술이므로, 구체적인 암호화 처리 알고리즘에 대한 상세한 설명은 생략하기로 한다. Since it is a previously disclosed technology, a detailed description of a specific encryption processing algorithm will be omitted.

도 5는 본 발명의 일 실시예에 따른 다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템의 병렬 처리 과정을 도시한 순서도이다.5 is a flowchart illustrating a parallel processing process of a multi-CPU and GPU-based encryption algorithm parallel processing system according to an embodiment of the present invention.

먼저, 하나의 CPU 또는 하나의GPU를 이용하여 암호화 알고리즘에 대한 순차처리 시간을 산출한다(S510). 이때, 암호화 알고리즘의 처리 구간 중 병렬 처리가 가능한 병렬화 구간을 산출하고, 이에 대한 순차 처리 시간을 산출한다.First, a sequential processing time for an encryption algorithm is calculated using one CPU or one GPU (S510). At this time, among the processing intervals of the encryption algorithm, a parallelization interval in which parallel processing is possible is calculated, and a sequential processing time for this is calculated.

다음으로, 이를 토대로 순차처리 대비 속도 향상 정도를 각 CPU 및 각 GPU 별로 산출한다(S520).Next, based on this, the degree of speed improvement compared to sequential processing is calculated for each CPU and each GPU (S520).

다음으로, 순차처리 대비 속도 향상 정도를 이용하여, 각 CPU 및 GPU에 대한 작업량을 산출하고, 이를 각 CPU와 GPU에 할당한다(S530).Next, the amount of work for each CPU and GPU is calculated using the degree of speed improvement compared to sequential processing, and it is allocated to each CPU and GPU (S530).

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. An embodiment of the present invention may be implemented in the form of a recording medium including instructions executable by a computer, such as program modules executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. Also, computer readable media may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transport mechanism, and includes any information delivery media.

본 발명의 방법 및 시스템은 특정 실시예와 관련하여 설명되었지만, 그것들의 구성 요소 또는 동작의 일부 또는 전부는 범용 하드웨어 아키텍쳐를 갖는 컴퓨터 시스템을 사용하여 구현될 수 있다. Although the methods and systems of the present invention have been described with reference to specific embodiments, some or all of their components or operations may be implemented using a computer system having a general-purpose hardware architecture.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The above description of the present invention is for illustrative purposes, and those skilled in the art can understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. will be. Therefore, the embodiments described above should be understood as illustrative in all respects and not limiting. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as distributed may be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is indicated by the following claims rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the claims and equivalent concepts should be construed as being included in the scope of the present invention. do.

100: 멀티코어 기반 시스템 110: 제어부
120: CPU 130: GPU
100: multi-core based system 110: control unit
120: CPU 130: GPU

Claims (2)

다중 CPU 및 GPU 기반의 암호화 알고리즘 병렬 처리 시스템의 병렬 처리 방법에 있어서,
상기 암호화 알고리즘의 처리 구간 중 병렬 처리가 가능한 병렬화 구간을 산출하는 단계;
단일 CPU 또는 단일 GPU 기반으로 상기 병렬 처리가 가능한 병렬화 구간에 대한 순차 처리 시간을 산출하는 단계;
각 CPU 및 GPU에 대하여 순차 처리 대비 속도 향상 정도에 대한 정보를 산출하는 단계; 및
상기 각 CPU 및 GPU에 대한 순차 처리 대비 속도 향상 정도에 대한 정보를 기반으로, 각 CPU 및 GPU에 대한 작업량을 할당하는 단계
를 포함하고,
상기 암호화 알고리즘은 LEA-CCM 알고리즘이며,
상기 각 CPU 및 GPU에 대한 순차 처리 대비 속도 향상 정도에 대한 정보를 기반으로, 각 CPU 및 GPU에 대한 작업량을 할당하는 단계는,
각 CPU에서 GPU로의 GPU메모리 할당과 메모리 복사, 연산실행 명령 데이터를 전송하는 과정과, 상기 연산실행 명령 데이터를 전송 받은 GPU가 데이터를 로딩하고 연산한 결과를 CPU로 전송하는 과정을 포함하는 데이터 복사 과정에서 발생하는 각 과정에 소요되는 시간인 데이터 복사 시간, 순차처리 대비 속도향상 정도와 작업량에 의하여 전체 CPU들과 전체 GPU들의 수행시간이 결정되며,
전체 CPU들의 작업 수행시간, 전체 GPU들의 작업 수행시간 및 동시처리 수행시간을 이용하여, 전체 CPU들 및 전체 GPU들의 전체 속도 향상 정도를 산출하고, 상기 전체 속도 향상 정도에 따른 병렬화 구간에서의 작업량을 통해 모든 처리장치들의 작업 처리가 동시에 종료되었을 때 각 처리 장치가 수행한 시간을 최적의 수행 시간으로 산출하는
병렬 처리 방법.
In the parallel processing method of a multi-CPU and GPU-based cryptographic algorithm parallel processing system,
Calculating a parallelization section in which parallel processing is possible among processing sections of the encryption algorithm;
Calculating sequential processing time for the parallelization section in which the parallel processing is possible based on a single CPU or single GPU;
Calculating information about the degree of speed improvement compared to sequential processing for each CPU and GPU; and
Allocating a workload to each CPU and GPU based on the information about the degree of speed improvement compared to sequential processing for each CPU and GPU
including,
The encryption algorithm is a LEA-CCM algorithm,
Allocating the workload for each CPU and GPU based on the information on the degree of speed improvement compared to sequential processing for each CPU and GPU,
Data copying, which includes the process of allocating GPU memory from each CPU to the GPU, copying the memory, and transmitting the operation execution command data, and the process of the GPU receiving the operation execution command data loading the data and transmitting the calculation result to the CPU The execution time of all CPUs and all GPUs is determined by the data copy time, which is the time required for each process that occurs in the process, the degree of speed improvement compared to sequential processing, and the amount of work.
Using the task execution time of all CPUs, the task execution time and concurrent processing execution time of all CPUs, the total speed improvement degree of all CPUs and all GPUs is calculated, and the amount of work in the parallelization section according to the total speed improvement degree is calculated. When the job processing of all processing units is finished at the same time, the time taken by each processing unit is calculated as the optimal execution time.
Parallel processing method.
삭제delete
KR1020160065272A 2016-05-27 2016-05-27 Method for parallel processing of encription algorithm using multi cpu and gpu KR102546008B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160065272A KR102546008B1 (en) 2016-05-27 2016-05-27 Method for parallel processing of encription algorithm using multi cpu and gpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160065272A KR102546008B1 (en) 2016-05-27 2016-05-27 Method for parallel processing of encription algorithm using multi cpu and gpu

Publications (2)

Publication Number Publication Date
KR20170133892A KR20170133892A (en) 2017-12-06
KR102546008B1 true KR102546008B1 (en) 2023-06-21

Family

ID=60922600

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160065272A KR102546008B1 (en) 2016-05-27 2016-05-27 Method for parallel processing of encription algorithm using multi cpu and gpu

Country Status (1)

Country Link
KR (1) KR102546008B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10228972B2 (en) * 2017-06-22 2019-03-12 Banuba Limited Computer systems and computer-implemented methods for dynamically adaptive distribution of workload between central processing unit(s) and graphics processing unit(s)
KR102029711B1 (en) * 2018-05-30 2019-10-08 한국항공대학교산학협력단 Job assignment apparatus and method for multi-gpu based deep-running model parallelization
CN108897616B (en) * 2018-06-04 2021-08-24 四川大学 Non-downsampling contourlet transform optimization method based on parallel operation
KR20230137674A (en) 2022-03-22 2023-10-05 국민대학교산학협력단 Parallel processing apparatus and method for xts optimization

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101088260B1 (en) * 2009-12-18 2011-11-30 고려대학교 산학협력단 apparatus for parallel processing ??????? using multi­core processor and method for processing thereof
KR101639003B1 (en) * 2014-07-15 2016-07-12 고려대학교 산학협력단 Manicore system based cpu/gpu and method for distributing workload for cpu/gpu concurrent processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
성미지 외 1명. IoT 보안 응용을 위한 경량 블록암호 LEA-128/192/256의 효율적인 하드웨어 구현. 2015.07.
이성주 외 3명. 이기종 컴퓨팅 환경에서 적응형 GMM 기술을 이용한 실시간 움직임 검출. 2016.01.

Also Published As

Publication number Publication date
KR20170133892A (en) 2017-12-06

Similar Documents

Publication Publication Date Title
US11088846B2 (en) Key rotating trees with split counters for efficient hardware replay protection
KR102546008B1 (en) Method for parallel processing of encription algorithm using multi cpu and gpu
Lee et al. SPRING: a novel parallel chaos-based image encryption scheme
US9230091B2 (en) Managing use of a field programmable gate array with isolated components
EP3843322A1 (en) Method and apparatus for multi-key total memory encryption based on dynamic key derivation
Mei et al. CUDA-based AES parallelization with fine-tuned GPU memory utilization
DE102015008012A1 (en) SM4 acceleration processors, methods, systems and instructions
US20220198027A1 (en) Storage encryption using converged cryptographic engine
US9419972B2 (en) Two dimensional direct memory access scheme for enhanced network protocol processing performance
US11438172B2 (en) Robust state synchronization for stateful hash-based signatures
US11544174B2 (en) Method and apparatus for protecting trace data of a remote debug session
US11722313B2 (en) State synchronization for post-quantum signing facilities
DE102020126293A1 (en) DEVICES, PROCEDURES AND SYSTEMS FOR INSTRUCTIONS FOR RESTRICTIONS ON USE Cryptographically
CN105009134A (en) Method, apparatus, system, and computer readable medium to provide secure operation
US11847067B2 (en) Cryptographic protection of memory attached over interconnects
CN105577363A (en) Extensible pipelined circuit aiming at SM4 cryptographic algorithm and implementation method thereof
CN102495980A (en) Credible password module capable of reconstructing dynamically
US20100306553A1 (en) High-throughput cryptographic processing using parallel processing
KR101923210B1 (en) Apparatus for cryptographic computation on heterogeneous multicore processors and method thereof
Eduardo et al. Speculative Encryption on {GPU} Applied to Cryptographic File Systems
CN111290791A (en) Scalar unit with high performance cryptographic operations
US20220417042A1 (en) Platform sealing secrets using physically unclonable function (puf) with trusted computing base (tcb) recoverability
US9800401B2 (en) Initialization vectors generation from encryption/decryption
Inampudi et al. Parallel implementation of cryptographic algorithm: AES using OpenCL on GPUs
KR102457166B1 (en) Hardware module and its control method with a 32bit instruction extension for processor supporting ARIA encryption and decryption

Legal Events

Date Code Title Description
N231 Notification of change of applicant
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right