NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ote_openssl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files
6  * (the "Software"), to deal in the Software without restriction,
7  * including without limitation the rights to use, copy, modify, merge,
8  * publish, distribute, sublicense, and/or sell copies of the Software,
9  * and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be
13  * included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 
41 #ifndef __OTE_OPENSSL_H
42 #define __OTE_OPENSSL_H
43 
44 #include <service/ote_crypto.h>
45 #include <common/ote_error.h>
46 
54 
68 te_error_t openssl_aes_update(te_crypto_operation_t operation, const void *src,
69  size_t src_len, void *dst, size_t *dst_len);
70 
85  const void *src, size_t src_len,
86  void *dst, size_t *dst_len);
87 
96 
104 
117 te_error_t openssl_mac_update(te_crypto_operation_t operation, const void *src,
118  size_t src_size, void *dst, size_t *dst_size);
119 
127 
135 
150  const void *src, size_t src_size,
151  void *dst, size_t *dst_size);
152 
161 
168 te_error_t openssl_rand_bytes(void *buffer, size_t size);
169 
172 #endif /* __OTE_OPENSSL_H */
void openssl_mac_free(te_crypto_operation_t operation)
Free internal allocated memory.
void openssl_aes_free(te_crypto_operation_t operation)
Free AES internal allocated memory.
te_error_t openssl_mac_update(te_crypto_operation_t operation, const void *src, size_t src_size, void *dst, size_t *dst_size)
Perform the actual MAC operation.
Internal data structure for te_crypto_operation_t.
Definition: ote_crypto.h:64
te_error_t openssl_aes_init(te_crypto_operation_t operation)
Initializes crypto operation for AES.
te_error_t openssl_rsa_handle_request(te_crypto_operation_t operation, const void *src, size_t src_size, void *dst, size_t *dst_size)
RSA-OAEP encrypt-decrypt function.
te_error_t openssl_mac_init(te_crypto_operation_t op)
Initialize MAC operation.
void openssl_rsa_free(te_crypto_operation_t operation)
Free RSA internal allocated memory.
NVIDIA Trusted Little Kernel Interface: Error Handling
te_error_t openssl_aes_do_final(te_crypto_operation_t operation, const void *src, size_t src_len, void *dst, size_t *dst_len)
AES do_final with crypto object and supplied parameters.
te_error_t openssl_rsa_init(te_crypto_operation_t op)
Initializes a crypto operation for RSA.
NVIDIA Trusted Little Kernel Interface: Cryptography
te_error_t openssl_aes_update(te_crypto_operation_t operation, const void *src, size_t src_len, void *dst, size_t *dst_len)
AES update with crypto object and supplied parameters.
te_error_t
Defines Open Trusted Environment (OTE) error codes.
Definition: ote_error.h:45
te_error_t openssl_rand_bytes(void *buffer, size_t size)
Get random bytes.