Skip to main content
. 2021 May 15;12(5):560. doi: 10.3390/mi12050560
Algorithm 1 Write-back operation of data blocks being stored into external main memory
Inputs:Data, Address
Outputs:Timestamps, Ciphertext, Signature
  1: Data ← set of data blocks to write back datai, 1in.
  2: address ← set of memory physical addressd, 1dn.
  3: pre-calculation H = AESk(0128), squaring operations, hash subkeys 1, H, H2, H4 are pre-stored in Hk memory;
  4: D-Cache miss, mapping address to physical address;
  5: begin inputting four physical address blocks, counter generates timestamps (Ts), Ts++, are stored in Ts memory;
  6: IV_seed = {address [127:96], 064, timestamp [31:0]};
  7: repeat: the four IV seed blocks are generated;
  8: Using AES engine to generate key_stream, and storing the first block key_stream_B1 in register B1;
  9: Ciphertext = Data XOR key_stream, then input ciphertext blocks to the GHash engine;
10: output: ciphertext blocks at another branch path are stored into the data zone of external memory;
11: until ciphertext blocks are computed in the GHash engine, signature = Tag XOR key_stream_B1;
12: output: integrity digital signature is stored into the signatures zone of external memory;