mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
22 lines
410 B
C++
22 lines
410 B
C++
/*
|
|
* prf.cpp
|
|
*
|
|
*/
|
|
|
|
|
|
#include "prf.h"
|
|
#include "aes.h"
|
|
#include "proto_utils.h"
|
|
|
|
void PRF_single(const Key& key, char* input, char* output)
|
|
{
|
|
// printf("prf_single\n");
|
|
// std::cout << *key;
|
|
// phex(input, 16);
|
|
AES_KEY aes_key;
|
|
AES_128_Key_Expansion((const unsigned char*)(&(key.r)), &aes_key);
|
|
aes_key.rounds=10;
|
|
AES_encryptC((block*)input, (block*)output, &aes_key);
|
|
// phex(output, 16);
|
|
}
|