mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Homework Help

Reply
 
Thread Tools
Old 2014-11-29, 00:44   #1
26B
 
Nov 2014

102 Posts
Default Extracting the Modulus from publickeyblob RSA 512

Hey guys, I'm just starting out and I've had a really amazing time learning.
I've been able to get the sources up and running on my test box, tests ran were flawless.

So on to my problem :-)

I've got what might be a really simple question.
Looking at my example PUBLICKEYBLOB, I thought to extract the modulus, reverse it then convert to numeric value.
If I've done it correctly, wouldn't this be my result?

Code:
11232071749463454753543252651230634613647560303982414229443737647100504614326868158151304468494764052881521121640590698587938838406219182506860563383053539
Code:
        static readonly byte[] pbData = new byte[] { 

            // BLOBHEADER
            0x06,                   // PUBLICKEYBLOB
            0x02,                   // CUR_BLOB_VERSION
            0x00, 0x00,             // reserved
            0x00, 0x24, 0x00, 0x00, // CALG_RSA_SIGN

            // RSAPUBKEY
            0x52, 0x53, 0x41, 0x31, // (DWORD magic)  "RSA1" (public key)
            0x00, 0x02, 0x00, 0x00, // (DWORD bitlen) bitlen = 512
            0x01, 0x00, 0x01, 0x00, // (DWORD pubexp) pubExp = 65537
            
             // inverted modulus
            0xE3, 0xEC, 0x11, 0xF1, 0x16, 0x38, 0x20, 0xDA, 
            0xC3, 0xEE, 0x88, 0x8C, 0x06, 0xE6, 0xEF, 0x67, 
            0x09, 0x8A, 0x7D, 0xFB, 0xE1, 0x6F, 0x0A, 0x0E, 
            0x21, 0xD8, 0x0A, 0x1C, 0x4A, 0xE6, 0x4F, 0xA3, 
            0xEE, 0xFC, 0xB9, 0x69, 0xAD, 0x8B, 0xD1, 0xA1, 
            0x3C, 0x06, 0x30, 0x17, 0x57, 0xCA, 0x1D, 0xB1, 
            0xC8, 0x13, 0x01, 0x7D, 0x3B, 0x16, 0x5C, 0x0F, 
            0x72, 0x6B, 0xEC, 0xC1, 0x1B, 0x39, 0x75, 0xD6 
        };

Before I let msieve run for weeks on end.. I'd just like to know that I've converted the modulus correctly.
26B is offline   Reply With Quote
Old 2014-11-29, 01:20   #2
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by 26B View Post
Looking at my example PUBLICKEYBLOB, I thought to extract the modulus, reverse it then convert to numeric value.
If I've done it correctly, wouldn't this be my result?

Code:
11232071749463454753543252651230634613647560303982414229443737647100504614326868158151304468494764052881521121640590698587938838406219182506860563383053539
From what I can tell, yes, you converted it correctly. I was able to recreate the same number based on the bytes you gave, and the non-inverted number has many small factors, so it can't be the public key.
Quote:
Originally Posted by 26B View Post
Before I let msieve run for weeks on end..
While msieve can sieve for NFS, it uses a really slow approach (line sieving) and is not meant for any real-world sieving. You should use the GGNFS sievers (which use lattice sieving) instead. See http://gilchrist.ca/jeff/factoring/n...ers_guide.html (a tutorial that uses Msieve, GGNFS, and factmsieve.py to factor a 100-digit number) http://www.mersenneforum.org/showpos...6&postcount=23 (GGNFS binaries for 64-bit Linux), and http://yafu.sourceforge.net/ (YAFU can be set up to use the GGNFS sievers, like factmsieve.py)

Assuming this is your first GNFS factorization, you might want to start with an easier number, e.g. 100 digits, to get a better working idea of how things work before you commit (and possibly waste) too much time.

Last fiddled with by Mini-Geek on 2014-11-29 at 01:27
Mini-Geek is offline   Reply With Quote
Old 2014-11-30, 07:31   #3
26B
 
Nov 2014

2 Posts
Smile

Thank you very much for the insightful response.
I am using factMsieve.pl that came with the GGNFS source.

Your reply gave me a answers to other questions - so thank you very much for the detailed reply!
I really did appreciate it.
26B is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting k-th roots mod m Dubslow Miscellaneous Math 8 2012-12-13 21:35
It's possible to calculate an unknown RSA modulus? D2MAC Math 8 2010-12-26 16:32
bash script for extracting primenet-status gLauss Linux 0 2010-07-31 11:19
Factorization of a 768-bit RSA modulus akruppa Factoring 53 2010-03-12 13:50
Extracting factors from ECMNet amcfarlane GMP-ECM 4 2006-05-19 18:03

All times are UTC. The time now is 18:07.

Wed Sep 30 18:07:34 UTC 2020 up 20 days, 15:18, 0 users, load averages: 2.39, 2.04, 1.80

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.