-/* $OpenBSD: bn.h,v 1.73 2023/07/28 10:05:16 tb Exp $ */
+/* $OpenBSD: bn.h,v 1.74 2023/07/28 10:07:30 tb Exp $ */
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
const BIGNUM *mod, BN_CTX *ctx);
/* Primes from RFC 2409 */
-BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
-BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
/* Primes from RFC 3526 */
-BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_8192(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);
-/* $OpenBSD: bn_const.c,v 1.7 2023/07/10 03:26:30 tb Exp $ */
+/* $OpenBSD: bn_const.c,v 1.8 2023/07/28 10:07:30 tb Exp $ */
/* Insert boilerplate */
#include <openssl/bn.h>
0xA6, 0x3A, 0x36, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc2409_prime_768(BIGNUM *bn)
-{
- return BN_bin2bn(RFC2409_PRIME_768, sizeof(RFC2409_PRIME_768), bn);
-}
-LCRYPTO_ALIAS(get_rfc2409_prime_768);
-
BIGNUM *
BN_get_rfc2409_prime_768(BIGNUM *bn)
{
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc2409_prime_1024(BIGNUM *bn)
-{
- return BN_bin2bn(RFC2409_PRIME_1024, sizeof(RFC2409_PRIME_1024), bn);
-}
-LCRYPTO_ALIAS(get_rfc2409_prime_1024);
-
BIGNUM *
BN_get_rfc2409_prime_1024(BIGNUM *bn)
{
0xCA, 0x23, 0x73, 0x27, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc3526_prime_1536(BIGNUM *bn)
-{
- return BN_bin2bn(RFC3526_PRIME_1536, sizeof(RFC3526_PRIME_1536), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_1536);
-
BIGNUM *
BN_get_rfc3526_prime_1536(BIGNUM *bn)
{
0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc3526_prime_2048(BIGNUM *bn)
-{
- return BN_bin2bn(RFC3526_PRIME_2048, sizeof(RFC3526_PRIME_2048), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_2048);
-
BIGNUM *
BN_get_rfc3526_prime_2048(BIGNUM *bn)
{
0xA9, 0x3A, 0xD2, 0xCA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc3526_prime_3072(BIGNUM *bn)
-{
- return BN_bin2bn(RFC3526_PRIME_3072, sizeof(RFC3526_PRIME_3072), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_3072);
-
BIGNUM *
BN_get_rfc3526_prime_3072(BIGNUM *bn)
{
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc3526_prime_4096(BIGNUM *bn)
-{
- return BN_bin2bn(RFC3526_PRIME_4096, sizeof(RFC3526_PRIME_4096), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_4096);
-
BIGNUM *
BN_get_rfc3526_prime_4096(BIGNUM *bn)
{
0x6D, 0xCC, 0x40, 0x24, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc3526_prime_6144(BIGNUM *bn)
-{
- return BN_bin2bn(RFC3526_PRIME_6144, sizeof(RFC3526_PRIME_6144), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_6144);
-
BIGNUM *
BN_get_rfc3526_prime_6144(BIGNUM *bn)
{
0xFF, 0xFF, 0xFF, 0xFF,
};
-BIGNUM *
-get_rfc3526_prime_8192(BIGNUM *bn)
-{
- return BN_bin2bn(RFC3526_PRIME_8192, sizeof(RFC3526_PRIME_8192), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_8192);
-
BIGNUM *
BN_get_rfc3526_prime_8192(BIGNUM *bn)
{
-/* $OpenBSD: bn.h,v 1.2 2023/07/28 10:05:16 tb Exp $ */
+/* $OpenBSD: bn.h,v 1.3 2023/07/28 10:07:30 tb Exp $ */
/*
* Copyright (c) 2023 Bob Beck <beck@openbsd.org>
*
LCRYPTO_USED(BN_MONT_CTX_set);
LCRYPTO_USED(BN_MONT_CTX_copy);
LCRYPTO_USED(BN_MONT_CTX_set_locked);
-LCRYPTO_USED(get_rfc2409_prime_768);
-LCRYPTO_USED(get_rfc2409_prime_1024);
LCRYPTO_USED(BN_get_rfc2409_prime_768);
LCRYPTO_USED(BN_get_rfc2409_prime_1024);
-LCRYPTO_USED(get_rfc3526_prime_1536);
-LCRYPTO_USED(get_rfc3526_prime_2048);
-LCRYPTO_USED(get_rfc3526_prime_3072);
-LCRYPTO_USED(get_rfc3526_prime_4096);
-LCRYPTO_USED(get_rfc3526_prime_6144);
-LCRYPTO_USED(get_rfc3526_prime_8192);
LCRYPTO_USED(BN_get_rfc3526_prime_1536);
LCRYPTO_USED(BN_get_rfc3526_prime_2048);
LCRYPTO_USED(BN_get_rfc3526_prime_3072);