diff libtomcrypt/src/pk/katja/katja_make_key.c @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 6dba84798cd5
children
line wrap: on
line diff
--- a/libtomcrypt/src/pk/katja/katja_make_key.c	Tue Jan 23 23:27:40 2018 +0800
+++ b/libtomcrypt/src/pk/katja/katja_make_key.c	Sat Feb 17 19:29:51 2018 +0800
@@ -5,19 +5,17 @@
  *
  * The library is free for all purposes without any express
  * guarantee it works.
- *
- * Tom St Denis, [email protected], http://libtom.org
  */
 #include "tomcrypt.h"
 
 /**
   @file katja_make_key.c
   Katja key generation, Tom St Denis
-*/  
+*/
 
-#ifdef MKAT
+#ifdef LTC_MKAT
 
-/** 
+/**
    Create a Katja key
    @param prng     An active PRNG state
    @param wprng    The index of the PRNG desired
@@ -29,7 +27,7 @@
 {
    void *p, *q, *tmp1, *tmp2;
    int    err;
-  
+
    LTC_ARGCHK(key != NULL);
    LTC_ARGCHK(ltc_mp.name != NULL);
 
@@ -68,7 +66,7 @@
    if ((err = mp_copy( p,  key->p)) != CRYPT_OK)                       { goto error2; }
    if ((err = mp_copy( q,  key->q)) != CRYPT_OK)                       { goto error2; }
    if ((err = mp_mul(key->p, key->q, key->pq)) != CRYPT_OK)            { goto error2; } /* tmp1 = pq  */
-   if ((err = mp_mul(key->pq, key->p, key->N)) != CRYPT_OK)            { goto error2; } /* N = p^2q   */  
+   if ((err = mp_mul(key->pq, key->p, key->N)) != CRYPT_OK)            { goto error2; } /* N = p^2q   */
    if ((err = mp_sub_d( p, 1,  tmp1)) != CRYPT_OK)                     { goto error2; } /* tmp1 = q-1 */
    if ((err = mp_sub_d( q, 1,  tmp2)) != CRYPT_OK)                     { goto error2; } /* tmp2 = p-1 */
    if ((err = mp_lcm(tmp1, tmp2, key->d)) != CRYPT_OK)                 { goto error2; } /* tmp1 = lcd(p-1,q-1) */
@@ -96,6 +94,6 @@
 
 #endif
 
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */