LTC_ARGCHK

1,026 views
Skip to first unread message

orcun

unread,
Apr 29, 2008, 3:47:49 AM4/29/08
to LibTom Projects
Hi all;
This is my first post to group. I am using rsa_make_key function of
tomcrypt library under linux. Normally i am using my own prng_state.
In this case i am getting memory corruption error while xcollac
function called in init function. The call stack is lake that:
rsa_make_key
mp_init_multi called
ltc_init_multi
mp_init called
init (ltm_desc.c)

Then i tried the example code of rsa_make_key function.

#include <tomcrypt.h>
#include <stdio.h>

int main(void) {
rsa_key key;
int err;
register_prng(&sprng_desc);
if ((err = rsa_make_key(NULL, find_prng("sprng"), 1024/8, 65537,
&key))
!= CRYPT_OK) {
printf("make_key error: %s\n", error_to_string(err));
return -1;
}
/* use the key ... */
return 0;

}

But i get "LTC_ARGCHK 'ltc_mp.name != NULL' failure on line 34 of file
src/pk/rsa/rsa_make_key.c" error.

Do you have any idea for my situation

Li Victor

unread,
Apr 29, 2008, 4:48:52 AM4/29/08
to lib...@googlegroups.com
Hello:
I am sorry that I have the same problem with you when using ecc_make_key function, and I have no idea how to solve it.

 
2008/4/29, orcun <orcune...@gmail.com>:
//////////////////////////////////////

orcun ertugrul

unread,
Apr 29, 2008, 9:31:07 AM4/29/08
to lib...@googlegroups.com

we are using same rsa_make_key function in windows environment without a problem. Have you been struggling with that problem for a long time. Or is it a new issue for you.

----- Original Message ----
2008/4/29, orcun <orcune...@gmail.com>:

Sent from Yahoo! Mail.
A Smarter Email.

Li Victor

unread,
Apr 29, 2008, 9:33:11 AM4/29/08
to lib...@googlegroups.com
But I am running the programming in VC++6.0 in windows environment.

2008/4/29, orcun ertugrul <orcune...@yahoo.co.uk>:
2008/4/29, orcun <orcune...@gmail.com>:

//------电子与信息学院------//
//------------李建生-------------//
//////////////////////////////////////

Patrick

unread,
Apr 29, 2008, 6:39:23 PM4/29/08
to lib...@googlegroups.com
Make sure you have initialized the math library properly.

Your program needs to have a line something like

ltc_mp = tfm_desc;

If you look through the documentation you will find this clearly explained.

-Patrick

Li Victor

unread,
Apr 29, 2008, 9:45:22 PM4/29/08
to lib...@googlegroups.com
Thank you. I will have a try..

2008/4/30, Patrick <oc...@gmx.net>:
//////////////////////////////////////

orcun ertugrul

unread,
Apr 30, 2008, 1:16:21 AM4/30/08
to lib...@googlegroups.com
I have the the line "ltc_mp = tfm_desc;"

sangee...@gmail.com

unread,
Mar 8, 2016, 4:09:07 AM3/8/16
to LibTom Projects

i also stuck with same error. i too have ltc_mp=tem_desc... how it is solved? please reply.

Steffen Jaeckel

unread,
Mar 8, 2016, 4:27:07 AM3/8/16
to lib...@googlegroups.com
On 08.03.2016 10:09, sangee...@gmail.com wrote:
>
> i also stuck with same error. i too have ltc_mp=tem_desc... how it is
> solved? please reply.
> On Wednesday, 30 April 2008 10:46:21 UTC+5:30, orcun ertugrul wrote:
>
> I have the the line "ltc_mp = tfm_desc;"
>
> ----- Original Message ----
> From: Patrick <oc...@gmx.net <javascript:>>
> To: lib...@googlegroups.com <javascript:>
> Sent: Wednesday, 30 April, 2008 1:39:23 AM
> Subject: Re: LTC_ARGCHK
>
>
> Make sure you have initialized the math library properly.
>
> Your program needs to have a line something like
>
> ltc_mp = tfm_desc;
>
> If you look through the documentation you will find this clearly
> explained.
>
> -Patrick
>

FYI: If you continue asking instead of reading trivial stuff I'll block
you from this list.


--
Steffen Jaeckel - s_ja...@gmx.de
GnuPG fingerprint: C438 6A23 7ED4 3A47 5541 B942 7B2C D0DD 4BCF F59B
My OTR key has changed on 30. Sept. 2015!
jabber: jae...@jabber.ccc.de F052DE29 4FA9A02D 44A794E5 AE5AC0FB C5865C64

Sangeetha B

unread,
Mar 8, 2016, 6:58:56 AM3/8/16
to lib...@googlegroups.com
sorry sir. it is a typo. 
#ifdef USE_TFM 
      ltc_mp = tfm_desc;
#endif
  present in my code as well. still i got that error.

--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
---
You received this message because you are subscribed to a topic in the Google Groups "LibTom Projects" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/libtom/JMZ6fSRj5Zg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to libtom+un...@googlegroups.com.
To post to this group, send email to lib...@googlegroups.com.
Visit this group at https://groups.google.com/group/libtom.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages