114k views
5 votes
For aes with a 128-bit block length and a 128-bit key length, what is the output of the first round of aes if the plaintext consists of 128 zeros and the first subkey consists of 128 zeros?

User Evgen
by
9.4k points

1 Answer

2 votes
The answer is 66e94bd4ef8a2c3b884cfa59ca342b2e.

You can check it with the following node.js program:

const crypto = require('crypto');
const zeros = Buffer.alloc(16);
var cipher = crypto.createCipheriv('aes-128-cbc', zeros, zeros);
var encrypted = Buffer.concat([cipher.update(zeros), cipher.final()]);
console.log(encrypted.toString('hex'));

Note that the output will contain 2 blocks of 128 bit, this is due to the padding algorithm. For this question you can ignore the second block.
User IanGSY
by
8.5k points