cs.CRSep 18, 2026

HE-Guardrail: A Homomorphic Guardrail Against Jailbreak Attacks for Encrypted Large Language Model Inference

Authors: Byeongseo Min, Yongwoo Lee, Young-Sik Kim, Yongjune Kim

Organizations: Pohang University of Science and Technology (POSTECH) · Inha University · Daegu Gyeongbuk Institute of Science and Technology (DGIST)

Abstract

Homomorphic encryption (HE) has emerged as a promising approach to privacy-preserving machine learning (PPML), enabling computation directly over encrypted data. In HE-based PPML, a client submits an encrypted input to the server, which evaluates models such as large language models (LLMs) without access to the underlying plaintext. However, we identify a critical security vulnerability in this setting: HE-LLM inference is vulnerable to malicious clients that submit adversarial prompts, such as jailbreak attacks. The same confidentiality that protects benign clients also prevents the server from inspecting incoming prompts or generated responses, making adversarial attempts difficult to detect or block and potentially allowing successful attacks to remain entirely invisible to the server. To address this vulnerability, we propose HE-Guardrail, a framework that evaluates guardrail mechanisms entirely over encrypted data and homomorphically controls whether the target-model response is returned to the client. We instantiate HE-Guardrail with three representative guardrails - Llama Guard, JBShield, and GradSafe. Our results show that HE-Guardrail closely reproduces the decisions of the corresponding plaintext guardrails in the encrypted domain, with distinct security-efficiency-utility trade-offs.

Figures & tables

Explore similar work

CardsList
  1. Fully Homomorphic Encryption on Llama 3 model for privacy preserving LLM inference

    Apr 14, 2026Anes Abdennebi, Nadjia Kara, Laaziz LahlouPrivacy-Preserving Language ModelsLLM Inference

  2. HEAT: Faster Fully Homomorphic Inference via Approximations-Weights Co-Adaptation

    Sep 1, 2026Alessandro Zirilli, Davide Marincione, Evgenios M. Kornaropoulos +2Privacy-Preserving Language ModelsHomomorphic Encryption

  3. Your Inference Request Will Become a Black Box: Confidential Inference for Cloud-based Large Language Models

    Feb 27, 2026Chung-ju Huang, Huiqiang Zhao, Yuanpeng He +5Privacy-Preserving Language ModelsPrivacy Leakage in Language Models