Skip to content

Commit

Permalink
Mention the unit of "len" in the Stream() function (#28)
Browse files Browse the repository at this point in the history
Implementations can use a different unit, but when the function is used
in other documents, having a well-defined unit is useful.

---------

Co-authored-by: Samuel Lucas <63159663+samuel-lucas6@users.noreply.github.com>
  • Loading branch information
jedisct1 and samuel-lucas6 authored Dec 7, 2023
1 parent 3e08062 commit c8143d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions draft-irtf-cfrg-aegis-aead.md
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ The `Stream` function expands a key and an optional nonce into a variable-length

Inputs:

- `len`: the length of the keystream to generate.
- `len`: the length of the keystream to generate in bits.
- `key`: the AEGIS key.
- `nonce`: the nonce. If unspecified, it is set to `N_MAX` zero bytes.

Expand All @@ -1519,7 +1519,7 @@ stream, tag = Encrypt(ZeroPad({}, len), {}, key, nonce)
return stream
~~~

This is equivalent to encrypting a `len` all-zero bytes message without associated data, and discarding the authentication tag.
This is equivalent to encrypting a `len` all-zero bits message without associated data, and discarding the authentication tag.

Instead of relying on the generic `Encrypt` function, implementations can skip the finalization step.

Expand Down

0 comments on commit c8143d5

Please sign in to comment.