mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:00:54 +07:00
761e784673
Allow in-place crypto operations. Also remove the coherent user flag (we use it automagically now), and by default use the user written key rather then the HW hidden key - this makes crypto just work without any special considerations, and thats OK, since its our only usage model. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
40 lines
735 B
C
40 lines
735 B
C
/* Copyright (C) 2003-2006, Advanced Micro Devices, Inc.
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef _GEODE_AES_H_
|
|
#define _GEODE_AES_H_
|
|
|
|
#define AES_KEY_LENGTH 16
|
|
#define AES_IV_LENGTH 16
|
|
|
|
#define AES_MIN_BLOCK_SIZE 16
|
|
|
|
#define AES_MODE_ECB 0
|
|
#define AES_MODE_CBC 1
|
|
|
|
#define AES_DIR_DECRYPT 0
|
|
#define AES_DIR_ENCRYPT 1
|
|
|
|
#define AES_FLAGS_HIDDENKEY (1 << 0)
|
|
|
|
struct geode_aes_op {
|
|
|
|
void *src;
|
|
void *dst;
|
|
|
|
u32 mode;
|
|
u32 dir;
|
|
u32 flags;
|
|
int len;
|
|
|
|
u8 key[AES_KEY_LENGTH];
|
|
u8 iv[AES_IV_LENGTH];
|
|
};
|
|
|
|
#endif
|