Skip to content

ECB Mode (ARCH9113)

Key swift.security.ecb-mode · Severity error · Category security · CWE CWE-327

Flags kCCOptionECBMode - ECB leaks plaintext patterns.

CCCrypt(..., CCOptions(kCCOptionECBMode), ...)
let sealed = try AES.GCM.seal(data, using: key)

Use an authenticated mode with a fresh nonce per message.