 }
 
 void pad_msg(char *msg, int matrix_dims) {
+    printf("Padding..\n");
     int i;
     unsigned int msg_len = strlen(msg);
     int matrix_size = matrix_dims*matrix_dims;

        }
    }
    // pad message if not divisible by matrix_dims^2
    if (msg_size % matrix_size != 0) {
        pad_msg(msg, matrix_dims);
        msg_size = strlen(msg);
    }
    printf("%s", msg);

    float *msg_vector = (float *)malloc(strlen(msg)*sizeof(float));

    //cudaFree(secretGpu);

    printf("\n\n5\n\n");
    for (i = 0; i < msg_parts; i++) {
    //    printf("%d %f\n\n\n\n", i, results[i]);
        for (j = 0; j < matrix_size; j++) {
            printf("%d: %c\n", (int)results[i][j], char((int)results[i][j]));
        }
    }
    
    float **unEncrypted = (float **)malloc(msg_parts * sizeof(float *));
    for (z = 0; z < msg_parts; z++) {
        unEncrypted[z] = (float *)malloc(matrix_size * sizeof(float));
        memset(unEncrypted[z], 0, nBytes);
    }
     

    cudaMemcpy(secretGpu, *invSKey, nBytes, cudaMemcpyHostToDevice);
    for (i = 0; i < msg_parts; i++) {
        printf("\n\n\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOO\nOOOOOOOOOO\n");
        cudaMemcpy(msgGpu, results[i], nBytes, cudaMemcpyHostToDevice);
        mtxEncrypt<<<grid, block>>>(secretGpu, msgGpu, resultGpu, matrix_dims);
        cudaMemcpy(unEncrypted[i], resultGpu, nBytes, cudaMemcpyDeviceToHost);
        cudaDeviceSynchronize();
    }
    printf("HELLO");
    for (i = 0; i < msg_parts; i++) {
        for (j = 0; j < matrix_size; j++) {
            printf("%c", char((int)unEncrypted[i][j]));
        }
