which MPI calculations allow the output argument to be identical to the the input arguments?

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Nov 29 06:13:45 CET 2009


Hi GCrypt folks--

The patch below adjusts a comment about MPI arithmetic to make more
sense (it doesn't mean anything to suggest that an unsigned long might
be the same as an MPI object, right?)

Is there a general agreement that gcrypt MPI calculation functions allow
their target value (w) to be the same as any of their other arguments?
are there certain calculation operations where that does not hold?

This would be useful information to include in the header of the
Calculations section of gcrypt.texi.

	--dkg



Index: mpi-add.c
===================================================================
--- mpi-add.c	(revision 1406)
+++ mpi-add.c	(working copy)
@@ -33,7 +33,7 @@

 /****************
  * Add the unsigned integer V to the mpi-integer U and store the
- * result in W. U and V may be the same.
+ * result in W. U and W may be the same.
  */
 void
 gcry_mpi_add_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned long v )





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 891 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20091129/88264806/attachment-0001.pgp>


More information about the Gcrypt-devel mailing list