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 , . |
2: address ← set of memory physical , . |
3: pre-calculation
H = , squaring operations, hash subkeys 1, H, , are pre-stored in 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], , 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; |