Forums Help & support Key-wrap issue Reply To: Key-wrap issue

#6525 Reply

Svante
Keymaster

Hello Stephen,

Thanks for contacting us.

First of all, the web site documentation was wrong. The minimum is 5000, and typical values are between 25000 and 100000. The reason is the editor inherited this text from the old site, it’s essentially a copy-paste issue. It is now updated.

The minimum of 6 is lower down in the code, in the actual specifications of the key wrap. The higher levels enforce a minimum of 5000.

Now, more importantly, reviewing the code we note that the speed determination is slightly incorrect. The intention is to do batches of 1000 iterations until half a second has gone, and then use that to calculate the effective speed. The current code includes the key derivation in each such 1000 iterations – which in itself also includes a 1000 iterations of a hashing function. The net effect is that our calculation is off. But it’s still at least 5000.

The part of 1 second / 2 second delays you’ll have to explain, because I don’t follow the reasoning. The idea is that performing the total number of key wrap iterations, should take approximately 50ms.