key.buf, nonce.buf, ctr);
if (new_ctr - ctr != nb_blocks) {
printf("FAILURE: Chacha20 returned counter not correct: ");
+ exit(1);
}
}
key.buf, nonce.buf, ctr);
if (new_ctr - ctr != nb_blocks) {
printf("FAILURE: IETF Chacha20 returned counter not correct: ");
+ exit(1);
}
}
key.buf, nonce.buf, ctr);
if (new_ctr - ctr != nb_blocks) {
printf("FAILURE: XChacha20 returned counter not correct: ");
+ exit(1);
}
}
if (memcmp(out.buf, out2, out.size)) {
printf("FAILURE: reconstructing public key"
" yields different signature\n");
+ exit(1);
}
}
if (memcmp(out.buf, out2, out.size)) {
printf("FAILURE: reconstructing public key"
" yields different signature\n");
+ exit(1);
}
}
int check = crypto_curve_to_hidden(out.buf, point.buf, tweak);
if ((u8)check != failure) {
fprintf(stderr, "Elligator inverse map: failure mismatch\n");
+ exit(1);
}
if (check) {
out.buf[0] = 0;