-1

i have this code in .NET Framework:

RSACryptoServiceProvider rsaCSP = new RSACryptoServiceProvider(keysize);
                RSAParameters rsaParam = rsaCSP.ExportParameters(true);

if i look closer with the debugger to rsaParam so i can see p and q (... is going with p*q to n). If keysize = 1024, i get p and q with each bytes[64].

Questions i ask myself: 1-If i look to q and p with the debugger: there is nothing i can interpretate as a number or a ascii-value? the values of [0], [1], [2] ... are 244, 231, 58 - see attachment. How can i interpretate the values of p and q? if i do a convert with System.Text.Encoding.Default.GetString(..p..), i dont get someting like a huge number!? Microsoft Documentation says only: p represents the P-Parameter in RSA. 2-would it be correct, if i say: at a keysize with 1024 Bit i got p and q with each 64 Bytes: it means i would get with p*q a number with 128 Bytes. And 128 Bytes * 8 = 1024 Bit.

Thanks. enter image description here

Eloy
  • 19
  • 4
  • 2
    See following for description of RSA. Prime number are used so the key used for encryption does not repeat making it very difficult to hack. https://en.wikipedia.org/wiki/RSA_numbers – jdweng Aug 20 '23 at 08:53
  • To see the byte array value as one big number, try https://stackoverflow.com/questions/5649190/byte-to-unsigned-biginteger – Martheen Aug 20 '23 at 09:11

0 Answers0