Solved

URGENT: RSA clean source code in C

Posted on 2010-09-10
10
446 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now