15,904,415 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 HitsugayaHisagi (Top 17 by date)
HitsugayaHisagi
13-Mar-16 4:22am
View
yes i just realise that. it didn't post just now due to connection error, so i'm now trying to delete it..sorry!
HitsugayaHisagi
13-Mar-16 4:15am
View
yes i initiated that way with
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(2048)
and yes that is the same link i referred to, but still thanks for the suggestion.
And no i only posted the Qs here in this forum. Not sure what is happening, hmm...
HitsugayaHisagi
28-Feb-16 2:33am
View
yes it worked!! thank you so much!!
HitsugayaHisagi
23-Feb-16 8:56am
View
tried a few, and this
StringBuilder sb = new StringBuilder();
foreach (BigInteger item in encrypted)
{
sb.Append(encrypted.ToString());
}
is the only one that gives me output, but it printed the method name for 5 times (for 5 character in plaintext). I'm really getting very confused now. What should I do?
HitsugayaHisagi
21-Feb-16 10:00am
View
have tried many ways like in the above, but still cant get it, what should I do? (sorry for late replying, not sure why for 4 days cant post any comments)
HitsugayaHisagi
21-Feb-16 9:59am
View
I would prefer a continuous string of numbers, and have tried various ways as in above, but I still cant get it. What should I do?
HitsugayaHisagi
17-Feb-16 9:03am
View
May I know what should I do? Like converting array into string? or print as array? I tried both, but with invalid argument.
HitsugayaHisagi
13-Feb-16 12:54pm
View
I did use the debugger and see how it goes though. It did enter into the CheckIfDivisible method, together with both the generated prime numbers. But because it did not fulfill the condition so it return false and the whole process repeated till like an infinite loop. That's what I understand from how the code moves.
HitsugayaHisagi
7-Feb-16 3:24am
View
Ok...I'll try. I thought if there's any similar code somewhere to have a look, because I cant really find a close one in google (or maybe I'm bad at googling specific stuff). And I'm quite new in doing cryptographic programmings, so I'm kinda lost somewhere. But thanks a lot for your guidance, I'll try and see again. Thanks again!!! =)
HitsugayaHisagi
5-Feb-16 21:30pm
View
I erm.. cant really imagine how the code looks like, may you please give me an example?
HitsugayaHisagi
5-Feb-16 21:13pm
View
Hmm...still having problem, 'System.Numerics.BigInteger' does not contain a definition for 'Exp'.
BigInteger sqrt = BigInteger.Exp(BigInteger.Log(value)/2);
if ((value % 2) == 0) return false;
for (var i = 3; i <= sqrt; i += 2)
if ((value % i) == 0) return false;
return true;
I did check out, and it seems to use Math.Exp is actually correct.
HitsugayaHisagi
4-Feb-16 10:46am
View
you mean like,
public bool CheckIfPrime(BigInteger n) //to check if the random number generated is prime
{
BigInteger sqrt = Math.Exp(BigInteger.Log(n)/2);
//but errors at this part (cannot implicitly convert type 'double' to 'System.Numerics.BigInteger'. An explicit conversion exists)
if ((n % 2) == 0) return false;
for (var i = 3; i <= sqrt; i += 2)
if ((n % i) == 0) return false;
return true;
}
HitsugayaHisagi
4-Feb-16 10:09am
View
Deleted
I tried this code
Random rand = new Random();
BigInteger p = BigInteger.genPseudoPrime(512, 5, rand);
txtP.Text = p.ToString();
Random rand2 = new Random();
do
{
BigInteger q = BigInteger.genPseudoPrime(512, 5, rand);
}
while (p == q);
txtQ.Text = q.ToString();
But it seems that the genPseudoPrime is not in the assembly, so I tried to add some such as System.Runtime.InteropServices, System.Xml, System.Reflection, and also downloaded from
http://www.codeproject.com/Articles/5266/Client-Server-Encryption-plus-extras?fid=25048&fr=26#xx0xx
Still, it doesn't work. Any idea what should I do?
HitsugayaHisagi
4-Feb-16 6:22am
View
which means it is not wise to use this code for checking BigInteger, you mean?
HitsugayaHisagi
3-Feb-16 9:59am
View
how would the one with param array look like?
HitsugayaHisagi
3-Feb-16 9:54am
View
Deleted
I'll give a try on the generating prime directly, at least it organizes the code a bit. May I know how to start on it? Like using genPseudoPrime or something else?
HitsugayaHisagi
15-Jan-16 4:07am
View
No, I couldn't find any in google as well, not even the one SA posted below (Thanks SA for the link, but I still can't find any codes related to certificateless concept). If I'm not desperate enough I wouldn't be asking for help here. I posted here thinking that maybe if any one with experience in programming world would know where to find websites that shares source code with each other. I'm very new to the programming world btw.
Show More