---
name: "DH_get_1024_160"
section: "3ssl"
platform: "linux"
package: "openssl"
version: "3.6.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/DH_get_1024_160"
---

# DH\_get\_1024\_160(3ssl)

Create standardized public primes or DH pairs

## NAME

DH\_get\_1024\_160, DH\_get\_2048\_224, DH\_get\_2048\_256, BN\_get0\_nist\_prime\_192, BN\_get0\_nist\_prime\_224, BN\_get0\_nist\_prime\_256, BN\_get0\_nist\_prime\_384, BN\_get0\_nist\_prime\_521, BN\_get\_rfc2409\_prime\_768, BN\_get\_rfc2409\_prime\_1024, BN\_get\_rfc3526\_prime\_1536, BN\_get\_rfc3526\_prime\_2048, BN\_get\_rfc3526\_prime\_3072, BN\_get\_rfc3526\_prime\_4096, BN\_get\_rfc3526\_prime\_6144, BN\_get\_rfc3526\_prime\_8192 - Create standardized public primes or DH pairs

## SYNOPSIS

```
 #include <openssl/dh.h>
 const BIGNUM *BN_get0_nist_prime_192(void);
 const BIGNUM *BN_get0_nist_prime_224(void);
 const BIGNUM *BN_get0_nist_prime_256(void);
 const BIGNUM *BN_get0_nist_prime_384(void);
 const BIGNUM *BN_get0_nist_prime_521(void);
 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
```

The following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by defining **OPENSSL\_API\_COMPAT** with a suitable version value, see **openssl\_user\_macros**(7):

```
 #include <openssl/dh.h>
 DH *DH_get_1024_160(void);
 DH *DH_get_2048_224(void);
 DH *DH_get_2048_256(void);
```

## DESCRIPTION

**DH\_get\_1024\_160()**, **DH\_get\_2048\_224()**, and **DH\_get\_2048\_256()** each return a DH object for the IETF RFC 5114 value. These functions are deprecated. Applications should instead use **EVP\_PKEY\_CTX\_set\_dh\_rfc5114()** and **EVP\_PKEY\_CTX\_set\_dhx\_rfc5114()** as described in **EVP\_PKEY\_CTX\_ctrl**(3) or by setting the **OSSL\_PKEY\_PARAM\_GROUP\_NAME** as specified in "DH parameters" in **EVP\_PKEY-DH**(7)) to one of "dh\_1024\_160", "dh\_2048\_224" or "dh\_2048\_256".

**BN\_get0\_nist\_prime\_192()**, **BN\_get0\_nist\_prime\_224()**, **BN\_get0\_nist\_prime\_256()**, **BN\_get0\_nist\_prime\_384()**, and **BN\_get0\_nist\_prime\_521()** functions return a BIGNUM for the specific NIST prime curve (e.g., P-256).

**BN\_get\_rfc2409\_prime\_768()**, **BN\_get\_rfc2409\_prime\_1024()**, **BN\_get\_rfc3526\_prime\_1536()**, **BN\_get\_rfc3526\_prime\_2048()**, **BN\_get\_rfc3526\_prime\_3072()**, **BN\_get\_rfc3526\_prime\_4096()**, **BN\_get\_rfc3526\_prime\_6144()**, and **BN\_get\_rfc3526\_prime\_8192()** functions return a BIGNUM for the specified size from IETF RFC 2409.  If **bn** is not NULL, the BIGNUM will be set into that location as well.

## RETURN VALUES

Defined above.

## HISTORY

The functions **DH\_get\_1024\_160()**, **DH\_get\_2048\_224()** and **DH\_get\_2048\_256()** were deprecated in OpenSSL 3.0.

## COPYRIGHT

Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License").  You may not use this file except in compliance with the License.  You can obtain a copy in the file LICENSE in the source distribution or at \<https://www.openssl.org/source/license.html\>.
