Skip to content
Back to skills

Kctf Jni Even Odd Xof

ASecurity

Solve KCTF JNI validators that deinterleave fixed-length input into even/odd shares, combine ARX/XOF constraints, sparse Boolean gates, S-box state machines, and TEA-derived schedules.

  • 271 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
toolspythonjava

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add manyuegong33/r0crawl_skills --skill kctf-jni-even-odd-xof --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kctf Jni Even Odd Xof?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kctf Jni Even Odd Xof
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/manyuegong33-kctf-jni-even-odd-xof/badge)](https://www.skillsdirectory.com/skills/manyuegong33-kctf-jni-even-odd-xof)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kctf-jni-even-odd-xof
description: Solve KCTF JNI validators that deinterleave fixed-length input into even/odd shares, combine ARX/XOF constraints, sparse Boolean gates, S-box state machines, and TEA-derived schedules.
---

# KCTF 第六题 酉时·书院迷局

## Workflow

1. Confirm Java hex input normalization (100 hex chars→50 bytes) and JNI entry; deinterleave with `vld2` into even25/odd25.
2. Recover APK `.kctfguard` key derivation (CRC + ELF section metadata), then simplify native opaque helpers (XOR/add/sub, inverse MixColumns, low-byte extraction, `mix32`).
3. Solve odd channel first: reverse four-round 64-bit ARX/XOF; use output bytes and seed branches to derive initial state words. Encode the 46-bit sparse Boolean gate as local CNF by enumerating each output bit’s 2–5 input support; split cubes and SAT-solve.
4. Apply cheap padding check by inverting XOF and requiring recovered bytes `25:32 == 5a…5a`; this isolates unique odd25 and seed.
5. Invert even channel’s byte permutation/state chain. Recover S-box seed from self-check bytes and enumerate small config fields.
6. Brute-force 32-bit TEA schedule seed (LCG `1664525*x+1013904223`, 16 rounds) using first known-answer test, then verify two additional KATs. Fold selector to derive final seed.
7. Reverse even share, verify expected 16-byte block equals odd-generated block, interleave even/odd bytes, hex-encode flag.

## Constants from writeup

Native key: `870573e5f5c63d52862dbd05ab3d9494`; hidden target first 16 bytes `9f73be24a1dd6c96b90723bba7cdfdc9`. Correct branch `seed=d7`; odd share `7ae31b94d256f80c41b7298e63a5df104bc8723d960fe458ad`. Even share `a77a78ff6a94367d1b4eb43faa8de2b30400bd533de8553443`. Final interleaved flag hex: `a77a7ae3781bff946ad2945636f87d0c1b414eb7b4293f8eaa638da5e2dfb310044b00c8bd72533d3d96e80f55e4345843ad`.

## Validation

Replay original JNI function (or a faithful Python model) and require all initial checks, S-box checks, 3 TEA KATs, sparse gate, and final block comparison to pass.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…