chacha20: allow setting counter for stream random access
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Sun, 21 Dec 2014 15:36:59 +0000 (17:36 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 23 Dec 2014 10:51:36 +0000 (12:51 +0200)
commit11b8d2d449a7bc664b4371ae14c57caa6704d272
tree1d222fffafb2169d8061fd215357a637c901cad2
parentc964321c8a1328e89d636d899a45d68802f5ac9f
chacha20: allow setting counter for stream random access

* cipher/chacha20.c (CHACHA20_CTR_SIZE): New.
(chacha20_ivsetup): Add setup for full counter.
(chacha20_setiv): Allow ivlen == CHACHA20_CTR_SIZE.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/chacha20.c