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