[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU shishi branch, master, updated. shishi-1-0-2-59-g485d3bd
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU shishi branch, master, updated. shishi-1-0-2-59-g485d3bd |
Date: |
Sun, 14 Sep 2014 00:49:19 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU shishi".
http://git.savannah.gnu.org/cgit/shishi.git/commit/?id=485d3bd8fdfa2e887d757197d3490ac1911cc915
The branch, master has been updated
via 485d3bd8fdfa2e887d757197d3490ac1911cc915 (commit)
from 547df5e3897c8d4e787cb672174d52b130995ddb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 485d3bd8fdfa2e887d757197d3490ac1911cc915
Author: Mats Erik Andersson <address@hidden>
Date: Sun Sep 14 02:45:24 2014 +0200
Two more test cases with ARCFOUR.
Test correctness of decryption using shishi_arcfour().
-----------------------------------------------------------------------
Summary of changes:
tests/low-crypto.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/tests/low-crypto.c b/tests/low-crypto.c
index 659f6de..2468be6 100644
--- a/tests/low-crypto.c
+++ b/tests/low-crypto.c
@@ -158,6 +158,24 @@ test (Shishi * handle)
free (out);
}
+ /* Decryption of previous case. */
+ err = shishi_arcfour (handle, 1 /* ignored! */, "keykeykey", 9, NULL,
+ NULL, "\x6a\x0e\x57\x89\x41\xe9\x1c\x22", 8,
+ &out);
+ if (err)
+ fail ("shishi_arcfour() failed: %d\n", err);
+ else
+ {
+ if (memcmp (out, "abcdefgh", 8) == 0)
+ success ("shishi_arcfour() OK decrypt\n");
+ else
+ {
+ hexprint (out, 8);
+ fail ("shishi_arcfour() failure\n");
+ }
+ free (out);
+ }
+
err = shishi_arcfour (handle, 0, "keykeyke", 8, NULL, &ivout,
"abcdefghi", 9, &out);
if (err)
@@ -214,6 +232,43 @@ test (Shishi * handle)
free (ivout);
}
+ err = shishi_arcfour (handle, 0, "keykeyk", 8, NULL, &ivout,
+ "Chr Dedekind", 13, &out);
+ if (err)
+ fail ("shishi_arcfour() failed: %d\n", err);
+ else
+ {
+ /* We have a valid seed in IVOUT. */
+ free (out);
+
+ err = shishi_arcfour (handle, 0, "keykeyk", 8, ivout, NULL,
+ "Johann Jeep", 12, &out);
+ if (err)
+ fail ("shishi_arcfour() failed: %d\n", err);
+ else
+ {
+ char *out2;
+
+ err = shishi_arcfour (handle, 1, "keykeyk", 8, ivout, NULL,
+ out, 12, &out2);
+ if (err)
+ fail ("shishi_arcfour() failed: %d\n", err);
+ else
+ {
+ if (memcmp (out2, "Johann Jeep", 12) == 0)
+ success ("shishi_arcfour() OK IV decrypt\n");
+ else
+ {
+ hexprint (out2, 12);
+ fail ("shishi_arcfour() failure\n");
+ }
+ free (out2);
+ }
+ }
+ free (out);
+ free (ivout);
+ }
+
err = shishi_des (handle, 0, "kdykdykd", NULL, NULL, "abcdefgh", 8, &out);
if (err)
fail ("shishi_des() failed: %d\n", err);
hooks/post-receive
--
GNU shishi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU shishi branch, master, updated. shishi-1-0-2-59-g485d3bd,
Mats Erik Andersson <=