Monday, 9 June 2008

Generating RSA Key Pair Programmatically using OpenSSL

#include "stdafx.h"
#include <conio.h>
#include <openssl/rsa.h>
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <stdlib.h>
#include <stdio.h>


int _tmain(int argc, _TCHAR* argv[])
{
RSA *myrsa;
unsigned long e = RSA_3;
BIO* out = NULL
FILE* fp;
myrsa = RSA_generate_key(2048,e,NULL,NULL);

out=BIO_new(BIO_s_file());


if(myrsa==NULL){
printf("error in generating keypair..");
printf("press any key to exit..");
_getch();
}

fp=fopen("rsakeypair.txt","wb");
out = BIO_new_fp(fp,BIO_CLOSE);
BIO_printf(out,"\n");
RSA_print(out,myrsa,0);
fclose(fp); _getch(); return(0);
}




The above example program generates a 2048 bit RSA Key pair. It also generates the p,q,n,e and d sections into the text file. In order to build this sample using Visual C++, you will need to build OpenSSL first. After you build OpenSSL, you can then include the generated headers to your VC/Include folder. You will also need to include the the lib files generated by OpenSSL onto VC/Lib. The above example program is written in VS05. OpenSSL simply rocks!



Code + Demo + ReadmeFile : Here

Friday, 6 June 2008

Wednesday, 4 June 2008

Best Practises for rule based application development

"Takes a high level view of knowledge and looks at different types of knowledge and their mappings to executable computer code to gain insights into when and why rule engines provide advantages over conventional software development tools." - Dennis MerrittAmzi! Inc. January 2004
Superb article, worth a read..

Microsoft Imagine Cup 08

I am participating in the Microsoft Imagine Cup 08. We have made it to the UK Semifinals at the moment and the grand UK finale is on the 5th of June at London. We have been officially invited to the Finals [ MS is bearing the travel fair, Hotel and Food bills!! :-) ]. I'm really looking forward to it.This is my first trip to London, haven't seen it before...So, I'm a bit nervous and excited at the moment..

My team comprises of myself and my only other teammate, David Wilson. We are hoping to win this based on a solid idea and extensively equipped skills to develop the app further.

rot26

The Microsoft UK Semifinalists listing can be found here. The University of HULL has been bagging the UK Finals from last 2 years. We are hoping to keep up the spirit alive and kicking from our university..

2 days to go, fingers crossed..

 

 

Neither prejudiced by the past nor in fear of the future,the moment, only the moment....

Tuesday, 3 June 2008

The Raghu Dixit Project - Antaragini

The Indian Dave Mathews!!!! Genius Music Making!!!

The above videos can be found Here and Here . (Just in case, if the buffering acts up..)