Skip to content

Commit

Permalink
minor readme change
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdaybird committed Sep 23, 2024
1 parent 324ad05 commit 431b6c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/encryption/symmetric/modes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Let's go into detail about Block cipher's [mode of operation](https://en.wikiped

## ECB: Electronic codebook (INSECURE)

The encryption operation in ECB can be viewed as,

![ECB](./figure_ecb.svg)

- It is the simplest mode of encryption but is not secure.
Expand All @@ -19,6 +21,8 @@ Let's go into detail about Block cipher's [mode of operation](https://en.wikiped

## CBC: Cipher Block Chaining

The encryption operation in CBC can be viewed as,

![CBC](./figure_cbc.svg)

- It is a CPA-secure mode of operation.
Expand All @@ -37,6 +41,8 @@ where,

## OFB: output feedback

The encryption operation in OFB can be viewed as,

![OFB](./figure_ofb.svg)

- IV is chosen uniformly and $Y_{0}:=IV$, then $Y_{i}=Enc_{k}(Y_{i-1})$ and $C_{i}=Y_{i} \oplus M_{i}$.
Expand All @@ -47,6 +53,8 @@ where,

## CTR: counter mode

The encryption operation in CTR can be viewed as,

![CTR](./figure_ctr.svg)

- Like OFB, CTR converts a block cipher to a stream cipher. where the keystream, called the Counter Block, is generated using the nonce/IV concatenated with a counter, which is
Expand Down

0 comments on commit 431b6c5

Please sign in to comment.