Diffstat (limited to 'frontend/gamma/tests/tests/Clipperz/Crypto') (more/less context) (ignore whitespace changes)
19 files changed, 114 insertions, 171 deletions
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html index 93089b7..828ccb8 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <title>Clipperz.Crypto.AES_v3 - TEST</title> | 28 | <title>Clipperz.Crypto.AES_v3 - TEST</title> |
32 | 29 | ||
33 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 30 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
34 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 31 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
35 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 32 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
36 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 33 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
37 | 34 | ||
38 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> | 35 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> |
39 | 36 | ||
40 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
41 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
44 | 41 | ||
45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> |
47 | 44 | ||
48 | </head> | 45 | </head> |
49 | <body> | 46 | <body> |
50 | <pre id="test"> | 47 | <pre id="test"> |
51 | <script type="text/javascript"> | 48 | <script type="text/javascript"> |
52 | 49 | ||
53 | try { | 50 | try { |
54 | var block; | 51 | var block; |
55 | var keyValue; | 52 | var keyValue; |
56 | varkey; | 53 | varkey; |
57 | var encryptedBlock; | 54 | var encryptedBlock; |
58 | var startTime, endTime; | 55 | var startTime, endTime; |
59 | 56 | ||
60 | startTime = new Date(); | 57 | startTime = new Date(); |
61 | 58 | ||
62 | keyValue = new Clipperz.ByteArray("0x00010203050607080a0b0c0d0f10111214151617191a1b1c1e1f202123242526"); | 59 | keyValue = new Clipperz.ByteArray("0x00010203050607080a0b0c0d0f10111214151617191a1b1c1e1f202123242526"); |
63 | key = new Clipperz.Crypto.AES.Key({key:keyValue}); | 60 | key = new Clipperz.Crypto.AES.Key({key:keyValue}); |
64 | block = new Clipperz.ByteArray("0x834eadfccac7e1b30664b1aba44815ab"); | 61 | block = new Clipperz.ByteArray("0x834eadfccac7e1b30664b1aba44815ab"); |
65 | encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); | 62 | encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); |
66 | is(encryptedBlock.toHexString(), "0x1946dabf6a03a2a2c3d0b05080aed6fc", "Test 1"); | 63 | is(encryptedBlock.toHexString(), "0x1946dabf6a03a2a2c3d0b05080aed6fc", "Test 1"); |
67 | 64 | ||
68 | keyValue = new Clipperz.ByteArray("0x28292a2b2d2e2f30323334353738393a3c3d3e3f41424344464748494b4c4d4e"); | 65 | keyValue = new Clipperz.ByteArray("0x28292a2b2d2e2f30323334353738393a3c3d3e3f41424344464748494b4c4d4e"); |
69 | key = new Clipperz.Crypto.AES.Key({key:keyValue}); | 66 | key = new Clipperz.Crypto.AES.Key({key:keyValue}); |
70 | block = new Clipperz.ByteArray("0xd9dc4dba3021b05d67c0518f72b62bf1"); | 67 | block = new Clipperz.ByteArray("0xd9dc4dba3021b05d67c0518f72b62bf1"); |
71 | encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); | 68 | encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues())); |
72 | is(encryptedBlock.toHexString(), "0x5ed301d747d3cc715445ebdec62f2fb4", "Test 2"); | 69 | is(encryptedBlock.toHexString(), "0x5ed301d747d3cc715445ebdec62f2fb4", "Test 2"); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html index 0d1cf07..4817096 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.performance.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <title>Clipperz.Crypto.AES_performance - TEST</title> | 28 | <title>Clipperz.Crypto.AES_performance - TEST</title> |
32 | 29 | ||
33 | <script> | 30 | <script> |
34 | jslog_config_enabled = true; | 31 | jslog_config_enabled = true; |
35 | </script> | 32 | </script> |
36 | 33 | ||
37 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 34 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
38 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 35 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
39 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 36 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
40 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 37 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
41 | 38 | ||
42 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> | 39 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> |
43 | 40 | ||
44 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
45 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
47 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> | 44 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> |
48 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 45 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
49 | 46 | ||
50 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 47 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
51 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 48 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
52 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> | 49 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> |
53 | 50 | ||
54 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> | 51 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> |
55 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> | 52 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Proxy.js'></script> |
56 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> | 53 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Connection.js'></script> |
57 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> | 54 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> |
58 | 55 | ||
59 | </head> | 56 | </head> |
60 | <body> | 57 | <body> |
61 | <pre id="test"> | 58 | <pre id="test"> |
62 | <script type="text/javascript"> | 59 | <script type="text/javascript"> |
63 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); | 60 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); |
64 | 61 | ||
65 | try { | 62 | try { |
66 | 63 | ||
67 | var password; | 64 | var password; |
68 | varplainText; | 65 | varplainText; |
69 | varencryptedText; | 66 | varencryptedText; |
70 | var decryptedText; | 67 | var decryptedText; |
71 | /* | 68 | /* |
72 | password = "trustno1"; | 69 | password = "trustno1"; |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html b/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html index 86fc49a..0ffcdb8 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/Base.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
38 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 35 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
39 | 36 | ||
40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
44 | 41 | ||
45 | </head> | 42 | </head> |
46 | <body> | 43 | <body> |
47 | <pre id="test"> | 44 | <pre id="test"> |
48 | <script type="text/javascript"> | 45 | <script type="text/javascript"> |
49 | try { | 46 | try { |
50 | var secretKey; | 47 | var secretKey; |
51 | varpublicKey; | 48 | varpublicKey; |
52 | varplainString; | 49 | varplainString; |
53 | varencryptedString; | 50 | varencryptedString; |
54 | 51 | ||
55 | 52 | ||
56 | secretKey = "s3cr37k39"; | 53 | secretKey = "s3cr37k39"; |
57 | plainString = "The Quick Brown Fox Jumps Over The Lazy Dog"; | 54 | plainString = "The Quick Brown Fox Jumps Over The Lazy Dog"; |
58 | encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); | 55 | encryptedString = Clipperz.Crypto.Base.encryptUsingSecretKey(secretKey, plainString); |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | // | 58 | // |
62 | //Secret key encryption / decryption | 59 | //Secret key encryption / decryption |
63 | // | 60 | // |
64 | is (isUndefinedOrNull(encryptedString), false, "An encrypted string should not be empty"); | 61 | is (isUndefinedOrNull(encryptedString), false, "An encrypted string should not be empty"); |
65 | is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); | 62 | is (plainString, Clipperz.Crypto.Base.decryptUsingSecretKey(secretKey, encryptedString), "I should be able to encrypt and then decrypt safely"); |
66 | 63 | ||
67 | try { | 64 | try { |
68 | vardecryptedText; | 65 | vardecryptedText; |
69 | 66 | ||
70 | decryptedText = Clipperz.Crypto.Base.decryptUsingSecretKey("anotherKey", encryptedString); | 67 | decryptedText = Clipperz.Crypto.Base.decryptUsingSecretKey("anotherKey", encryptedString); |
71 | ok( false, "It should not be possible to decrypt a text with a different passphrase (decrypted text: " + decryptedText + ")" ); | 68 | ok( false, "It should not be possible to decrypt a text with a different passphrase (decrypted text: " + decryptedText + ")" ); |
72 | } catch (e) { | 69 | } catch (e) { |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html b/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html index bdb0cbc..b970a9a 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/BigInt.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
38 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 35 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
39 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
40 | 37 | ||
41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> |
44 | </head> | 41 | </head> |
45 | <body> | 42 | <body> |
46 | <pre id="test"> | 43 | <pre id="test"> |
47 | <script type="text/javascript"> | 44 | <script type="text/javascript"> |
48 | try { | 45 | try { |
49 | varbigInt_1; | 46 | varbigInt_1; |
50 | varbigInt_2; | 47 | varbigInt_2; |
51 | varresult; | 48 | varresult; |
52 | varexpectedResult; | 49 | varexpectedResult; |
53 | 50 | ||
54 | // | 51 | // |
55 | //Constructur and equality test | 52 | //Constructur and equality test |
56 | // | 53 | // |
57 | bigInt_1 = new Clipperz.Crypto.BigInt("110"); | 54 | bigInt_1 = new Clipperz.Crypto.BigInt("110"); |
58 | is (bigInt_1.equals(bigInt_1), true, ""); | 55 | is (bigInt_1.equals(bigInt_1), true, ""); |
59 | 56 | ||
60 | bigInt_1 = new Clipperz.Crypto.BigInt("110"); | 57 | bigInt_1 = new Clipperz.Crypto.BigInt("110"); |
61 | bigInt_2 = new Clipperz.Crypto.BigInt("110", 10); | 58 | bigInt_2 = new Clipperz.Crypto.BigInt("110", 10); |
62 | is (bigInt_1.equals(bigInt_2), true, ""); | 59 | is (bigInt_1.equals(bigInt_2), true, ""); |
63 | 60 | ||
64 | bigInt_1 = new Clipperz.Crypto.BigInt("110"); | 61 | bigInt_1 = new Clipperz.Crypto.BigInt("110"); |
65 | bigInt_2 = new Clipperz.Crypto.BigInt(110); | 62 | bigInt_2 = new Clipperz.Crypto.BigInt(110); |
66 | is (bigInt_1.equals(bigInt_2), true, ""); | 63 | is (bigInt_1.equals(bigInt_2), true, ""); |
67 | 64 | ||
68 | bigInt_1 = new Clipperz.Crypto.BigInt(6); | 65 | bigInt_1 = new Clipperz.Crypto.BigInt(6); |
69 | bigInt_2 = new Clipperz.Crypto.BigInt("110", 2); | 66 | bigInt_2 = new Clipperz.Crypto.BigInt("110", 2); |
70 | is (bigInt_1.equals(bigInt_2), true, ""); | 67 | is (bigInt_1.equals(bigInt_2), true, ""); |
71 | 68 | ||
72 | bigInt_1 = new Clipperz.Crypto.BigInt(6); | 69 | bigInt_1 = new Clipperz.Crypto.BigInt(6); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html index ba98167..9ef9146 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.B283.deferred.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <!-- - -> | 28 | <!-- - -> |
32 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 29 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
33 | <!- - --> | 30 | <!- - --> |
34 | <!-- --> | 31 | <!-- --> |
35 | <script type="text/javascript" src="../../../../js/MochiKit/Base.js"></script> | 32 | <script type="text/javascript" src="../../../../js/MochiKit/Base.js"></script> |
36 | <script type="text/javascript" src="../../../../js/MochiKit/Async.js"></script> | 33 | <script type="text/javascript" src="../../../../js/MochiKit/Async.js"></script> |
37 | <script type="text/javascript" src="../../../../js/MochiKit/DOM.js"></script> | 34 | <script type="text/javascript" src="../../../../js/MochiKit/DOM.js"></script> |
38 | <script type="text/javascript" src="../../../../js/MochiKit/Logging.js"></script> | 35 | <script type="text/javascript" src="../../../../js/MochiKit/Logging.js"></script> |
39 | <script type="text/javascript" src="../../../../js/MochiKit/Iter.js"></script> | 36 | <script type="text/javascript" src="../../../../js/MochiKit/Iter.js"></script> |
40 | <!-- --> | 37 | <!-- --> |
41 | 38 | ||
42 | <!-- - -> | 39 | <!-- - -> |
43 | <script type="text/javascript" src="../../../../js/MochiKit/Style.js"></script> | 40 | <script type="text/javascript" src="../../../../js/MochiKit/Style.js"></script> |
44 | <script type="text/javascript" src="../../../../js/MochiKit/Signal.js"></script> | 41 | <script type="text/javascript" src="../../../../js/MochiKit/Signal.js"></script> |
45 | <script type="text/javascript" src="../../../../js/MochiKit/Color.js"></script> | 42 | <script type="text/javascript" src="../../../../js/MochiKit/Color.js"></script> |
46 | <script type="text/javascript" src="../../../../js/MochiKit/Position.js"></script> | 43 | <script type="text/javascript" src="../../../../js/MochiKit/Position.js"></script> |
47 | <script type="text/javascript" src="../../../../js/MochiKit/Visual.js"></script> | 44 | <script type="text/javascript" src="../../../../js/MochiKit/Visual.js"></script> |
48 | <!- - --> | 45 | <!- - --> |
49 | 46 | ||
50 | 47 | ||
51 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 48 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
52 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 49 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
53 | 50 | ||
54 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>--> | 51 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>--> |
55 | <!--<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>--> | 52 | <!--<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>--> |
56 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script>--> | 53 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script>--> |
57 | 54 | ||
58 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> | 55 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> |
59 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> | 56 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> |
60 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> | 57 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> |
61 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> | 58 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> |
62 | 59 | ||
63 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/StandardCurves.js'></script> | 60 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/StandardCurves.js'></script> |
64 | 61 | ||
65 | </head> | 62 | </head> |
66 | <body> | 63 | <body> |
67 | <pre id="test"> | 64 | <pre id="test"> |
68 | <script type="text/javascript"> | 65 | <script type="text/javascript"> |
69 | try { | 66 | try { |
70 | 67 | ||
71 | var deferredResult; | 68 | var deferredResult; |
72 | 69 | ||
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html index 3d7efaa..6024021 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.B283.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
38 | 35 | ||
39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
41 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> | 38 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> |
45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> |
47 | </head> | 44 | </head> |
48 | <body> | 45 | <body> |
49 | <pre id="test"> | 46 | <pre id="test"> |
50 | <script type="text/javascript"> | 47 | <script type="text/javascript"> |
51 | try { | 48 | try { |
52 | // | 49 | // |
53 | //ECC.BinaryFiniteField | 50 | //ECC.BinaryFiniteField |
54 | // | 51 | // |
55 | varf2m; | 52 | varf2m; |
56 | varf2m_improved; | 53 | varf2m_improved; |
57 | var a, a1, b; | 54 | var a, a1, b; |
58 | var result; | 55 | var result; |
59 | var result_improved; | 56 | var result_improved; |
60 | var expectedResul; | 57 | var expectedResul; |
61 | 58 | ||
62 | f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16)}) | 59 | f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16)}) |
63 | f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B283().finiteField(); | 60 | f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B283().finiteField(); |
64 | a = new Clipperz.Crypto.ECC.BinaryField.Value("05c91e41 d9ca17ef 9d8a33c1 a44eba6d 368fde02 1c492077 1a46eb01 a481e5f7 f430749d", 16); | 61 | a = new Clipperz.Crypto.ECC.BinaryField.Value("05c91e41 d9ca17ef 9d8a33c1 a44eba6d 368fde02 1c492077 1a46eb01 a481e5f7 f430749d", 16); |
65 | b = new Clipperz.Crypto.ECC.BinaryField.Value("07377071 2de7d57b a803f65f 45786c06 876b8066 db75ec47 81c053b0 a0f78e2c a6ab5187", 16); | 62 | b = new Clipperz.Crypto.ECC.BinaryField.Value("07377071 2de7d57b a803f65f 45786c06 876b8066 db75ec47 81c053b0 a0f78e2c a6ab5187", 16); |
66 | 63 | ||
67 | // | 64 | // |
68 | //addition | 65 | //addition |
69 | // | 66 | // |
70 | result = f2m.add(a, b); | 67 | result = f2m.add(a, b); |
71 | expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("2fe6e30f42dc2943589c59ee136d66bb1e45e64c73ccc309b86b8b104766bdb529b251a", 16); | 68 | expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("2fe6e30f42dc2943589c59ee136d66bb1e45e64c73ccc309b86b8b104766bdb529b251a", 16); |
72 | is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.add"); | 69 | is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.add"); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html index 6bddb26..5a7a4f7 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.FiniteField.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
38 | 35 | ||
39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
41 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> | 38 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> |
45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> |
47 | </head> | 44 | </head> |
48 | <body> | 45 | <body> |
49 | <pre id="test"> | 46 | <pre id="test"> |
50 | <script type="text/javascript"> | 47 | <script type="text/javascript"> |
51 | try { | 48 | try { |
52 | // | 49 | // |
53 | //ECC.BinaryFiniteField | 50 | //ECC.BinaryFiniteField |
54 | // | 51 | // |
55 | varf2m; | 52 | varf2m; |
56 | varf2m_improved; | 53 | varf2m_improved; |
57 | var a, b; | 54 | var a, b; |
58 | var result; | 55 | var result; |
59 | var result_improved; | 56 | var result_improved; |
60 | var expectedResul; | 57 | var expectedResul; |
61 | 58 | ||
62 | f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16)}) | 59 | f2m = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16)}) |
63 | f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B571().finiteField(); | 60 | f2m_improved = Clipperz.Crypto.ECC.StandardCurves.B571().finiteField(); |
64 | a = new Clipperz.Crypto.ECC.BinaryField.Value("01401ca8 7b8f1446 84a2c58a e9308c23 7789e4bf 1f36dd11 7c150b7d 6076dd1d a6197fe4 c5225a06 4db0e422 2589d5ca 50eb6bb6 b7147a03 f6152843 8a8767c6 a6c4a688 3fd6f067", 16); | 61 | a = new Clipperz.Crypto.ECC.BinaryField.Value("01401ca8 7b8f1446 84a2c58a e9308c23 7789e4bf 1f36dd11 7c150b7d 6076dd1d a6197fe4 c5225a06 4db0e422 2589d5ca 50eb6bb6 b7147a03 f6152843 8a8767c6 a6c4a688 3fd6f067", 16); |
65 | b = new Clipperz.Crypto.ECC.BinaryField.Value("0112f5c9 7e74737b 38925faf e22cea3e 12b868d4 ddea5b33 41db8fc2 e788cab7 4f0a7a3c c27087a8 93659453 69938650 a99217d5 66e13f80 dc87f082 73f7411b 6b01ef1d 399c772a", 16); | 62 | b = new Clipperz.Crypto.ECC.BinaryField.Value("0112f5c9 7e74737b 38925faf e22cea3e 12b868d4 ddea5b33 41db8fc2 e788cab7 4f0a7a3c c27087a8 93659453 69938650 a99217d5 66e13f80 dc87f082 73f7411b 6b01ef1d 399c772a", 16); |
66 | 63 | ||
67 | // | 64 | // |
68 | //addition | 65 | //addition |
69 | // | 66 | // |
70 | result = f2m.add(a, b); | 67 | result = f2m.add(a, b); |
71 | expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("52e96105fb673dbc309a250b1c661d65318c6bc2dc86223dce84bf87fe17aae91305d80752ddaeded570714c1a539af9797c63d1f545832a92d8c1f97026ddcdc54995064a874d", 16); | 68 | expectedResult = new Clipperz.Crypto.ECC.BinaryField.Value("52e96105fb673dbc309a250b1c661d65318c6bc2dc86223dce84bf87fe17aae91305d80752ddaeded570714c1a539af9797c63d1f545832a92d8c1f97026ddcdc54995064a874d", 16); |
72 | is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.add"); | 69 | is(result.asString(16), expectedResult.asString(16), "ECC.BinaryFinetField.add"); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html index 885bcc4..c58cf42 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.BinaryField.Value.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
38 | 35 | ||
39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
41 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> | 38 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC.js'></script>--> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script> |
45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Functions.js'></script> |
47 | </head> | 44 | </head> |
48 | <body> | 45 | <body> |
49 | <pre id="test"> | 46 | <pre id="test"> |
50 | <script type="text/javascript"> | 47 | <script type="text/javascript"> |
51 | try { | 48 | try { |
52 | var value_1; | 49 | var value_1; |
53 | var value_2; | 50 | var value_2; |
54 | 51 | ||
55 | value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("a", 16); | 52 | value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("a", 16); |
56 | is(value_1.asString(16), "0a"); | 53 | is(value_1.asString(16), "0a"); |
57 | 54 | ||
58 | value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("ffff", 16); | 55 | value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("ffff", 16); |
59 | is(value_1.asString(16), "ffff"); | 56 | is(value_1.asString(16), "ffff"); |
60 | 57 | ||
61 | value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("7fff", 16); | 58 | value_1 = new Clipperz.Crypto.ECC.BinaryField.Value("7fff", 16); |
62 | is(value_1.asString(16), "7fff"); | 59 | is(value_1.asString(16), "7fff"); |
63 | 60 | ||
64 | is(parseInt("ffff", 16), 65535); | 61 | is(parseInt("ffff", 16), 65535); |
65 | is(parseInt("ffffff", 16), 16777215); | 62 | is(parseInt("ffffff", 16), 16777215); |
66 | is(parseInt("ffffffff", 16), 4294967295); | 63 | is(parseInt("ffffffff", 16), 4294967295); |
67 | is(parseInt("ffffffffff", 16), 1099511627775); | 64 | is(parseInt("ffffffffff", 16), 1099511627775); |
68 | is(parseInt("ffffffffffff", 16), 281474976710655); | 65 | is(parseInt("ffffffffffff", 16), 281474976710655); |
69 | is(parseInt("ffffffffffffff", 16), 72057594037927940); | 66 | is(parseInt("ffffffffffffff", 16), 72057594037927940); |
70 | is(parseInt("ffffffffffffffff", 16), 18446744073709552000); | 67 | is(parseInt("ffffffffffffffff", 16), 18446744073709552000); |
71 | is(parseInt("10000000000000000", 16), 18446744073709552001); | 68 | is(parseInt("10000000000000000", 16), 18446744073709552001); |
72 | is(parseInt("10000000000000001", 16), 18446744073709552002); | 69 | is(parseInt("10000000000000001", 16), 18446744073709552002); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html index b53a9a1..b784f66 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/ECC.K283.deferred.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <!-- - -> | 28 | <!-- - -> |
32 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 29 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
33 | <!- - --> | 30 | <!- - --> |
34 | <!-- --> | 31 | <!-- --> |
35 | <script type="text/javascript" src="../../../../js/MochiKit/Base.js"></script> | 32 | <script type="text/javascript" src="../../../../js/MochiKit/Base.js"></script> |
36 | <script type="text/javascript" src="../../../../js/MochiKit/Async.js"></script> | 33 | <script type="text/javascript" src="../../../../js/MochiKit/Async.js"></script> |
37 | <script type="text/javascript" src="../../../../js/MochiKit/DOM.js"></script> | 34 | <script type="text/javascript" src="../../../../js/MochiKit/DOM.js"></script> |
38 | <script type="text/javascript" src="../../../../js/MochiKit/Logging.js"></script> | 35 | <script type="text/javascript" src="../../../../js/MochiKit/Logging.js"></script> |
39 | <script type="text/javascript" src="../../../../js/MochiKit/Iter.js"></script> | 36 | <script type="text/javascript" src="../../../../js/MochiKit/Iter.js"></script> |
40 | <!-- --> | 37 | <!-- --> |
41 | 38 | ||
42 | <!-- - -> | 39 | <!-- - -> |
43 | <script type="text/javascript" src="../../../../js/MochiKit/Style.js"></script> | 40 | <script type="text/javascript" src="../../../../js/MochiKit/Style.js"></script> |
44 | <script type="text/javascript" src="../../../../js/MochiKit/Signal.js"></script> | 41 | <script type="text/javascript" src="../../../../js/MochiKit/Signal.js"></script> |
45 | <script type="text/javascript" src="../../../../js/MochiKit/Color.js"></script> | 42 | <script type="text/javascript" src="../../../../js/MochiKit/Color.js"></script> |
46 | <script type="text/javascript" src="../../../../js/MochiKit/Position.js"></script> | 43 | <script type="text/javascript" src="../../../../js/MochiKit/Position.js"></script> |
47 | <script type="text/javascript" src="../../../../js/MochiKit/Visual.js"></script> | 44 | <script type="text/javascript" src="../../../../js/MochiKit/Visual.js"></script> |
48 | <!- - --> | 45 | <!- - --> |
49 | 46 | ||
50 | 47 | ||
51 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 48 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
52 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 49 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
53 | 50 | ||
54 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>--> | 51 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>--> |
55 | <!--<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>--> | 52 | <!--<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>--> |
56 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script>--> | 53 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script>--> |
57 | 54 | ||
58 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script>--> | 55 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Value.js'></script>--> |
59 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script>--> | 56 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Point.js'></script>--> |
60 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script>--> | 57 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js'></script>--> |
61 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script>--> | 58 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/BinaryField/Curve.js'></script>--> |
62 | 59 | ||
63 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Value.js'></script> | 60 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Value.js'></script> |
64 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Point.js'></script> | 61 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Point.js'></script> |
65 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/FiniteField.js'></script> | 62 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/FiniteField.js'></script> |
66 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Curve.js'></script> | 63 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/Koblitz/Curve.js'></script> |
67 | 64 | ||
68 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/StandardCurves.js'></script> | 65 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/ECC/StandardCurves.js'></script> |
69 | 66 | ||
70 | </head> | 67 | </head> |
71 | <body> | 68 | <body> |
72 | <pre id="test"> | 69 | <pre id="test"> |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html index 1342349..2968894 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.html | |||
@@ -1,70 +1,67 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <title>Clipperz.Crypto.JSCrypto_vs_Clipperz - tests</title> | 28 | <title>Clipperz.Crypto.JSCrypto_vs_Clipperz - tests</title> |
32 | 29 | ||
33 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 30 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
34 | 31 | ||
35 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 32 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
36 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
37 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
38 | 35 | ||
39 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> | 36 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> |
40 | 37 | ||
41 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
45 | <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> |
47 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
48 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
49 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> | 46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> |
50 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 47 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
51 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> | 48 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> |
52 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> | 49 | <script type='text/javascript' src='../../../../js/Clipperz/PM/Crypto.js'></script> |
53 | 50 | ||
54 | <script type='text/javascript' src='./jscrypto.js'></script> | 51 | <script type='text/javascript' src='./jscrypto.js'></script> |
55 | 52 | ||
56 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> | 53 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> |
57 | 54 | ||
58 | </head> | 55 | </head> |
59 | <body> | 56 | <body> |
60 | 57 | ||
61 | <pre id="test"> | 58 | <pre id="test"> |
62 | <script type="text/javascript"> | 59 | <script type="text/javascript"> |
63 | var longAsciiText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam ac ipsum. Morbi mauris. Aenean ac elit id metus lobortis elementum. Proin at quam ac ipsum pellentesque adipiscing. Aenean vestibulum, nisl eu suscipit iaculis, quam pede congue mi, sit amet dapibus metus neque eget dui. Suspendisse posuere diam ac sapien. Nulla lobortis dapibus leo. Quisque ornare tortor quis turpis. Aliquam erat volutpat. Ut faucibus lacinia magna. Nunc metus leo, volutpat quis, mollis ac, sagittis ut, turpis. Quisque purus. Mauris ante enim, vehicula eu, suscipit vitae, laoreet vel, nulla. Pellentesque pede leo, aliquam quis, vehicula eget, rhoncus nec, metus. Vestibulum tellus. Suspendisse blandit. Pellentesque vel tellus. Maecenas arcu. Duis eget purus. Curabitur non pede nec odio cursus luctus. In non elit. Nullam eget nunc in nisl elementum commodo. Vivamus sollicitudin pede quis dui. Morbi commodo. Praesent a risus id urna hendrerit fermentum. Nunc ultricies tristique odio. Phasellus imperdiet, sapien eget viverra blandit, tortor risus blandit nisi, et sodales libero dolor quis nisl. Morbi vel enim. Nunc in quam. Vestibulum a magna. Fusce auctor elit in augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris tincidunt consectetuer leo. Etiam non turpis. Vestibulum eros. Praesent venenatis adipiscing augue. Pellentesque dapibus odio ac arcu rhoncus sagittis. Nullam vitae augue. Ut magna nulla, congue eu, porta in, egestas quis, ligula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur malesuada neque non nulla. Nulla facilisi. Fusce viverra magna ut tellus. Sed rutrum pretium sapien. Vivamus dui. Cras fringilla. Nullam lorem. Vestibulum varius, purus at imperdiet fermentum, metus diam ultricies lacus, vitae aliquam ipsum libero sit amet felis. Sed eget eros ac velit commodo sollicitudin. Morbi in metus in mi viverra lacinia. Sed ut urna. Suspendisse imperdiet tellus ac velit. Duis malesuada velit sit amet sapien. Vestibulum a sapien id libero accumsan luctus. Fusce iaculis. Donec pulvinar orci ut pede. Nam placerat sem ut sem. Ut pretium bibendum nisl. Suspendisse potenti. Phasellus mollis neque in neque. Suspendisse augue magna, eleifend et, malesuada at, viverra in, nisl. Donec vel lectus in justo ultrices tristique. Aliquam erat volutpat. Morbi suscipit, risus ac volutpat mollis, risus metus hendrerit sapien, ac scelerisque est orci eu est. Quisque sit amet velit. Sed libero diam, semper id, eleifend ac, iaculis non, nulla. Donec varius tincidunt arcu. Sed quis metus eu erat adipiscing viverra. Donec odio. Aenean sagittis nisl sed purus. Fusce vel nibh quis felis accumsan bibendum. Etiam et risus ac tortor cursus pharetra. Maecenas tellus. Pellentesque nec felis id eros vehicula commodo. Aliquam interdum sagittis odio. Maecenas at lorem eget mi aliquet sagittis. Mauris quis nibh in odio sodales lacinia. Proin augue mauris, placerat a, blandit vel, tincidunt eget, ante. Quisque turpis purus, placerat eget, tempor consectetuer, aliquet ac, enim. Etiam eleifend vestibulum mi. Vivamus gravida. Morbi dolor. In hac habitasse platea dictumst. Nulla commodo lectus faucibus lorem. Phasellus aliquet pede id metus hendrerit tempus. Fusce convallis pede ac neque tempor dignissim. Sed vitae lorem sit amet justo dapibus porta. Ut quam orci, pretium non, sagittis nec, condimentum id, dolor. Sed tempor. Nunc porta rutrum leo. Nunc id sem. Sed nibh tortor, dapibus eget, feugiat a, pretium pretium, purus. Suspendisse suscipit lobortis sem. Praesent pharetra orci. Quisque molestie tristique quam. Maecenas nunc lorem, rhoncus non, venenatis sed, sodales at, felis. Quisque semper. Quisque malesuada est quis lacus. Nullam a justo. Aliquam pellentesque, ante ut congue molestie, nisl sapien posuere nisl, eu cursus nulla ligula vel nisl. Fusce commodo lacinia magna. Aenean rutrum vestibulum lorem. Pellentesque fermentum tristique ipsum. Nulla facilisi. Donec id mi eget ipsum commodo egestas. Mauris iaculis. Nulla vulputate mi at nisl. In condimentum sodales tellus. Donec metus orci, mollis vel, accumsan ac, ornare ac, lacus. Pellentesque accumsan est et tellus. Nam mollis. Aenean accumsan eros sit amet tellus. Praesent eu libero. Sed tempus urna nec dolor. Nulla facilisi. Duis eleifend rhoncus neque. Curabitur consectetuer quam eu justo. Sed metus. Vivamus risus. Aliquam erat volutpat. Aliquam erat volutpat. Nunc semper urna. Praesent molestie libero a lacus. Nullam suscipit lobortis velit. Praesent rhoncus, felis ut interdum dapibus, ipsum lectus vestibulum nulla, in interdum risus dolor eget orci. Nullam venenatis. Suspendisse laoreet, arcu a luctus consectetuer, libero ligula condimentum quam, eget elementum mauris tortor sed enim. Pellentesque leo. Nam interdum malesuada ante. Praesent fermentum nunc et dolor. Donec auctor volutpat odio. Pellentesque volutpat egestas ipsum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras ac ligula eu justo dignissim accumsan. Nullam nisi. Fusce id sem. Fusce et urna. Pellentesque commodo pharetra lorem. Donec erat. Vestibulum elit arcu, commodo et, consequat eget, posuere eget, sem. Morbi sed nulla sed neque commodo commodo. Aliquam erat volutpat. Ut id turpis a enim malesuada vestibulum. In arcu dui, dignissim vitae, blandit eu, egestas ac, arcu. In ultricies sapien vitae nisi. Proin rhoncus magna eget tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In dictum. Sed volutpat pharetra quam. Mauris eget eros. Fusce malesuada dolor id pede. Praesent nec justo sed nisi vehicula varius. In scelerisque convallis nulla. Pellentesque sodales massa vulputate urna. Duis metus urna, imperdiet ac, sodales vel, ullamcorper sed, pede. Vestibulum aliquam mollis metus. Praesent tempus tristique elit. Maecenas tellus tortor, pretium id, mollis id, molestie non, turpis. Vivamus nibh magna, bibendum vitae, a."; | 60 | var longAsciiText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam ac ipsum. Morbi mauris. Aenean ac elit id metus lobortis elementum. Proin at quam ac ipsum pellentesque adipiscing. Aenean vestibulum, nisl eu suscipit iaculis, quam pede congue mi, sit amet dapibus metus neque eget dui. Suspendisse posuere diam ac sapien. Nulla lobortis dapibus leo. Quisque ornare tortor quis turpis. Aliquam erat volutpat. Ut faucibus lacinia magna. Nunc metus leo, volutpat quis, mollis ac, sagittis ut, turpis. Quisque purus. Mauris ante enim, vehicula eu, suscipit vitae, laoreet vel, nulla. Pellentesque pede leo, aliquam quis, vehicula eget, rhoncus nec, metus. Vestibulum tellus. Suspendisse blandit. Pellentesque vel tellus. Maecenas arcu. Duis eget purus. Curabitur non pede nec odio cursus luctus. In non elit. Nullam eget nunc in nisl elementum commodo. Vivamus sollicitudin pede quis dui. Morbi commodo. Praesent a risus id urna hendrerit fermentum. Nunc ultricies tristique odio. Phasellus imperdiet, sapien eget viverra blandit, tortor risus blandit nisi, et sodales libero dolor quis nisl. Morbi vel enim. Nunc in quam. Vestibulum a magna. Fusce auctor elit in augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris tincidunt consectetuer leo. Etiam non turpis. Vestibulum eros. Praesent venenatis adipiscing augue. Pellentesque dapibus odio ac arcu rhoncus sagittis. Nullam vitae augue. Ut magna nulla, congue eu, porta in, egestas quis, ligula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur malesuada neque non nulla. Nulla facilisi. Fusce viverra magna ut tellus. Sed rutrum pretium sapien. Vivamus dui. Cras fringilla. Nullam lorem. Vestibulum varius, purus at imperdiet fermentum, metus diam ultricies lacus, vitae aliquam ipsum libero sit amet felis. Sed eget eros ac velit commodo sollicitudin. Morbi in metus in mi viverra lacinia. Sed ut urna. Suspendisse imperdiet tellus ac velit. Duis malesuada velit sit amet sapien. Vestibulum a sapien id libero accumsan luctus. Fusce iaculis. Donec pulvinar orci ut pede. Nam placerat sem ut sem. Ut pretium bibendum nisl. Suspendisse potenti. Phasellus mollis neque in neque. Suspendisse augue magna, eleifend et, malesuada at, viverra in, nisl. Donec vel lectus in justo ultrices tristique. Aliquam erat volutpat. Morbi suscipit, risus ac volutpat mollis, risus metus hendrerit sapien, ac scelerisque est orci eu est. Quisque sit amet velit. Sed libero diam, semper id, eleifend ac, iaculis non, nulla. Donec varius tincidunt arcu. Sed quis metus eu erat adipiscing viverra. Donec odio. Aenean sagittis nisl sed purus. Fusce vel nibh quis felis accumsan bibendum. Etiam et risus ac tortor cursus pharetra. Maecenas tellus. Pellentesque nec felis id eros vehicula commodo. Aliquam interdum sagittis odio. Maecenas at lorem eget mi aliquet sagittis. Mauris quis nibh in odio sodales lacinia. Proin augue mauris, placerat a, blandit vel, tincidunt eget, ante. Quisque turpis purus, placerat eget, tempor consectetuer, aliquet ac, enim. Etiam eleifend vestibulum mi. Vivamus gravida. Morbi dolor. In hac habitasse platea dictumst. Nulla commodo lectus faucibus lorem. Phasellus aliquet pede id metus hendrerit tempus. Fusce convallis pede ac neque tempor dignissim. Sed vitae lorem sit amet justo dapibus porta. Ut quam orci, pretium non, sagittis nec, condimentum id, dolor. Sed tempor. Nunc porta rutrum leo. Nunc id sem. Sed nibh tortor, dapibus eget, feugiat a, pretium pretium, purus. Suspendisse suscipit lobortis sem. Praesent pharetra orci. Quisque molestie tristique quam. Maecenas nunc lorem, rhoncus non, venenatis sed, sodales at, felis. Quisque semper. Quisque malesuada est quis lacus. Nullam a justo. Aliquam pellentesque, ante ut congue molestie, nisl sapien posuere nisl, eu cursus nulla ligula vel nisl. Fusce commodo lacinia magna. Aenean rutrum vestibulum lorem. Pellentesque fermentum tristique ipsum. Nulla facilisi. Donec id mi eget ipsum commodo egestas. Mauris iaculis. Nulla vulputate mi at nisl. In condimentum sodales tellus. Donec metus orci, mollis vel, accumsan ac, ornare ac, lacus. Pellentesque accumsan est et tellus. Nam mollis. Aenean accumsan eros sit amet tellus. Praesent eu libero. Sed tempus urna nec dolor. Nulla facilisi. Duis eleifend rhoncus neque. Curabitur consectetuer quam eu justo. Sed metus. Vivamus risus. Aliquam erat volutpat. Aliquam erat volutpat. Nunc semper urna. Praesent molestie libero a lacus. Nullam suscipit lobortis velit. Praesent rhoncus, felis ut interdum dapibus, ipsum lectus vestibulum nulla, in interdum risus dolor eget orci. Nullam venenatis. Suspendisse laoreet, arcu a luctus consectetuer, libero ligula condimentum quam, eget elementum mauris tortor sed enim. Pellentesque leo. Nam interdum malesuada ante. Praesent fermentum nunc et dolor. Donec auctor volutpat odio. Pellentesque volutpat egestas ipsum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras ac ligula eu justo dignissim accumsan. Nullam nisi. Fusce id sem. Fusce et urna. Pellentesque commodo pharetra lorem. Donec erat. Vestibulum elit arcu, commodo et, consequat eget, posuere eget, sem. Morbi sed nulla sed neque commodo commodo. Aliquam erat volutpat. Ut id turpis a enim malesuada vestibulum. In arcu dui, dignissim vitae, blandit eu, egestas ac, arcu. In ultricies sapien vitae nisi. Proin rhoncus magna eget tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In dictum. Sed volutpat pharetra quam. Mauris eget eros. Fusce malesuada dolor id pede. Praesent nec justo sed nisi vehicula varius. In scelerisque convallis nulla. Pellentesque sodales massa vulputate urna. Duis metus urna, imperdiet ac, sodales vel, ullamcorper sed, pede. Vestibulum aliquam mollis metus. Praesent tempus tristique elit. Maecenas tellus tortor, pretium id, mollis id, molestie non, turpis. Vivamus nibh magna, bibendum vitae, a."; |
64 | var longIsoLatin1Text = "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùù"; | 61 | var longIsoLatin1Text = "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¢£¤¥¦§¨©ª«¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùù"; |
65 | var longUtf8Text = "客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之"; | 62 | var longUtf8Text = "客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之所以能统称为汉语第客家方言简体字危及了对古代文学的研究共有找华语并不被中国政府很好的接受然而汉语之"; |
66 | </script> | 63 | </script> |
67 | <script type="text/javascript" src="JSCrypto_vs_Clipperz.test.js"></script> | 64 | <script type="text/javascript" src="JSCrypto_vs_Clipperz.test.js"></script> |
68 | </pre> | 65 | </pre> |
69 | </body> | 66 | </body> |
70 | </html> | 67 | </html> |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js index 7dc688c..1580e6c 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/JSCrypto_vs_Clipperz.test.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | //function logElapsedTime(aDescription, aStartTime, anEndTime) { | 26 | //function logElapsedTime(aDescription, aStartTime, anEndTime) { |
30 | //MochiKit.Logging.logDebug(aDescription + " - took " + (anEndTime - aStartTime) + "ms"); | 27 | //MochiKit.Logging.logDebug(aDescription + " - took " + (anEndTime - aStartTime) + "ms"); |
31 | //SimpleTest.ok(true, aDescription + " - took " + (anEndTime - aStartTime) + "ms"); | 28 | //SimpleTest.ok(true, aDescription + " - took " + (anEndTime - aStartTime) + "ms"); |
32 | //} | 29 | //} |
33 | 30 | ||
34 | var asciiTestString = longAsciiText; | 31 | var asciiTestString = longAsciiText; |
35 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; | 32 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; |
36 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; | 33 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; |
37 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; | 34 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; |
38 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; | 35 | //asciiTestString = asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString + asciiTestString; |
39 | //asciiTestString = asciiTestString + asciiTestString; | 36 | //asciiTestString = asciiTestString + asciiTestString; |
40 | //asciiTestString = asciiTestString + asciiTestString; | 37 | //asciiTestString = asciiTestString + asciiTestString; |
41 | 38 | ||
42 | var isoLatin1TestString= longIsoLatin1Text; | 39 | var isoLatin1TestString= longIsoLatin1Text; |
43 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; | 40 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; |
44 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; | 41 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; |
45 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; | 42 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString + isoLatin1TestString; |
46 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString; | 43 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString; |
47 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString; | 44 | //isoLatin1TestString = isoLatin1TestString + isoLatin1TestString; |
48 | 45 | ||
49 | var utf8TestString = longUtf8Text; | 46 | var utf8TestString = longUtf8Text; |
50 | //utf8TestString = utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString; | 47 | //utf8TestString = utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString; |
51 | //utf8TestString = utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString; | 48 | //utf8TestString = utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString + utf8TestString; |
52 | //utf8TestString = utf8TestString + utf8TestString; | 49 | //utf8TestString = utf8TestString + utf8TestString; |
53 | //utf8TestString = utf8TestString + utf8TestString; | 50 | //utf8TestString = utf8TestString + utf8TestString; |
54 | 51 | ||
55 | var times = { | 52 | var times = { |
56 | 'Clipperz': {}, | 53 | 'Clipperz': {}, |
57 | 'JSCrypto': {} | 54 | 'JSCrypto': {} |
58 | }; | 55 | }; |
59 | 56 | ||
60 | function appendResults (aDescription, aTimer) { | 57 | function appendResults (aDescription, aTimer) { |
61 | MochiKit.DOM.appendChildNodes(MochiKit.DOM.getElement('timerTBODY'), | 58 | MochiKit.DOM.appendChildNodes(MochiKit.DOM.getElement('timerTBODY'), |
62 | MochiKit.DOM.TR(null, | 59 | MochiKit.DOM.TR(null, |
63 | MochiKit.DOM.TH({align:'left'}, aDescription), | 60 | MochiKit.DOM.TH({align:'left'}, aDescription), |
64 | MochiKit.DOM.TH(null, aTimer['ascii']['encrypt'] + ' - ' + aTimer['ascii']['decrypt'])//, | 61 | MochiKit.DOM.TH(null, aTimer['ascii']['encrypt'] + ' - ' + aTimer['ascii']['decrypt'])//, |
65 | // MochiKit.DOM.TH(null, aTimer['isoLatin1']['encrypt']+ ' - ' + aTimer['isoLatin1']['decrypt']), | 62 | // MochiKit.DOM.TH(null, aTimer['isoLatin1']['encrypt']+ ' - ' + aTimer['isoLatin1']['decrypt']), |
66 | // MochiKit.DOM.TH(null, aTimer['utf8']['encrypt'] + ' - ' + aTimer['utf8']['decrypt']) | 63 | // MochiKit.DOM.TH(null, aTimer['utf8']['encrypt'] + ' - ' + aTimer['utf8']['decrypt']) |
67 | ) | 64 | ) |
68 | ); | 65 | ); |
69 | 66 | ||
70 | } | 67 | } |
71 | 68 | ||
72 | //============================================================================= | 69 | //============================================================================= |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html b/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html index 7ffd691..438d96f 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/PRNG.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script> jslog_config_enabled = true; </script> | 28 | <script> jslog_config_enabled = true; </script> |
32 | 29 | ||
33 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 30 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
34 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 31 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
35 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 32 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
36 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 33 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
37 | 34 | ||
38 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 35 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
39 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
40 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
41 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> |
44 | 41 | ||
45 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Statistics.js'></script>--> | 42 | <!--<script type='text/javascript' src='../../../../js/Clipperz/Crypto/Statistics.js'></script>--> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
47 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
48 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> | 45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> |
49 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
50 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> | 47 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> |
51 | </head> | 48 | </head> |
52 | <body> | 49 | <body> |
53 | <pre id="test"> | 50 | <pre id="test"> |
54 | <script type="text/javascript"> | 51 | <script type="text/javascript"> |
55 | test_PRNG = function() { | 52 | test_PRNG = function() { |
56 | varrand1, rand2; | 53 | varrand1, rand2; |
57 | var i,c; | 54 | var i,c; |
58 | 55 | ||
59 | c = 10; | 56 | c = 10; |
60 | for (i=0; i<c; i++) { | 57 | for (i=0; i<c; i++) { |
61 | // jslog.debug(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString()); | 58 | // jslog.debug(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString()); |
62 | } | 59 | } |
63 | 60 | ||
64 | rand1 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(1); | 61 | rand1 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(1); |
65 | is(rand1.byteAtIndex(0) <= 255, true, "getRandomByte returns always a single byte"); | 62 | is(rand1.byteAtIndex(0) <= 255, true, "getRandomByte returns always a single byte"); |
66 | 63 | ||
67 | rand2 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(1); | 64 | rand2 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(1); |
68 | is(rand1.equals(rand2), false, "getRandomByte should almost always return two different values when called into sequence"); | 65 | is(rand1.equals(rand2), false, "getRandomByte should almost always return two different values when called into sequence"); |
69 | 66 | ||
70 | 67 | ||
71 | rand1 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); | 68 | rand1 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); |
72 | rand2 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); | 69 | rand2 = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html b/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html index 468a987..f29f894 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/RSA.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/DOM.js'></script> |
38 | 35 | ||
39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/RSA.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/RSA.js'></script> |
42 | 39 | ||
43 | </head> | 40 | </head> |
44 | <body> | 41 | <body> |
45 | <pre id="test"> | 42 | <pre id="test"> |
46 | <script type="text/javascript"> | 43 | <script type="text/javascript"> |
47 | try { | 44 | try { |
48 | varrsaPublicKey; | 45 | varrsaPublicKey; |
49 | varrandomValue; | 46 | varrandomValue; |
50 | varpublicEncryptedValue; | 47 | varpublicEncryptedValue; |
51 | var privateEncryptedValue; | 48 | var privateEncryptedValue; |
52 | 49 | ||
53 | varstartTime; | 50 | varstartTime; |
54 | varendTime; | 51 | varendTime; |
55 | 52 | ||
56 | 53 | ||
57 | startTime=new Date(); | 54 | startTime=new Date(); |
58 | rsaPublicKey = Clipperz.Crypto.RSA.generatePublicKey(512); | 55 | rsaPublicKey = Clipperz.Crypto.RSA.generatePublicKey(512); |
59 | 56 | ||
60 | endTime=new Date(); | 57 | endTime=new Date(); |
61 | is(true, true, 'Time to generate the RSA public key (size 512 bit): '+(endTime.getTime()-startTime.getTime())/1000.0); | 58 | is(true, true, 'Time to generate the RSA public key (size 512 bit): '+(endTime.getTime()-startTime.getTime())/1000.0); |
62 | 59 | ||
63 | randomValue = Clipperz.Crypto.Base.generateRandomSeed(); | 60 | randomValue = Clipperz.Crypto.Base.generateRandomSeed(); |
64 | publicEncryptedValue = Clipperz.Crypto.RSA.encryptUsingPublicKey(rsaPublicKey, randomValue); | 61 | publicEncryptedValue = Clipperz.Crypto.RSA.encryptUsingPublicKey(rsaPublicKey, randomValue); |
65 | privateEncryptedValue = Clipperz.Crypto.RSA.encryptUsingPrivateKey(rsaPublicKey, randomValue); | 62 | privateEncryptedValue = Clipperz.Crypto.RSA.encryptUsingPrivateKey(rsaPublicKey, randomValue); |
66 | 63 | ||
67 | is(publicEncryptedValue == privateEncryptedValue, false); | 64 | is(publicEncryptedValue == privateEncryptedValue, false); |
68 | is(Clipperz.Crypto.RSA.decryptUsingPrivateKey(rsaPublicKey, publicEncryptedValue), randomValue); | 65 | is(Clipperz.Crypto.RSA.decryptUsingPrivateKey(rsaPublicKey, publicEncryptedValue), randomValue); |
69 | is(Clipperz.Crypto.RSA.decryptUsingPublicKey(rsaPublicKey, privateEncryptedValue), randomValue); | 66 | is(Clipperz.Crypto.RSA.decryptUsingPublicKey(rsaPublicKey, privateEncryptedValue), randomValue); |
70 | 67 | ||
71 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
72 | } catch (err) { | 69 | } catch (err) { |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html index 1c88213..a580491 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <title>Clipperz.Crypto.SHA - TEST</title> | 28 | <title>Clipperz.Crypto.SHA - TEST</title> |
32 | 29 | ||
33 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 30 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
34 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 31 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
35 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 32 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
36 | 33 | ||
37 | <script type='text/javascript' src='../../../js/JSON/json2.js'></script> | 34 | <script type='text/javascript' src='../../../js/JSON/json2.js'></script> |
38 | 35 | ||
39 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
40 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
41 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/Async.js'></script> |
45 | 42 | ||
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
47 | 44 | ||
48 | 45 | ||
49 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> | 46 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.Async.js"></script> |
50 | 47 | ||
51 | </head> | 48 | </head> |
52 | <body> | 49 | <body> |
53 | <pre id="test"> | 50 | <pre id="test"> |
54 | <script type="text/javascript" src="SHA.test.js"></script> | 51 | <script type="text/javascript" src="SHA.test.js"></script> |
55 | </pre> | 52 | </pre> |
56 | </body> | 53 | </body> |
57 | </html> | 54 | </html> |
58 | 55 | ||
59 | 56 | ||
60 | 57 | ||
61 | <!-- html> | 58 | <!-- html> |
62 | <head> | 59 | <head> |
63 | <script> | 60 | <script> |
64 | jslog_config_enabled = true; | 61 | jslog_config_enabled = true; |
65 | clipperz_profiling_enabled = true; | 62 | clipperz_profiling_enabled = true; |
66 | </script> | 63 | </script> |
67 | 64 | ||
68 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 65 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
69 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 66 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
70 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 67 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
71 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 68 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
72 | 69 | ||
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js index c9f1f3b..2864aaf 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SHA.test.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | var testSHA = function (aValue, anExpectedResult) { | 26 | var testSHA = function (aValue, anExpectedResult) { |
30 | var byteArrayValue; | 27 | var byteArrayValue; |
31 | 28 | ||
32 | byteArrayValue = new Clipperz.ByteArray(aValue); | 29 | byteArrayValue = new Clipperz.ByteArray(aValue); |
33 | hash = Clipperz.Crypto.SHA.sha256(byteArrayValue); | 30 | hash = Clipperz.Crypto.SHA.sha256(byteArrayValue); |
34 | is(hash.toHexString(), anExpectedResult, "sha256(' " + byteArrayValue.toHexString() + "')"); | 31 | is(hash.toHexString(), anExpectedResult, "sha256(' " + byteArrayValue.toHexString() + "')"); |
35 | 32 | ||
36 | } | 33 | } |
37 | 34 | ||
38 | 35 | ||
39 | var tests = { | 36 | var tests = { |
40 | 37 | ||
41 | 'basic_tests': function (someTestArgs) { | 38 | 'basic_tests': function (someTestArgs) { |
42 | testSHA('', '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'); | 39 | testSHA('', '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'); |
43 | testSHA('0xbd', '0x68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b'); | 40 | testSHA('0xbd', '0x68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b'); |
44 | testSHA('0x5fd4', '0x7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788'); | 41 | testSHA('0x5fd4', '0x7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788'); |
45 | testSHA('0xc98c8e55', '0x7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504'); | 42 | testSHA('0xc98c8e55', '0x7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504'); |
46 | testSHA('0x0df1cd526b5a4edd', '0x47f527210d6e8f940b5082fec01b7305908fa2b49ea3ae597c19a3986097153c'); | 43 | testSHA('0x0df1cd526b5a4edd', '0x47f527210d6e8f940b5082fec01b7305908fa2b49ea3ae597c19a3986097153c'); |
47 | testSHA('0xfdf4700984ee11b70af1880d0e0fefd4', '0xb01ae16eed3b4a770f127b98469ba26fe3d8e9f59d8a2983214afe6cff0e6b6c'); | 44 | testSHA('0xfdf4700984ee11b70af1880d0e0fefd4', '0xb01ae16eed3b4a770f127b98469ba26fe3d8e9f59d8a2983214afe6cff0e6b6c'); |
48 | testSHA('0x8cf53d90077df9a043bf8d10b470b144784411c93a4d504556834dae3ea4a5bb', '0x56059e8cb3c2978b198208bf5ca1e1ea5659b737a506324b7cec75b5ebaf057d'); | 45 | testSHA('0x8cf53d90077df9a043bf8d10b470b144784411c93a4d504556834dae3ea4a5bb', '0x56059e8cb3c2978b198208bf5ca1e1ea5659b737a506324b7cec75b5ebaf057d'); |
49 | testSHA('0xeebcf5cd6b12c90db64ff71a0e08ccd956e170a50dad769480d6b1fb3eff4934cde90f9e9b930ee637a66285c10f4e8a', '0xc117b9dce689c399ec99008788cd5d24d8396fab7d96315c4f3fe6d56da63bb3'); | 46 | testSHA('0xeebcf5cd6b12c90db64ff71a0e08ccd956e170a50dad769480d6b1fb3eff4934cde90f9e9b930ee637a66285c10f4e8a', '0xc117b9dce689c399ec99008788cd5d24d8396fab7d96315c4f3fe6d56da63bb3'); |
50 | testSHA('0x3592ecfd1eac618fd390e7a9c24b656532509367c21a0eac1212ac83c0b20cd896eb72b801c4d212c5452bbbf09317b50c5c9fb1997553d2bbc29bb42f5748ad', '0x105a60865830ac3a371d3843324d4bb5fa8ec0e02ddaa389ad8da4f10215c454'); | 47 | testSHA('0x3592ecfd1eac618fd390e7a9c24b656532509367c21a0eac1212ac83c0b20cd896eb72b801c4d212c5452bbbf09317b50c5c9fb1997553d2bbc29bb42f5748ad', '0x105a60865830ac3a371d3843324d4bb5fa8ec0e02ddaa389ad8da4f10215c454'); |
51 | 48 | ||
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'aldo_cortesi_tests': function (someTestArgs) { | 53 | 'aldo_cortesi_tests': function (someTestArgs) { |
57 | testSHA('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','0xa3f01b6939256127582ac8ae9fb47a382a244680806a3f613a118851c1ca1d47'); | 54 | testSHA('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','0xa3f01b6939256127582ac8ae9fb47a382a244680806a3f613a118851c1ca1d47'); |
58 | testSHA('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','0xb35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a'); | 55 | testSHA('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','0xb35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a'); |
59 | testSHA('0x79', '0xa1fce4363854ff888cff4b8e7875d600c2682390412a8cf79b37d0b11148b0fa'); | 56 | testSHA('0x79', '0xa1fce4363854ff888cff4b8e7875d600c2682390412a8cf79b37d0b11148b0fa'); |
60 | testSHA('0x80', '0x76be8b528d0075f7aae98d6fa57a6d3c83ae480a8469e668d7b0af968995ac71'); | 57 | testSHA('0x80', '0x76be8b528d0075f7aae98d6fa57a6d3c83ae480a8469e668d7b0af968995ac71'); |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'longTextPerformance_test': function (someTestArgs) { | 62 | 'longTextPerformance_test': function (someTestArgs) { |
66 | var longText; | 63 | var longText; |
67 | var startTime; | 64 | var startTime; |
68 | var endTime; | 65 | var endTime; |
69 | 66 | ||
70 | longText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nunc sapien, condimentum vitae, varius vel, pharetra in, augue. Mauris quam magna, pretium sit amet, accumsan id, volutpat lobortis, nibh. Fusce sagittis. Aenean justo. Curabitur euismod pede. Morbi at ante. Proin nisl leo, ultrices sed, facilisis et, nonummy sit amet, lorem. Praesent mauris tellus, pulvinar sed, nonummy vitae, rhoncus non, nunc. Proin placerat malesuada nisl. Nunc id enim. Maecenas commodo enim ac nibh. Sed condimentum, urna sit amet euismod gravida, mi urna varius odio, luctus pretium lectus justo nec felis. Ut in augue et est malesuada rhoncus. Sed vel orci. Mauris suscipit. Praesent cursus velit non turpis. Donec tristique dolor ac est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est sapien, vulputate eget, bibendum id, pharetra nec, mauris. Aliquam faucibus tincidunt dui. Proin iaculis. Maecenas sagittis. Integer et augue. Donec vitae urna in orci aliquet commodo. Vestibulum lorem sem, suscipit ac, placerat nec, mollis in, felis. Donec laoreet odio a mauris. Integer rutrum, sapien id varius molestie, mauris odio egestas orci, non bibendum sem felis in metus. Phasellus consectetuer lectus adipiscing mauris. Ut magna tellus, euismod ac, suscipit tincidunt, ullamcorper adipiscing, massa. Etiam orci. Phasellus a urna. Cras neque quam, laoreet at, tempus eget, euismod nec, nibh. Etiam hendrerit. Aenean vel lorem. Ut ligula lacus, congue eu, lobortis sit amet, venenatis in, magna. Nullam cursus felis quis est. Sed sem est, condimentum eu, vestibulum a, mattis vel, diam. Curabitur tincidunt pede quis pede. Sed neque diam, convallis vel, luctus at, porta id, nisl. Suspendisse potenti. Sed volutpat lobortis orci. Praesent mi. In interdum. Suspendisse suscipit ipsum eget dolor. Curabitur et tellus sed velit hendrerit varius. Cras sit amet est. Donec arcu nulla, vehicula et, pretium in, placerat id, felis. Integer mollis auctor lectus. Integer ultrices elementum sapien. Nam et erat. Nam pulvinar porta tortor. Nam at risus. Quisque nulla. Integer vestibulum, lacus id bibendum laoreet, ligula mi pharetra lorem, sit amet pharetra felis mauris quis justo. Aliquam ultricies. Duis a pede eget lorem dapibus rhoncus. Aenean eu elit non libero consectetuer viverra. Maecenas velit mi, eleifend vel, malesuada vel, condimentum quis, odio. Mauris tempus augue sed turpis. Pellentesque condimentum, lacus vitae pellentesque ultricies, risus tellus posuere nisi, et dictum turpis pede nec elit. Sed eu lectus eu justo sagittis euismod. Vestibulum lobortis, urna id mollis rhoncus, orci quam euismod ligula, at malesuada lacus magna vitae massa. Phasellus mattis fermentum velit. Nulla vulputate consequat enim. Maecenas quis neque. Curabitur sagittis facilisis neque. In elementum, eros non porttitor rhoncus, libero turpis sodales odio, vitae porta tellus purus et ante. Nullam molestie sollicitudin metus. Donec a elit. Morbi ut lacus. Donec at arcu. Quisque velit diam, interdum a, lacinia at, varius et, odio. Cras neque magna, ornare id, sollicitudin id, consequat a, est. Phasellus vestibulum est at leo. Nam facilisis, nulla dapibus condimentum pellentesque, est magna viverra ligula, at sollicitudin urna augue ut sapien. Fusce justo."; | 67 | longText = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nunc sapien, condimentum vitae, varius vel, pharetra in, augue. Mauris quam magna, pretium sit amet, accumsan id, volutpat lobortis, nibh. Fusce sagittis. Aenean justo. Curabitur euismod pede. Morbi at ante. Proin nisl leo, ultrices sed, facilisis et, nonummy sit amet, lorem. Praesent mauris tellus, pulvinar sed, nonummy vitae, rhoncus non, nunc. Proin placerat malesuada nisl. Nunc id enim. Maecenas commodo enim ac nibh. Sed condimentum, urna sit amet euismod gravida, mi urna varius odio, luctus pretium lectus justo nec felis. Ut in augue et est malesuada rhoncus. Sed vel orci. Mauris suscipit. Praesent cursus velit non turpis. Donec tristique dolor ac est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est sapien, vulputate eget, bibendum id, pharetra nec, mauris. Aliquam faucibus tincidunt dui. Proin iaculis. Maecenas sagittis. Integer et augue. Donec vitae urna in orci aliquet commodo. Vestibulum lorem sem, suscipit ac, placerat nec, mollis in, felis. Donec laoreet odio a mauris. Integer rutrum, sapien id varius molestie, mauris odio egestas orci, non bibendum sem felis in metus. Phasellus consectetuer lectus adipiscing mauris. Ut magna tellus, euismod ac, suscipit tincidunt, ullamcorper adipiscing, massa. Etiam orci. Phasellus a urna. Cras neque quam, laoreet at, tempus eget, euismod nec, nibh. Etiam hendrerit. Aenean vel lorem. Ut ligula lacus, congue eu, lobortis sit amet, venenatis in, magna. Nullam cursus felis quis est. Sed sem est, condimentum eu, vestibulum a, mattis vel, diam. Curabitur tincidunt pede quis pede. Sed neque diam, convallis vel, luctus at, porta id, nisl. Suspendisse potenti. Sed volutpat lobortis orci. Praesent mi. In interdum. Suspendisse suscipit ipsum eget dolor. Curabitur et tellus sed velit hendrerit varius. Cras sit amet est. Donec arcu nulla, vehicula et, pretium in, placerat id, felis. Integer mollis auctor lectus. Integer ultrices elementum sapien. Nam et erat. Nam pulvinar porta tortor. Nam at risus. Quisque nulla. Integer vestibulum, lacus id bibendum laoreet, ligula mi pharetra lorem, sit amet pharetra felis mauris quis justo. Aliquam ultricies. Duis a pede eget lorem dapibus rhoncus. Aenean eu elit non libero consectetuer viverra. Maecenas velit mi, eleifend vel, malesuada vel, condimentum quis, odio. Mauris tempus augue sed turpis. Pellentesque condimentum, lacus vitae pellentesque ultricies, risus tellus posuere nisi, et dictum turpis pede nec elit. Sed eu lectus eu justo sagittis euismod. Vestibulum lobortis, urna id mollis rhoncus, orci quam euismod ligula, at malesuada lacus magna vitae massa. Phasellus mattis fermentum velit. Nulla vulputate consequat enim. Maecenas quis neque. Curabitur sagittis facilisis neque. In elementum, eros non porttitor rhoncus, libero turpis sodales odio, vitae porta tellus purus et ante. Nullam molestie sollicitudin metus. Donec a elit. Morbi ut lacus. Donec at arcu. Quisque velit diam, interdum a, lacinia at, varius et, odio. Cras neque magna, ornare id, sollicitudin id, consequat a, est. Phasellus vestibulum est at leo. Nam facilisis, nulla dapibus condimentum pellentesque, est magna viverra ligula, at sollicitudin urna augue ut sapien. Fusce justo."; |
71 | startTime = new Date(); | 68 | startTime = new Date(); |
72 | testSHA(longText, '0xf6fac13c06784e0fbc61a3d25c41c9984840a8b617a2beb57cf6fa3e5e4a8949'); | 69 | testSHA(longText, '0xf6fac13c06784e0fbc61a3d25c41c9984840a8b617a2beb57cf6fa3e5e4a8949'); |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html b/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html index 63278c4..d0ee153 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/SRP.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 28 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
32 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 29 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
33 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 30 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
34 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 31 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
35 | 32 | ||
36 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 33 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
37 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 34 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
38 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 35 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
39 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 36 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
40 | 37 | ||
41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/BigInt.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/Base.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> |
45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> | 42 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> |
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SRP.js'></script> |
47 | </head> | 44 | </head> |
48 | <body> | 45 | <body> |
49 | <pre id="test"> | 46 | <pre id="test"> |
50 | <script type="text/javascript"> | 47 | <script type="text/javascript"> |
51 | hashString = function(aValue) { | 48 | hashString = function(aValue) { |
52 | return Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(aValue)).toHexString().substring(2) | 49 | return Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(aValue)).toHexString().substring(2) |
53 | } | 50 | } |
54 | try { | 51 | try { |
55 | varusername; | 52 | varusername; |
56 | varpassphrase; | 53 | varpassphrase; |
57 | 54 | ||
58 | var C; | 55 | var C; |
59 | var P; | 56 | var P; |
60 | var encryptedText_1; | 57 | var encryptedText_1; |
61 | var encryptedText_2; | 58 | var encryptedText_2; |
62 | varsalt; | 59 | varsalt; |
63 | varx; | 60 | varx; |
64 | var v; | 61 | var v; |
65 | var v1; | 62 | var v1; |
66 | 63 | ||
67 | username = "giulio.cesare"; | 64 | username = "giulio.cesare"; |
68 | passphrase = "trustno1"; | 65 | passphrase = "trustno1"; |
69 | 66 | ||
70 | C = hashString(username); | 67 | C = hashString(username); |
71 | is (C, "bde3c7b5fdcd9d6ce72782ca1ae912fc4397d668fcb3a73a04e5d47852670c4a", "C"); | 68 | is (C, "bde3c7b5fdcd9d6ce72782ca1ae912fc4397d668fcb3a73a04e5d47852670c4a", "C"); |
72 | 69 | ||
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html b/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html index 63f7610..8920915 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/Usage.html | |||
@@ -1,72 +1,69 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <title>Clipperz.Crypto.Usage - TEST</title> | 28 | <title>Clipperz.Crypto.Usage - TEST</title> |
32 | 29 | ||
33 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 30 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
34 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> | 31 | <script type="text/javascript" src="../../../../js/JSLog/jslog.js"></script> |
35 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> | 32 | <script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script> |
36 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> | 33 | <link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css"> |
37 | 34 | ||
38 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> | 35 | <script type='text/javascript' src='../../../../js/JSON/json2.js'></script> |
39 | 36 | ||
40 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> | 37 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script> |
41 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> | 38 | <script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script> |
42 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> | 39 | <script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script> |
43 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> | 40 | <script type='text/javascript' src='../../../../js/Clipperz/Logging.js'></script> |
44 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> | 41 | <script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script> |
45 | 42 | ||
46 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> | 43 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script> |
47 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> | 44 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script> |
48 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> | 45 | <script type='text/javascript' src='../../../../js/Clipperz/Crypto/PRNG.js'></script> |
49 | 46 | ||
50 | </head> | 47 | </head> |
51 | <body> | 48 | <body> |
52 | <pre id="test"> | 49 | <pre id="test"> |
53 | <script type="text/javascript"> | 50 | <script type="text/javascript"> |
54 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); | 51 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); |
55 | 52 | ||
56 | MochiKit.Base.update(Clipperz, { | 53 | MochiKit.Base.update(Clipperz, { |
57 | 'PM': { | 54 | 'PM': { |
58 | 'Crypto': { | 55 | 'Crypto': { |
59 | 'passwordEntropy': function(aValue) { | 56 | 'passwordEntropy': function(aValue) { |
60 | var result; | 57 | var result; |
61 | varbitPerChar; | 58 | varbitPerChar; |
62 | 59 | ||
63 | bitPerChar = 4; | 60 | bitPerChar = 4; |
64 | if (/[a-z]/.test(aValue)) { | 61 | if (/[a-z]/.test(aValue)) { |
65 | bitPerChar ++; | 62 | bitPerChar ++; |
66 | } | 63 | } |
67 | if (/[A-Z]/.test(aValue)) { | 64 | if (/[A-Z]/.test(aValue)) { |
68 | bitPerChar ++; | 65 | bitPerChar ++; |
69 | } | 66 | } |
70 | if (/[^a-zA-Z0-9]/.test(aValue)) { | 67 | if (/[^a-zA-Z0-9]/.test(aValue)) { |
71 | bitPerChar ++; | 68 | bitPerChar ++; |
72 | } | 69 | } |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/index.html b/frontend/gamma/tests/tests/Clipperz/Crypto/index.html index 67487ac..dd63ceb 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/index.html +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/index.html | |||
@@ -1,58 +1,55 @@ | |||
1 | <!-- | 1 | <!-- |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | --> | 24 | --> |
28 | 25 | ||
29 | <html> | 26 | <html> |
30 | <head> | 27 | <head> |
31 | <title>Clipperz.Crypto.* - tests</title> | 28 | <title>Clipperz.Crypto.* - tests</title> |
32 | 29 | ||
33 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> | 30 | <script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script> |
34 | <script type="text/javascript" src="../../../SimpleTest/TestRunner.js"></script> | 31 | <script type="text/javascript" src="../../../SimpleTest/TestRunner.js"></script> |
35 | </head> | 32 | </head> |
36 | <body> | 33 | <body> |
37 | <script> | 34 | <script> |
38 | TestRunner.runTests( | 35 | TestRunner.runTests( |
39 | 'AES.html', | 36 | 'AES.html', |
40 | 'AES.performance.html', | 37 | 'AES.performance.html', |
41 | 'Base.html', | 38 | 'Base.html', |
42 | 'BigInt.html', | 39 | 'BigInt.html', |
43 | 40 | ||
44 | //'ECC.B283.deferred.html', | 41 | //'ECC.B283.deferred.html', |
45 | //'ECC.BinaryField.FiniteField.html', | 42 | //'ECC.BinaryField.FiniteField.html', |
46 | //'ECC.BinaryField.FiniteField.B283.html', | 43 | //'ECC.BinaryField.FiniteField.B283.html', |
47 | //'ECC.BinaryField.Value.html', | 44 | //'ECC.BinaryField.Value.html', |
48 | //#'ECC.K283.deferred.html', | 45 | //#'ECC.K283.deferred.html', |
49 | 46 | ||
50 | 'PRNG.html', | 47 | 'PRNG.html', |
51 | //'RSA.html', | 48 | //'RSA.html', |
52 | 'SHA.html', | 49 | 'SHA.html', |
53 | 'SRP.html', | 50 | 'SRP.html', |
54 | 'Usage.html' | 51 | 'Usage.html' |
55 | ); | 52 | ); |
56 | </script> | 53 | </script> |
57 | </body> | 54 | </body> |
58 | </html> \ No newline at end of file | 55 | </html> \ No newline at end of file |
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js b/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js index e9db091..9a0d5fa 100644 --- a/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js +++ b/frontend/gamma/tests/tests/Clipperz/Crypto/jscrypto.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | /* jsCrypto | 26 | /* jsCrypto |
30 | Core AES | 27 | Core AES |
31 | 28 | ||
32 | Emily Stark (estark@stanford.edu) | 29 | Emily Stark (estark@stanford.edu) |
33 | Mike Hamburg (mhamburg@stanford.edu) | 30 | Mike Hamburg (mhamburg@stanford.edu) |
34 | Dan Boneh (dabo@cs.stanford.edu) | 31 | Dan Boneh (dabo@cs.stanford.edu) |
35 | 32 | ||
36 | Symmetric AES in Javascript using precomputed lookup tables for round transformations rather for speed improvements | 33 | Symmetric AES in Javascript using precomputed lookup tables for round transformations rather for speed improvements |
37 | and code size reduction. Provides authenticated encryption in OCB and CCM modes. | 34 | and code size reduction. Provides authenticated encryption in OCB and CCM modes. |
38 | Parts of this code are based on the OpenSSL implementation of AES: http://www.openssl.org | 35 | Parts of this code are based on the OpenSSL implementation of AES: http://www.openssl.org |
39 | 36 | ||
40 | Public domain, 2009. | 37 | Public domain, 2009. |
41 | 38 | ||
42 | */ | 39 | */ |
43 | 40 | ||
44 | 41 | ||
45 | // CCM mode is the default | 42 | // CCM mode is the default |
46 | var CCM = 1, OCB = 2; | 43 | var CCM = 1, OCB = 2; |
47 | 44 | ||
48 | /* aes object constructor. Takes as arguments: | 45 | /* aes object constructor. Takes as arguments: |
49 | - 16-byte key, or an array of 4 32-bit words | 46 | - 16-byte key, or an array of 4 32-bit words |
50 | - Optionally specify a mode (aes.OCB or aes.CCM). Defaults to CCM | 47 | - Optionally specify a mode (aes.OCB or aes.CCM). Defaults to CCM |
51 | - Optionally specify a MAC tag length for integrity. Defaults to 16 bytes | 48 | - Optionally specify a MAC tag length for integrity. Defaults to 16 bytes |
52 | */ | 49 | */ |
53 | function aes(key, mode, Tlen) { | 50 | function aes(key, mode, Tlen) { |
54 | // initialize objects for CCM and OCB modes | 51 | // initialize objects for CCM and OCB modes |
55 | this._CCM = new cipherCCM(this); | 52 | this._CCM = new cipherCCM(this); |
56 | this._OCB = new cipherOCB(this); | 53 | this._OCB = new cipherOCB(this); |
57 | 54 | ||
58 | this._decryptScheduled = false; | 55 | this._decryptScheduled = false; |
59 | 56 | ||
60 | if (mode) this._mode = mode; | 57 | if (mode) this._mode = mode; |
61 | else this._mode = OCB; | 58 | else this._mode = OCB; |
62 | 59 | ||
63 | // AES round constants | 60 | // AES round constants |
64 | this._RCON = [ | 61 | this._RCON = [ |
65 | [0x00, 0x00, 0x00, 0x00], | 62 | [0x00, 0x00, 0x00, 0x00], |
66 | [0x01, 0x00, 0x00, 0x00], | 63 | [0x01, 0x00, 0x00, 0x00], |
67 | [0x02, 0x00, 0x00, 0x00], | 64 | [0x02, 0x00, 0x00, 0x00], |
68 | [0x04, 0x00, 0x00, 0x00], | 65 | [0x04, 0x00, 0x00, 0x00], |
69 | [0x08, 0x00, 0x00, 0x00], | 66 | [0x08, 0x00, 0x00, 0x00], |
70 | [0x10, 0x00, 0x00, 0x00], | 67 | [0x10, 0x00, 0x00, 0x00], |
71 | [0x20, 0x00, 0x00, 0x00], | 68 | [0x20, 0x00, 0x00, 0x00], |
72 | [0x40, 0x00, 0x00, 0x00], | 69 | [0x40, 0x00, 0x00, 0x00], |