diff --git a/sys/crypto/chacha20/chacha.c b/sys/crypto/chacha20/chacha.c index ac4eef22211..c882078c0bb 100644 --- a/sys/crypto/chacha20/chacha.c +++ b/sys/crypto/chacha20/chacha.c @@ -120,8 +120,10 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) for (;;) { if (bytes < 64) { +#ifndef KEYSTREAM_ONLY for (i = 0;i < bytes;++i) tmp[i] = m[i]; m = tmp; +#endif ctarget = c; c = tmp; }