The CRC implementation is pulled directly from the spec:
Given that we only need a CRC of 8 bytes, this implementation might be a bit overkill. But maybe not.
I'll need to look into it.
I think the whole table can be precomputed, at a minimum.
In any case, that code should be rewritten.