# CTR mode calculate messages before new key is required

I am studying a cryptography video on Coursera here titled: Modes of Operation: Many Time Key (CTR).

I have just two simple questions:

1. At around 4:30 in the video they show 2^48 without saying where this number came from, perhaps it forms part of the AES specification?

2. They then go on to explain that they plugged in the value 2^48 into the underlined equation on the line above, to calculate how many messages and of what size could be sent before a new key is required. How did they do this and what was the output?

Here is a picture from the video:

• square-root square-root! Jul 13, 2021 at 22:28
• @kelalaka What did they square root? Jul 13, 2021 at 22:58
• Well, you have three numbers 128, 32 and 48 as powers of two... They have chosen 48 bit as margin, but remember the birthday bound! Jul 14, 2021 at 0:15
• @MaartenBodewes Would you mind posting a reply to the question, because I did the square root of 128 and got a different answer... Then there is the case of the second question. Jul 14, 2021 at 0:49
• I think I can explain the slide, but I'm currently unsure about the term $|X|$... The squared q is needed because the nonce can collide otherwise. Basically you use 128 - 32 = 96 bits, and the square root of that is 48 bits. However, you still have to deal with the counter as well. However, I have too little context to create a readable answer - these slides are not the best readable without context - i.e. the presentation. Jul 14, 2021 at 11:07