목차
[소스코드] 72.6KB
Big INT.h
RSA.cpp
RSA.h
Big INT.cpp
[실행파일] 59.7KB
Plaintext.TXT
Private Key.txt
[Backup Key]
My RSA.exe
Public Key.txt
Big INT.h
RSA.cpp
RSA.h
Big INT.cpp
[실행파일] 59.7KB
Plaintext.TXT
Private Key.txt
[Backup Key]
My RSA.exe
Public Key.txt
본문내용
/***************************************************************
/* RSA Enc/Dec v1.0.3.1
/* Made by CY. Kim (KimChangYoun@gmail.com)
/* http://tpin.kr/
/*
/* Copyright ⓒ2008-2009 by CY. Kim. All rights reserved.
***************************************************************/
#include "RSA.h"
static const RossiBigInt Zero ( 0 );
static const RossiBigInt One ( 1 );
static const RossiBigInt Two ( 2 );
int main( void ) {
UINT KeyPress = 0;
system( "cls" );
gotoxy( 5, 2 );
cout << "Can I help you, sir, or are you just browsing?";
gotoxy( 1, 22 );
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
cout << "──────── MENU ─────────";
gotoxy( 1, 23 );
cout << "F1: Enc, F2: Dec, F3: KeyGen, ESC: Exit";
gotoxy( 44, 22 );
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_INTENSITY );
cout << "ⓒ2008-2009";
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
cout << " CY. Kim";
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN | FOREGROUND_RED );
cout << " v1.0.3.1";
gotoxy( 44, 23 );
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN | FOREGROUND_INTENSITY );
cout << "Rivest Shamir Adleman Algorism";
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
for( ; ; ) {
if( _kbhit() ) {
KeyPress = _getch();
if( KeyPress==0 ) {
KeyPress = _getch();
switch( KeyPress ) {
case F1: // 암호화( 블록크기는 16b(2B) )
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
Progress( 'E' );
break;
case F2: // 복호화( 블록크기는 16b(2B) )
Progress( 'D' );
break;
case F3:
Progress( 'K' );
break;
}
} else {
if( KeyPress==ESC ) {
return 0;
}
}
}
}
}
/* RSA Enc/Dec v1.0.3.1
/* Made by CY. Kim (KimChangYoun@gmail.com)
/* http://tpin.kr/
/*
/* Copyright ⓒ2008-2009 by CY. Kim. All rights reserved.
***************************************************************/
#include "RSA.h"
static const RossiBigInt Zero ( 0 );
static const RossiBigInt One ( 1 );
static const RossiBigInt Two ( 2 );
int main( void ) {
UINT KeyPress = 0;
system( "cls" );
gotoxy( 5, 2 );
cout << "Can I help you, sir, or are you just browsing?";
gotoxy( 1, 22 );
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
cout << "──────── MENU ─────────";
gotoxy( 1, 23 );
cout << "F1: Enc, F2: Dec, F3: KeyGen, ESC: Exit";
gotoxy( 44, 22 );
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_INTENSITY );
cout << "ⓒ2008-2009";
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
cout << " CY. Kim";
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN | FOREGROUND_RED );
cout << " v1.0.3.1";
gotoxy( 44, 23 );
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN | FOREGROUND_INTENSITY );
cout << "Rivest Shamir Adleman Algorism";
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
for( ; ; ) {
if( _kbhit() ) {
KeyPress = _getch();
if( KeyPress==0 ) {
KeyPress = _getch();
switch( KeyPress ) {
case F1: // 암호화( 블록크기는 16b(2B) )
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
Progress( 'E' );
break;
case F2: // 복호화( 블록크기는 16b(2B) )
Progress( 'D' );
break;
case F3:
Progress( 'K' );
break;
}
} else {
if( KeyPress==ESC ) {
return 0;
}
}
}
}
}
소개글