Skip to content

Calculate correct cipher output length - #166

Merged
randombit merged 1 commit into
randombit:masterfrom
arckoor:cipher-output-length
May 7, 2026
Merged

Calculate correct cipher output length#166
randombit merged 1 commit into
randombit:masterfrom
arckoor:cipher-output-length

Conversation

@arckoor

@arckoor arckoor commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Fixes #155 (I think at least? cc @teythoon)
botan_cipher_output_length assumes you ask for the full message length and always includes the tag, hence the somewhat awkward calculation to add / subtract that if we're not at the end yet.
The added test would previously fail.

@arckoor
arckoor force-pushed the cipher-output-length branch from a2214fb to c72ddb7 Compare October 8, 2025 16:12
@arckoor

arckoor commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

I have frankly no idea why the git ci is failing?
I don't think I added anything that should cause that, but it's also not an intermittent failure, also happened after a just-in-case force push 🤔

@arckoor
arckoor force-pushed the cipher-output-length branch from c72ddb7 to 9e0f6c8 Compare March 3, 2026 21:50
@randombit

Copy link
Copy Markdown
Owner

@arckoor Sorry for the wait here can you rebase to make sure CI is still good, otherwise lgtm

@arckoor
arckoor force-pushed the cipher-output-length branch from 9e0f6c8 to de139d3 Compare May 7, 2026 15:26
@randombit
randombit merged commit dcca834 into randombit:master May 7, 2026
17 checks passed
@randombit

Copy link
Copy Markdown
Owner

@arckoor I'll probably release 0.13 of the crate later today, if you have any other changes you'd want in lmk

@arckoor
arckoor deleted the cipher-output-length branch May 7, 2026 15:45
@arckoor

arckoor commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

I don't have any other things that wouldn't first need changes in botan itself, so release away :)

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.

Using Cipher::finish_into fails with CBC

2 participants