You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
539 B
21 lines
539 B
#pragma once |
|
|
|
#include <stdint.h> |
|
|
|
class Des |
|
{ |
|
private: |
|
/* data */ |
|
public: |
|
uint8_t deskey[8] = {90,114,90,107,85,97,86,103};//{ "ZrZkUaVg" }; |
|
uint8_t DES_Encrypt_key[8]; |
|
uint8_t DES_Decrypt_key[8]; |
|
uint8_t sub_keys[16][8]; //sub_keys[16][8] |
|
uint8_t main_key[8]; |
|
void des(uint8_t*, uint8_t*, uint8_t, uint8_t*); |
|
void FLASH_Read_KEYS(uint8_t key_index); |
|
void transpose(uint8_t*, uint8_t*, const uint8_t*, uint8_t); |
|
void rotate_l(uint8_t*); |
|
void compute_subkeys(uint8_t*); |
|
void f(uint8_t*, uint8_t*, uint8_t*); |
|
};
|
|
|