21.08.2015 Views

RSA-PSS – Provably secure RSA Signatures and their ...

RSA-PSS – Provably secure RSA Signatures and their ...

RSA-PSS – Provably secure RSA Signatures and their ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.10 DifficultiesI found out that the most difficult part was not the implementation of the <strong>PSS</strong>padding itself, but the h<strong>and</strong>ling of the parameter block. RFC 3447 specifiesa parameter block (s. 49 in [<strong>RSA</strong> Inc., 2002]) allowing to specify the hashfunction, salt length, mask generation function <strong>and</strong> the hash function used insidethe mask generation function. The parameters are decoded (cryptohi/secvfy.c)several API layers above the signature generation (softoken/rsawrapr.c) <strong>and</strong>have to be passed through them (pk11wrap/pk11obj.c). None of the existingalgorithms within nss had a parameter block, so this required a bunch of APIchanges.8.11 Conclusions from the ImplementationThe parameter block adds a lot of complexity for no real gain. It allows forexample constructions where the hash function used directly <strong>and</strong> the hash functionfor the mask generation function differ (e.g., SHA-1 with MGF1 usingSHA-256). The variable salt length allows to choose values that violate thesecurity properties of the whole <strong>PSS</strong> construction (e.g., a zero length salt). Itwould’ve been much easier to stick to a predefined set of sane parameters <strong>and</strong>assign them <strong>their</strong> own IDs.Another point where unnecessary complexity was added was the h<strong>and</strong>lingof key sizes. A number of bit-shifting operations were only necessary becauseRFC 3447 allows keys of any size. It would have made the whole implementationsignificantly simpler if the allowed key sizes were restricted to ones divisible by8 (which makes a byte-representation without padding possible). As usuallyall real-world applications use common key sizes like 1024, 2048 or 4096, thisrestriction would not have many implications on users.The fact that the only input to the whole signature generation <strong>and</strong> verificationfunctions is the hash of a message was welcome for the implementation,but it weakens the security (see chapter 5). It would’ve needed even more APIchanges to make a construction like the original <strong>PSS</strong> proposal that does notstart with Hash(M) possible. However, I would still consider r<strong>and</strong>omizationof the hash a good idea, as it would vastly improve the security on real-worldattacks.8.12 SummaryI have provided working patches to support <strong>RSA</strong>SSA-<strong>PSS</strong> in nss, a cryptographiclibrary widely used by popular products like the Mozilla Firefox browser.Due to the very invasive changes required, inclusion of them into the main nsscodebase will probably still require some time.Further possible tasks that could be done are support for designated<strong>RSA</strong>SSA-<strong>PSS</strong> keys/certificates <strong>and</strong> support for Cryptographic Message Syntax37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!