diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-04-12 08:30:49 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-04-12 08:30:49 +0000 |
commit | 33479f263aff0e2c5354b9d22c43f759a05a4d52 (patch) | |
tree | 91f57a83dffab34db4c7953e9aa55cdf0e5303a6 /os/hal/include | |
parent | e5049e103d5cf64ca047cb33f5ff3a9f16139dec (diff) | |
download | ChibiOS-33479f263aff0e2c5354b9d22c43f759a05a4d52.tar.gz ChibiOS-33479f263aff0e2c5354b9d22c43f759a05a4d52.tar.bz2 ChibiOS-33479f263aff0e2c5354b9d22c43f759a05a4d52.zip |
Modified AES GCM function signatures.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12734 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/hal_crypto.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/os/hal/include/hal_crypto.h b/os/hal/include/hal_crypto.h index 78ba32b00..5d477b8d9 100644 --- a/os/hal/include/hal_crypto.h +++ b/os/hal/include/hal_crypto.h @@ -92,7 +92,8 @@ typedef enum { CRY_ERR_INV_KEY_SIZE = 2, /**< Invalid key size. */
CRY_ERR_INV_KEY_TYPE = 3, /**< Invalid key type. */
CRY_ERR_INV_KEY_ID = 4, /**< Invalid key identifier. */
- CRY_ERR_OP_FAILURE = 5 /**< Requested operation failed.*/
+ CRY_ERR_AUTH_FAILED = 5, /**< Failed authentication. */
+ CRY_ERR_OP_FAILURE = 6 /**< Failed operation. */
} cryerror_t;
/**
@@ -284,22 +285,24 @@ extern "C" { const uint8_t *iv);
cryerror_t cryEncryptAES_GCM(CRYDriver *cryp,
crykey_t key_id,
- size_t size,
- const uint8_t *in,
- uint8_t *out,
+ size_t auth_size,
+ const uint8_t *auth_in,
+ size_t text_size,
+ const uint8_t *text_in,
+ uint8_t *text_out,
const uint8_t *iv,
- size_t aadsize,
- const uint8_t *aad,
- uint8_t *authtag);
+ size_t tag_size,
+ uint8_t *tag_out);
cryerror_t cryDecryptAES_GCM(CRYDriver *cryp,
crykey_t key_id,
- size_t size,
- const uint8_t *in,
- uint8_t *out,
+ size_t auth_size,
+ const uint8_t *auth_in,
+ size_t text_size,
+ const uint8_t *text_in,
+ uint8_t *text_out,
const uint8_t *iv,
- size_t aadsize,
- const uint8_t *aad,
- uint8_t *authtag);
+ size_t tag_size,
+ const uint8_t *tag_in);
cryerror_t cryLoadDESTransientKey(CRYDriver *cryp,
size_t size,
const uint8_t *keyp);
|