@@ -200,6 +200,7 @@ int wc_Chacha_SetKey(ChaCha* ctx, const byte* key, word32 keySz)
200200 return 0 ;
201201}
202202
203+ #ifndef USE_INTEL_CHACHA_SPEEDUP
203204/**
204205 * Converts word into bytes with rotations having been done.
205206 */
@@ -228,6 +229,7 @@ static WC_INLINE void wc_Chacha_wordtobyte(word32 x[CHACHA_CHUNK_WORDS],
228229#endif
229230 }
230231}
232+ #endif /* !USE_INTEL_CHACHA_SPEEDUP */
231233
232234
233235#ifdef HAVE_XCHACHA
@@ -325,6 +327,7 @@ extern void chacha_encrypt_avx2(ChaCha* ctx, const byte* m, byte* c,
325327#endif
326328
327329
330+ #ifndef USE_INTEL_CHACHA_SPEEDUP
328331/**
329332 * Encrypt a stream of bytes
330333 */
@@ -372,6 +375,8 @@ static void wc_Chacha_encrypt_bytes(ChaCha* ctx, const byte* m, byte* c,
372375 ctx -> left = CHACHA_CHUNK_BYTES - bytes ;
373376 }
374377}
378+ #endif /* !USE_INTEL_CHACHA_SPEEDUP */
379+
375380
376381/**
377382 * API to encrypt/decrypt a message of any size.
@@ -423,10 +428,10 @@ int wc_Chacha_Process(ChaCha* ctx, byte* output, const byte* input,
423428 chacha_encrypt_x64 (ctx , input , output , msglen );
424429 return 0 ;
425430 }
426- #endif
431+ #else
427432 wc_Chacha_encrypt_bytes (ctx , input , output , msglen );
428-
429433 return 0 ;
434+ #endif
430435}
431436
432437void wc_Chacha_purge_current_block (ChaCha * ctx ) {
0 commit comments