I have a question regarding understanding representation of length in AES-GCM while doing padding for the IV to calculate ICB/J0. In the aes GCM test vectors testcase5 I see the IV is of length 8 bytes as follows:
IV cafebabefacedbad
But len({})||len(IV ) is mentioned as
00000000000000000000000000000040
but since the length of IV is of 8 bytes in length the representation len({})||len(IV ) should be as follows
00000000000000000000000000000008
Can someone help me in understanding whether how the len(IV) which is of 8 bytes is of 40 instead of 8.
Edit 1:
For IV of length 60, I see it was represented as
000000000000000000000000000001e0
As it was mentioned in comments, if we see the pattern whatever the IV length is it is multiplied by 8 when its get represented with len(IV). Any thoughts on this?