Leuvenshtein: 셀당 단일 부트스트랩을 통한 효율적인 FHE 기반 편집 거리 계산
Leuvenshtein: Efficient FHE-based Edit Distance Computation with Single Bootstrap per Cell
August 20, 2025
저자: Wouter Legiest, Jan-Pieter D'Anvers, Bojan Spasic, Nam-Luc Tran, Ingrid Verbauwhede
cs.AI
초록
본 논문은 완전 동형 암호화(Fully Homomorphic Encryption, FHE) 프레임워크 내에서, 특히 TFHE와 같은 3세대 암호화 기법을 대상으로 레벤슈타인(Levenshtein) 편집 거리를 계산하는 새로운 접근 방식을 제시한다. 편집 거리 계산은 DNA 서열 정렬과 같은 금융 및 유전체학 분야의 응용 프로그램에서 필수적이다. 우리는 Leuvenshtein이라는 편집 거리 계산 비용을 크게 줄이는 최적화된 알고리즘을 소개한다. 이 알고리즘은 계산 셀당 필요한 프로그래밍 가능한 부트스트랩(Programmable Bootstraps, PBS)의 수를 기존의 Wagner-Fisher 알고리즘이 요구하는 약 94회에서 단 1회로 줄인다. 또한, 문자 간 동등성 검사를 효율적으로 수행하는 방법을 제안하여 ASCII 문자 비교를 단 2회의 PBS 연산으로 축소한다. 마지막으로, 입력 문자열 중 하나가 암호화되지 않은 상태일 때 전처리를 활용하여 추가적인 성능 개선의 가능성을 탐구한다. 우리의 Leuvenshtein 알고리즘은 현재 사용 가능한 최고의 TFHE 구현 대비 최대 278배, 최적화된 Wagner-Fisher 알고리즘 구현 대비 최대 39배 빠른 성능을 달성한다. 또한, 서버 측에서 하나의 암호화되지 않은 입력이 존재할 때 오프라인 전처리가 가능한 경우, 추가로 3배의 속도 향상을 얻을 수 있다.
English
This paper presents a novel approach to calculating the Levenshtein (edit)
distance within the framework of Fully Homomorphic Encryption (FHE),
specifically targeting third-generation schemes like TFHE. Edit distance
computations are essential in applications across finance and genomics, such as
DNA sequence alignment. We introduce an optimised algorithm that significantly
reduces the cost of edit distance calculations called Leuvenshtein. This
algorithm specifically reduces the number of programmable bootstraps (PBS)
needed per cell of the calculation, lowering it from approximately 94
operations -- required by the conventional Wagner-Fisher algorithm -- to just
1. Additionally, we propose an efficient method for performing equality checks
on characters, reducing ASCII character comparisons to only 2 PBS operations.
Finally, we explore the potential for further performance improvements by
utilising preprocessing when one of the input strings is unencrypted. Our
Leuvenshtein achieves up to 278times faster performance compared to the best
available TFHE implementation and up to 39times faster than an optimised
implementation of the Wagner-Fisher algorithm. Moreover, when offline
preprocessing is possible due to the presence of one unencrypted input on the
server side, an additional 3times speedup can be achieved.