stream/chacha ivlen cosmetics
This commit is contained in:
parent
e4793b50d0
commit
0d998fd4c8
@ -36,6 +36,7 @@ int chacha_ivctr32(chacha_state *st, const unsigned char *iv, unsigned long ivle
|
||||
LOAD32L(st->input[14], iv + 4);
|
||||
LOAD32L(st->input[15], iv + 8);
|
||||
st->ksleft = 0;
|
||||
st->ivlen = ivlen;
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ int chacha_ivctr64(chacha_state *st, const unsigned char *iv, unsigned long ivle
|
||||
LOAD32L(st->input[14], iv + 0);
|
||||
LOAD32L(st->input[15], iv + 4);
|
||||
st->ksleft = 0;
|
||||
st->ivlen = ivlen;
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,8 @@ int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keyle
|
||||
LOAD32L(st->input[1], constants + 4);
|
||||
LOAD32L(st->input[2], constants + 8);
|
||||
LOAD32L(st->input[3], constants + 12);
|
||||
st->rounds = rounds; /* e.g. 20 for chacha20 */
|
||||
st->rounds = rounds; /* e.g. 20 for chacha20 */
|
||||
st->ivlen = 0; /* will be set later by chacha_ivctr(32|64) */
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user