Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD2 algorithm takes up A LOT of CPU usage #70

Open
Ekultek opened this issue Aug 26, 2017 · 0 comments
Open

MD2 algorithm takes up A LOT of CPU usage #70

Ekultek opened this issue Aug 26, 2017 · 0 comments

Comments

@Ekultek
Copy link
Owner

Ekultek commented Aug 26, 2017

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 Ekultek self-assigned this Aug 26, 2017
@Ekultek Ekultek added the speed label Aug 26, 2017
@Ekultek Ekultek added this to the 2.0 milestone Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant