Implement CRC

Implement outgoing CRC calculation and ingoing CRC checksums.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>