chiark / gitweb /
Some basic formatting fixes.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 24 Jun 2016 00:17:47 +0000 (01:17 +0100)
  * Some indentation fixes.

  * Reorder the factors in a mathsy comment to improve clarity.

math/strongprime.c
pub/rsa-gen.c

index 6acac174c49488924428ef8870c3d497776e0ef2..a2dd43858cb1d6d1ef1c624a76d97e425f335c5f 100644 (file)
@@ -88,7 +88,7 @@ mp *strongprime_setup(const char *name, mp *d, pfilt *f, unsigned nbits,
   rr = mprand(rr, nbits, r, 1);
   DRESET(&dn); dstr_putf(&dn, "%s [s]", name);
   if ((s = pgen(dn.buf, MP_NEWSEC, rr, event, ectx, n, pgen_filter, &c,
-          rabin_iters(nbits), pgen_test, &rb)) == 0)
+               rabin_iters(nbits), pgen_test, &rb)) == 0)
     goto fail_s;
 
   rr = mprand(rr, nbits, r, 1);
@@ -114,7 +114,7 @@ mp *strongprime_setup(const char *name, mp *d, pfilt *f, unsigned nbits,
 
   /* --- Select a suitable starting-point for finding %$p$% --- *
    *
-   * This computes %$p_0 = 2(s^{r - 2} \bmod r)s - 1$%.
+   * This computes %$p_0 = 2 s (s^{r - 2} \bmod r) - 1$%.
    */
 
   {
index a7a2ca4ef4955c2357e6de50d0747f916c221593..730673e33388f0be37377dd73c07d2a1ca554f27 100644 (file)
@@ -90,7 +90,7 @@ again:
     g.g = MP_NEW;
     g.max = MP_256;
     q = pgen("q", q, q, event, ectx, n, pgen_gcdstep, &g,
-                rabin_iters(nbits/2), pgen_test, &rb);
+            rabin_iters(nbits/2), pgen_test, &rb);
     pfilt_destroy(&g.jp);
     mp_drop(g.r);
     if (!q) {