A broken or deprecated cipher from the RustCrypto ecosystem is used to protect data.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
DES (Des::new, crate des) and 3DES (TdesEde3::new / TdesEde2::new) have a 64-bit block and are considered insecure (Sweet32, brute-force), while RC4 (Rc4::new, crate rc4) has well-known keystream biases and is forbidden by RFC 7465. For OAuth/OIDC this means tokens, client secrets, and other sensitive material are not adequately protected and may be recovered by an attacker.
Use an authenticated AEAD cipher instead: AES-GCM via the aes-gcm crate (Aes256Gcm::new(key)) or ChaCha20-Poly1305 (ChaCha20Poly1305::new(key)), both of which provide confidentiality and integrity.
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.rust.crypto.weak-cipher -- <reason>