This pull request includes several changes to the rosenpass
project, primarily focused on code refactoring to improve readability and maintainability. The most important changes include updating the fuzz targets to use a more consistent approach, refactoring the protocol.rs
file, and improving the secret-memory
module by utilizing the ToLifetime
trait.
fuzz/fuzz_targets/blake2b.rs
: Updated the fuzz target to use Blake2bInput
struct and improved the handling of input data.fuzz/fuzz_targets/kyber_encaps.rs
: Refactored to use Kyber768Input
struct and ensured input length validation.fuzz/fuzz_targets/mceliece_encaps.rs
: Simplified the fuzz target by removing unnecessary imports and improving encapsulation handling.rosenpass/src/protocol/protocol.rs
: Updated the cpy_min
function calls to use the to
method for better readability and consistency. [1] [2]secret-memory/src/public.rs
: Refactored various methods to use the ToLifetime
trait, enhancing code clarity and reducing redundancy. [1] [2] [3] [4] [5] [6] [7] [8] [9]secret-memory/src/secret.rs
: Applied similar refactoring using ToLifetime
to improve the handling of secret data. [1] [2] [3] [4] [5] [6] [7]to/src/lib.rs
: Added ToLifetime
to the list of exports to facilitate its usage across the project.to/src/to/to_function.rs
: Improved documentation and examples for the to
function, highlighting the benefits of using the To
trait.to/src/to/to_trait.rs
: Fixed a typo in the documentation for better clarity./claim #164
Sambit Chakraborty
@Sambit003
Rosenpass
@rosenpass