# \[Crypto\] Leaking IV in CBC mode

DevFeed: [\[Crypto\] Leaking IV in CBC mode](<https://devfeed.tech/articles/crypto-leaking-iv-in-cbc-mode-20538.md>)

Original publisher: [Read original article](<https://yurichev.com/blog/CBC_IV/>)

Published: 2025-09-15T22:00:00Z

Content type: tutorial

Language: en

Sources: [Dennis Yurichev](<https://devfeed.tech/sources/dennis-yurichev.md>)

Topics: [Encryption](<https://devfeed.tech/topics/encryption.md>), [Code](<https://devfeed.tech/topics/code.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [crypto](<https://devfeed.tech/tags/crypto.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

This article explains how an initialization vector (IV) in CBC mode can be recovered when plaintext contains known bytes such as zeroes or padding. It demonstrates the issue with zero-padded data and PKCS#7 padding, including Python decryption code.

## Source excerpt

[Crypto] Leaking IV in CBC mode