From: Andreas Steffen Date: Sun, 24 Nov 2013 10:47:57 +0000 (+0100) Subject: Cleaned up ntru-crypto library X-Git-Tag: 5.1.2dr1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7047cda591286788fa0dc1d66c5d28ccab87b70;p=thirdparty%2Fstrongswan.git Cleaned up ntru-crypto library --- diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto.h index 7749b3b950..ebd444058e 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto.h @@ -34,9 +34,10 @@ #ifndef NTRU_CRYPTO_H #define NTRU_CRYPTO_H -#include "ntru_crypto_platform.h" #include "ntru_crypto_error.h" +#include + #include "ntru_drbg.h" #if !defined( NTRUCALL ) @@ -52,11 +53,6 @@ #endif #endif /* NTRUCALL */ -#if defined ( __cplusplus ) -extern "C" { -#endif /* __cplusplus */ - - /* parameter set ID list */ typedef enum _NTRU_ENCRYPT_PARAM_SET_ID { @@ -249,90 +245,4 @@ ntru_crypto_ntru_encrypt_keygen( in privkey_blob */ uint8_t *privkey_blob); /* out - address for private key blob */ - - -/* ntru_crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo - * - * DER-encodes an NTRUEncrypt public-key from a public-key blob into a - * SubjectPublicKeyInfo field for inclusion in an X.509 certificate. - * - * The required minimum size of the output SubjectPublicKeyInfo buffer - * (encoded_subjectPublicKeyInfo) may be queried by invoking this function - * with encoded_subjectPublicKeyInfo = NULL. In this case, no encoding is - * performed, NTRU_OK is returned, and the required minimum size for - * encoded_subjectPublicKeyInfo is returned in encoded_subjectPublicKeyInfo_len. - * - * When encoded_subjectPublicKeyInfo != NULL, at invocation - * *encoded_subjectPublicKeyInfo_len must be the size of the - * encoded_subjectPublicKeyInfo buffer. - * Upon return, it is the actual size of the encoded public key. - * - * Returns NTRU_OK if successful. - * Returns NTRU_ERROR_BASE + NTRU_BAD_PARAMETER if an argument pointer - * (other than encoded_subjectPublicKeyInfo) is NULL. - * Returns NTRU_ERROR_BASE + NTRU_BAD_LENGTH if pubkey_blob_len is zero. - * Returns NTRU_ERROR_BASE + NTRU_BAD_PUBLIC_KEY if the public-key blob is - * invalid (unknown format, corrupt, bad length). - * Returns NTRU_ERROR_BASE + NTRU_BUFFER_TOO_SMALL if the SubjectPublicKeyInfo - * buffer is too small. - */ - -NTRUCALL -ntru_crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo( - uint16_t pubkey_blob_len, /* in - no. of octets in public-key - blob */ - uint8_t const *pubkey_blob, /* in - ptr to public-key blob */ - uint16_t *encoded_subjectPublicKeyInfo_len, - /* in/out - no. of octets in encoded info, - address for no. of octets in - encoded info */ - uint8_t *encoded_subjectPublicKeyInfo); - /* out - address for encoded info */ - - -/* ntru_crypto_ntru_encrypt_SubjectPublicKeyInfo2PublicKey - * - * Decodes a DER-encoded NTRUEncrypt public-key from a - * SubjectPublicKeyInfo field in an X.509 certificate and returns the - * public-key blob itself. - * - * The required minimum size of the output public-key buffer (pubkey_blob) - * may be queried by invoking this function with pubkey_blob = NULL. - * In this case, no decoding is performed, NTRU_OK is returned, and the - * required minimum size for pubkey_blob is returned in pubkey_blob_len. - * - * When pubkey_blob != NULL, at invocation *pubkey_blob_len must be the - * size of the pubkey_blob buffer. - * Upon return, it is the actual size of the public-key blob. - * - * Returns NTRU_OK if successful. - * Returns NTRU_ERROR_BASE + NTRU_BAD_PARAMETER if an argument pointer - * (other than pubkey_blob) is NULL. - * Returns NTRU_ERROR_BASE + NTRU_BAD_ENCODING if the encoded data is - * an invalid encoding of an NTRU public key. - * Returns NTRU_ERROR_BASE + NTRU_OID_NOT_RECOGNIZED if the - * encoded data contains an OID that identifies an object other than - * an NTRU public key. - * Returns NTRU_ERROR_BASE + NTRU_BUFFER_TOO_SMALL if the pubkey_blob buffer - * is too small. - */ - -NTRUCALL -ntru_crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey( - uint8_t const *encoded_data, /* in - ptr to subjectPublicKeyInfo - in the encoded data */ - uint16_t *pubkey_blob_len, /* in/out - no. of octets in pubkey blob, - address for no. of octets in - pubkey blob */ - uint8_t *pubkey_blob, /* out - address for pubkey blob */ - uint8_t **next); /* out - address for ptr to encoded - data following the - subjectPublicKeyInfo */ - - -#if defined ( __cplusplus ) -} -#endif /* __cplusplus */ - - #endif /* NTRU_CRYPTO_H */ diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash.h index cf023f3401..6f6b4f4a7a 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash.h @@ -33,12 +33,12 @@ #ifndef NTRU_CRYPTO_HASH_H #define NTRU_CRYPTO_HASH_H -#include "ntru_crypto_platform.h" #include "ntru_crypto_error.h" #include "ntru_crypto_hash_basics.h" #include "ntru_crypto_sha1.h" #include "ntru_crypto_sha256.h" +#include /*************** * error macro * diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash_basics.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash_basics.h index 99448d1fb4..0ad09e7f34 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash_basics.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_hash_basics.h @@ -33,7 +33,7 @@ #ifndef NTRU_CRYPTO_HASH_BASICS_H #define NTRU_CRYPTO_HASH_BASICS_H -#include "ntru_crypto_platform.h" +#include /************** diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_msbyte_uint32.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_msbyte_uint32.h index 7d2b0a65e4..180bd39b19 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_msbyte_uint32.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_msbyte_uint32.h @@ -35,7 +35,7 @@ #define NTRU_CRYPTO_MSBYTE_UINT32_H -#include "ntru_crypto_platform.h" +#include /* ntru_crypto_msbyte_2_uint32() diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt.c b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt.c index 6ece9900b2..2a2304cd27 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt.c +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt.c @@ -1026,278 +1026,3 @@ ntru_crypto_ntru_encrypt_keygen( return result; } - - -/* DER-encoding prefix template for NTRU public keys, - * with parameter-set-specific fields nomalized - */ - -static uint8_t const der_prefix_template[] = { - 0x30, 0x82, - 0x00, 0x23, /* add pubkey length */ - 0x30, 0x18, 0x06, 0x0a, 0x2b, 0x06, 0x01, - 0x04, 0x01, 0xc1, 0x70, 0x01, 0x01, 0x02, /* end of NTRU OID compare */ - 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, - 0xc1, 0x70, 0x01, 0x02, - 0x00, /* set param-set DER id */ - 0x03, 0x82, - 0x00, 0x05, /* add pubkey length */ - 0x00, 0x04, 0x82, - 0x00, 0x00, /* add pubkey length */ -}; - - -/* add_16_to_8s - * - * adds a 16-bit value to two bytes - */ - -static void -add_16_to_8s( - uint16_t a, - uint8_t *b) -{ - uint16_t tmp = ((uint16_t)b[0] << 8) + b[1]; - - tmp = tmp + a; - b[0] = (uint8_t)((tmp >> 8) & 0xff); - b[1] = (uint8_t)(tmp & 0xff); -} - - -/* sub_16_from_8s - * - * subtracts a 16-bit value from two bytes - */ - -static void -sub_16_from_8s( - uint16_t a, - uint8_t *b) -{ - uint16_t tmp = ((uint16_t)b[0] << 8) + b[1]; - - tmp = tmp - a; - b[0] = (uint8_t)((tmp >> 8) & 0xff); - b[1] = (uint8_t)(tmp & 0xff); -} - - -/* ntru_crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo - * - * DER-encodes an NTRUEncrypt public-key from a public-key blob into a - * SubjectPublicKeyInfo field for inclusion in an X.509 certificate. - * - * The required minimum size of the output SubjectPublicKeyInfo buffer - * (encoded_subjectPublicKeyInfo) may be queried by invoking this function - * with encoded_subjectPublicKeyInfo = NULL. In this case, no encoding is - * performed, NTRU_OK is returned, and the required minimum size for - * encoded_subjectPublicKeyInfo is returned in encoded_subjectPublicKeyInfo_len. - * - * When encoded_subjectPublicKeyInfo != NULL, at invocation - * *encoded_subjectPublicKeyInfo_len must be the size of the - * encoded_subjectPublicKeyInfo buffer. - * Upon return, it is the actual size of the encoded public key. - * - * Returns NTRU_OK if successful. - * Returns NTRU_ERROR_BASE + NTRU_BAD_PARAMETER if an argument pointer - * (other than encoded_subjectPublicKeyInfo) is NULL. - * Returns NTRU_ERROR_BASE + NTRU_BAD_LENGTH if pubkey_blob_len is zero. - * Returns NTRU_ERROR_BASE + NTRU_BAD_PUBLIC_KEY if the public-key blob is - * invalid (unknown format, corrupt, bad length). - * Returns NTRU_ERROR_BASE + NTRU_BUFFER_TOO_SMALL if the SubjectPublicKeyInfo - * buffer is too small. - */ - -uint32_t -ntru_crypto_ntru_encrypt_publicKey2SubjectPublicKeyInfo( - uint16_t pubkey_blob_len, /* in - no. of octets in public-key - blob */ - uint8_t const *pubkey_blob, /* in - ptr to public-key blob */ - uint16_t *encoded_subjectPublicKeyInfo_len, - /* in/out - no. of octets in encoded info, - address for no. of octets in - encoded info */ - uint8_t *encoded_subjectPublicKeyInfo) - /* out - address for encoded info */ -{ - NTRU_ENCRYPT_PARAM_SET *params = NULL; - uint8_t const *pubkey_packed = NULL; - uint8_t pubkey_pack_type; - uint16_t packed_pubkey_len; - uint16_t encoded_len; - - /* check for bad parameters */ - - if (!pubkey_blob || !encoded_subjectPublicKeyInfo_len) - NTRU_RET(NTRU_BAD_PARAMETER); - if (pubkey_blob_len == 0) - NTRU_RET(NTRU_BAD_LENGTH); - - /* get a pointer to the parameter-set parameters, the packing type for - * the public key, and a pointer to the packed public key - */ - - if (!ntru_crypto_ntru_encrypt_key_parse(TRUE /* pubkey */, pubkey_blob_len, - pubkey_blob, &pubkey_pack_type, - NULL, ¶ms, &pubkey_packed, - NULL)) - NTRU_RET(NTRU_BAD_PUBLIC_KEY); - - /* return the encoded_subjectPublicKeyInfo size if requested */ - - packed_pubkey_len = (params->N * params->q_bits + 7) >> 3; - encoded_len = sizeof(der_prefix_template) + packed_pubkey_len; - if (!encoded_subjectPublicKeyInfo) { - *encoded_subjectPublicKeyInfo_len = encoded_len; - NTRU_RET(NTRU_OK); - } - - /* check the encoded_subjectPublicKeyInfo buffer size */ - - if (*encoded_subjectPublicKeyInfo_len < encoded_len) { - NTRU_RET(NTRU_BUFFER_TOO_SMALL); - } - - /* form the encoded subjectPublicKey */ - - memcpy(encoded_subjectPublicKeyInfo, der_prefix_template, - sizeof(der_prefix_template)); - add_16_to_8s(packed_pubkey_len, encoded_subjectPublicKeyInfo + 2); - add_16_to_8s(packed_pubkey_len, encoded_subjectPublicKeyInfo + 32); - add_16_to_8s(packed_pubkey_len, encoded_subjectPublicKeyInfo + 37); - encoded_subjectPublicKeyInfo[29] = params->der_id; - memcpy(encoded_subjectPublicKeyInfo + sizeof(der_prefix_template), - pubkey_packed, packed_pubkey_len); - - *encoded_subjectPublicKeyInfo_len = encoded_len; - - NTRU_RET(NTRU_OK); -} - - -/* ntru_crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey - * - * Decodes a DER-encoded NTRUEncrypt public-key from a - * SubjectPublicKeyInfo field in an X.509 certificate and returns the - * public-key blob itself. - * - * The required minimum size of the output public-key buffer (pubkey_blob) - * may be queried by invoking this function with pubkey_blob = NULL. - * In this case, no decoding is performed, NTRU_OK is returned, and the - * required minimum size for pubkey_blob is returned in pubkey_blob_len. - * - * When pubkey_blob != NULL, at invocation *pubkey_blob_len must be the - * size of the pubkey_blob buffer. - * Upon return, it is the actual size of the public-key blob. - * - * Returns NTRU_OK if successful. - * Returns NTRU_ERROR_BASE + NTRU_BAD_PARAMETER if an argument pointer - * (other than pubkey_blob) is NULL. - * Returns NTRU_ERROR_BASE + NTRU_BAD_ENCODING if the encoded data is - * an invalid encoding of an NTRU public key. - * Returns NTRU_ERROR_BASE + NTRU_OID_NOT_RECOGNIZED if the - * encoded data contains an OID that identifies an object other than - * an NTRU public key. - * Returns NTRU_ERROR_BASE + NTRU_BUFFER_TOO_SMALL if the pubkey_blob buffer - * is too small. - */ - -uint32_t -ntru_crypto_ntru_encrypt_subjectPublicKeyInfo2PublicKey( - uint8_t const *encoded_data, /* in - ptr to subjectPublicKeyInfo - in the encoded data */ - uint16_t *pubkey_blob_len, /* in/out - no. of octets in pubkey blob, - address for no. of octets in - pubkey blob */ - uint8_t *pubkey_blob, /* out - address for pubkey blob */ - uint8_t **next) /* out - address for ptr to encoded - data following the - subjectPublicKeyInfo */ -{ - NTRU_ENCRYPT_PARAM_SET *params = NULL; - uint8_t prefix_buf[39]; - bool der_id_valid; - uint16_t packed_pubkey_len = 0; - uint8_t pubkey_pack_type; - uint16_t public_key_blob_len; - - /* check for bad parameters */ - - if (!encoded_data || !pubkey_blob_len || !next) - NTRU_RET(NTRU_BAD_PARAMETER); - - /* determine if data to be decoded is a valid encoding of an NTRU - * public key - */ - - memcpy(prefix_buf, encoded_data, sizeof(prefix_buf)); - - /* get a pointer to the parameter-set parameters */ - - if ((params = ntru_encrypt_get_params_with_DER_id(encoded_data[29])) == - NULL) { - der_id_valid = FALSE; - - /* normalize the prefix-buffer data used in an NTRU OID comparison */ - - prefix_buf[2] = der_prefix_template[2]; - prefix_buf[3] = der_prefix_template[3]; - - } else { - der_id_valid = TRUE; - - /* normalize the prefix-buffer data for the specific parameter set */ - - packed_pubkey_len = (params->N * params->q_bits + 7) >> 3; - sub_16_from_8s(packed_pubkey_len, prefix_buf + 2); - sub_16_from_8s(packed_pubkey_len, prefix_buf + 32); - sub_16_from_8s(packed_pubkey_len, prefix_buf + 37); - prefix_buf[29] = 0; - } - - /* validate the DER prefix encoding */ - - if (!der_id_valid || memcmp(prefix_buf, der_prefix_template, - sizeof(der_prefix_template))) { - - /* bad DER prefix, so determine if this is a bad NTRU encoding or an - * unknown OID by comparing the first 18 octets - */ - - if (memcmp(prefix_buf, der_prefix_template, 18)) - NTRU_RET(NTRU_OID_NOT_RECOGNIZED); - else - NTRU_RET(NTRU_BAD_ENCODING); - } - - /* get public key packing type and blob length */ - - ntru_crypto_ntru_encrypt_key_get_blob_params(params, &pubkey_pack_type, - &public_key_blob_len, NULL, - NULL); - - /* return the pubkey_blob size if requested */ - - if (!pubkey_blob) { - *pubkey_blob_len = public_key_blob_len; - NTRU_RET(NTRU_OK); - } - - /* check size of output buffer */ - - if (*pubkey_blob_len < public_key_blob_len) - NTRU_RET(NTRU_BUFFER_TOO_SMALL); - - /* create the public-key blob */ - - ntru_crypto_ntru_encrypt_key_recreate_pubkey_blob(params, packed_pubkey_len, - encoded_data + sizeof(der_prefix_template), - pubkey_pack_type, pubkey_blob); - *pubkey_blob_len = public_key_blob_len; - - *next = *next + sizeof(der_prefix_template) + packed_pubkey_len; - - NTRU_RET(NTRU_OK); -} - diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_key.c b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_key.c index b44ca81d78..90baaadf31 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_key.c +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_key.c @@ -290,43 +290,6 @@ ntru_crypto_ntru_encrypt_key_create_pubkey_blob( } -/* ntru_crypto_ntru_encrypt_key_recreate_pubkey_blob - * - * Returns a public key blob, recreated from an already-packed public key. - */ - -void -ntru_crypto_ntru_encrypt_key_recreate_pubkey_blob( - NTRU_ENCRYPT_PARAM_SET const *params, /* in - pointer to - param set - parameters */ - uint16_t packed_pubkey_len, /* in - no. octets in - packed pubkey */ - uint8_t const *packed_pubkey, /* in - pointer to the - packed pubkey */ - uint8_t pubkey_pack_type, /* out - pubkey packing - type */ - uint8_t *pubkey_blob) /* out - addr for the - pubkey blob */ -{ - assert(params); - assert(packed_pubkey); - assert(pubkey_blob); - - switch (pubkey_pack_type) { - case NTRU_ENCRYPT_KEY_PACKED_COEFFICIENTS: - *pubkey_blob++ = NTRU_ENCRYPT_PUBKEY_TAG; - *pubkey_blob++ = (uint8_t)sizeof(params->OID); - memcpy(pubkey_blob, params->OID, sizeof(params->OID)); - pubkey_blob += sizeof(params->OID); - memcpy(pubkey_blob, packed_pubkey, packed_pubkey_len); - break; - default: - assert(FALSE); - } -} - - /* ntru_crypto_ntru_encrypt_key_create_privkey_blob * * Returns a private key blob, packed according to the packing type provided. diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_param_sets.c b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_param_sets.c index d99b7d6c49..fbbf810ae5 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_param_sets.c +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_ntru_encrypt_param_sets.c @@ -430,28 +430,3 @@ ntru_encrypt_get_params_with_OID( return NULL; } - -/* ntru_encrypt_get_params_with_DER_id - * - * Looks up a set of NTRUEncrypt parameters based on the DER id of the - * parameter set. - * - * Returns a pointer to the parameter set parameters if successful. - * Returns NULL if the parameter set cannot be found. - */ - -NTRU_ENCRYPT_PARAM_SET * -ntru_encrypt_get_params_with_DER_id( - uint8_t der_id) /* in - parameter-set DER id */ -{ - size_t i; - - for (i = 0; i < numParamSets; i++) { - if (ntruParamSets[i].der_id == der_id) { - return &(ntruParamSets[i]); - } - } - return NULL; -} - - diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_platform.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_platform.h deleted file mode 100644 index b236cfe698..0000000000 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_platform.h +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** - * NTRU Cryptography Reference Source Code - * Copyright (c) 2009-2013, by Security Innovation, Inc. All rights reserved. - * - * ntru_crypto_platform.h is a component of ntru-crypto. - * - * Copyright (C) 2009-2013 Security Innovation - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - *****************************************************************************/ - - -/****************************************************************************** - * - * File: ntru_crypto_platform.h - * - * Contents: Platform-specific basic definitions. - * - *****************************************************************************/ - -#ifndef NTRU_CRYPTO_PLATFORM_H -#define NTRU_CRYPTO_PLATFORM_H - -#include - -#endif /* NTRU_CRYPTO_PLATFORM_H */ diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha1.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha1.h index fbb2e46174..5555317226 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha1.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha1.h @@ -34,9 +34,9 @@ #define NTRU_CRYPTO_SHA1_H -#include "ntru_crypto_platform.h" #include "ntru_crypto_sha.h" +#include /****************************************** * macros needed for generic hash objects * diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha2.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha2.h index 8b0de65b3a..24d6483a7b 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha2.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha2.h @@ -34,9 +34,9 @@ #define NTRU_CRYPTO_SHA2_H -#include "ntru_crypto_platform.h" #include "ntru_crypto_sha.h" +#include /************************* * structure definitions * diff --git a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha256.h b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha256.h index db4e857475..05b19b5e89 100644 --- a/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha256.h +++ b/src/libstrongswan/plugins/ntru/ntru_crypto/ntru_crypto_sha256.h @@ -35,9 +35,9 @@ #define CRYPTO_SHA256_H -#include "ntru_crypto_platform.h" #include "ntru_crypto_sha2.h" +#include /****************************************** * macros needed for generic hash objects *