Cipher Maps: 범주 이론과 Oblivious Computing의 만남

발행: (2026년 1월 7일 오후 05:42 GMT+9)
8 min read
원문: Dev.to

Source: Dev.to

소개

암호화된 데이터에 대해 대수적 구조를 유지하면서 연산을 할 수 있다면 어떨까요?
비싼 동형 암호화를 사용하는 대신, 다음을 통합하는 원칙적인 수학적 프레임워크를 통해 가능합니다:

  • 옵리비어스 컴퓨팅
  • 베르누이 타입 (통계적 근사)
  • 범주론적 추상화

저의 최근 연구인 cipher mapsalgebraic cipher types는 바로 이 아이디어를 탐구합니다.

핵심 아이디어: Cipher Functors

A cipher functor cA lifts a monoid

[ (S,\ *,\ e) ]

into a cipher monoid

[ (cA(S),\ \oplus,\ \hat e) ]

Latent space (real monoid)   : (S, *, e)
          ↓ cA (cipher functor)
Cipher space (encrypted)    : (cA(S), ⊕, ê)

핵심 속성

속성설명
구조 보존cA(x * y) ≈ cA(x) ⊕ cA(y) (제어된 근사 범위 내에서)
프라이버시암호문에 대한 연산은 기본값에 대한 어떠한 정보도 드러내지 않는다.
조합성암호 연산의 합성은 기본 모노이드에서의 합성을 그대로 반영한다.
근사결과는 근사값이지만 증명 가능한 오류 한계가 제공된다.

These properties give us a type system for oblivious computing: instead of ad‑hoc encryption schemes, we obtain principled constructions that preserve algebraic structure.

Why This Matters

  • Formal privacy guarantees are baked into the type.
  • Error bounds are derived from Bernoulli‑type theory.
  • Composable abstractions let us build complex oblivious pipelines from verified components.

예시

Base monoidCipher liftResulting oblivious structure
((\mathbb{N}, +, 0))cAOblivious counters
((\mathcal{P}(U), \cup, \varnothing))cAHash‑based oblivious sets (Bloom‑filter‑like)
((\mathbb{N}^U, \oplus, \mathbf{0}))cACount‑Min sketches with privacy

(링크: Algebraic Cipher Types, Cipher Maps)

통합 프레임워크

The paper unifies three major threads:

  1. Algebraic cipher types – categorical foundations → 대수적 암호 유형 – 범주론적 기초
  2. Bernoulli types – statistical approximation theory → 베르누이 유형 – 통계적 근사 이론
  3. Oblivious function approximation – practical algorithms → 무관심 함수 근사 – 실용적인 알고리즘

Cipher Maps as Morphisms

  • Objects – cipher types (encrypted/oblivious data structures) → 객체 – 암호 유형 (암호화된/무관심 데이터 구조)
  • Morphisms – functions that preserve both algebraic structure and statistical properties → 사상 – 대수적 구조와 통계적 특성을 모두 보존하는 함수

Composition of morphisms yields principled ways to build complex oblivious computations while tracking error propagation. → 사상의 합성은 오류 전파를 추적하면서 복잡한 무관심 연산을 구축하는 원칙적인 방법을 제공합니다.

핵심 기여: Oblivious Bernoulli Maps

An Oblivious Bernoulli map is a function

[ f : cA(S) \to cA(T) ]

that:

  • 암호화/은폐된 입력에서 동작한다
  • 암호화/은폐된 출력을 생성한다
  • 베르누이‑유형 이론에 기반한 증명 가능한 오류 경계를 가진다
  • 암호 함자에서 유도된 범주 구조를 보존한다

Practical Result

  1. 일반 함수 f : S → T 로 시작한다.
  2. 이를 암호 맵 cA(f) : cA(S) → cA(T) 로 올린다.
  3. 자동 프라이버시 보장형식적인 오류 경계를 얻는다.
  4. 오류 전파를 추적하면서 여러 암호 맵을 합성한다.

왜 추상 수학인가?

범주론적 개념은폐 컴퓨팅에 대한 이점
Functoriality cA(f ∘ g) = cA(f) ∘ cA(g)보안 조합이 자유롭다
Natural transformations은폐 표현 간의 일반적인 변환
Limits / colimits복합 은폐 타입의 체계적인 구성
Monoidal structure은폐 계산의 병렬 조합

이러한 추상화가 없으면, 새로운 은폐 알고리즘마다 맞춤형 보안 증명이 필요합니다.

Concrete Instantiation: Cipher‑Trapdoor‑Sets

cipher‑trapdoor‑sets 논문은 구체적인 예시를 제시한다:

  • Base monoid – 멱집합 ((\mathcal{P}(U), \cup, \varnothing))
  • Cipher functor – 해시 기반 베르누이 맵

Result: Hash‑Based Oblivious Sets (HBOS), 즉 다음을 갖춘 Bloom 필터:

  • 형식적인 프라이버시 의미론
  • 합성 오류 경계
  • 타입‑안전 집합 연산 (합집합, 교집합 등)

Applications in the Wild

  • 데이터베이스 연산자 – 접근 패턴을 숨기는 오블리비어스 데이터에 대한 조인, 프로젝션, 셀렉트
  • 집계 쿼리 – 적절한 모노이드로 승격된 SUM, COUNT, AVG
  • 그라디언트 집계 – 오블리비어스 타입을 사용하면 신뢰할 수 있는 집계자 없이도 차등 프라이버시를 구현 가능
  • 스트리밍 분석 – 스트리밍 모노이드에 대한 암호 매핑은 상수 메모리, 검증 가능한 프라이빗 파이프라인을 제공

구현 스케치 (C++)

// Pseudocode sketch
template <typename T>
class CipherFunctor {
public:
    using Cipher = ObliviousBernoulli;

    // Lift a clear value into the cipher domain
    Cipher lift(const T& value);

    // Approximate inverse (decrypt/approximate)
    T approximate_inverse(const Cipher& cipher) const;

    // Monoidal operation on ciphertexts
    Cipher combine(const Cipher& a, const Cipher& b) const;
};

현대 템플릿 메타프로그래밍으로 구현되어, 설계는 제로 비용 추상을 목표로 합니다.

Research Directions

DirectionOpen Questions
Higher categories암호 카테고리 간의 함자?
Dependent types타입 시스템에 프라이버시/정확도 트레이드‑오프를 인코딩?
Effect systems암호 맵을 사용하여 정보 흐름을 추적?
Compiler integration일반 코드를 자동으로 오블리비어스 버전으로 변환?

전망

우리는 전환점에 서 있습니다:

  • 프라이버시 규제는 오블리비어스 컴퓨팅을 요구합니다.
  • 규모는 근사 알고리즘으로 우리를 이끕니다.
  • 복잡성은 구성적 추상화를 필요로 합니다.

Cipher maps는 이러한 시스템을 올바르게 구축하기 위한 수학적 기반을 제공합니다—“즉석 암호 + 희망”을 원칙적인 구성, 자동 프라이버시, 그리고 구성적 보안으로 전환합니다.

  • Algebraic Cipher Types
  • Cipher Maps: Unified Framework
  • Hash‑Based Oblivious Sets
  • Bernoulli Types Series
  • Encrypted Search with Oblivious Types

(All links to be added.)

Privacy‑preserving systems with formal guarantees

Back to Blog

관련 글

더 보기 »

AWS SageMaker는 실제로 무엇인가요??

SageMaker가 왜 존재할까요? 실제 이야기를 들려드리겠습니다. 2015‑2017년경, 기업들은 단순히 연구에 그치지 않고 실제 프로덕션에서 머신러닝을 적용하려고 시도하기 시작했습니다—단지 연구만이 아니라…