- if (keystr) *keystr = p; /* point at key string, second time */
-
- for (i=1; i<=w; i++)
- bn[j][i] = 0;
- for (i=b; i-- ;) {
- unsigned char byte = *p++;
- if (i & 1)
- bn[j][1+i/2] |= byte<<8;
- else
- bn[j][1+i/2] |= byte;
- }
-
- debug(bn[j]);
-
- }
-
- result->exponent = bn[0];
- result->modulus = bn[1];
+ if (order == 0)
+ p += ssh1_read_bignum(p, &result->exponent);
+ result->bytes = (((p[0] << 8) + p[1]) + 7) / 8;
+ if (keystr) *keystr = p+2;
+ p += ssh1_read_bignum(p, &result->modulus);
+ if (order == 1)
+ p += ssh1_read_bignum(p, &result->exponent);