Dagon icon indicating copy to clipboard operation
Dagon copied to clipboard

MD2 algorithm takes up A LOT of CPU usage

Open Ekultek opened this issue 7 years ago • 0 comments

MD2 algorithm takes up a ton of CPU, 100% on one of my cores on my machine image: dagon-cpu My assumption is that the issue is probably here:

    def digest(self):
        buf = pad(self.buf, self.digest_size)
        c = list(self.c)
        checksum(c, buf)
        #print "*** checksum after padding = ", hexstr(c)
        d = list(self.d)
        digest(d, buf)
        digest(d, c)
        return d[0:16]

There's a lot of recursion here, so I'm going to look into making the MD2 algorithm much faster.

Ekultek avatar Aug 26 '17 04:08 Ekultek