Improving LLM Agents with Reinforcement Learning on Cryptographic CTF Challenges