You are an agent, your current working directory is /app. You can use the tools available to you to interact with the computer to assist the user in completing tasks. # Repair nonce-derived AES-CCM message limits Work in `/app/vendor/pycryptodome`. The frozen source already includes its local Python modules and ABI3 native extensions, so the task must run offline with `PYTHONPATH=/app/vendor/pycryptodome/lib`. CCM encodes the message length in `Q = 15 - len(nonce)` bytes. The current implementation can initialize or process a message whose length cannot be represented in those `Q` bytes. Repair the existing source tree rather than adding a replacement cipher or bypassing its APIs. ## Required source repairs Modify both existing modules: - `/app/vendor/pycryptodome/lib/Crypto/Cipher/_mode_ccm.py` - `/app/vendor/pycryptodome/lib/Crypto/Cipher/_mode_ccm.pyi` The repaired implementation must: 1. Expose `CCMMessageTooLongError`, a `ValueError` subclass, from the CCM mode module and its typing stub. 2. Reject a declared `msg_len` when `msg_len >= 2 ** (8 * Q)` before CCM MAC/counter state is initialized. 3. When `msg_len` is omitted, reject an oversized first `encrypt()` or `decrypt()` input with the same exception before producing or accepting output. An `output=` buffer must remain unchanged on rejection. 4. Derive the bound from the actual nonce length. For example, a 13-byte nonce cannot encode 65536 bytes, while a 12-byte nonce can. 5. Preserve the public `AES.new(..., AES.MODE_CCM, ...)` API, valid associated-data handling, streaming behavior, ciphertext/tag values, and decrypt/verify behavior. Do not disable or replace the vendored tests, native modules, AES dispatch, or regression runner. ## Artifact After repairing the source, run: ```bash cd /app PYTHONPATH=/app/vendor/pycryptodome/lib python3 /app/regression/run_ccm_regression.py ``` This must create `/app/ccm_repair_report.json` with schema version `tbench.ccm_repair_report.v1` and all checks passing. The private verifier independently recomputes the cryptographic and boundary behavior from trusted fixtures.