Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ciphertext stealing #41

Closed
makavity opened this issue Apr 5, 2023 · 2 comments
Closed

Ciphertext stealing #41

makavity opened this issue Apr 5, 2023 · 2 comments

Comments

@makavity
Copy link
Contributor

makavity commented Apr 5, 2023

Hello!
For belt-ecb I need ciphertext stealing. And what is the best way to implement it?
Just make encrypt method and do not process block by block, process always all blocks, or implement block-padding CiphertextStealing, which accept 3*BlockSize and pad only last block?

@newpavlov
Copy link
Member

newpavlov commented Apr 5, 2023

I think we need to implement a generic CTS crate, then you would define belt-ecb as Cts2<BeltBlock> and belt-cbc as Cts2<cbc::En(De)cryptor<BeltBlock>>. Since we currently do not have traits for ciphertext stealing, we should be fine with using inherent methods on the structs.

@newpavlov
Copy link
Member

Going to close this issue in favor of #1

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

No branches or pull requests

2 participants