Solved

URGENT: RSA clean source code in C

Posted on 2010-09-10
10
473 Views
Last Modified: 2013-11-13
Hi,
I am looking for a clean source code of RSA written in C, without any libs or licenses attached. I checked most of the previous questions regarding this subject in EE but most of the provided links were broken, or they were prompting a licensed code.
Another important requirement is that the code will encrypt string or stream.
Thank you
0
Comment
Question by:nickge
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 3

Expert Comment

by:aledev
ID: 33645217
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 33645237
Have a look at OpenSSL (http://www.openssl.org/) or libgcrypt (http://www.gnupg.org/). For C++, have a look at Crypto++ (http://www.cryptopp.com/).
0
 

Author Comment

by:nickge
ID: 33645360
aledev,
thank you for the prompt reply but the specific code can only have a key size of 32 bit and not 1024 bit in order to be secure. Moreover it's in C++ and the code quality is not good.

Infinity08,
I checked them, but I want something on its own and not as a part of a lib. Thank you
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
aledev earned 250 total points
ID: 33645508
0
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 250 total points
ID: 33645648
>> I checked them, but I want something on its own and not as a part of a lib.

May I ask why ?

When it comes to security, it's best to go with a tried and tested solution (like one of the libraries I suggested), rather than rolling your own, or copying some code that floats around on the internet, or has been given to you in some other way.
0
 

Author Comment

by:nickge
ID: 33646181
May I ask why ?

When it comes to security, it's best to go with a tried and tested solution (like one of the libraries I suggested), rather than rolling your own, or copying some code that floats around on the internet, or has been given to you in some other way.

You are absolute right but for the specific project i need it for I am not allowed to import any library
0
 

Author Comment

by:nickge
ID: 33646204
Anyway guys I think I am going to try and write the code by myself (although i do not know C). If i finally do it I ll post a link in order for others to find it. Thank you both for your time. Points will be split.
0
 
LVL 6

Expert Comment

by:xRalf
ID: 33646253
0
 
LVL 6

Expert Comment

by:xRalf
ID: 33646277
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 33646765
>> You are absolute right but for the specific project i need it for I am not allowed to import any library

In that case, you can always look at the source code for those specific libraries, and get some inspiration from it, or simply copy the code you need (check the specific license, but usually that's allowed).
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question