Skip to content

field_encryption.cpp

GitHub Actions edited this page Jan 2, 2026 · 1 revision

field_encryption.cpp

Stand: 5. Dezember 2025
Version: 1.0.0
Kategorie: Src


Path: src/security/field_encryption.cpp

Purpose: High level FieldEncryption API. Design references mention encryptEntityBatch; verify and document batch API and HKDF integration.

Public functions / symbols:

  • ``
  • if (i == 3) {
  • if (i == 4) {
  • : key_provider_(key_provider)
  • if (!key_provider_) {
  • if (!ctx) {
  • if (ret <= 0) {
  • << base64_encode(tag);
  • std::stringstream ss(b64);
  • return encrypt(plaintext_bytes, key_id);
  • return encryptInternal(plaintext_bytes, key_id, key_version, key);
  • std::vector<uint8_t> iv(12); // 96 bits for GCM
  • throw EncryptionException("Failed to generate random IV");
  • throw EncryptionException("Failed to create cipher context");
  • throw EncryptionException("Failed to initialize cipher");
  • throw EncryptionException("Failed to set IV length");
  • throw EncryptionException("Failed to set key and IV");
  • throw EncryptionException("Encryption failed");
  • throw EncryptionException("Failed to finalize encryption");
  • throw EncryptionException("Failed to get authentication tag");
  • EVP_CIPHER_CTX_free(ctx);
  • throw DecryptionException("IV must be 12 bytes");
  • throw DecryptionException("Tag must be 16 bytes");
  • throw DecryptionException("Failed to create cipher context");
  • throw DecryptionException("Failed to initialize cipher");
  • throw DecryptionException("Failed to set IV length");
  • throw DecryptionException("Failed to set key and IV");
  • throw DecryptionException("Decryption failed");
  • throw DecryptionException("Failed to set authentication tag");
  • throw DecryptionException("Authentication failed - data may have been tampered with");

Notes / TODOs:

  • If encryptEntityBatch is missing, add implementation plan link to docs/development/feature_status_changefeed_encryption.md.

ThemisDB Dokumentation

Version: 1.3.0 | Stand: Dezember 2025


📋 Schnellstart


🏗️ Architektur


🗄️ Basismodell


💾 Storage & MVCC


📇 Indexe & Statistiken


🔍 Query & AQL


💰 Caching


📦 Content Pipeline


🔎 Suche


⚡ Performance & Benchmarks


🏢 Enterprise Features


✅ Qualitätssicherung


🧮 Vektor & GNN


🌍 Geo Features


🛡️ Sicherheit & Governance

Authentication

Schlüsselverwaltung

Verschlüsselung

TLS & Certificates

PKI & Signatures

PII Detection

Vault & HSM

Audit & Compliance

Security Audits

Gap Analysis


🚀 Deployment & Betrieb

Docker

Observability

Change Data Capture

Operations


💻 Entwicklung

API Implementations

Changefeed

Security Development

Development Overviews


📄 Publikation & Ablage


🔧 Admin-Tools


🔌 APIs


📚 Client SDKs


📊 Implementierungs-Zusammenfassungen


📅 Planung & Reports


📖 Dokumentation


📝 Release Notes


📖 Styleguide & Glossar


🗺️ Roadmap & Changelog


💾 Source Code Documentation

Main Programs

Source Code Module


🗄️ Archive


🤝 Community & Support


Vollständige Dokumentation: https://makr-code.github.io/ThemisDB/

Clone this wiki locally