]>
git.zerfleddert.de Git - proxmark3-svn/blob - common/mbedtls/platform_util_arm.h
2 * \file platform_util.h
4 * \brief Common and shared functions used by multiple modules in the Mbed TLS
8 * Copyright (C) 2018, Arm Limited, All Rights Reserved
9 * SPDX-License-Identifier: GPL-2.0
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 * This file is part of Mbed TLS (https://tls.mbed.org)
27 #ifndef MBEDTLS_PLATFORM_UTIL_H
28 #define MBEDTLS_PLATFORM_UTIL_H
37 * \brief Securely zeroize a buffer
39 * The function is meant to wipe the data contained in a buffer so
40 * that it can no longer be recovered even if the program memory
41 * is later compromised. Call this function on sensitive data
42 * stored on the stack before returning from a function, and on
43 * sensitive data stored on the heap before freeing the heap
46 * It is extremely difficult to guarantee that calls to
47 * mbedtls_platform_zeroize() are not removed by aggressive
48 * compiler optimizations in a portable way. For this reason, Mbed
49 * TLS provides the configuration option
50 * MBEDTLS_PLATFORM_ZEROIZE_ALT, which allows users to configure
51 * mbedtls_platform_zeroize() to use a suitable implementation for
52 * their platform and needs
54 * \param buf Buffer to be zeroized
55 * \param len Length of the buffer in bytes
58 void mbedtls_platform_zeroize( void *buf
, size_t len
);
64 #endif /* MBEDTLS_PLATFORM_UTIL_H */