[svn] gcry - r1394 - in trunk: . cipher doc src

svn author wk cvs at cvs.gnupg.org
Sun May 10 18:27:32 CEST 2009


Author: wk
Date: 2009-05-10 18:27:32 +0200 (Sun, 10 May 2009)
New Revision: 1394

Modified:
   trunk/ChangeLog
   trunk/README
   trunk/cipher/ChangeLog
   trunk/cipher/rsa.c
   trunk/doc/ChangeLog
   trunk/doc/gcrypt.texi
   trunk/src/gcrypt.h.in
Log:
Doc fixes.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/ChangeLog	2009-05-10 16:27:32 UTC (rev 1394)
@@ -1,3 +1,7 @@
+2009-04-23  Werner Koch  <wk at g10code.com>
+
+	* README: Add a section on build problems.
+
 2009-01-22  Werner Koch  <wk at g10code.com>
 
 	* configure.ac: Bump LT version to C17/A7/R0 to mark the start of

Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/cipher/ChangeLog	2009-05-10 16:27:32 UTC (rev 1394)
@@ -1,3 +1,8 @@
+2009-03-31  Werner Koch  <wk at g10code.com>
+
+	* rsa.c (rsa_check_secret_key): Return GPG_ERR_BAD_SECKEY and not
+	GPG_ERR_PUBKEY_ALGO.
+
 2009-02-16  Werner Koch  <wk at g10code.com>
 
 	* rsa.c (generate_x931): Do not initialize TBL with automatic

Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/doc/ChangeLog	2009-05-10 16:27:32 UTC (rev 1394)
@@ -1,3 +1,12 @@
+2009-05-10  Werner Koch  <wk at g10code.com>
+
+	* gcrypt.texi (Working with cipher handles): Clarified that
+	keylengths are in bytes.
+
+2009-04-02  Werner Koch  <wk at g10code.com>
+
+	* gcrypt.texi (Self-Tests): Fix register fucntion names.
+
 2009-02-22  Werner Koch  <wk at g10code.com>
 
 	* gcrypt.texi (Memory allocation): Fix describion of gcry-calloc.

Modified: trunk/README
===================================================================
--- trunk/README	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/README	2009-05-10 16:27:32 UTC (rev 1394)
@@ -73,8 +73,8 @@
       cd doc
       make pdf
 
+      
 
-
     Mailing List
     ------------
 
@@ -132,7 +132,7 @@
                      time.  This is helpful to create OS X fat binaries.
 
      --enable-random-daemon
-                     Include support for a global random damon and
+                     Include support for a global random daemon and
                      build the daemon.  This is an experimental feature.
 
      --enable-mpi-path=EXTRA_PATH
@@ -170,9 +170,54 @@
                      available.  Try this if you get problems with
                      assembler code.
 
-       
 
+    Build Problems
+    --------------
 
+    We can't check all assembler files, so if you have problems
+    assembling them (or the program crashes) use --disable-asm with
+    ./configure.  If you opt to delete individual replacement files in
+    hopes of using the remaining ones, be aware that the configure
+    scripts may consider several subdirectories to get all available
+    assembler files; be sure to delete the correct ones.  Never delete
+    udiv-qrnnd.S in any CPU directory, because there may be no C
+    substitute (in mpi/genereic).  Don't forget to delete
+    "config.cache" and run "./config.status --recheck".  We got a few
+    reports about problems using versions of gcc earlier than 2.96
+    along with a non-GNU assembler (as).  If this applies to your
+    platform, you can either upgrade gcc to a more recent version, or
+    use the GNU assembler.
+
+    Some make tools are broken - the best solution is to use GNU's
+    make.  Try gmake or grab the sources from a GNU archive and
+    install them.
+
+    If you are cross-compiling and you get an error either building a
+    tool called "yat2m" or running that tool, the problem is most
+    likely a bad or missing native compiler.  We require a standard
+    C-89 compiler to produce an executable to be run on the build
+    platform.  You can explicitly set such a compiler with configure
+    arguments. On HP/UX you might want to try: "CC_FOR_BUILD=c89".
+
+    Specific problems on some machines:
+
+      * IBM RS/6000 running AIX
+
+	Due to a change in gcc (since version 2.8) the MPI stuff may
+	not build. In this case try to run configure using:
+	    CFLAGS="-g -O2 -mcpu=powerpc" ./configure
+
+      * SVR4.2 (ESIX V4.2 cc)
+
+        Due to problems with the ESIX as(1), you probably want to do:
+            CFLAGS="-O -K pentium" ./configure --disable-asm
+
+      * SunOS 4.1.4
+      
+         ./configure ac_cv_sys_symbol_underscore=yes
+
+
+
     License
     -------
     

Modified: trunk/cipher/rsa.c
===================================================================
--- trunk/cipher/rsa.c	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/cipher/rsa.c	2009-05-10 16:27:32 UTC (rev 1394)
@@ -886,7 +886,7 @@
     err = GPG_ERR_NO_OBJ;  /* To check the key we need the optional
                               parameters. */
   else if (!check_secret_key (&sk))
-    err = GPG_ERR_PUBKEY_ALGO;
+    err = GPG_ERR_BAD_SECKEY;
 
   return err;
 }

Modified: trunk/doc/gcrypt.texi
===================================================================
--- trunk/doc/gcrypt.texi	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/doc/gcrypt.texi	2009-05-10 16:27:32 UTC (rev 1394)
@@ -12,7 +12,7 @@
 (version @value{VERSION}, @value{UPDATED}),
 which is GNU's library of cryptographic building blocks.
 
-Copyright @copyright{} 2000, 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 2000, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -1703,11 +1703,11 @@
 @deftypefun gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t @var{h}, const void *@var{k}, size_t @var{l})
 
 Set the key @var{k} used for encryption or decryption in the context
-denoted by the handle @var{h}.  The length @var{l} of the key @var{k}
-must match the required length of the algorithm set for this context or
-be in the allowed range for algorithms with variable key size.  The
-function checks this and returns an error if there is a problem.  A
-caller should always check for an error.
+denoted by the handle @var{h}.  The length @var{l} (in bytes) of the
+key @var{k} must match the required length of the algorithm set for
+this context or be in the allowed range for algorithms with variable
+key size.  The function checks this and returns an error if there is a
+problem.  A caller should always check for an error.
 
 @end deftypefun
 
@@ -1719,18 +1719,18 @@
 @deftypefun gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t @var{h}, const void *@var{k}, size_t @var{l})
 
 Set the initialization vector used for encryption or decryption. The
-vector is passed as the buffer @var{K} of length @var{l} and copied to
-internal data structures.  The function checks that the IV matches the
-requirement of the selected algorithm and mode. 
+vector is passed as the buffer @var{K} of length @var{l} bytes and
+copied to internal data structures.  The function checks that the IV
+matches the requirement of the selected algorithm and mode.
 @end deftypefun
 
 @deftypefun gcry_error_t gcry_cipher_setctr (gcry_cipher_hd_t @var{h}, const void *@var{c}, size_t @var{l})
 
 Set the counter vector used for encryption or decryption. The counter
-is passed as the buffer @var{c} of length @var{l} and copied to
+is passed as the buffer @var{c} of length @var{l} bytes and copied to
 internal data structures.  The function checks that the counter
 matches the requirement of the selected algorithm (i.e., it must be
-the same size as the block size).  
+the same size as the block size).
 @end deftypefun
 
 @deftypefun gcry_error_t gcry_cipher_reset (gcry_cipher_hd_t @var{h})
@@ -3639,8 +3639,9 @@
 
 @deftypefun gcry_error_t gcry_md_setkey (gcry_md_hd_t @var{h}, const void *@var{key}, size_t @var{keylen})
 
-For use with the HMAC feature, set the MAC key to the value of @var{key}
-of length @var{keylen}.  There is no restriction on the length of the key.
+For use with the HMAC feature, set the MAC key to the value of
+ at var{key} of length @var{keylen} bytes.  There is no restriction on
+the length of the key.
 @end deftypefun
 
 
@@ -5401,9 +5402,9 @@
 
 Loading of extra modules into libgcrypt is disabled in FIPS mode and
 thus no tests are
-implemented. (@code{cipher/@/cipher.c:@/gcry_cipher_register},
- at code{cipher/@/md.c:@/gcry_md_register},
- at code{cipher/@/md.c:@/gcry_pk_register})
+implemented. (@code{cipher/@/cipher.c:@/_gcry_cipher_register},
+ at code{cipher/@/md.c:@/_gcry_md_register},
+ at code{cipher/@/pubkey.c:@/_gcry_pk_register})
 
 
 @subsection Manual Key Entry Tests

Modified: trunk/src/gcrypt.h.in
===================================================================
--- trunk/src/gcrypt.h.in	2009-04-02 10:25:57 UTC (rev 1393)
+++ trunk/src/gcrypt.h.in	2009-05-10 16:27:32 UTC (rev 1394)
@@ -909,7 +909,7 @@
                                   void *out, size_t outsize,
                                   const void *in, size_t inlen);
 
-/* Set KEY of length KEYLEN for the cipher handle HD.  */
+/* Set KEY of length KEYLEN bytes for the cipher handle HD.  */
 gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t hd,
                                  const void *key, size_t keylen);
 
@@ -935,10 +935,10 @@
 gpg_error_t gcry_cipher_setctr (gcry_cipher_hd_t hd,
                                 const void *ctr, size_t ctrlen);
 
-/* Retrieved the key length used with algorithm A. */
+/* Retrieved the key length in bytes used with algorithm A. */
 size_t gcry_cipher_get_algo_keylen (int algo);
 
-/* Retrieve the block length used with algorithm A. */
+/* Retrieve the block length in bytes used with algorithm A. */
 size_t gcry_cipher_get_algo_blklen (int algo);
 
 /* Return 0 if the algorithm A is available for use. */
@@ -1174,7 +1174,7 @@
 int gcry_md_map_name (const char* name) _GCRY_GCC_ATTR_PURE;
 
 /* For use with the HMAC feature, the set MAC key to the KEY of
-   KEYLEN. */
+   KEYLEN bytes. */
 gcry_error_t gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen);
 
 /* Start or stop debugging for digest handle HD; i.e. create a file




More information about the Gnupg-commits mailing list