Skip to Main Content
Hands-On Cryptography with Python
book

Hands-On Cryptography with Python

by Samuel Bowne
June 2018
Beginner to intermediate content levelBeginner to intermediate
100 pages
2h 9m
English
Packt Publishing
Content preview from Hands-On Cryptography with Python

Padding oracle attack

In this section, we will see how padding works in the PKCS # 7 system and then show you a system with the PADDING ERROR message. Plus, we'll also deal with the padding oracle attack, which makes it possible to craft ciphertext that will decode 20 plaintext we want.

Here is the encryption routine:

We'll have three blocks of data, each 16-bytes long. We'll encrypt the data with AES in CBC mode, so in comes the initialization vector and the key. You produce three blocks of ciphertext, and each one of the blocks after the first uses the output of the previous encryption routine as an initialization vector to XOR with the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Cryptography in Python: Learning Correct Cryptography by Example

Practical Cryptography in Python: Learning Correct Cryptography by Example

Seth James Nielson, Christopher K. Monson
Cryptography Algorithms

Cryptography Algorithms

Massimo Bertaccini

Publisher Resources

ISBN: 9781789534443Supplemental Content