Recently I have watched the video Multi-Precision Arithmetic for Cryptology in C++, at Run-Time and at Compile-Time (at 21:56 seg) :
The speaker says that to use a byte from the user key as a subscript of an array allows side channel attacks. My question is what if to use this during a key crunching stage:
Do
HashOut = DoHash()
FinalKey += HashOut[currentKeyByte mod KeySize]
currentKeySize += 1
While (Len(FinalKey) < WantedSized);
Let's forget for a minute the widely known KDFs, okay? The idea behind the pseudo-code above would interfere in constant-time aspects?
If it does. What if to use the bytes from hashed key instead of the original bytes of the key?
Thanks in advance!