Results 1 to 4 of 4

Thread: Crypto api test problems

  1. #1
    Unregistered
    Guest

    Crypto api test problems

    I was trying to test the RSA keys generated by the windows crypto api.

    So I generate the key pair and export them to two files.

    As the private key's one is encrypted, I had a loot at the pubblic one.

    It should be:
    BYTE bType;
    BYTE bVersion;
    WORD reserved;
    ALG_ID aiKeyAlg;
    DWORD magic; // Has to be RSA1
    DWORD bitlen; // # of bits in modulus
    DWORD pubexp; // public exponent
    // Modulus data follows

    I find that keysize=512bits and e=65537(default value)

    I looked at the modulus, it is:
    54C101F2283AE773F57A3EB03CCF7DD8D61AE197FF8B8AAA632B35AFBF289F26B8DFF3E6D2105C1E5AD5629F00B547974261 2C02C8AA18E4F98CAA1714C17BA

    I put it in this useful utility from tmg
    http://www.secretashell.com/TMG/rsatool2.zip and I found that is not the product of two prime numbers, but of many little numbers.

    This is wrong.
    And I cant understand where's my error.

    Lookin for help...

    sappox
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    DakienDX
    Guest
    Hello Unregistered !

    I have a quite fast computer and quite much (and fast) memory in it. I just know that RSA-256 wil take about 2 hours to decrypt and that it's impossible to decrypt RSA-512 (even with a 2GB swap file) on my computer.

    I've never played with the crypto api, but it is possible that you have to reverse the number to (try to ) factorize it.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  3. #3
    Unregistered
    Guest
    ArthaXerXes
    I'm not sure, as it doesn't work, but the publickeyblob structure should be the one I described, so that should be the modulus.

    I don't want to factor a 512bit modulus but it results to be the product of more than 2 numbers.
    how could you calculate (p-1)(q-1) if n=pqrs??????

    there's something wrong but i can't understand what..

    I generated another publickeyblob, this time the modulus is
    B5259E051CD80678479D70FEA750910238DB0AD95AD4950772B79CBD42FDD916DB825A1716061366B46742BCD48F9B346BB0 E1016D424291598E02D59DFCD9DF

    This time is a 512bit one,put when I try to factor with rsatool2, it results
    PRIME FACTOR: 577
    PRIME FACTOR: 1FDB8DE50B
    PRIME FACTOR: 10A5DD714B3E182A9E2F9D08B6B1A72DC1A15B69E44A8EB72EAB0969BB5787530052A7078C14241922F48B177A3B1D84BF97 DD0D84C3AD3D0302B

    Please help..

    Thanks
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  4. #4
    Unregistered
    Guest
    I didnt think at that problem.

    You were right.
    Many thanks.

    Sappox
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. Crypto Scheme
    By galgal in forum RCE Cryptographics
    Replies: 6
    Last Post: January 24th, 2011, 11:02
  2. Crypto api test problems
    By Unregistered in forum Advanced Reversing and Programming
    Replies: 5
    Last Post: October 28th, 2001, 12:36
  3. Crypto
    By JJ in forum Advanced Reversing and Programming
    Replies: 3
    Last Post: November 8th, 2000, 09:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •