Many Repairs, One Direction: Steering Code Models Toward Safer Cryptographic API Use
Cryptographic API misuse in large language model-generated code can compromise software security.
ProofPaper ↗
Key points
- While many existing approaches improve code security by modifying model parameters or inputs, how representation changes associated with different cryptographic API repairs can support a shared intervention for safer code generation remains underexplored.
- To investigate this, we construct 48,000 matched program pairs across four programming languages and ten cryptographic API misuse categories.
- Subtracting the misuse program's internal representation from its secure counterpart's gives a repair vector.
- We introduce CrypSteer, which extracts a shared direction by normalizing repair differences and selecting a principal component aligned with repairs across misuse categories.
Sources (1)
- [1]Many Repairs, One Direction: Steering Code Models Toward Safer Cryptographic API UsearXiv (AI, ML, NLP, CV, robotics, multi-agent) · Oct 18, 09:32 AM
Cryptographic API misuse in large language model-generated code can compromise software security.
While many existing approaches improve code security by modifying model parameters or inputs, how representation changes associated with different cryptographic API repairs can support a shared intervention for safer code generation remains underexplored.
Extractive summary: sentences quoted from the sources.
Before this
- Oct 17, 2026EdgeKernelBench: Unified LLM-Driven Kernel Generation for Edge Backends
- Oct 17, 2026ECHO: Efficient Causal Self-Recursion Beyond Auxiliary Multi-Token Prediction
- Oct 16, 2026Prefix-Tuning for Arbitrary Output Sequences on Pretrained Transformers
- Oct 16, 2026Momentum: Persistent Dynamics for Video World Models
- Oct 15, 2026On the SPOT: Enhancing Speculative Decoding for Diffusion Language Models via Commit-Order Prediction
- Oct 15, 2026Pearl-Chat: Engineering a native Luganda language model from first principles in JAX and Flax NNX