Ver código fonte

A couple of places were using SGX_AESGCM_KEY_SIZE as the token size instead of TOKEN_SIZE

TOKEN_SIZE is defined as SGX_CMAC_MAC_SIZE, not SGX_AESGCM_KEY_SIZE.
Ian Goldberg 1 ano atrás
pai
commit
db5a8e1bbe
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      Client/clients.cpp
  2. 1 1
      Client/clients.hpp

+ 1 - 1
Client/clients.cpp

@@ -884,7 +884,7 @@ using the tokens they received in this epoch
 
 void Client::epoch_process() {
 
-    uint32_t pt_token_size = uint32_t(config.m_priv_out) * SGX_AESGCM_KEY_SIZE;
+    uint32_t pt_token_size = uint32_t(config.m_priv_out) * TOKEN_SIZE;
     uint32_t token_bundle_size = pt_token_size + SGX_AESGCM_IV_SIZE
         + SGX_AESGCM_MAC_SIZE;
     unsigned char *enc_tokens = (unsigned char*) malloc (token_bundle_size);

+ 1 - 1
Client/clients.hpp

@@ -1,4 +1,4 @@
-typedef uint8_t token[SGX_AESGCM_MAC_SIZE];
+typedef uint8_t token[TOKEN_SIZE];
 typedef uint8_t aes_key[SGX_AESGCM_KEY_SIZE];
 
 // #define VERBOSE_CLIENT