Shengxing Zhang

Writing

Writing

Five articles on two themes: what a program should be allowed to reach, and where to put that limit so it cannot be got around; and what it takes to move cryptography and data across the boundaries set by standards, law and networks.

01

Putting the SM algorithms behind the EVM's precompiles

Swapping the algorithm standard is not a mechanical substitution: curve arithmetic and encodings carried over, ecrecover could only become verification, signing has to stay off-chain, gas had to be re-measured, and the checks at the C boundary decide whether one bad transaction can stop a node.

02

Moving two terabytes across the Pacific

2TB in one night, between two AWS partitions with disconnected IAM systems, over a 150 ms link: why no managed tool applied, how keys get across without a shared symmetric secret, the bandwidth-delay arithmetic, a state machine for resume, and the multipart ETag problem.

03

Why I put a proxy between my AI agent and my server

An agent read ~/.ssh/id_rsa during a task unrelated to SSH, and the read was entirely within its permissions. Overreach, taking orders and leakage are three different problems, each needing its own layer; enforcement sits at the protocol layer.

04

Rule-based prompt-injection detection: what it catches, what it costs

An injection detector comes down to three decisions: what to scan, what happens on a hit, and what does the judging. Why a hit blocks the whole result, why the first version uses rules rather than a classifier, and a real hole in the shipped defaults found by the test suite.

05

Designing a notebook that never goes online

Every way data could leave the phone, checked one by one: no network permission and no dependency that could use one, three exits that each require a user action, an optional app lock, and the system backup that 1.6.0 turned off. Evidence for each, and how to verify it on the APK.