Skip to content

Commit

Permalink
diagram adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
thor314 committed Sep 5, 2024
1 parent 0b22131 commit ebf9227
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions circuits/aes-gcm/ghash.circom
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ include "gfmul.circom";
// output: Y_{n+1} where n is the number of blocks.
// GHASH Process
//
// X1 X2 ... XM
// X1 X2 ... XM
// │ │ │
// ▼ ▼ ▼
// ┌────────────────┐ ┌──────────┐ ┌──────────┐
// │ multiply by H │ ┌─────▶│ XOR │ ┌─────▶│ XOR │
// └────────┬───────┘ | └────┬─────┘ | └────┬─────┘
// │ │ │ | |
// │ │ ▼ | ▼
// │ │ ┌────────────────┐ | ┌────────────────┐
// │ │ │ multiply by H │ | │ multiply by H │
// │ │ └───────┬────────┘ | └───────┬────────┘
// │ │ │ | |
// ▼ │ ▼ | ▼
// ┌─────────┐ │ ┌────────────────┐ | ┌────────────────┐
// │ TAG1 │ ─────┘ │ multiply by H │ | │ multiply by H │
// └─────────┘ └───────┬────────┘ | └───────┬────────┘
// │ | |
// ▼ | ▼
// ┌─────────┐ | ┌─────────┐
// │ TAG2 │ ──────┘ │ TAGM │
// └─────────┘ └─────────┘
// ┌─────────┐ │ ┌─────────┐ | ┌─────────┐
// │ TAG1 │ ─────┘ │ TAG2 │ ──────┘ │ TAGM │
// └─────────┘ └─────────┘ └─────────┘
//

template GHASH(NUM_BLOCKS) {
Expand Down Expand Up @@ -79,4 +79,4 @@ template GHASH(NUM_BLOCKS) {
// Assign the final tag
tag[0] <== intermediate[NUM_BLOCKS-1][0];
tag[1] <== intermediate[NUM_BLOCKS-1][1];
}
}

0 comments on commit ebf9227

Please sign in to comment.