DRM decrypting tool for Samsung TVs PVR
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.

aes.h 889B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __AES_H
  2. #define __AES_H
  3. #define MAXKC (256/32)
  4. #define MAXKB (256/8)
  5. #define MAXNR 14
  6. #define BLOCK_SIZE 16
  7. typedef unsigned char u8;
  8. typedef unsigned short u16;
  9. typedef unsigned int u32;
  10. typedef struct {
  11. u32 ek[ 4*(MAXNR+1) ];
  12. u32 dk[ 4*(MAXNR+1) ];
  13. int rounds;
  14. } block_state;
  15. /* AES */
  16. extern void block_init_aes(block_state *state, unsigned char *key, int keylen);
  17. extern void block_finalize_aes(block_state* self);
  18. extern void block_encrypt_aes(block_state *self, u8 *in, u8 *out);
  19. extern void block_decrypt_aes(block_state *self, u8 *in, u8 *out);
  20. /* AES-NI */
  21. extern void block_init_aesni(block_state *state, unsigned char *key, int keylen);
  22. extern void block_finalize_aesni(block_state* self);
  23. extern void block_encrypt_aesni(block_state *self, u8 *in, u8 *out);
  24. extern void block_decrypt_aesni(block_state *self, u8 *in, u8 *out);
  25. #endif /* __AES_H */