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

Detail seek() usage #22

Merged
merged 1 commit into from Sep 29, 2022
Merged

Detail seek() usage #22

merged 1 commit into from Sep 29, 2022

Conversation

skaunov
Copy link
Contributor

@skaunov skaunov commented Sep 27, 2022

It took some effort to understand that seek works not by counter blocks (as in diagram (from Wikipedia?)), but by bytes of keystream, so I would say it worth mentioning this.

Please, comment if it's better to place this notification upstream to cipher crate, or any other place.

It took some effort to understand that counter works not by blocks as in [diagram] (from Wikipedia?) but counts each bytes, so I would say it worth mentioning this.

Please, comment if it's better to place this notification upstream to `cipher` crate, or any other place.

[diagram]: https://raw.githubusercontent.com/RustCrypto/media/26acc39f/img/block-modes/ctr_enc.svg
@skaunov skaunov changed the title Details seek() usage Detail seek() usage Sep 27, 2022
@newpavlov
Copy link
Member

Note that block-level operations are supported by the CtrCore type. Ctr64LE and others are simple buffered wrappers around it. CtrCore supports block-level seeking by implementing the StreamCipherSeekCore trait.

@newpavlov newpavlov merged commit 37276dd into RustCrypto:master Sep 29, 2022
@skaunov skaunov deleted the patch-1 branch September 29, 2022 01:07
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.

None yet

2 participants