Skip to content

visiongaiatechnology/wpkeyvault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β•šβ•β•β–ˆβ–ˆβ•”β•β•β•    β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•    β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β•šβ•β•β–ˆβ–ˆβ•”β•β•β•
β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘       β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•    β•šβ–ˆβ–ˆβ•”β•      β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
 β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘       β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘        β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
  β•šβ•β•β•β•   β•šβ•β•β•β•β•β•    β•šβ•β•       β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•   β•šβ•β•         β•šβ•β•β•β•  β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•

VGT Key Vault

AES-256-GCM Cryptographic API Key Manager for WordPress

License PHP WordPress Encryption Status

OMEGA PROTOCOL ACTIVE Β· AAD CONTEXT BINDING Β· ZERO PLAINTEXT STORAGE


Donate via PayPal VisionGaia Technology


πŸ” What is VGT Key Vault?

WordPress stores API keys in plaintext. Every plugin, every theme, every integration dumps credentials directly into wp_options β€” readable by anyone with database access.

VGT Key Vault closes this gap.

A cryptographic key management system that seals every API key with AES-256-GCM + AAD Context Binding before it ever touches the database. Even with full database access, an attacker retrieves nothing but cryptographically worthless ciphertext β€” mathematically bound to the key identifier.

Built as the cryptographic backbone of the VisionGaiaTechnology Sentinel ecosystem β€” and now available as a standalone open-source solution for any WordPress installation.


⚑ The Problem With Standard WordPress Key Storage

Standard WordPress Plugins:
  API Key entered         β†’ stored as plaintext in wp_options
  DB dump by attacker     β†’ all credentials compromised
  Plugin stores key_value β†’ readable by any other plugin

VGT Key Vault:
  API Key entered         β†’ AES-256-GCM encrypted with AAD
  DB dump by attacker     β†’ ciphertext only β†’ worthless
  Inter-plugin access     β†’ one authenticated API call

πŸ›οΈ Architecture β€” Three Core Kernels

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    VGT KEY VAULT PROTOCOL                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   CRYPTO KERNEL   β”‚  REGISTRY KERNEL  β”‚    ADMIN KERNEL     β”‚
β”‚                   β”‚                   β”‚                      β”‚
β”‚  AES-256-GCM      β”‚  O(1) Hash Map    β”‚  Glassmorphism UI   β”‚
β”‚  GCM Auth Tag     β”‚  Auto-Migration   β”‚  Key Injection Form β”‚
β”‚  AAD Binding      β”‚  Auto-Heal        β”‚  Vault Dashboard    β”‚
β”‚  HKDF Key Derive  β”‚  Index Registry   β”‚  Delete with Nonce  β”‚
β”‚  Random IV        β”‚                   β”‚  Status Alerts      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”‘ The AAD Context Binding β€” What Makes This Different

Standard AES-256-GCM encrypts data. VGT Key Vault goes further with AAD (Additional Authenticated Data) β€” binding every ciphertext to its identifier:

WITHOUT AAD (standard encryption):
  encrypt("sk-groq-xxx") β†’ Ciphertext_A
  Attacker copies Ciphertext_A to option "vis_api_key_other"
  decrypt(Ciphertext_A) β†’ "sk-groq-xxx" βœ“ (Ciphertext Swapping works)

WITH AAD (VGT Key Vault):
  encrypt("sk-groq-xxx", context="vis_api_key_groq") β†’ Ciphertext_A
  Attacker copies Ciphertext_A to option "vis_api_key_other"
  decrypt(Ciphertext_A, context="vis_api_key_other") β†’ FAIL βœ—
  (GCM Authentication Tag mismatch β€” manipulation mathematically impossible)

This eliminates an entire class of credential-swapping attacks that most developers have never even heard of.


πŸ”‘ Crypto Kernel β€” Crypto_Engine

// Master Key Derivation via HKDF (not raw salt β€” proper key derivation)
hash_hkdf('sha256', SECURE_AUTH_KEY, 0, 'vgt_vault_master_domain', AUTH_SALT);

// Encryption with AAD Context Binding
Crypto_Engine::encrypt($api_key, $option_name);

// Decryption β€” verified against AAD (tamper detection built-in)
Crypto_Engine::decrypt($ciphertext, $option_name);

Key Architecture:

  • Master key derived via HKDF-SHA256 from WordPress salts β€” never stored
  • Every encryption uses a fresh random IV (random_bytes)
  • GCM Authentication Tag appended β€” detects any modification
  • AAD Context ID binds ciphertext to its exact storage location

πŸ“¦ Registry Kernel β€” Vault_Registry

O(1) Hash Map instead of O(n) Array scan:

  [ "vis_api_key_groq" => true ]   ← isset() lookup: O(1)
  [ "vis_api_key_openai" => true ]
  [ "vis_api_key_stripe" => true ]

Auto-Migration: Old array format detected β†’ silently upgraded
Auto-Heal: Option missing from DB β†’ removed from index automatically

πŸ›‘οΈ Admin Kernel β€” Admin_Dashboard

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VGT Crypto Vault                                    β”‚
β”‚  AES-256-GCM Β· Context-Aware AAD Binding             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Key Injection       β”‚  Active Cryptonodes (O(1))    β”‚
β”‚                      β”‚                               β”‚
β”‚  System Identifier   β”‚  vis_api_key_groq    [Term.]  β”‚
β”‚  [vis_api_key_...]   β”‚  Hash: K7mX9pQr2nZ...         β”‚
β”‚                      β”‚                               β”‚
β”‚  Plaintext Token     β”‚  vis_api_key_openai  [Term.]  β”‚
β”‚  [sk-...]            β”‚  Hash: Lp4vN8kJhFm...         β”‚
β”‚                      β”‚                               β”‚
β”‚  [In Vault versiegeln]β”‚                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Every action is protected:

  • Nonce verification on all POST requests
  • manage_options capability check before any operation
  • Confirmation dialog before key termination

πŸ”Œ Inter-Plugin API β€” One Line Access

Other plugins in your ecosystem retrieve keys with a single authenticated call:

use VGT\Vault\API;

// O(1) retrieval + AES-256-GCM decryption in one call
$api_key = API::get_key('vis_api_key_groq');

// Throws RuntimeException if key missing or tampered
try {
    $key = API::get_key('vis_api_key_stripe');
} catch (\RuntimeException $e) {
    // Handle missing/compromised key
}

No plaintext ever stored. No raw option access. One secure interface.


πŸš€ Installation

Requirements

PHP:        8.0+
WordPress:  6.0+
OpenSSL:    enabled (standard on all hosting)

Setup in 3 Steps

1. Upload & Activate:

WordPress Admin β†’ Plugins β†’ Upload Plugin β†’ ZIP β†’ Install β†’ Activate

2. Store your first API key:

WordPress Admin β†’ VGT Vault β†’ Key Injection
System Identifier: vis_api_key_groq
Plaintext Token:   sk-your-key-here
β†’ [In Vault versiegeln]

3. Use in your plugin:

$key = \VGT\Vault\API::get_key('vis_api_key_groq');

πŸ“Š Security Comparison

Feature Standard wp_options VGT Key Vault
Database encryption ❌ Plaintext βœ… AES-256-GCM
Ciphertext Swapping protection ❌ βœ… AAD Context Binding
Key derivation ❌ Raw storage βœ… HKDF-SHA256
Tamper detection ❌ βœ… GCM Auth Tag
O(1) Registry lookup ❌ βœ… Hash Map
CSRF protection ❌ βœ… wp_verify_nonce
Inter-plugin API ❌ βœ… Typed facade
Auto-Heal registry ❌ βœ…
DB dump resistance ❌ Full compromise βœ… Ciphertext only

πŸ“ File Structure

vgt-key-vault/
β”œβ”€β”€ vgt-key-vault.php          ← single-file plugin
β”‚
└── Inline Kernels:
    β”œβ”€β”€ Crypto_Engine          ← AES-256-GCM + AAD + HKDF
    β”œβ”€β”€ Vault_Registry         ← O(1) Hash Map + Auto-Migration
    β”œβ”€β”€ Admin_Dashboard        ← UI + nonce-protected handlers
    └── API                    ← inter-plugin facade

No external dependencies. No composer. No build step.
One PHP file. Drop it in and it works.


⚠️ Important Security Notice

⚠️  VGT Key Vault derives its master key from WordPress salts.

    If you change AUTH_SALT or SECURE_AUTH_KEY in wp-config.php,
    ALL stored ciphertexts become permanently unreadable.

    Before migration or salt rotation:
    1. Decrypt and export all keys from the Vault Dashboard
    2. Rotate salts
    3. Re-import keys into the new Vault

🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first.

git clone https://github.com/VisionGaiaTechnology/wpkeyvault
cd vgt-key-vault

Found a vulnerability?
Report via the VGT Sentinel Operative Registry β€” responsible disclosure is rewarded.


β˜• Support the Project

VGT Key Vault is free and open-source under AGPLv3.
If it saved you time, money, or a security incident β€” consider supporting:

Donate via PayPal


πŸ“„ License

AGPLv3 License Β· Β© 2026 VisionGaia Technology Β· Cologne, Germany

Anyone using and modifying this plugin must publish changes under AGPLv3.
Commercial use permitted. Attribution required.


Built as part of the VisionGaiaTechnology Security Ecosystem

VisionGaia Technology Sentinel

No plaintext. No compromise. No exceptions.

VISIONGAIATECHNOLOGY – WE ARCHITECT THE FUTURE OF SECURITY.

About

A cryptographic key management system that seals every API key with AES-256-GCM + AAD Context Binding

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages