15,906,455 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by dyf7970268 (Top 1 by date)
dyf7970268
13-Apr-14 23:51pm
View
Thank you for your answer.
I'm sorry, I described is wrong, this is the result of Google Translate, and I describe in detail, which is Google translation.
I need to export the Diffie-Hellman shared key .
There are two users A and B.
G and P are known between 128 byte value. P is a large prime number, G is an arbitrary value.
A randomly generates a value Xa, B generates a random value Xb, Xa and Xb are confidential, and only two of them know.
A calculation Ya = G ^ Xa mod P.
B calculated Yb = G ^ Xb mod P.
The two sides exchanged value Ya and Yb.
A case can be calculated key Ka = Yb ^ Xa, B can be calculated key Kb = Ya ^ Xb mod P;
According to DH algorithms can know Ka equal Kb.
Ka and Kb are shared key.
When I was a user A, I want to export is the Ka value.