buffer[64-1] = (uint8_t)(ctx->counter);
buffer[64-2] = (uint8_t)((ctx->counter)>>8);
buffer[64-3] = (uint8_t)((ctx->counter)>>16);
buffer[64-1] = (uint8_t)(ctx->counter);
buffer[64-2] = (uint8_t)((ctx->counter)>>8);
buffer[64-3] = (uint8_t)((ctx->counter)>>16);