bn_gcd.c (59191) | bn_gcd.c (100936) |
---|---|
1/* crypto/bn/bn_gcd.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 154 unchanged lines hidden (view full) --- 163 if (Y == NULL) goto err; 164 165 if (in == NULL) 166 R=BN_new(); 167 else 168 R=in; 169 if (R == NULL) goto err; 170 | 1/* crypto/bn/bn_gcd.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 154 unchanged lines hidden (view full) --- 163 if (Y == NULL) goto err; 164 165 if (in == NULL) 166 R=BN_new(); 167 else 168 R=in; 169 if (R == NULL) goto err; 170 |
171 BN_zero(X); 172 BN_one(Y); | 171 if (!BN_zero(X)) goto err; 172 if (!BN_one(Y)) goto err; |
173 if (BN_copy(A,a) == NULL) goto err; 174 if (BN_copy(B,n) == NULL) goto err; 175 sign=1; 176 177 while (!BN_is_zero(B)) 178 { 179 if (!BN_div(D,M,A,B,ctx)) goto err; 180 T=A; --- 30 unchanged lines hidden --- | 173 if (BN_copy(A,a) == NULL) goto err; 174 if (BN_copy(B,n) == NULL) goto err; 175 sign=1; 176 177 while (!BN_is_zero(B)) 178 { 179 if (!BN_div(D,M,A,B,ctx)) goto err; 180 T=A; --- 30 unchanged lines hidden --- |