When working on the ipython kernel, I noticed that the HMAC step was taking a while, so I decided to try to optmise the hash function a bit. This is the result.
I made three changes:
Moved the initialisation of $K outside of the function, since it's a
constant for the algorithm.
Some fancy construction (metaops, gather/take) were replaced with more
verbose constructions with less overhead.
Array accesses with postcircumfix:<[ ]> were replaced with the lower-level
.AT-POS method in the inner loop of the algorithm.
When working on the ipython kernel, I noticed that the HMAC step was taking a while, so I decided to try to optmise the hash function a bit. This is the result.
I made three changes: