Skip to content

Conversation

@DigiH
Copy link
Contributor

@DigiH DigiH commented Aug 6, 2025

For consistency with OMG decryption and general bindkey AES CTR matching.

In Counter (CTR) mode, the nonce (or IV) is combined with a counter that increments with each block of ciphertext being decrypted. The length of the nonce is typically 8 to 16 bytes, depending on the implementation, and pycryptodome allows for nonces of various lengths.

8-byte IV: Some libraries will accept an 8-byte IV (used as the nonce), then increment the counter automatically. This might work if the library’s implementation is flexible, but this is not universal behaviour. Some libraries will throw an error or expect you to provide a full 16-byte IV.

Checklist:

  • I have created the pull request against the latest development branch
  • I have added only one feature/fix per PR and the code change compiles without warnings
  • I accept the Developer Certificate of Origin (DCO).

For consistency with OMG decryption and general bindkey AES CTR matching.

> In Counter (CTR) mode, the nonce (or IV) is combined with a counter that increments with each block of ciphertext being decrypted. The length of the nonce is typically 8 to 16 bytes, depending on the implementation, and pycryptodome allows for nonces of various lengths.

> 8-byte IV: Some libraries will accept an 8-byte IV (used as the nonce), then increment the counter automatically. This might work if the library’s implementation is flexible, but this is not universal behaviour. Some libraries will throw an error or expect you to provide a full 16-byte IV.
@DigiH DigiH merged commit 47118d9 into theengs:development Aug 6, 2025
6 checks passed
@DigiH DigiH deleted the nonce branch August 6, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant