DevOTechS Forums
November 24, 2024, 05:35:50 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: DevOTechS forums
 
  Home Help Search Calendar Login Register  
  Show Posts
Pages: [1]
1  HIME / General HIME discussions / Re: Truncation problems on: May 07, 2008, 07:52:03 AM
Eddy,

Thank you for your support.

My P, Q and e values are from a know good RSA key, hence I should be able to calculate all the other components from these.
The reason I am doing this is that I want to write a tool to test that RSA keys have been correctly migrated from a pre existing system to a new system - hence I have to use the existing keys.

I will do a bit more experimentation before getting back to you with an example of my truncation problem.

Best regards,

Gwyn
2  HIME / General HIME discussions / Truncation problems on: May 06, 2008, 04:37:51 PM
 Huh  Hello,

I am using C# and finding problems. Below are some calculations I have been doing with RSA.

These work for small values (a few bytes) and I am able to encrypt and decrypt succesfully.

However, when I try to scale up to, say, 96 bytes RSA keyset, then I get truncation problems. The first few bytes of my caclucated values are OK, but then the rest is wrong.

Any ideas?


HIME.hi_PutReg(pString, 10);      //p = 10
HIME.hi_PutReg(qString, 11);      //q = 11
HIME.hi_Mul(10, 11, 12);            //Modulus = 12
                                             //e = 2
HIME.hi_Decr(10,15);                //p-1 = 15
HIME.hi_Decr(11,16);                //q-1 = 16
HIME.hi_Mul(15,16,17);              //(p-1)(q-1)
HIME.hi_Modinv(2, 17, 18);
HIME.hi_Encrypt_Rsa(1, 2, 12, 4);

Any help would be most welcome. Is there a manual showing examples?

Thank you

Gwyn
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!