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 647407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:43:08+00:00 2026-05-13T21:43:08+00:00

maybe it’s not so proper to ask this question here… anyway, I’m trying to

  • 0

maybe it’s not so proper to ask this question here… anyway, I’m trying to use the gmp library for the implementation of DH, but the problem here I got is:

Once, when I was doing the tests to observe the output, although big values of prime and the private keys were selected:

  • p was about more than 300 digits long in decimal
  • a, b were about 100 digits long

finally I got a shared secret key which was extremely small, perhaps smaller than 10^8 in decimal…

This problem didn’t show up many times, in fact, during all the observation, it appeared just once…but still, this was not so good at all.

So I wonder if there are some methods which can avoid this… Thanx a lot

  • 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-13T21:43:08+00:00Added an answer on May 13, 2026 at 9:43 pm

    The Diffie-Hellman key exchange is designed to generate a secret shared key.

    By using large values of p, a and b, you ensure that the pool of potential shared keys is a very large one.

    However, the actual value of the shared key can be any value within that pool. As a result, it could range from zero to (p – 1)… that’s because, the Key is

    G^(ab) mod p

    Hence, you haven’t discovered a problem here… your just seeing the instances when G^(ab) is close in value to a multiple of p, and hence the mod is a low number.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

maybe this is an old question but i'm trying as a personal experiment to
Maybe a silly question but here goes anyway. Example: Let's say I have one
....maybe not so simple. First, I am trying to code this in Wordpress, not
Maybe this is a very simple question, but I just can not figure out.
Maybe this is a dumb question, but I use cc to refer to the
Maybe my title is not the best but here is what I really want.I
Maybe it's wrong but I always use this query for my app: cme_only =
Maybe this is a poor question, but, I can't find a tutorial or even
Maybe it has been asked somewhere, but I am trying to find my question
Maybe a stupid question, but.. In my code I use the following construction at

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.