Lines Matching refs:PRIMEBITS
52 #define PRIMEBITS 1024
193 ret = dh_params_generate( &p, &g, PRIMEBITS);
201 Ra_binary = calloc(1, PRIMEBITS/8);
206 gcry_randomize(Ra_binary, PRIMEBITS/8, GCRY_STRONG_RANDOM);
207 gcry_mpi_scan(&Ra, GCRYMPI_FMT_USG, Ra_binary, PRIMEBITS/8, NULL);
232 /* len = length of p = PRIMEBITS/8 */
233 *(u_int16_t *)rbuf = htons((u_int16_t) PRIMEBITS/8);
238 gcry_mpi_print( GCRYMPI_FMT_USG, (unsigned char *)rbuf, PRIMEBITS/8, NULL, p);
239 rbuf += PRIMEBITS/8;
240 *rbuflen += PRIMEBITS/8;
243 gcry_mpi_print( GCRYMPI_FMT_USG, (unsigned char *)rbuf, PRIMEBITS/8, &nwritten, Ma);
244 if (nwritten < PRIMEBITS/8) {
245 memmove(rbuf + (PRIMEBITS/8) - nwritten, rbuf, nwritten);
246 memset(rbuf, 0, (PRIMEBITS/8) - nwritten);
248 rbuf += PRIMEBITS/8;
249 *rbuflen += PRIMEBITS/8;
367 if (ibuflen != 2 + PRIMEBITS/8 + 16) {
377 gcry_mpi_scan(&Mb, GCRYMPI_FMT_USG, ibuf, PRIMEBITS/8, NULL);
378 ibuf += PRIMEBITS/8;
384 K_bin = calloc(1, PRIMEBITS/8);
389 gcry_mpi_print(GCRYMPI_FMT_USG, K_bin, PRIMEBITS/8, &nwritten, K);
390 if (nwritten < PRIMEBITS/8) {
391 memmove(K_bin + PRIMEBITS/8 - nwritten, K_bin, nwritten);
392 memset(K_bin, 0, PRIMEBITS/8 - nwritten);
403 gcry_md_hash_buffer(GCRY_MD_MD5, K_MD5hash, K_bin, PRIMEBITS/8);
450 gcry_mpi_print(GCRYMPI_FMT_USG, (unsigned char *)rbuf, PRIMEBITS/8, NULL, clientNonce);