cforler / Ada-Crypto-Library

This project is obsolete is no longer developed, maintained or serviced!
Other
84 stars 20 forks source link

Generation of CRT form of RSA keys #7

Closed rod-chapman closed 8 years ago

rod-chapman commented 8 years ago

Hi Christian, Here's the pull request. As you can see, I've refactored Gen_RSA_Key a bit to make it simpler. I have also updated Check_Private_Key to check that the CRT forms are correct and P > Q. I've also updated Set_Private_Key and Get_Private_Key accordingly.

I have updated the English version of the document, but not the German - sorry - I stopped studying German about 31 years ago... I think there may be a bug in the documentation regarding the conditions under which Constraint_Error is raised by Set_Private_Key - the code does TWO GCD checks, but the documentation only mentions one of them, and it look wrong anyway. I have marked the spot in the .tex file where that is.

Oh - I've updated test/test-rsa.adb of course. You should find that all tests pass OK.

All the best, Rod