db207264ad
The test vectors are taken from the reference implementation, modified to output the results of its random-number generator, and the results of key generation prior to SHA3. This allows the interoperability of the two implementations to be tested somewhat. To accomplish the testing, this commit creates a new, lower-level API that leaves the generation of random numbers and all wire encoding and decoding up to the caller. Change-Id: Ifae3517696dde4be4a0b7c1998bdefb789bac599 Reviewed-on: https://boringssl-review.googlesource.com/8070 Reviewed-by: Adam Langley <agl@google.com>
32 lines
481 B
CMake
32 lines
481 B
CMake
add_library(
|
|
newhope
|
|
|
|
OBJECT
|
|
|
|
error_correction.c
|
|
newhope.c
|
|
ntt.c
|
|
poly.c
|
|
precomp.c
|
|
reduce.c
|
|
)
|
|
|
|
add_executable(
|
|
newhope_test
|
|
|
|
newhope_test.c
|
|
$<TARGET_OBJECTS:test_support>
|
|
)
|
|
|
|
add_executable(
|
|
newhope_vectors_test
|
|
|
|
newhope_vectors_test.cc
|
|
$<TARGET_OBJECTS:test_support>
|
|
)
|
|
|
|
target_link_libraries(newhope_test crypto)
|
|
target_link_libraries(newhope_vectors_test crypto)
|
|
add_dependencies(all_tests newhope_test)
|
|
add_dependencies(all_tests newhope_vectors_test)
|