OpenSSL
// SSL_Client.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of [...]
// SSL_Server.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of [...]
// Verify_Cert.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of [...]
// use_rsa.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of [...]
// enc_rsa.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of [...]
Continue reading about OpenlSSL – RSA 패키지를 이용한 공개키 & 개인키 만들기
// dec_evp.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of [...]
libssl-dev 우분투/데비안 의 경우… # sudo apt-get install libssl-dev
#include <stdio.h>#include <string.h>#include <openssl/bio.h>#include <openssl/err.h>#include <openssl/bn.h>#include <openssl/dh.h>#include <openssl/rand.h>#include <openssl/pem.h> #define IN_FILE “./plain.txt” // plain file#define OUT_FILE “./encrypt.txt” // cipher file unsigned char* readFile(char *file, int *readLen);unsigned char *readFileBio(BIO *fileBIO, int *readLen);unsigned char *addString(unsigned char *destString, int destLen, const unsigned char *addString, int addLen); int main(int argc, char* argv[]){ [...]
#include <stdio.h> #include <stdio.h>#include <string.h>#include <openssl/evp.h>#include <openssl/objects.h>#include <openssl/rand.h> int main(int argc, char* argv[]){ int i; // salt bufer length = 8 unsigned char salt[8]; // EVP_CIPHER = Cipher structure const EVP_CIPHER *cipher = NULL; [...]
#include <stdio.h>#include <openssl/err.h>#include <openssl/rand.h> int main(int argc, char* argv[]){ int i; int retVal = 0; // 랜덤 수의 길이는 64로 한다. int length = 64; // PRNG에 공급할 seed 생성 RAND_status(); // 생성할 [...]


최근 답글