Lines Matching refs:PRIMEBITS
38 #define PRIMEBITS 1024
252 Ra_binary = calloc(1, PRIMEBITS/8);
257 gcry_randomize(Ra_binary, PRIMEBITS/8, GCRY_STRONG_RANDOM);
258 gcry_mpi_scan(&Ra, GCRYMPI_FMT_USG, Ra_binary, PRIMEBITS/8, NULL);
283 /* len = length of p = PRIMEBITS/8 */
284 *(u_int16_t *)rbuf = htons((u_int16_t) PRIMEBITS/8);
289 gcry_mpi_print( GCRYMPI_FMT_USG, (unsigned char *)rbuf, PRIMEBITS/8, NULL, p);
290 rbuf += PRIMEBITS/8;
291 *rbuflen += PRIMEBITS/8;
294 gcry_mpi_print( GCRYMPI_FMT_USG, (unsigned char *)rbuf, PRIMEBITS/8, &nwritten, Ma);
295 if (nwritten < PRIMEBITS/8) {
296 memmove(rbuf + (PRIMEBITS/8) - nwritten, rbuf, nwritten);
297 memset(rbuf, 0, (PRIMEBITS/8) - nwritten);
299 rbuf += PRIMEBITS/8;
300 *rbuflen += PRIMEBITS/8;
415 if (ibuflen != 2 + PRIMEBITS/8 + 16) {
425 gcry_mpi_scan(&Mb, GCRYMPI_FMT_USG, ibuf, PRIMEBITS/8, NULL);
426 ibuf += PRIMEBITS/8;
432 K_bin = calloc(1, PRIMEBITS/8);
437 gcry_mpi_print(GCRYMPI_FMT_USG, K_bin, PRIMEBITS/8, &nwritten, K);
438 if (nwritten < PRIMEBITS/8) {
439 memmove(K_bin + PRIMEBITS/8 - nwritten, K_bin, nwritten);
440 memset(K_bin, 0, PRIMEBITS/8 - nwritten);
449 gcry_md_hash_buffer(GCRY_MD_MD5, K_MD5hash, K_bin, PRIMEBITS/8);
496 gcry_mpi_print(GCRYMPI_FMT_USG, (unsigned char *)rbuf, PRIMEBITS/8, NULL, clientNonce);
928 if (dh_params_generate(PRIMEBITS) != 0) {