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.
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