I. Overview

%%{init: { 'theme': 'base', 'themeVariables': { 'edgeLabelBackground': '#fff' }}}%%
flowchart LR
    A["Plaintext data\nexposure"] -- "API / Plug-in / TDE encryption" --> B["Strengthened\ndata asset protection"]
    style A fill:#f9f9f9,stroke:#333,stroke-width:3px
    style B fill:#e1f5fe,stroke:#01579b,stroke-width:3px

Definition: A technique that uses encryption algorithms to store sensitive fields within a database (such as resident registration numbers or passwords) in a form unreadable by unauthorized parties.

Necessity:
( Asset Protection ) Encrypting sensitive information within the database blocks access by unauthorized parties
( Compliance ) Meets legal and regulatory requirements such as personal data protection laws and prepares the organization for security audits
( Preventing Administrative Misuse ) Restricts even privileged administrators from directly accessing encrypted data, preventing leakage

II. Mechanism & Components

A. Encryption Architecture and Comparison by Type

flowchart LR
    APP["Application"] -->|"① API method\nEncrypt at the app layer"| DB1["DB\nstores ciphertext"]

    APP -->|"② Plug-in method\nSend plaintext"| PG["DB engine\nplug-in module\nperforms encryption"]
    PG --> DB2["DB\nstores ciphertext"]

    APP -->|"③ TDE method\nSend plaintext"| DBE["DB engine\n(kernel level)"]
    DBE -->|"Transparent encryption on storage"| ST["Storage\nencrypted files"]

Key point: The methods are distinguished by which layer performs the encryption — the application (API), the DB server (Plug-in), or the storage layer (TDE).

B. Detailed Comparison by Method

CategoryAPI MethodPlug-in MethodTDE (Transparent Data Encryption)
Executing EntityApplication serverDB server (separate module)DB server (kernel/engine level)
Encryption PointEncrypted at the app layer before transmissionProcessed inside the DB engineProcessed when the data file is stored
Application ChangesRequired (API calls)Almost none (View/Trigger)Not required
Performance ImpactLow load on the DB serverPossible load on the DB serverLow load due to in-engine optimization
Index UsageExact-match search onlyLimited usabilityAll indexes usable

III. Comparison & Application

An architect must be able to propose the optimal combination (hybrid approach) for the operating environment, selecting among the following criteria.

Selection CriterionOptimal MethodReason
Preserving Legacy SystemsTDE / Plug-inMinimizes the cost and risk of modifying source code
Strong End-to-End SecurityAPIData is encrypted before it ever travels across the network
Performance First (High Volume)TDEOptimized via hardware acceleration (AES-NI) and full index usability

Default to TDE unless a specific requirement forces otherwise — it demands no application changes, preserves full index usability, and modern hardware acceleration has closed most of the historical performance gap. Reach for the API method only when data must be protected before it ever crosses the network boundary, since that end-to-end guarantee is the one thing TDE and Plug-in encryption structurally cannot provide.

Last updated 18 Aug 2026, 00:00 UTC. history