Overview
TAKAKRYPT Database Encryption Plugin (TDB) encrypts sensitive columns right inside the database engine, without changing the database structure itself. Data is stored as ciphertext at rest and decrypted on access, while staying queryable through standard SQL. It runs as a set of functions inside the database engine, so encrypting or reading protected data stays within the same SQL connection your application already uses, so there is no separate service or proxy in the path.
TDB is integrated with TAKAKRYPT for centralized key management, which provides strong data protection, reduces plaintext exposure, and supports regulatory compliance (UU PDP No. 27/2022).
Unlike TAKAKRYPT Batch Transformation (which transforms existing data in a database as a job you run), TDB protects the database continuously, encrypting every new write and decrypting every authorized read as it happens.
TDB protects data through a set of SQL functions (tdp_encrypt, tdp_decrypt, tdp_tokenize, tdp_detokenize, tdp_mask, and related functions), not by silently intercepting every query. Applications (or views built on top of these functions) call them explicitly as part of their SQL. Plan for a schema or query change when adopting TDB, rather than expecting a drop-in, zero-touch deployment.
Key Benefits
| Benefit | Description |
|---|---|
| Queryable encrypted columns | Data stays queryable using standard SQL once it is read back through the matching decrypt or detokenize function |
| Zero plaintext at rest | All sensitive data is stored in encrypted form at the storage level |
| Centralized key management | The entire key lifecycle is managed centrally through TAKAKRYPT |
| Fine-grained access policy | Access is enforced based on policy and identity, down to the column |
| Runs in the engine | Encryption happens next to the data, inside the database engine |
How It Works
The application connects to the database as usual. In practice, it calls a TDB function as part of its SQL, either directly or through a view that wraps the call. The function, running inside the database engine, retrieves the encryption key from TAKAKRYPT, then encrypts the value before it is written or decrypts it when read back. Plaintext is only produced on an authorized call, and at rest the data stays ciphertext. The application does need to know which columns are protected and call the right function for each one.
See Architecture for the components and the full communication flow.
Same SQL, Protected Columns
Take a query that reads a protected column:
SELECT name, credit_card FROM customers;
What comes back depends on how the data is read:
| Data at rest | Authorized query | |
|---|---|---|
name | Sarah Chen | Sarah Chen |
credit_card | XB2xQtzY1Oc1JO3UuhlPZVeM | 4111 1111 1111 1111 |
At rest, the protected column is stored as ciphertext. On an authorized query, the plugin fetches the key from TAKAKRYPT and decrypts the value on access.
These values are examples, and the ciphertext will differ with your keys and policy.
Technical Specifications
| Item | Specification |
|---|---|
| Version | 1.0.0 |
| Database support | PostgreSQL (version 12 and up), MySQL (version 8.0 and up), SQL Server (version 2016 and up), Oracle (12c / 19c / 21c), ClickHouse (version 23.8 and up) |
| Operating system | Linux |
| Key algorithms | AES 128, AES 256, RSA 1024, RSA 2048, RSA 4096 |
| Tokenization | FF1, FF3-1 |
| Data Masking | Full, Partial, Random, configurable per column |
Hardware Requirements
| Item | Requirement |
|---|---|
| CPU | 4 cores (minimum) |
| RAM | 16 GB (minimum) |
TDB runs alongside the database engine, so plan these resources on top of what the engine itself needs.
Compliance
| Item | Description |
|---|---|
| UU PDP No. 27/2022 | Designed to support Indonesia's Personal Data Protection Law |
| Audit-ready logging | Designed for enterprise audit requirements |
| KMIP key standard | External key managers are supported through KMIP, as for the rest of TAKAKRYPT |
Frequently Asked Questions
Does my SQL have to change?
Your queries stay standard SQL, and encrypted columns remain queryable. Protection is applied through the TDB functions, or views built on them, so you call them wherever a column is protected.
Is anything stored in plaintext?
No. Protected columns are ciphertext at rest and decrypted only on authorized access.
Where do the keys live?
In TAKAKRYPT. The plugin fetches them per policy, and nothing is hard-coded in the database.
What masking modes exist?
Full, partial, and random masking, configurable per column.
To install TDB, start with the Prerequisites. Installation guides are available for MySQL and PostgreSQL.