diff --git a/css/style.css b/css/style.css index 18e5b9e..1c8566f 100644 --- a/css/style.css +++ b/css/style.css @@ -823,7 +823,7 @@ font-size: 30px; margin-top: 2px; } -//To move navigation buttons outside use these settings: +/To move navigation buttons outside use these settings: #owl-demo .owl-controls .owl-buttons div, #owl-partner-institutions .owl-controls .owl-buttons div{ position: absolute; diff --git a/css/style1.css b/css/style1.css index fde8204..a8d4593 100644 --- a/css/style1.css +++ b/css/style1.css @@ -7,7 +7,7 @@ Description: The theme to accompany the profile site for vlabs.ac.in Version: 1.0 */ @import url(http://fonts.googleapis.com/css?family=Open+Sans:300); -/ + /* try to alter with above URL and check which fit the best @import url(http://fonts.googleapis.com/css?family=Open+Sans); @@ -575,7 +575,7 @@ a:focus margin-top: 2px; } -//To move navigation buttons outside use these settings: +/To move navigation buttons outside use these settings: #owl-demo .owl-controls .owl-buttons div, #owl-partner-institutions .owl-controls .owl-buttons div{ position: absolute; @@ -737,8 +737,9 @@ a:focus <<<<<<< HEAD font-size: 2.0em; text-align: left; -======= - font-size: 1.2em; +} +======= { + font-size: 1.2em; >>>>>>> f3b4f22ca1ec6639cf95185650d5427a8bca30ee line-height: normal; color: black; diff --git a/src/lab/css/style.css b/src/lab/css/style.css index d0be27c..0d4163e 100755 --- a/src/lab/css/style.css +++ b/src/lab/css/style.css @@ -19,7 +19,7 @@ body { margin:0 auto; padding:0 - width:100%; + width:100px; } #lab-header, #experiment-header @@ -229,25 +229,25 @@ nav#lab-article-navigation ul li a:focus, nav#experiment-article-navigation ul l color: #fef4e9; border: solid 1px #da7c0c; background: #f78d1d; - background: -webkit-gradient(linear, left top, left bottom, - from(#faa51a), to(#f47a20)); - background: -moz-linear-gradient(top, #faa51a, #f47a20); + background: -webkit-linear-gradient(top, #faa51a 0%, #f47a20 100%); + + background: -o-linear-gradient(top, #faa51a 0%, #f47a20 100%); } .button:hover { background: #f47c20; - background: -webkit-gradient(linear, left top, left bottom, - from(#f88e11), to(#f06015)); - background: -moz-linear-gradient(top, #f88e11, #f06015); + background: -webkit-linear-gradient(top, #f88e11 0%,#f06015 100%); + + background: -o-linear-gradient(top, #f88e11 0%, #f06015 100%); } .button:active { - background: -webkit-gradient(linear, left top, left bottom, - from(#f47a20), to(#faa51a)); - background: -moz-linear-gradient(top, #f47a20, #faa51a); + background: -webkit-linear-gradient(top, #f47a20 0%, #faa51a 100%); + + background: -o-linear-gradient(top, #f47a20 0%, #faa51a 100%); } /* basic styles for button size, padding, etc. */ diff --git a/src/lab/exp11/Quizzes.html b/src/lab/exp11/Quizzes.html index 38c3ab2..afaaef9 100644 --- a/src/lab/exp11/Quizzes.html +++ b/src/lab/exp11/Quizzes.html @@ -1,4 +1,4 @@ - + @@ -110,26 +110,26 @@

Digital Signatures Scheme

  • Digital signature uses ______ for generating valid signature
      -
    1. Private key
    2. -
    3. Public key
    4. -
    5. Secret key
    6. -
    7. None of the aboove
    8. +
    9. Private key
    10. +
    11. Private key
    12. +
    13. Secret key
    14. +
    15. None of the above
  • Verification Algorithm uses ______ for validating digital signature
      -
    1. Private key
    2. -
    3. Public key
    4. -
    5. Secret key
    6. -
    7. None of the aboove
    8. +
    9. Private key
    10. +
    11. Private key
    12. +
    13. Secret key
    14. +
    15. None of the above
  • Is digital signature scheme possible without public key cryptography
      -
    1. Yes
    2. -
    3. No
    4. -
    5. May be exist
    6. -
    7. None of the aboove
    8. +
    9. Yes
    10. +
    11. No
    12. +
    13. May be exist
    14. +
    15. None of the above
  • diff --git a/src/lab/js/cbc-mac.js b/src/lab/js/cbc-mac.js index cef13fe..69f3eb7 100644 --- a/src/lab/js/cbc-mac.js +++ b/src/lab/js/cbc-mac.js @@ -26,7 +26,7 @@ function isUnsignedInteger(s) { } function rand_sequence(len){ - ret=""; + var ret=""; for(i=0; i 2*l) { current_l = l; + function next_function(new) //any local variable 'new' is created +{ +} current_function = next_function(l); } else { alert("l should not be greater than the (length of plaintext)/2"); diff --git a/src/lab/js/des.js b/src/lab/js/des.js index c04db5c..b04acbb 100644 --- a/src/lab/js/des.js +++ b/src/lab/js/des.js @@ -279,7 +279,7 @@ function des_round( L, R, KeyR ) // copy the existing L bits, then set new L = old R var temp_L = new Array( 33 ); - for( i=0; i<33; i++ ) + for( var i=0; i<33; i++ ) { // copy exising L bits temp_L[i] = L[i]; diff --git a/src/lab/js/exp1.js b/src/lab/js/exp1.js index 8299c64..8fd7a4e 100644 --- a/src/lab/js/exp1.js +++ b/src/lab/js/exp1.js @@ -7,8 +7,8 @@ function Shift_Encrypt(src, dst) { var plaintext = document.getElementById(src).value.toLowerCase(); if(plaintext.length < 1){ alert("please enter some plaintext"); return; } var shift = parseInt(document.getElementById("shift_key").value); - ciphertext = ""; var re = /[a-z]/; - for(i=0; i> 2); + ret += var int2char(v >> 2); slop = v & 3; k = 1; } diff --git a/src/lab/js/exp10/jsbn2.js b/src/lab/js/exp10/jsbn2.js index e53e00b..f46afd6 100644 --- a/src/lab/js/exp10/jsbn2.js +++ b/src/lab/js/exp10/jsbn2.js @@ -87,7 +87,9 @@ function bnpFromNumber(a,b,c) { else { this.fromNumber(a,c); if(!this.testBit(a-1)) // force MSB set + { var op_or; this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + } if(this.isEven()) this.dAddOffset(1,0); // force odd while(!this.isProbablePrime(b)) { this.dAddOffset(2,0); diff --git a/src/lab/js/exp10/rsa2.js b/src/lab/js/exp10/rsa2.js index 1dfdb70..3fef038 100644 --- a/src/lab/js/exp10/rsa2.js +++ b/src/lab/js/exp10/rsa2.js @@ -59,7 +59,7 @@ function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) { // Generate a new random private key B bits long, using public expt E function RSAGenerate(B,E) { - var rng = new SecureRandom(); + var rng = new var SecureRandom(); var qs = B>>1; this.e = parseInt(E,16); var ee = new BigInteger(E,16); diff --git a/src/lab/js/exp11/jsbn2.js b/src/lab/js/exp11/jsbn2.js index e53e00b..909ad86 100644 --- a/src/lab/js/exp11/jsbn2.js +++ b/src/lab/js/exp11/jsbn2.js @@ -87,7 +87,8 @@ function bnpFromNumber(a,b,c) { else { this.fromNumber(a,c); if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + { var op_or; + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);} if(this.isEven()) this.dAddOffset(1,0); // force odd while(!this.isProbablePrime(b)) { this.dAddOffset(2,0); diff --git a/src/lab/js/exp11/rsa.js b/src/lab/js/exp11/rsa.js index 9f86640..903dc53 100644 --- a/src/lab/js/exp11/rsa.js +++ b/src/lab/js/exp11/rsa.js @@ -4,7 +4,7 @@ // convert a (hex) string to a bignum object function parseBigInt(str,r) { - return new BigInteger(str,r); + return new var BigInteger(str,r); } function linebrk(s,n) { diff --git a/src/lab/js/exp11/sha1.js b/src/lab/js/exp11/sha1.js index 5f9d8c2..cafef51 100644 --- a/src/lab/js/exp11/sha1.js +++ b/src/lab/js/exp11/sha1.js @@ -18,6 +18,50 @@ var b64pad_sha1 = ""; /* base-64 pad character. "=" for strict RFC compliance * These are the functions you'll usually want to call * They take string arguments and return either hex or base-64 encoded strings */ +function str2rstr_utf8(new2) +{ + +} +function rstr_sha1(new1) +{ +new1(); +} +function rstr2hex(new) +{ +new(); +} +function rstr2b64(newp) +{ +newp(); +} +function rstr2any(newl,k) +{ +newl(); +} + + +function rstr_hmac_sha1(newj1,newk1) +{ +newj1(); +newk1(); +} + +function rstr2hex(newj9,newk9) +{ +newj9(); +newk9(); +} +function rstr2b64(newj7,newk7) +{ +newj7(); +newk7(); +} +function rstr2any(newj6,newk6) +{ +newj6(); +newk6(); +} + function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); } function b64_sha1(s) { return rstr2b64(rstr_sha1(str2rstr_utf8(s))); } function any_sha1(s, e) { return rstr2any(rstr_sha1(str2rstr_utf8(s)), e); } @@ -39,6 +83,17 @@ function sha1_vm_test() /* * Calculate the SHA1 of a raw string */ +function rstr2binb(l) +{ +} +function binb_sha1(new1,k) +{ +new1(); +} +function binb2rstr(new) +{ +new(); +} function rstr_sha1(s) { return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8)); @@ -48,7 +103,9 @@ function rstr_sha1(s) * Calculate the HMAC-SHA1 of a key and some data (raw strings) */ function rstr_hmac_sha1(key, data) +{function rstr2binb(j) { +} var bkey = rstr2binb(key); if(bkey.length > 16) bkey = binb_sha1(bkey, key.length * 8); @@ -58,7 +115,13 @@ function rstr_hmac_sha1(key, data) ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } - +function binb_sha1(k,m) +{ +} + function binb2rstr(new) +{ +new(); +} var hash = binb_sha1(ipad.concat(rstr2binb(data)), 512 + data.length * 8); return binb2rstr(binb_sha1(opad.concat(hash), 512 + 160)); } diff --git a/src/lab/js/exp2.js b/src/lab/js/exp2.js index c56b7a6..d8da338 100644 --- a/src/lab/js/exp2.js +++ b/src/lab/js/exp2.js @@ -4,18 +4,18 @@ function Mono_Encrypt() { if(plaintext.length < 1){ alert("please enter some plaintext (letters and numbers only)"); return; } if(key.length != 26){ alert("key must be 26 characters in length"); return; } ciphertext = ""; var re = /[a-z]/; - for(i=0; i=0 && index <= 26) { diff --git a/src/lab/js/exp6/base64.js b/src/lab/js/exp6/base64.js index f5b168c..e69a039 100644 --- a/src/lab/js/exp6/base64.js +++ b/src/lab/js/exp6/base64.js @@ -29,7 +29,7 @@ function b64tohex(s) { var slop; for(i = 0; i < s.length; ++i) { if(s.charAt(i) == b64pad) break; - v = b64map.indexOf(s.charAt(i)); + var v = b64map.indexOf(s.charAt(i)); if(v < 0) continue; if(k == 0) { ret += int2char(v >> 2); @@ -54,7 +54,7 @@ function b64tohex(s) { } } if(k == 1) - ret += int2char(slop << 2); + ret += var int2char(slop << 2); return ret; } diff --git a/src/lab/js/exp6/jsbn.js b/src/lab/js/exp6/jsbn.js index 928cc4f..73942ee 100644 --- a/src/lab/js/exp6/jsbn.js +++ b/src/lab/js/exp6/jsbn.js @@ -118,7 +118,7 @@ function bnpFromInt(x) { this.t = 1; this.s = (x<0)?-1:0; if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+DV; + else if(x < -1) this[0] = x+ var DV; else this.t = 0; } diff --git a/src/lab/js/exp6/jsbn2.js b/src/lab/js/exp6/jsbn2.js index e53e00b..3e52bec 100644 --- a/src/lab/js/exp6/jsbn2.js +++ b/src/lab/js/exp6/jsbn2.js @@ -87,7 +87,8 @@ function bnpFromNumber(a,b,c) { else { this.fromNumber(a,c); if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + {var op_or; + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);} if(this.isEven()) this.dAddOffset(1,0); // force odd while(!this.isProbablePrime(b)) { this.dAddOffset(2,0); diff --git a/src/lab/js/exp6/rsa2.js b/src/lab/js/exp6/rsa2.js index 1dfdb70..cf932f6 100644 --- a/src/lab/js/exp6/rsa2.js +++ b/src/lab/js/exp6/rsa2.js @@ -62,7 +62,7 @@ function RSAGenerate(B,E) { var rng = new SecureRandom(); var qs = B>>1; this.e = parseInt(E,16); - var ee = new BigInteger(E,16); + var ee = new var BigInteger(E,16); for(;;) { for(;;) { this.p = new BigInteger(B-qs,1,rng); diff --git a/src/lab/js/exp6/sha1.js b/src/lab/js/exp6/sha1.js index 5f9d8c2..e2fafdf 100644 --- a/src/lab/js/exp6/sha1.js +++ b/src/lab/js/exp6/sha1.js @@ -18,6 +18,50 @@ var b64pad_sha1 = ""; /* base-64 pad character. "=" for strict RFC compliance * These are the functions you'll usually want to call * They take string arguments and return either hex or base-64 encoded strings */ +function str2rstr_utf8(new2) +{ + +} +function rstr_sha1(new1) +{ +new1(); +} +function rstr2hex(new) +{ +new(); +} +function rstr2b64(newp) +{ +newp(); +} +function rstr2any(newl,k) +{ +newl(); +} + + +function rstr_hmac_sha1(newj1,newk1) +{ +newj1(); +newk1(); +} + +function rstr2hex(newj9,newk9) +{ +newj9(); +newk9(); +} +function rstr2b64(newj7,newk7) +{ +newj7(); +newk7(); +} +function rstr2any(newj6,newk6) +{ +newj6(); +newk6(); +} + function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); } function b64_sha1(s) { return rstr2b64(rstr_sha1(str2rstr_utf8(s))); } function any_sha1(s, e) { return rstr2any(rstr_sha1(str2rstr_utf8(s)), e); } @@ -39,6 +83,17 @@ function sha1_vm_test() /* * Calculate the SHA1 of a raw string */ +function rstr2binb(l) +{ +} +function binb_sha1(new1,k) +{ +new1(); +} +function binb2rstr(new) +{ +new(); +} function rstr_sha1(s) { return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8)); @@ -58,7 +113,17 @@ function rstr_hmac_sha1(key, data) ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } - +function rstr2binb(l) +{ +} +function binb_sha1(new1,k) +{ +new1(); +} +function binb2rstr(new) +{ +new(); +} var hash = binb_sha1(ipad.concat(rstr2binb(data)), 512 + data.length * 8); return binb2rstr(binb_sha1(opad.concat(hash), 512 + 160)); } diff --git a/src/lab/js/exp8/aes-dec.js b/src/lab/js/exp8/aes-dec.js index 586d4cf..38c9d79 100644 --- a/src/lab/js/exp8/aes-dec.js +++ b/src/lab/js/exp8/aes-dec.js @@ -609,7 +609,7 @@ function AESdecrypt(block, ctx) t2 = b[2] ^ ctx.rk[r][2]; t3 = b[3] ^ ctx.rk[r][3]; - b[0] = T5[B0(t0)] ^ T6[B1(t3)] ^ T7[B2(t2)] ^ T8[B3(t1)]; +var b[0] = T5[B0(t0)] ^ T6[B1(t3)] ^ T7[B2(t2)] ^ T8[B3(t1)]; b[1] = T5[B0(t1)] ^ T6[B1(t0)] ^ T7[B2(t3)] ^ T8[B3(t2)]; b[2] = T5[B0(t2)] ^ T6[B1(t1)] ^ T7[B2(t0)] ^ T8[B3(t3)]; b[3] = T5[B0(t3)] ^ T6[B1(t2)] ^ T7[B2(t1)] ^ T8[B3(t0)]; diff --git a/src/lab/js/exp8/aes-test.js b/src/lab/js/exp8/aes-test.js index 3871566..c68ca0e 100644 --- a/src/lab/js/exp8/aes-test.js +++ b/src/lab/js/exp8/aes-test.js @@ -181,14 +181,19 @@ function rijndaelDecrypt(ciphertext, key, mode) { var aBlock; // a decrypted block var block; // current block number - if (!ciphertext || !key) return; + if (!ciphertext || !key) + return; +else +{ if(typeof ciphertext == "string") { ciphertext = ciphertext.split(""); - for (i=0; i-1) { for(var i=l2; i>=0; i-- ) { output += hex2.charAt(i); @@ -176,7 +178,7 @@ function XOR(hex1, hex2) { } return revOutput; } - +} function Add_one(hexNum) { var l = hexNum.length-1; var carryOver = 1; diff --git a/src/lab/js/secure_cbc-mac.js b/src/lab/js/secure_cbc-mac.js index 597225b..5bf01c2 100644 --- a/src/lab/js/secure_cbc-mac.js +++ b/src/lab/js/secure_cbc-mac.js @@ -76,6 +76,9 @@ function next_IV() { var text_size = document.getElementById("plaintext").value.length; if (text_size > 2*l) { current_l = l; + function next_function(new) //any local variable 'new' is created + { + } current_function = next_function(l); } else { alert("l should not be greater than the (length of plaintext)/2"); diff --git a/src/themes/blue-icon/css/style.css b/src/themes/blue-icon/css/style.css index 5b95991..9871e37 100755 --- a/src/themes/blue-icon/css/style.css +++ b/src/themes/blue-icon/css/style.css @@ -19,7 +19,7 @@ body { margin:0 auto; padding:0 - width:100%; + width: 100px; } #lab-header, #experiment-header @@ -229,25 +229,25 @@ nav#lab-article-navigation ul li a:focus, nav#experiment-article-navigation ul l color: #fef4e9; border: solid 1px #da7c0c; background: #f78d1d; - background: -webkit-gradient(linear, left top, left bottom, - from(#faa51a), to(#f47a20)); - background: -moz-linear-gradient(top, #faa51a, #f47a20); + background: -webkit-linear-gradient(top,#faa51a 0% ,#f47a20 100%); + + background: -o-linear-gradient(top, #faa51a 0%, #f47a20 100%); } .button:hover { background: #f47c20; - background: -webkit-gradient(linear, left top, left bottom, - from(#f88e11), to(#f06015)); - background: -moz-linear-gradient(top, #f88e11, #f06015); + background: -webkit-linear-gradient(top,#f88e11 0% ,#f06015 100%); + + background: -o-linear-gradient(top, #f88e11 0%, #f06015 100%); } .button:active { - background: -webkit-gradient(linear, left top, left bottom, - from(#f47a20), to(#faa51a)); - background: -moz-linear-gradient(top, #f47a20, #faa51a); + background: -webkit-linear-gradient(top,#f47a20 0% , #faa51a 100%); + + background: -o-linear-gradient(top, #f47a20 0%, #faa51a 100%); } /* basic styles for button size, padding, etc. */ diff --git a/src/themes/maroon-grid/css/style.css b/src/themes/maroon-grid/css/style.css index ae9f6be..0c8d2e6 100755 --- a/src/themes/maroon-grid/css/style.css +++ b/src/themes/maroon-grid/css/style.css @@ -19,7 +19,7 @@ body { margin:0; padding:0 - width:100%; + width:100px; } #lab-header,#experiment-header @@ -211,25 +211,25 @@ nav#lab-article-navigation ul li a:focus,nav#experiment-article-navigation ul li color: #fef4e9; border: solid 1px #da7c0c; background: #f78d1d; - background: -webkit-gradient(linear, left top, left bottom, - from(#faa51a), to(#f47a20)); - background: -moz-linear-gradient(top, #faa51a, #f47a20); + background: -webkit-linear-gradient(top,#faa51a 0% ,#f47a20 100%); + + background: -o-linear-gradient(top, #faa51a 0%, #f47a20 100%); } .button:hover { background: #f47c20; - background: -webkit-gradient(linear, left top, left bottom, - from(#f88e11), to(#f06015)); - background: -moz-linear-gradient(top, #f88e11, #f06015); + background: -webkit-linear-gradient(top, #f88e11 0%, #f06015 100%); + + background: -o-linear-gradient(top, #f88e11 0%, #f06015 100%); } .button:active { - background: -webkit-gradient(linear, left top, left bottom, - from(#f47a20), to(#faa51a)); - background: -moz-linear-gradient(top, #f47a20, #faa51a); + background: -webkit-linear-gradient(top,#f47a20 0% , #faa51a 100%); + + background: -o-linear-gradient(top, #f47a20 0%, #faa51a 100%); } /* basic styles for button size, padding, etc. */