Browse Source

Fixing loop start for multithreaded token generation

Sajin 1 year ago
parent
commit
2f47b85593
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Enclave/storage.cpp

+ 1 - 1
Enclave/storage.cpp

@@ -93,7 +93,7 @@ static void* generate_all_tokens_launch(void *voidargs)
     uint32_t user_end = args->start + args->num;
 
     const sgx_aes_gcm_128bit_key_t *pTSK = &(g_teems_config.TSK);
-    for(uint32_t lcid=0; lcid < user_end; lcid++) {
+    for(uint32_t lcid=user_start; lcid < user_end; lcid++) {
 
         unsigned char *tkn_iv_ptr = epoch_tokens + enc_tokens_size * lcid;
         unsigned char *tkn_ptr = tkn_iv_ptr + SGX_AESGCM_IV_SIZE;