Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

shrims4u

@shrims4u
About
Posts
20
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Multiple values associated with a single value
    S shrims4u

    Hi all, I want a trick as to how to add multiple values for a single value . For example : A Person named "A" has two cars "Car1" , "Car2" How do I design the database for this ??

    Database tutorial question database design

  • MD5 using openssl
    S shrims4u

    Thanx man... I did it but that method is a bit long using the evp.h

    C / C++ / MFC linux tutorial question

  • MD5 using openssl
    S shrims4u

    can anyone please tell me how to create the message digest using openssl library in linux.... ????

    C / C++ / MFC linux tutorial question

  • Extracting keys from digital certificates
    S shrims4u

    Thanks but can it be used in linux??? How to download dat API ???

    C / C++ / MFC cryptography json help question

  • Extracting keys from digital certificates
    S shrims4u

    Is there any API in C programming language which can help in retrieving the certificate from the keystore and aslo the keys from the certificate?????????

    C / C++ / MFC cryptography json help question

  • sending an e-mail
    S shrims4u

    Im also developing an email client adding the lines given by you it gave an error from gmail Issue STARTTLS command how to code for this??

    Java question com debugging help

  • Retrieving public key for encryption from digital certificate
    S shrims4u

    Can anyone please tell me some package for handling Digital certificates..... I want to extract the public key or private key from the digital certificate and use it for encryption and digital signature... The code is in C programming

    C / C++ / MFC cryptography security

  • Retrieving public key for encryption from digital certificate
    S shrims4u

    How to extract only the public key from any digital certificate??? I am writing an email client which sends encrypted emails in java....

    Java java security cryptography tutorial question

  • segmentation fault- gdb output : at 0x00ac315a meaning??
    S shrims4u

    how do we use a debugger???? u mean gdb ??? for debugging we have to put debugging symbols in the program??? like ifdef DEBUG ???

    C / C++ / MFC question

  • segmentation fault- gdb output : at 0x00ac315a meaning??
    S shrims4u

    Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1219208304 (LWP 3526)] 0x00ac315a in g_mime_message_get_body () from /usr/lib/libgmime-2.0.so.2 wat does dat mean??? what does the number 0x00ac315a signify..??

    C / C++ / MFC question

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    I dint understand what you want me to do...

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    will you please help me??? you understood my problem?

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    ill mail the whole program to uall Actually it is a milter which decrypts the incoming mail messages... /* sample_milter - example mail filter module ** ** Copyright © 2004 by Jef Poskanzer . ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** 1. Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** 2. Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in the ** documentation and/or other materials provided with the distribution. ** ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ** SUCH DAMAGE. ** ** For commentary on this license please see http://www.acme.com/license.html */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libmilter/mfapi.h" ////////////////////////////////////////////////////////////// #include "gmp.h" /* Forwards. */ static void usage( void ); static sfsistat sample_connect( SMFICTX* ctx, char* connhost, _SOCK_ADDR* connaddr ); static sfsistat sample_helo( SMFICTX* ctx, char* helohost ); static sfsistat sample_envfrom( SMFICTX* ctx, char** fromargs ); static sfsistat sample_envrcpt( SMFICTX* ctx, char** rcptargs ); static sfsistat sample_header( SMFICTX* ctx, char* name, char* value ); static sfsistat sample_eoh( SMFICTX* ctx ); static sfsistat sample_body( SMFICT

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    i dint understand??? wat is down voting???

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    Also i get this message from gdb..... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1218634864 (LWP 9064)] 0x06d0199c in __gmpz_powm () from /usr/lib/sse2/libgmp.so.3

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    yah the values that are passed are proper... The gdb output is as follows.... [New Thread -1208882288 (LWP 9012)] [New Thread -1208879424 (LWP 9009)] [New Thread -1219372144 (LWP 9017)] GNU MP: Cannot allocate memory (size=3368600780) Program received signal SIGABRT, Aborted. [Switching to Thread -1219372144 (LWP 9017)] 0x00110402 in __kernel_vsyscall ()

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    i am writing a milter which decrypts the email message. For decryption i am using GMP library... The code which gives the error is as follows: mpz_t bigbody,encbody,decbody,n,d,e; mpz_init_set_str (e, "5", 10); mpz_init_set_str (n, "81072118814004638617775947138239917744589505176471539666269773100315781097546894455560658571445286325125766632676152452856383447352821337178984474781813475276075048299705214136395672502245955793627681061360075723595075874516950614187016991430293887968216015097675955399134514678660046996064181098182893072761", 10); mpz_init_set_str (d, "32428847525601855447110378855295967097835802070588615866507909240126312439018757782224263428578114530050306653070460981142553378941128534871593789912725382636961637010791821646038659077539848411532121133465246631106852802485583932352673149866783600963924490576147444236696494852521901563664557493382382127469", 10); char *STR; STR=(char*)malloc(1000); mpz_t array[10]; //mpz_array_init (array, 10, 308); mpz_t array1[10]; //mpz_array_init (array1, 10, 100000); char substring[400]; int i=0,lower=0,upper=308; while(i { strncpy(substring, data_buffer + lower, upper); *(substring+308)='\0'; syslog( LOG_INFO, "conn# %d - substring = %s", cd->connection_num, substring ); lower=upper; upper=upper+308; mpz_init_set_str(array[i],substring,10); mpz_get_str (STR, 10, array[i]); strcat(STR,"\0"); syslog( LOG_INFO, "conn# %d - Encrypted-Biginteger = %s", cd->connection_num, STR ); mpz_init(array1[i]); mpz_powm (array1[i], array[i], d, n); mpz_get_str (STR, 10, array1[i]); syslog( LOG_INFO, "conn# %d - Decrypted-Biginteger = %s", cd->connection_num, STR ); size_t length; void *ret; char *decrypted; decrypted=(char*)malloc(1000); ret=mpz_export (decrypted, &length, 1,sizeof(data_buffer[0]), 0, 0, array1[i]); //ret=mpz_export (decrypted, &length, 1,sizeof(data_buffer[0]), 0, 0, array1[i]); strncpy(decrypted,ret,length); *(decrypted+length)='\0'; syslog( LOG_INFO, "conn# %d - size decrypted = %d Decrypted = %s", cd->connection_num,length, (char *)ret ); fflush(stdout); free(decrypted); fflush(stdin); mpz_clear(array[i]); mpz_clear(array1[i]); i++; } This code executes for 2 iterations and then give segmentation fault at mpz_powm( )

    Linux, Apache, MySQL, PHP data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    the value of array[i] is a bignumber.... Also d and n are initialised... The error is at mpz_powm.... you want me to write the values in numbers???? Actually it differs each time according to the message

    C / C++ / MFC data-structures help

  • segmentation error while using mpz_powm in a loop
    S shrims4u

    i am writing a milter which decrypts the email message. For decryption i am using GMP library... The code which gives the error is as follows: mpz_t bigbody,encbody,decbody,n,d,e; mpz_init_set_str (e, "5", 10); mpz_init_set_str (n, "81072118814004638617775947138239917744589505176471539666269773100315781097546894455560658571445286325125766632676152452856383447352821337178984474781813475276075048299705214136395672502245955793627681061360075723595075874516950614187016991430293887968216015097675955399134514678660046996064181098182893072761", 10); mpz_init_set_str (d, "32428847525601855447110378855295967097835802070588615866507909240126312439018757782224263428578114530050306653070460981142553378941128534871593789912725382636961637010791821646038659077539848411532121133465246631106852802485583932352673149866783600963924490576147444236696494852521901563664557493382382127469", 10); char *STR; STR=(char*)malloc(1000); mpz_t array[10]; //mpz_array_init (array, 10, 308); mpz_t array1[10]; //mpz_array_init (array1, 10, 100000); char substring[400]; int i=0,lower=0,upper=308; while(iconnection_num, substring ); lower=upper; upper=upper+308; mpz_init_set_str(array[i],substring,10); mpz_get_str (STR, 10, array[i]); strcat(STR,"\0"); syslog( LOG_INFO, "conn# %d - Encrypted-Biginteger = %s", cd->connection_num, STR ); mpz_init(array1[i]); mpz_powm (array1[i], array[i], d, n); mpz_get_str (STR, 10, array1[i]); syslog( LOG_INFO, "conn# %d - Decrypted-Biginteger = %s", cd->connection_num, STR ); size_t length; void *ret; char *decrypted; decrypted=(char*)malloc(1000); ret=mpz_export (decrypted, &length, 1,sizeof(data_buffer[0]), 0, 0, array1[i]); //ret=mpz_export (decrypted, &length, 1,sizeof(data_buffer[0]), 0, 0, array1[i]); strncpy(decrypted,ret,length); *(decrypted+length)='\0'; syslog( LOG_INFO, "conn# %d - size decrypted = %d Decrypted = %s", cd->connection_num,length, (char *)ret ); fflush(stdout); free(decrypted); fflush(stdin); mpz_clear(array[i]); mpz_clear(array1[i]); i++; } This code executes for 2 iterations and then give segmentation fault at mpz_powm( )

    C / C++ / MFC data-structures help

  • simple SMTP client ??
    S shrims4u

    I want to create a simple SMTP client which will send an email with login and password features using VC++... How can i acieve it.. Actually i want to know how do we pass messages int commant prompt using C++..so that i can pass commands like MAIL FROM MAIL TO telnet address port(25) Please help

    C / C++ / MFC question c++ help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups