Lines Matching refs:bitlen
82 unsigned int bitlen, int ispub);
84 unsigned int bitlen, int ispub);
149 static unsigned int blob_length(unsigned bitlen, int isdss, int ispub) in blob_length() argument
152 nbyte = (bitlen + 7) >> 3; in blob_length()
153 hnbyte = (bitlen + 15) >> 4; in blob_length()
186 unsigned int bitlen, magic; in do_b2i() local
188 if (do_blob_header(&p, length, &magic, &bitlen, &isdss, &ispub) <= 0) { in do_b2i()
193 if (length < blob_length(bitlen, isdss, ispub)) { in do_b2i()
198 return b2i_dss(&p, bitlen, ispub); in do_b2i()
200 return b2i_rsa(&p, bitlen, ispub); in do_b2i()
207 unsigned int bitlen, magic, length; in do_b2i_bio() local
215 if (do_blob_header(&p, 16, &magic, &bitlen, &isdss, &ispub) <= 0) in do_b2i_bio()
218 length = blob_length(bitlen, isdss, ispub); in do_b2i_bio()
235 ret = b2i_dss(&p, bitlen, ispub); in do_b2i_bio()
237 ret = b2i_rsa(&p, bitlen, ispub); in do_b2i_bio()
245 unsigned int bitlen, int ispub) in b2i_dss() argument
255 nbyte = (bitlen + 7) >> 3; in b2i_dss()
320 unsigned int bitlen, int ispub) in b2i_rsa() argument
328 nbyte = (bitlen + 7) >> 3; in b2i_rsa()
329 hnbyte = (bitlen + 15) >> 4; in b2i_rsa()
430 unsigned int bitlen, magic = 0, keyalg; in do_i2b() local
434 bitlen = check_bitlen_dsa(EVP_PKEY_get0_DSA(pk), ispub, &magic); in do_i2b()
437 bitlen = check_bitlen_rsa(EVP_PKEY_get0_RSA(pk), ispub, &magic); in do_i2b()
441 if (bitlen == 0) in do_i2b()
443 outlen = 16 + blob_length(bitlen, in do_i2b()
466 write_ledword(&p, bitlen); in do_i2b()
492 int bitlen; in check_bitlen_dsa() local
498 bitlen = BN_num_bits(p); in check_bitlen_dsa()
499 if ((bitlen & 7) || (BN_num_bits(q) != 160) in check_bitlen_dsa()
500 || (BN_num_bits(g) > bitlen)) in check_bitlen_dsa()
503 if (BN_num_bits(pub_key) > bitlen) in check_bitlen_dsa()
512 return bitlen; in check_bitlen_dsa()
520 int nbyte, hnbyte, bitlen; in check_bitlen_rsa() local
526 bitlen = RSA_bits(rsa); in check_bitlen_rsa()
528 hnbyte = (bitlen + 15) >> 4; in check_bitlen_rsa()
531 return bitlen; in check_bitlen_rsa()
552 return bitlen; in check_bitlen_rsa()