mark all block comments that need format preserving so that
[openssl.git] / crypto / bn / bn_gcd.c
index 63a77d2439bf584efb087afc194b694d90ca3055..233e3f53322bd9e114ff0d815b64aa9b7001d8e9 100644 (file)
@@ -263,7 +263,8 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                if (!BN_nnmod(B, B, A, ctx)) goto err;
                }
        sign = -1;
                if (!BN_nnmod(B, B, A, ctx)) goto err;
                }
        sign = -1;
-       /* From  B = a mod |n|,  A = |n|  it follows that
+       /*-
+        * From  B = a mod |n|,  A = |n|  it follows that
         *
         *      0 <= B < A,
         *     -sign*X*a  ==  B   (mod |n|),
         *
         *      0 <= B < A,
         *     -sign*X*a  ==  B   (mod |n|),
@@ -280,7 +281,7 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                
                while (!BN_is_zero(B))
                        {
                
                while (!BN_is_zero(B))
                        {
-                       /*
+                       /*-
                         *      0 < B < |n|,
                         *      0 < A <= |n|,
                         * (1) -sign*X*a  ==  B   (mod |n|),
                         *      0 < B < |n|,
                         *      0 < A <= |n|,
                         * (1) -sign*X*a  ==  B   (mod |n|),
@@ -327,7 +328,8 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                                }
 
                        
                                }
 
                        
-                       /* We still have (1) and (2).
+                       /*-
+                        * We still have (1) and (2).
                         * Both  A  and  B  are odd.
                         * The following computations ensure that
                         *
                         * Both  A  and  B  are odd.
                         * The following computations ensure that
                         *
@@ -363,7 +365,7 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                        {
                        BIGNUM *tmp;
                        
                        {
                        BIGNUM *tmp;
                        
-                       /*
+                       /*-
                         *      0 < B < A,
                         * (*) -sign*X*a  ==  B   (mod |n|),
                         *      sign*Y*a  ==  A   (mod |n|)
                         *      0 < B < A,
                         * (*) -sign*X*a  ==  B   (mod |n|),
                         *      sign*Y*a  ==  A   (mod |n|)
@@ -410,7 +412,8 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                                if (!BN_div(D,M,A,B,ctx)) goto err;
                                }
                        
                                if (!BN_div(D,M,A,B,ctx)) goto err;
                                }
                        
-                       /* Now
+                       /*-
+                        * Now
                         *      A = D*B + M;
                         * thus we have
                         * (**)  sign*Y*a  ==  D*B + M   (mod |n|).
                         *      A = D*B + M;
                         * thus we have
                         * (**)  sign*Y*a  ==  D*B + M   (mod |n|).
@@ -423,7 +426,8 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                        B=M;
                        /* ... so we have  0 <= B < A  again */
                        
                        B=M;
                        /* ... so we have  0 <= B < A  again */
                        
-                       /* Since the former  M  is now  B  and the former  B  is now  A,
+                       /*-
+                        * Since the former  M  is now  B  and the former  B  is now  A,
                         * (**) translates into
                         *       sign*Y*a  ==  D*A + B    (mod |n|),
                         * i.e.
                         * (**) translates into
                         *       sign*Y*a  ==  D*A + B    (mod |n|),
                         * i.e.
@@ -476,7 +480,7 @@ BIGNUM *int_bn_mod_inverse(BIGNUM *in,
                        }
                }
                
                        }
                }
                
-       /*
+       /*-
         * The while loop (Euclid's algorithm) ends when
         *      A == gcd(a,n);
         * we have
         * The while loop (Euclid's algorithm) ends when
         *      A == gcd(a,n);
         * we have
@@ -565,7 +569,8 @@ static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
                if (!BN_nnmod(B, pB, A, ctx)) goto err;
                }
        sign = -1;
                if (!BN_nnmod(B, pB, A, ctx)) goto err;
                }
        sign = -1;
-       /* From  B = a mod |n|,  A = |n|  it follows that
+       /*-
+        * From  B = a mod |n|,  A = |n|  it follows that
         *
         *      0 <= B < A,
         *     -sign*X*a  ==  B   (mod |n|),
         *
         *      0 <= B < A,
         *     -sign*X*a  ==  B   (mod |n|),
@@ -576,7 +581,7 @@ static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
                {
                BIGNUM *tmp;
                
                {
                BIGNUM *tmp;
                
-               /*
+               /*-
                 *      0 < B < A,
                 * (*) -sign*X*a  ==  B   (mod |n|),
                 *      sign*Y*a  ==  A   (mod |n|)
                 *      0 < B < A,
                 * (*) -sign*X*a  ==  B   (mod |n|),
                 *      sign*Y*a  ==  A   (mod |n|)
@@ -591,7 +596,8 @@ static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
                /* (D, M) := (A/B, A%B) ... */          
                if (!BN_div(D,M,pA,B,ctx)) goto err;
                
                /* (D, M) := (A/B, A%B) ... */          
                if (!BN_div(D,M,pA,B,ctx)) goto err;
                
-               /* Now
+               /*-
+                * Now
                 *      A = D*B + M;
                 * thus we have
                 * (**)  sign*Y*a  ==  D*B + M   (mod |n|).
                 *      A = D*B + M;
                 * thus we have
                 * (**)  sign*Y*a  ==  D*B + M   (mod |n|).
@@ -604,7 +610,8 @@ static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
                B=M;
                /* ... so we have  0 <= B < A  again */
                
                B=M;
                /* ... so we have  0 <= B < A  again */
                
-               /* Since the former  M  is now  B  and the former  B  is now  A,
+               /*-
+                * Since the former  M  is now  B  and the former  B  is now  A,
                 * (**) translates into
                 *       sign*Y*a  ==  D*A + B    (mod |n|),
                 * i.e.
                 * (**) translates into
                 *       sign*Y*a  ==  D*A + B    (mod |n|),
                 * i.e.
@@ -632,7 +639,7 @@ static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
                sign = -sign;
                }
                
                sign = -sign;
                }
                
-       /*
+       /*-
         * The while loop (Euclid's algorithm) ends when
         *      A == gcd(a,n);
         * we have
         * The while loop (Euclid's algorithm) ends when
         *      A == gcd(a,n);
         * we have