#include #include "aes.h" #include #include #include #define PACKAGE_SIZE 4096 #define PACKAGE_NUM 2048 #define AES_ONCE 16 int main(int argc, char *argv[]) { uint8_t key[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; uint8_t in[AES_ONCE], out[AES_ONCE]; uint8_t *w; int rank, size; uint8_t xbuf[2][PACKAGE_SIZE]; uint8_t ybuf[2][PACKAGE_SIZE]; int i, j, k; MPI_Request request; MPI_Status status; w = aes_init(sizeof(key)); aes_key_expansion(key, w); MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); if (rank == 0) { for (i = 0; i < PACKAGE_NUM; ++i) { } } else if (rank == 1) { } else if (rank == 2) { } MPI_Finalize(); }