20 lines
384 B
C
20 lines
384 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
#include "test_util.h"
|
|
|
|
|
|
void rand_poly(NtruIntPoly *a, uint16_t N, uint16_t modulus){
|
|
uint16_t i;
|
|
int16_t coeffs[N];
|
|
// int16_t coeffs;
|
|
a->N = N;
|
|
printf("-> ");
|
|
for (i=0; i<N; i++){
|
|
a->coeffs[i] = random() % modulus;
|
|
printf("%d %d\n ", i+1, coeffs[i] );
|
|
}
|
|
}
|
|
|