Re: [PATCH] cipher:pk:sexp: Remove bogus checks in SEXP parsing.

NIIBE Yutaka via Gcrypt-devel <[email protected]> Tue, 24 Jun 2025 15:23:01 +0900
Newsgroups gmane.comp.encryption.gpg.libgcrypt.devel
Message-ID <[email protected]>
Hello, again,

I wrote:
> * cipher/pubkey-util.c (_gcry_pk_util_data_to_mpi): Remove bogus check
> for VALUELEN.

I withdraw the proposal of this patch.


Jacob Bachmeyer <[email protected]> wrote:
> NACK!  NACK!  NACK!

Thank you for your feedback.

Looking the commit log and other use cases, I learned that it is the
check when we use opaque MPI; Internally, when MPI is opaque, it holds a
information of number of bits.

The check:

	8*VALUELEN < VALUELEN

detects the case where it cannot be represented by an opaque MPI.
-- 

_______________________________________________
Gcrypt-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel