hubertf<p>AES-CBC encryption with Padding Oracle - CBC-R in 6 lines of code (by me):</p><p>ct=bytearray(("\x41" * 16).encode())<br>while len(pt_padded) >= 16:<br> pt_N = pt_padded[-16:]<br> dec = aes_cbc_poa_decrypt_1_block_noIV(ct[0:16])<br> ct = xor(dec, pt_N) + ct <br> pt_padded = pt_padded[:-16]</p><p>Image: result of encryption and decrypting it again, also with Padding Oracle</p><p><a href="https://mastodon.social/tags/ctf" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ctf</span></a> <a href="https://mastodon.social/tags/cybersecurity" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cybersecurity</span></a> <a href="https://mastodon.social/tags/cryptography" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cryptography</span></a> <a href="https://mastodon.social/tags/cbc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cbc</span></a>-r <a href="https://mastodon.social/tags/paddingoracle" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>paddingoracle</span></a></p>