Skip to content

feat: crypto module — Blowfish encrypt/decrypt#2

Merged
anakod merged 1 commit into
futurefrom
feature/crypto
May 28, 2026
Merged

feat: crypto module — Blowfish encrypt/decrypt#2
anakod merged 1 commit into
futurefrom
feature/crypto

Conversation

@anakod

@anakod anakod commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Crypto module

Blowfish encryption with Lua bindings.

New files

  • lib/blowfish/ — vendored mbedTLS Blowfish (Apache-2.0, separate LICENSE)
  • src/crypto/crypto_engine.cpp/h — CryptoEngine API
  • src/engines/lua/lua_crypto.cpp/h — Lua bindings

Lua API

crypto.encrypt(plaintext, key) → ciphertext_hex
crypto.decrypt(ciphertext_hex, key) → plaintext

Modified

  • lua_engine.cpp — register crypto lib
  • log_config.cpp/h — Log::CRYPTO category

Third-party Blowfish code in lib/blowfish/ with own Apache-2.0 license.

22/22 crypto tests pass. 63/63 total.

New files:
- lib/blowfish/ — vendored mbedTLS Blowfish (Apache-2.0, separate LICENSE)
- src/crypto/crypto_engine.cpp/h — CryptoEngine: encrypt/decrypt API
- src/engines/lua/lua_crypto.cpp/h — Lua crypto.* bindings

Modified:
- lua_engine.cpp — register crypto lib
- log_config.cpp/h — add Log::CRYPTO category

Lua API:
  crypto.encrypt(plaintext, key) → ciphertext (hex)
  crypto.decrypt(ciphertext_hex, key) → plaintext

22/22 crypto tests pass. Third-party code in lib/ with own license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants