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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:37:37+00:00 2026-05-24T13:37:37+00:00

There are two keys in asymmetric encryption algorithm public key and private key For

  • 0

There are two keys in asymmetric encryption algorithm

  • public key and
  • private key

For the concept of client and server, it need to public key on server side to decrypt client’s message.

So my question is how can we share public key between client and server?

I am using JAVA, so if your example contains java code this will ok for me, or if any pictorial info, this will very ok.

Thank you!

  • 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-24T13:37:38+00:00Added an answer on May 24, 2026 at 1:37 pm

    If the client hasn’t met the server before, so he doesn’t know what public key to expect, one must use a third party intermediary to validate the identities involved. In P2P scenarios, you have what are called “key signing parties“, where people exchange public keys through meeting face-to-face.

    If the people already know eachother, then, even through an insecure channel, you can use algorithms like Diffie-Hellman to exchange your identities, which you can validate against the information you already had about the identity of that person.

    In a common HTTPS scenario, the client may not already know the server, but the server presents a certificate, validated by a mutually-trusted third party, that acknowledges his identity. For instance, Paypal might present you with a certificate that says “VeriSign agrees I am who I say I am.”, and if you trust VeriSign, this “web of trust” as it’s called means you’ll trust Paypal are who they says they are.

    In your client-server scenario, the server needs both its private and public key – the public key is used for encrypting the messages going back to the client, and the private key is used to decrypt the messages the client is sending to him.

    The server doesn’t usually know who the user is (cryptographically speaking), the client may make a new certificate and public/private keypair for each request it sends. A way to change this is detailed in this IBM article. What ends up happening in usual HTTPS scenarios is a mixture of private and public key encryptions; you can read more about that in this related SO post.

    Good luck!

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

Sidebar

Related Questions

There seems to be a lot of hype about asymmetric Public Key encryption. RSA,
Is there a way to merge two primary keys into one and then cascade
There are two scenarios I need to clarify: An executable compiled with .NET 3.5
There are two databases in SQL Server 2005: One called A and another one
I need two methods one to encrypt and one to decrypt an xml file
http://en.wikipedia.org/wiki/CMAC http://www.rfc-archive.org/getrfc.php?rfc=4493 There are two keys K1 and K2. Are there any other reasons,
There are two weird operators in C#: the true operator the false operator If
There are two popular closure styles in javascript. The first I call anonymous constructor
There are two popular naming conventions: vc90/win64/debug/foo.dll foo-vc90-win64-debug.dll Please discuss the problems/benefits associated with
There are two schools of thought on how to best extend, enhance, and reuse

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.