Releases: enquo/cretrit
CAUTION: Incompatibility Ahead
This release incorporates quite a lot of changes I've made as a result of enabling about a thousand rustc and clippy lints, and reviewing the API for ugliness.
The changes range from the trivial (make sure everything marked pub
is actually exported) through the useful (lots and lots of docs) through to the really rather important (remove as much panic-able code as possible).
It also includes some quality-of-life improvements (such as fewer and better lifetimes).
Included as part of this is a certain amount of API and data format breakage due to, for example, returning Result
s in places where previously the code would have just panicked.
My apologies, but in return there's much less chance of something inconsequential taking down your entire application, so that's... good, I guess?
Remove leftover dbg!
Whoops.
PlainText::From<bool> support
Only two possible values, but why should you let an attacker know anything?
Allow Cipher creation from pre-initialized PRF/PRP/RNG
Something of a niche use-case, perhaps, but if you have a hankering to do it, now you can.
Documentation bugfixes
This release only fixes the README so that the examples are valid Rust.
To ensure this sort of shenanigan doesn't happen again, the examples are now also valid doctests.
Safety First!
This release renames the Cipher.encrypt
function to Cipher.full_encrypt
, and introduces a Cipher.right_encrypt
, which allows callers to decide when they don't need to take the risk of possibly leaking a left ciphertext.
There's also an improvement to comparisons to avoid leaking the difference block via timing.
Initial Release
It works. No doubt many improvements will be forthcoming.