Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

For consistency across the different function calls, we use the term "initialization vector", or iv, to refer to the "nonce", which is the term typically used in CTR mode.

As shown in the CLI capture below, you can use CTR mode to encrypt and decrypt and arbitrary payloadan arbitrary payload:

No Format
> ctr
params:
 - key:         c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf
 - iv:          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
input:
 - plaintext:   00 11 22 34 44 55 66 77 88 99 aa bb cc dd ee ff
output:
 - ciphertext:  85 67 52 24 76 60 5b b4 8d 9d 4b 77 ad cd ac 56
output:
 - decrypted:   00 11 22 34 44 54 66 77 88 99 aa bb cc dd ee ff

...