1 #ifndef __VTPMMGR_DISK_CRYPTO_H 2 #define __VTPMMGR_DISK_CRYPTO_H 3 4 void do_random(void *buf, size_t size); 5 void aes_encrypt_one(void *target, const void *src, const struct key128 *key); 6 void aes_decrypt_one(void *target, const void *src, const struct key128 *key); 7 8 void aes_setup(aes_context *ctx, const struct key128 *key); 9 void aes_encrypt_ctr(void *target, size_t target_size, const void *srcv, size_t src_size, const aes_context *key_e); 10 void aes_decrypt_ctr(void *target, size_t target_size, const void *srcv, size_t src_size, const aes_context *key_e); 11 void aes_cmac(struct mac128 *target, const void *src, size_t size, const aes_context *key); 12 int aes_cmac_verify(const struct mac128 *target, const void *src, size_t size, const aes_context *key); 13 14 void sha256(struct hash256 *target, const void *src, size_t size); 15 int sha256_verify(const struct hash256 *targ, const void *data, size_t size); 16 17 #endif 18