Skip to content

Commit

Permalink
New LUKS modules code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ventaquil committed Jul 22, 2022
1 parent 31758f0 commit 2bd1861
Show file tree
Hide file tree
Showing 24 changed files with 456 additions and 740 deletions.
14 changes: 7 additions & 7 deletions OpenCL/m14611-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14612-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_serpent.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14613-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_twofish.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14621-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14622-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_serpent.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14623-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_twofish.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14631-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14632-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_serpent.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14633-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_twofish.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14641-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14642-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_serpent.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
14 changes: 7 additions & 7 deletions OpenCL/m14643-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include M2S(INCLUDE_PATH/inc_cipher_twofish.cl)
#endif

#define LUKS_STRIPES 4000
#define LUKS_CT_LEN 512
#define LUKS_AF_MAX_LEN ((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES)
#define LUKS_STRIPES ( 4000)
#define LUKS_CT_LEN ( 512)
#define LUKS_AF_MAX_LEN (HC_LUKS_KEY_SIZE_512 / 8 * LUKS_STRIPES)

typedef enum hc_luks_hash_type
{
Expand Down Expand Up @@ -60,10 +60,10 @@ typedef enum hc_luks_cipher_mode

typedef struct luks
{
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t
int hash_type; // hc_luks_hash_type_t
int key_size; // hc_luks_key_size_t
int cipher_type; // hc_luks_cipher_type_t
int cipher_mode; // hc_luks_cipher_mode_t

u32 ct_buf[LUKS_CT_LEN / 4];

Expand Down
Loading

0 comments on commit 2bd1861

Please sign in to comment.