Skip to content

Separate Nettle-specific implementation details

Igor Matuszewski requested to merge igor/split-backends into master

Another attempt at !627 (closed) and #333 (closed).

With this applied, the only places that use nettle unconditionally are two tests using {ed,x25519} key pairs, which still needs to be addressed:

I tried to only split the parts from the implementation that touched the Nettle implementation directly.

For instance, in AEAD we only concern ourselves with the Aead trait from Nettle, so I duplicated it in crypto/aead.rs and reimplemented it in terms of nettle::aead::Aead and only construct and return the high-level Box<dyn Aead> instead (this is what I originally had in mind when coming up with traits for the common low-level crypto operations).

@teythoon I hope this is more what you had in mind. Are you satisfied with the direction of this MR?

Merge request reports