Manuel Pégourié-Gonnard | a6916fa | 2014-05-02 15:17:29 +0200 | [diff] [blame^] | 1 | /** |
| 2 | * \file ccm.h |
| 3 | * |
| 4 | * \brief Counter with CBC-MAC (CCM) for 128-bit block ciphers |
| 5 | * |
| 6 | * Copyright (C) 2014, Brainspark B.V. |
| 7 | * |
| 8 | * This file is part of PolarSSL (http://www.polarssl.org) |
| 9 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
| 10 | * |
| 11 | * All rights reserved. |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation; either version 2 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License along |
| 24 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 25 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 26 | */ |
| 27 | #ifndef POLARSSL_CCM_H |
| 28 | #define POLARSSL_CCM_H |
| 29 | |
| 30 | #include "cipher.h" |
| 31 | |
| 32 | #define POLARSSL_ERR_CCM_BAD_INPUT -0x000D /**< Bad input parameters to function. */ |
| 33 | #define POLARSSL_ERR_CCM_AUTH_FAILED -0x000F /**< Authenticated decryption failed. */ |
| 34 | |
| 35 | #ifdef __cplusplus |
| 36 | extern "C" { |
| 37 | #endif |
| 38 | |
| 39 | #if defined(POLARSSL_SELF_TEST) && defined(POLARSSL_AES_C) |
| 40 | /** |
| 41 | * \brief Checkup routine |
| 42 | * |
| 43 | * \return 0 if successful, or 1 if the test failed |
| 44 | */ |
| 45 | int ccm_self_test( int verbose ); |
| 46 | #endif /* POLARSSL_SELF_TEST && POLARSSL_AES_C */ |
| 47 | |
| 48 | #ifdef __cplusplus |
| 49 | } |
| 50 | #endif |
| 51 | |
| 52 | #endif /* POLARSSL_CGM_H */ |