Skip to content

Allow nonce reuse #3326

Description

@erenon

Problem:

Use-case: on a signal, I want to send A xor B message immediately. To save on the TLS encryption, I want to encrypt both messages beforehand, with the same nonce. crypto/fipsmodule/cipher/e_aes.c prevents this.

Solution:

In crypto/fipsmodule/cipher/e_aes.c, remove the given_counter < gcm_ctx->min_next_nonce check. (the min_next_nonce field can be removed compleltey)

The change is trivial, but I do not understand why the check is there on the first place. To protect the user against accidental misuse? I can prepare an MR.

  • Does this change any public APIs?

No

  • Which algorithm(s) will this impact?

AES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions