Display actual data, do not suggest that the nonce is part of the ciphertext
This commit is contained in:
parent
57fb685157
commit
a549360201
@ -57,10 +57,8 @@ auth(void)
|
||||
printf("Generating %s authentication...\n", crypto_auth_primitive());
|
||||
crypto_auth(mac, message, message_len, key);
|
||||
|
||||
puts("Format: authentication tag::message");
|
||||
fputs("Authentication tag: ", stdout);
|
||||
print_hex(mac, sizeof mac);
|
||||
fputs("::", stdout);
|
||||
puts((const char*)message);
|
||||
putchar('\n');
|
||||
|
||||
puts("Verifying authentication tag...");
|
||||
|
@ -112,11 +112,11 @@ box(void)
|
||||
puts("Bob sends the ciphertext...\n");
|
||||
printf("Ciphertext len: %zu bytes - Original message length: %zu bytes\n",
|
||||
ciphertext_len, message_len);
|
||||
puts("Notice the prepended 16 byte authentication token");
|
||||
puts("Format: nonce::encrypted_message");
|
||||
puts("Notice the prepended 16 byte authentication token\n");
|
||||
fputs("Nonce: ", stdout);
|
||||
print_hex(ciphertext, ciphertext_len);
|
||||
putchar('\n');
|
||||
fputs("Ciphertext: ", stdout);
|
||||
print_hex(nonce, sizeof nonce);
|
||||
fputs("::", stdout);
|
||||
print_hex(ciphertext, ciphertext_len);
|
||||
putchar('\n');
|
||||
putchar('\n');
|
||||
|
Loading…
Reference in New Issue
Block a user