Question: Write a function with the header void chacha20_block_sse(chacha20_ctx *ctx, uint32_t output[16]) that behaves exactly like the function chacha20_block but uses SSE instructions to accelerate the
Write a function with the header void chacha20_block_sse(chacha20_ctx *ctx, uint32_t output[16]) that behaves exactly like the function chacha20_block but uses SSE instructions to accelerate the rounds. The file you submit should be named exactly hw2_chacha.c and should not include a main function. The chacha20_block function is shown below.
To be eligible for credit programs must report no warnings when compiled with gcc -std=c99 -W
![Write a function with the header void chacha20_block_sse(chacha20_ctx *ctx, uint32_t output[16]) that](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f391d100a6e_60866f391d0934a8.jpg)
void chacha20_block (chacha20_ctx *ctx, uint32_t output [16]) uint 32t *cons t nonce = ctx->schedule+12; //12 is where the 128 bit counter is - int i = 10; memcpy (output, ctx->schedule, sizeof (ctx->schedule)): while (i-- QUARTERROUND (output, 0, 4,8, 12) QUARTERROUND (output, 1, 5, 9, 13) QUARTERROUND (output, 2, 6, 10, 14) QUARTERROUND (output, 3, 7, 11, 15) QUARTERROUND (output, 0, 5, 10, 15) QUARTERROUND (output, 1, 6, 11, 12) QUARTERROUND (output, 2, 7, 8, 131) QUARTERROUND (output, 3, 4, 9, 14) for (i = 0; i schedule[il; FROMLE ((uint8_t *) (output+i), result); void chacha20_block (chacha20_ctx *ctx, uint32_t output [16]) uint 32t *cons t nonce = ctx->schedule+12; //12 is where the 128 bit counter is - int i = 10; memcpy (output, ctx->schedule, sizeof (ctx->schedule)): while (i-- QUARTERROUND (output, 0, 4,8, 12) QUARTERROUND (output, 1, 5, 9, 13) QUARTERROUND (output, 2, 6, 10, 14) QUARTERROUND (output, 3, 7, 11, 15) QUARTERROUND (output, 0, 5, 10, 15) QUARTERROUND (output, 1, 6, 11, 12) QUARTERROUND (output, 2, 7, 8, 131) QUARTERROUND (output, 3, 4, 9, 14) for (i = 0; i schedule[il; FROMLE ((uint8_t *) (output+i), result)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
