Fatal error: out of core in secure memory - during decrypt function call

Moritz Schulte moritz@duesseldorf.ccc.de
Sat, 17 May 2003 15:28:19 +0200


Hi Warren,

sorry for the late reply.

> Does the problem with the library code extend into the creation of
> the mpi / sexp of the source data, or is it only the creation of the
> key that is corrupted?

I am pretty sure that the problem is the input data.  In short: it is
too short.  In rsa.c::secret() we use an optimized RSA algorithm that
obviously fails for `small' numbers.  I cannot tell right now, where
exactly the algorithm fails, I am still trying to find out.

> If the key is the problem

As I said, I think your problem is caused by your input data, not by
your key.

> I also see the testKey() result of the key pair is sane, but the
> testKey of only pubKey returns [65], invalid object... Is that part
> of the same mpi math error?

Oh, seems that the documentation is a bit bogus: as the comment in
pubkey.c::gcry_pk_testkey says, at the moment `only secret key
checking' is supported.  I will include this comment in the manual.

> I've included the more current / modular version of the program.  It
> now ends with a different error, but I'm not sure if it's due to the
> same problem, or something else...

Oh.  I will have a look at it; what I have written above applies to
the first program and the triggered bug.

		moritz
-- 
moritz@duesseldorf.ccc.de - http://duesseldorf.ccc.de/~moritz/
GPG fingerprint = 3A14 3923 15BE FD57 FC06  B501 0841 2D7B 6F98 4199