ARMv8 프로세서 상에서의 해시 함수 LSH 최적 구현
- Abstract
- 본 논문에서는 64-bit ARMv8 프로세서의 벡터 레지스터를 활용한 해시함수 LSH 최적화 구현을 제안한다. 해시함수 LSH 전체 연산 과정에 대해 벡터 레지스터를 활용하여 병렬 연산을 효율적으로 수행한다. 제안 기법은 LSH-256과 LSH-512에 대한 싱글 메시지 최적화 구현과 LSH-256에 대한 멀티 메시지 최적화 병렬 구현을 제안한다. LSH의 Wordperm 함수와 메시지 확장 함수에서 수행되는 순열을 구현하기 위해서는 많은 벡터 명령어가 필요하다. 따라서, 싱글 메시지 최적화 구현에서는 Wordperm과 메시지 확장함수 에 대해 최적화를 수행한다. 제안 기법은 순열 P를 LSH 연산 전에 수행한다. P가 적용되어 수정된 LSH를 수행한 후에는 P의 역순열인 P^-1을 수행하여 연산을 마무리한다. 이 과정에서 LSH-256과 LSH-512에 각각에 적합한 P를 찾아 벡터 명령어를 사용하여 효율적으로 구현한다. 결과적으로, P가 적용되어 수정된 Wordperm 함수와 메시지 확장 함수는 P를 적용하기 전보다 더 적은 벡터 명령어를 사용하여 구현하였다. LSH의 주요 연산은 ARX(Addition, Rotation, eXclusive OR)이다. 따라서, 수정된 LSH에서 수행 되는 ARX 연산에 대한 최적화를 수행한다. 멀티 메시지에 대한 최적화 병렬 구현은 레지스터 내부 정렬을 통해 서로 다른 2개의 메시지에 대해 LSH-256을 병렬 구현하였다. 이 과정에서 메시지 확장 함수에서 수행되는 덧셈 연산을 기존의 절반으로 생략하여 최적화한다. 결과적으로, LSH-256 최적화 구현은 1,024-bit와 2,048-bit 메시지에 대해 한국인터넷진흥원 (KISA)에서 제공한 레퍼런스 코드보다 각각 3.94배, 4.32배 성능 향상을 확 인하였다. LSH-512 최적화 구현은 1,024-bit와 2,048-bit 메시지에 대해 KISA에서 제공한 레퍼런스 코드보다 각각 2.34배, 1.78배 성능 향상을 확인하였다. 멀티 메시지에 대한 LSH-256 병렬 구현은 1,024-bit와 2,048-bit 메시지에 대해 KISA에서 제공한 레퍼런스 코드보다 각각 5.26배, 5.61배 성능 향상을 확인하였다. 그리고 1,024-bit와 2,048-bit 메시지에 대해 LSH-256 최적화 구현 대비 각각 1.33배, 1.30배 성능 향상을 확인하였다.
|In this paper, we propose an LSH optimization implementation of hash function using vector registers of 64-bit ARMv8 processor. Hash function LSH Performs parallel operation efficiently by utilizing vector registers for the entire operation process. The proposed method proposes a single message optimization implementation for LSH-256 and LSH-512 and a multi-message optimization parallel implementation for LSH-256. Many vector instructions are needed to implement the permutations performed by LSH's Wordperm function and message expansion function. Therefore, in the single message optimization implementation, Wordperm and message extension functions are optimized. The proposed method performs permutation P before LSH operation. After P is applied and the modified LSH is performed, the operation is completed by performing P, which is the reverse permutation of P. In this process, P suitable for LSH-256 and LSH-512 is found and implemented efficiently using vector instructions. As a result, the Wordperm function and the message extension function modified by applying P were implemented using fewer vector instructions than before applying P. The main operation of LSH is ARX (Addition, Rotation, eXclusive OR). Therefore, optimization of the ARX operation performed in the modified LSH is performed. Optimized parallel implementation for multi-message parallel implementation of LSH-256 for two different messages through register internal alignment. In this process, the addition operation performed in the message extension function is omitted to half of the previous one and optimized. As a result, the LSH-256 optimized implementation confirmed 3.94 times and 4.32 times performance improvement over the reference code provided by the Korea Internet & Security Agency (KISA) for 1,024-bit and 2,048-bit messages, respectively.
The LSH-512 optimized implementation confirmed 2.34 times and 1.78 times performance improvement over the reference code provided by KISA for 1,024-bit and 2,048-bit messages, respectively. Parallel implementation of LSH-256 for multi-message confirmed performance improvement of 5.26 times and 5.61 times, respectively, compared to the reference code provided by KISA for 1,024-bit and 2,048-bit messages. Also, for 1,024-bit and 2,048-bit messages, performance improvements were confirmed by 1.33 times and 1.30 times, respectively, compared to LSH-256 optimized implementation.
- Author(s)
- 심민주
- Issued Date
- 2023
- Awarded Date
- 2023-02
- Type
- Thesis
- Keyword
- LSH 해시함수; 소프트웨어 구현; ARMv8 프로세서; 병렬 연산
- URI
- http://dspace.hansung.ac.kr/handle/2024.oak/6001
- Authorize & License
-
- Files in This Item:
-
Items in Repository are protected by copyright, with all rights reserved, unless otherwise indicated.