RustCrypto / RSA

RSA implementation in pure Rust
Apache License 2.0
550 stars 153 forks source link

Remove 'unsalted' PSS handling #294

Closed lumag closed 1 year ago

lumag commented 1 year ago

The 'unsalted' PSS handling is not behaving like one would expect. It doesn't use salt of 0 length, but insteaad it uses some defaults which are not properly documented. Make the salt_len mandatatory for both singing and verification.

lumag commented 1 year ago

@tarcieri sounds good to me.

cc @roblabla @dignifiedquire

tarcieri commented 1 year ago

@lumag alternatively, you could implement ^^^ proposed API in this PR, which would avoid the need to deprecate anything.

Instead, change new to be salted, but infer the salt size from the digest function.

(Or I'm still happy to do that as a followup, which would simplify the overall changes and help organize discussion perhaps)

lumag commented 1 year ago

Sure, I'll do that in a minute

lumag commented 1 year ago

done