Skip to main content
Glama

CipherHUB Cryptography Toolkit

xts_cipher

[other] [symmetric_cipher] AES-XTS 可调窄分组模式加解密(IEEE 1619 / NIST SP 800-38E)。algorithm 可选 AES128XTS(key 32B = 数据密钥 16B + 调组密钥 16B)或 AES256XTS(key 64B = 32B + 32B)。tweak_in_hex 为 16 字节调整值,编码数据单元编号/扇区地址,密文与数据单元位置绑定。process_type 可选 Encrypt / Decrypt(两个变换不同,须显式声明)。输入 16B ~ 16MB,无填充,密文与明文等长;非 16 倍数的尾部自动走密文窃取(ciphertext stealing)。模式特点:各数据单元独立加密,支持并行与随机访问,同一数据单元加解密自同步;同一密钥下 tweak 严禁重复使用(否则两个数据单元明文相同会直接暴露相等关系);XTS 只提供保密性、可塑性攻击下无认证,需要防篡改时在外层叠加 AEAD 或签名。典型使用场景:BitLocker / LUKS2 / FileVault 全盘加密,AMD SEV-SNP 以 AES-256-XTS + VEK 加密 guest 内存(tweak 按物理地址派生,每页唯一),Intel TDX 内存加密同族。返回字段:output_data_in_hex、output_length、output_sha256、algorithm。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmNo密码算法名称(具体可选值因工具而异,见工具描述)AES256XTS
key_in_hexNo密钥的十六进制字符串。长度取决于算法:AES256=64 字符(32B),AES128/SM4=32 字符(16B)
process_typeNo操作类型,可选值:Encrypt / DecryptEncrypt
tweak_in_hexNo
input_data_in_hexNo输入数据的十六进制字符串(加密时为明文,解密时为密文,1B~16MB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does so thoroughly. It discloses input size limits, no padding, ciphertext stealing for non-16-byte tails, output fields, tweak reuse dangers, lack of authentication, and parallel/random-access behavior. This far exceeds what an annotation could provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but dense, with every sentence adding substantive value: standards, parameter semantics, behavioral constraints, security caveats, use cases, and return fields. It is front-loaded with the operation and algorithm, making the core purpose immediately visible before the detailed caveats.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, no output schema, and no annotations, the description is remarkably complete. It covers input constraints, output fields, algorithm selection, tweak requirements, security warnings, and real-world usage context. An agent has enough information to correctly select and invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is about 80%, the description adds critical meaning: exact key lengths per algorithm (32B vs 64B and their split into data/tweak keys), tweak_in_hex as a 16-byte value, the requirement to explicitly declare process_type, and input data range. The schema descriptions stay generic, so the tool description is the main source of parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the operation as AES-XTS tunable narrow-block encryption/decryption, names the exact standards (IEEE 1619 / NIST SP 800-38E), and distinguishes it from sibling symmetric tools like block_cipher, ctr_cipher, and stream_cipher by specifying the mode and key structure. It is specific about the resource (AES-XTS) and the two supported algorithms, leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides strong contextual guidance by stating typical use cases (BitLocker, LUKS2, FileVault, AMD SEV-SNP, Intel TDX) and explaining the security properties that make XTS suitable for disk/memory encryption. It does not explicitly name sibling alternatives to exclude, but the use-case and mode characteristics make the intended application clear enough for an agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.