updated eel and eapml from more recent versions.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Objects that ..."
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "The best government is the one that charges you the least blackmail for leaving you alone. - Thomas Rudmose-Brown (1996)"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Tests Cipher Block Chaining mode"
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Government is the great fiction, through which everybody endeavors to live at the expense of everybody else. - Frederic Bastiat"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Tests Cipher Feedback mode"
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Liberty is the only thing you cannot have unless you are willing to give it to others. - William Allen White"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Tests Counter mode"
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "We contend that for a nation to try to tax itself into prosperity is like a man standing in a bucket and trying to lift himself up by the handle. - Winston Churchill (1903)"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Tests DER encoding facilities"
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Nothing can destroy a government more quickly than its failure to observe its own laws, or worse, its disregard of the charter of its own existence - U.S. Supreme Court Justice Tom C. Clark - Mapp vs. Ohio"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description : "Tests basic Elliptical Curve library functionality"
|
||||
author : "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Giving money and power to government is like giving whiskey and car keys to teenage boys. - P.J. O'Rourke"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Tests Electronic Codebook mode"
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Ask not what you can do for your country; ask what your government is doing to you. - Joseph Sobran (1990)"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {HMAC_SHA256_TEST}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
|
||||
class
|
||||
HMAC_SHA256_TEST
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {MD5_TEST}."
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Give me liberty or give me death! - Patrick Henry"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Tests Output Feedback mode"
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "Government is actually the worst failure of civilized man. There has never been a really good one, and even those that are most tolerable are arbitrary, cruel, grasping, and unintelligent. - H. L. Mencken"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {RSA_TEST}."
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "When buying and selling are controlled by legislation, the first things to be bought and sold are legislators. - P.J. O'Rourke"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {SHA1_TEST}."
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "We must have government, but we must watch them like a hawk. - Millicent Fenwick (1983)"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {SHA256_TEST}."
|
||||
author: "Colin LeMahieu"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
quote: "A little government and a little luck are necessary in life, but only a fool trusts either of them. - P. J. O'Rourke"
|
||||
|
||||
class
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
note
|
||||
description : "tests application root class"
|
||||
date : "$Date: 2008-12-29 15:41:59 -0800 (Mon, 29 Dec 2008) $"
|
||||
revision : "$Revision: 76432 $"
|
||||
date : "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision : "$Revision: 87787 $"
|
||||
|
||||
class
|
||||
TEST
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
<<<<<<< local
|
||||
note
|
||||
description : "tests application root class"
|
||||
date : "$Date: 2008-12-29 15:41:59 -0800 (Mon, 29 Dec 2008) $"
|
||||
revision : "$Revision: 76432 $"
|
||||
|
||||
class
|
||||
TEST
|
||||
|
||||
inherit
|
||||
ARGUMENTS
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
local
|
||||
key_pair: RSA_KEY_PAIR
|
||||
message: INTEGER_X
|
||||
cipher: INTEGER_X
|
||||
plain: INTEGER_X
|
||||
signature: INTEGER_X
|
||||
correct: BOOLEAN
|
||||
i: INTEGER
|
||||
do
|
||||
i := +1
|
||||
io.put_string ("Creating keypair%N")
|
||||
create key_pair.make (1024)
|
||||
io.put_string ("Created keypair%N")
|
||||
create message.make_random (128)
|
||||
cipher := key_pair.public.encrypt (message)
|
||||
plain := key_pair.private.decrypt (cipher)
|
||||
io.put_string ("Checked encryption%N")
|
||||
signature := key_pair.private.sign (message)
|
||||
correct := key_pair.public.verify (message, signature)
|
||||
io.put_string ("Checked signing%N")
|
||||
end
|
||||
|
||||
make_2
|
||||
local
|
||||
key: EC_KEY_PAIR
|
||||
message: INTEGER_X
|
||||
signature: TUPLE [r: INTEGER_X s: INTEGER_X]
|
||||
correct: BOOLEAN
|
||||
i: INTEGER
|
||||
do
|
||||
create key.make_sec_t113r1
|
||||
create message.make_random_max (key.private.params.n)
|
||||
from
|
||||
i := 0
|
||||
until
|
||||
i > 100
|
||||
loop
|
||||
signature := key.private.sign (message)
|
||||
correct := key.public.verify (message, signature)
|
||||
i := i + 1
|
||||
end
|
||||
end
|
||||
|
||||
test_sec_t_multiply
|
||||
local
|
||||
d: INTEGER_X
|
||||
g: EC_POINT_F2M
|
||||
curve: EC_CURVE_F2M
|
||||
q: EC_POINT_F2M
|
||||
q_x_solution: INTEGER_X
|
||||
q_y_solution: INTEGER_X
|
||||
q_solution: EC_POINT_F2M
|
||||
correct: BOOLEAN
|
||||
do
|
||||
create d.make_from_hex_string ("00000003 A41434AA 99C2EF40 C8495B2E D9739CB2 155A1E0D")
|
||||
create g.make_sec_t163k1
|
||||
create curve.make_sec_t163k1
|
||||
create q_x_solution.make_from_hex_string ("00000003 7D529FA3 7E42195F 10111127 FFB2BB38 644806BC")
|
||||
create q_y_solution.make_from_hex_string ("00000004 47026EEE 8B34157F 3EB51BE5 185D2BE0 249ED776")
|
||||
create q_solution.make_curve_x_y (create {EC_FIELD_ELEMENT_F2M}.make (q_x_solution), create {EC_FIELD_ELEMENT_F2M}.make (q_y_solution))
|
||||
q := g.product_value (d, curve)
|
||||
correct := q ~ q_solution
|
||||
end
|
||||
|
||||
test1: detachable AES_TEST
|
||||
test2: detachable CBC_TEST
|
||||
test3: detachable CFB_TEST
|
||||
test4: detachable CTR_TEST
|
||||
test5: detachable DER_TEST
|
||||
test6: detachable ECB_TEST
|
||||
test7: detachable EC_TEST
|
||||
test8: detachable MD5_TEST
|
||||
test9: detachable OFB_TEST
|
||||
test10: detachable RSA_TEST
|
||||
test11: detachable SHA1_TEST
|
||||
test12: detachable SHA256_TEST
|
||||
test13: detachable TEST_EC_BINARY
|
||||
|
||||
end
|
||||
=======
|
||||
note
|
||||
description : "tests application root class"
|
||||
date : "$Date: 2008-12-29 15:41:59 -0800 (Mon, 29 Dec 2008) $"
|
||||
revision : "$Revision: 76432 $"
|
||||
|
||||
class
|
||||
TEST
|
||||
|
||||
inherit
|
||||
ARGUMENTS
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
local
|
||||
key_pair: RSA_KEY_PAIR
|
||||
message: INTEGER_X
|
||||
cipher: INTEGER_X
|
||||
plain: INTEGER_X
|
||||
signature: INTEGER_X
|
||||
correct: BOOLEAN
|
||||
do
|
||||
io.put_string ("Creating keypair%N")
|
||||
create key_pair.make (1024)
|
||||
io.put_string ("Created keypair%N")
|
||||
create message.make_random (128)
|
||||
cipher := key_pair.public.encrypt (message)
|
||||
plain := key_pair.private.decrypt (cipher)
|
||||
io.put_string ("Checked encryption%N")
|
||||
signature := key_pair.private.sign (message)
|
||||
correct := key_pair.public.verify (message, signature)
|
||||
io.put_string ("Checked signing%N")
|
||||
end
|
||||
|
||||
make_2
|
||||
local
|
||||
key: EC_KEY_PAIR
|
||||
message: INTEGER_X
|
||||
signature: TUPLE [r: INTEGER_X s: INTEGER_X]
|
||||
correct: BOOLEAN
|
||||
i: INTEGER
|
||||
do
|
||||
create key.make_sec_t113r1
|
||||
create message.make_random_max (key.private.params.n)
|
||||
from
|
||||
i := 0
|
||||
until
|
||||
i > 100
|
||||
loop
|
||||
signature := key.private.sign (message)
|
||||
correct := key.public.verify (message, signature)
|
||||
i := i + 1
|
||||
end
|
||||
end
|
||||
|
||||
test_sec_t_multiply
|
||||
local
|
||||
d: INTEGER_X
|
||||
g: EC_POINT_F2M
|
||||
curve: EC_CURVE_F2M
|
||||
q: EC_POINT_F2M
|
||||
q_x_solution: INTEGER_X
|
||||
q_y_solution: INTEGER_X
|
||||
q_solution: EC_POINT_F2M
|
||||
correct: BOOLEAN
|
||||
do
|
||||
create d.make_from_hex_string ("00000003 A41434AA 99C2EF40 C8495B2E D9739CB2 155A1E0D")
|
||||
create g.make_sec_t163k1
|
||||
create curve.make_sec_t163k1
|
||||
create q_x_solution.make_from_hex_string ("00000003 7D529FA3 7E42195F 10111127 FFB2BB38 644806BC")
|
||||
create q_y_solution.make_from_hex_string ("00000004 47026EEE 8B34157F 3EB51BE5 185D2BE0 249ED776")
|
||||
create q_solution.make_curve_x_y (create {EC_FIELD_ELEMENT_F2M}.make (q_x_solution), create {EC_FIELD_ELEMENT_F2M}.make (q_y_solution))
|
||||
q := g.product_value (d, curve)
|
||||
correct := q ~ q_solution
|
||||
end
|
||||
|
||||
test1: detachable AES_TEST
|
||||
test2: detachable CBC_TEST
|
||||
test3: detachable CFB_TEST
|
||||
test4: detachable CTR_TEST
|
||||
test5: detachable DER_TEST
|
||||
test6: detachable ECB_TEST
|
||||
test7: detachable EC_TEST
|
||||
test8: detachable MD5_TEST
|
||||
test9: detachable OFB_TEST
|
||||
test10: detachable RSA_TEST
|
||||
test11: detachable SHA1_TEST
|
||||
test12: detachable SHA256_TEST
|
||||
test13: detachable TEST_EC_BINARY
|
||||
test14: detachable HMAC_SHA256_TEST
|
||||
|
||||
end
|
||||
>>>>>>> other
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {TEST_EC_BINARY}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
|
||||
class
|
||||
TEST_EC_BINARY
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {TEST_EC_FIELD_ELEMENT_F2M}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
|
||||
revision: "$Revision: 87787 $"
|
||||
|
||||
class
|
||||
TEST_EC_FIELD_ELEMENT_F2M
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<variable name="eapml_scan_type" value="vc"/>
|
||||
<variable name="eapml_limb_type" value="natural_32"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="eapml" location="..\..\eapml\eapml-safe.ecf"/>
|
||||
<library name="eapml" location="$ISE_LIBRARY\contrib\library\math\eapml\eapml-safe.ecf"/>
|
||||
<library name="eel" location="..\eel-safe.ecf" readonly="false">
|
||||
<option>
|
||||
<assertions precondition="true"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<variable name="eapml_scan_type" value="gcc"/>
|
||||
<variable name="eapml_limb_type" value="natural_32"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="eapml" location="..\..\eapml\eapml.ecf"/>
|
||||
<library name="eapml" location="$ISE_LIBRARY\contrib\library\math\eapml\eapml.ecf"/>
|
||||
<library name="eel" location="..\eel.ecf" readonly="false">
|
||||
<option>
|
||||
<assertions precondition="true"/>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Reference in New Issue
Block a user