]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/ec/ecx_backend.h
Fix X509_PUBKEY_cmp(), move to crypto/x509/x_pubkey.c, rename, export, and document it
[thirdparty/openssl.git] / crypto / ec / ecx_backend.h
CommitLineData
0abae163
RL
1/*
2 * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#define ISX448(id) ((id) == EVP_PKEY_X448)
11#define IS25519(id) ((id) == EVP_PKEY_X25519 || (id) == EVP_PKEY_ED25519)
12#define KEYLENID(id) (IS25519(id) ? X25519_KEYLEN \
13 : ((id) == EVP_PKEY_X448 ? X448_KEYLEN \
14 : ED448_KEYLEN))
15#define KEYNID2TYPE(id) \
48b4b104
MC
16 (IS25519(id) ? ((id) == EVP_PKEY_X25519 ? ECX_KEY_TYPE_X25519 \
17 : ECX_KEY_TYPE_ED25519) \
0abae163 18 : ((id) == EVP_PKEY_X448 ? ECX_KEY_TYPE_X448 \
48b4b104 19 : ECX_KEY_TYPE_ED448))
0abae163 20#define KEYLEN(p) KEYLENID((p)->ameth->pkey_id)