Lines Matching refs:nbyte
94 static int read_lebn(const unsigned char **in, unsigned int nbyte, BIGNUM **r)
99 p = *in + nbyte - 1;
100 tmpbuf = OPENSSL_malloc(nbyte);
104 for (i = 0; i < nbyte; i++)
106 *r = BN_bin2bn(tmpbuf, nbyte, NULL);
109 *in += nbyte;
207 unsigned int nbyte, hnbyte;
208 nbyte = (bitlen + 7) >> 3;
217 return 44 + 3 * nbyte;
223 return 64 + 2 * nbyte;
227 return 4 + nbyte;
233 return 4 + 2 * nbyte + 5 * hnbyte;
304 unsigned int nbyte;
305 nbyte = (bitlen + 7) >> 3;
311 if (!read_lebn(&p, nbyte, &dsa->p))
315 if (!read_lebn(&p, nbyte, &dsa->g))
318 if (!read_lebn(&p, nbyte, &dsa->pub_key))
357 unsigned int nbyte, hnbyte;
358 nbyte = (bitlen + 7) >> 3;
369 if (!read_lebn(&p, nbyte, &rsa->n))
382 if (!read_lebn(&p, nbyte, &rsa->d))
545 int nbyte, hnbyte, bitlen;
549 nbyte = BN_num_bytes(rsa->n);
557 * For private key each component must fit within nbyte or hnbyte.
559 if (BN_num_bytes(rsa->d) > nbyte)
576 int nbyte, hnbyte;
577 nbyte = BN_num_bytes(rsa->n);
588 write_lebn(out, rsa->d, nbyte);
593 int nbyte;
594 nbyte = BN_num_bytes(dsa->p);
595 write_lebn(out, dsa->p, nbyte);
597 write_lebn(out, dsa->g, nbyte);
599 write_lebn(out, dsa->pub_key, nbyte);