randombit/botan

Skein MAC enhancements - (continuation of a previous issue)

Open

#2,331 opened on Apr 13, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C++ (654 forks)auto 404
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (3,283 stars)
PR merge metrics
 (PR metrics pending)

Description

I mistakenly closed a former issue regarding Skein/MAC, thus this is the continuation :-) .

As said a current project likes to use Botan as its sole crypto lib and requires Skein-MAC. Fortunately the project uses Skein-512(256) and Skein-512(384) MAC and not, as previously assumed, Skein-256(256) and Skein-512(384) MAC.

This finding made it much simpler and fairly straight-forward to enhance the current Botan Skein code to support MAC.

I forked Botan and added functions to implement the MAC handling and while I was at it also enhanced handling of personalization data (may now be longer than 64 bytes), support of arbitrary length hash output (full 'counter' mode of OUTPUT stage) and support of bit-stream input with a partial last byte.

All Botan tests still work and also my tests which use official test vectors work. However, no official test vectors using personalization data seem to exist.

I just made the changes to the Skein-512 and Threefish-512 code and did not integrate this with other parts of Botan.

The changes to both classes are in my fork of Botan and a pull request is already pending.

Please feel free to use the enhancements and adapt as required to integrate it.

Contributor guide