Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7524387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:05:15+00:00 2026-05-30T03:05:15+00:00

With openssl, I could get as following format, but if I want to use

  • 0

With openssl, I could get as following format, but if I want to use this modulus in my RSAPrivatekeySpec, how would I convert the modulus into a BigInteger ? Thanks!
The following is just an example.

 Modulus (2048 bit):
        00:98:10:23:16:ff:b6:f4:26:a2:42:a6:19:23:0e:
        0f:27:4a:b9:43:3d:a0:4b:b9:1b:1a:57:92:dd:a8:
        bc:5d:b8:6e:e6:7f:0f:2e:89:a5:77:16:d1:cf:44:
        69:74:2b:b1:a9:dd:72:bd:a8:9c:aa:90:ca:7b:f4:
        d3:d3:db:11:98:bd:61:f1:2c:77:41:ad:c4:42:6a:
        88:d1:37:04:12:a9:36:ec:09:34:0d:31:71:b9:5a:
        ea:ed:ce:61:1c:1e:5f:6c:9e:28:ee:21:2a:e4:c6:
        1f:75:29:78:a5:96:b1:53:17:4d:bf:88:d1:12:5c:
        a6:75:aa:7c:fe:23:a8:dd:25:35:46:c6:8a:eb:2e:
        e4:a3:1d:7f:b6:6d:9c:7d:66:59:84:c9:51:15:82:
        67:a6:85:e9:c8:d6:2b:a7:e6:28:08:d2:b1:99:92:
        67:32:c4:ba:f7:c9:1a:16:30:e5:cb:39:cb:96:28:
        70:32:ba:18:d2:64:2f:74:3e:dd:09:e0:68:56:57:
        cf:50:63:c0:95:a9:b0:5b:2a:ad:21:4f:bd:e7:15:
        64:4a:9d:e4:c5:c3:5c:35:bf:e6:78:f4:8a:40:83:
        da:7d:0d:6c:02:60:4a:3f:0c:9c:03:fd:48:e6:72:
        f3:0d:5b:90:6b:de:59:58:c9:f4:26:4a:61:b4:52:
        21:1d
    Exponent: 65537 (0x10001)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:05:15+00:00Added an answer on May 30, 2026 at 3:05 am

    Here is a small example illustrating one way to do this.

    public class OpensslIntToBigInteger {
    
        public static BigInteger opensslBigToBigInteger(String opensslInt)
        {
            String hexInt = opensslInt.replaceAll(":", "");
            hexInt = hexInt.replaceAll("\\s+", "");
            return new BigInteger(hexInt, 16);
        }
        public static void main(String[] args) {
    
            String opensslInt = 
                    "        00:98:10:23:16:ff:b6:f4:26:a2:42:a6:19:23:0e:\n" +
                    "        0f:27:4a:b9:43:3d:a0:4b:b9:1b:1a:57:92:dd:a8:\n" + 
                    "        bc:5d:b8:6e:e6:7f:0f:2e:89:a5:77:16:d1:cf:44:\n" + 
                    "        69:74:2b:b1:a9:dd:72:bd:a8:9c:aa:90:ca:7b:f4:\n" + 
                    "        d3:d3:db:11:98:bd:61:f1:2c:77:41:ad:c4:42:6a:\n" + 
                    "        88:d1:37:04:12:a9:36:ec:09:34:0d:31:71:b9:5a:\n" + 
                    "        ea:ed:ce:61:1c:1e:5f:6c:9e:28:ee:21:2a:e4:c6:\n" + 
                    "        1f:75:29:78:a5:96:b1:53:17:4d:bf:88:d1:12:5c:\n" + 
                    "        a6:75:aa:7c:fe:23:a8:dd:25:35:46:c6:8a:eb:2e:\n" + 
                    "        e4:a3:1d:7f:b6:6d:9c:7d:66:59:84:c9:51:15:82:\n" + 
                    "        67:a6:85:e9:c8:d6:2b:a7:e6:28:08:d2:b1:99:92:\n" + 
                    "        67:32:c4:ba:f7:c9:1a:16:30:e5:cb:39:cb:96:28:\n" + 
                    "        70:32:ba:18:d2:64:2f:74:3e:dd:09:e0:68:56:57:\n" + 
                    "        cf:50:63:c0:95:a9:b0:5b:2a:ad:21:4f:bd:e7:15:\n" + 
                    "        64:4a:9d:e4:c5:c3:5c:35:bf:e6:78:f4:8a:40:83:\n" + 
                    "        da:7d:0d:6c:02:60:4a:3f:0c:9c:03:fd:48:e6:72:\n" + 
                    "        f3:0d:5b:90:6b:de:59:58:c9:f4:26:4a:61:b4:52:\n" + 
                    "        21:1d";
    
            BigInteger modulus = opensslBigToBigInteger(opensslInt);
            System.out.println(modulus.toString(16));
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I could susscessfuly genearte pkcs7 signature using PEM(private key)file in Openssl. But, how do
When I try to use imap_open I get the following error: Warning: imap_open() [function.imap-open]:
I'm trying to write a function, that would use native openssl to do some
Alright, so this is absolutely killing me... If anyone could help me, I would
I need to use AES encryption in my embedded Erlang application, but OpenSSL is
The man page did not clearly specify this. But looking at openssl's apps implementations,
Trying to build openssl-fips-2.0 with NDK, before I was lucky found this link and
I am following this tutorial to set up a push notifications >> http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 Yet
I'm trying to get a small twitter client running and I ran into a
I am using Pony mail to send email messages (because I could never get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.