• Cryptomsg4.js
    Some changes made to the hash function.
    Add a logoff function.
    Noticed that the Rnum in the messages were all the same value.
    Fixed it.

    >setupID();
    IDPW_hash
    199,118,61,228,125,51,183,83,209,53,107,248,75,23,162,128
    In left pane enter connect(); and press return.
    =undefined
    >connect();
    {
      "text": [
        new Uint8Array([65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
        new Uint8Array(16)
       ],
      "Rnum": new Uint8Array([106, 252, 92, 219, 97, 146, 133, 70, 139, 53, 121, 170, 154, 73, 162, 119]),
      "Auth": new Uint8Array(16),
      "Mhash": new ArrayBuffer([207, 109, 3, 165, 191, 27, 97, 58, 131, 189, 253, 144, 214, 189, 226, 240])
     }
    Client msg 1 hash OK
    {
      "text": [
        new Uint8Array([65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
        new Uint8Array(16)
       ],
      "Rnum": new Uint8Array([224, 101, 186, 153, 117, 133, 224, 12, 118, 39, 165, 92, 202, 210, 183, 51]),
      "Auth": new ArrayBuffer([66, 169, 179, 113, 114, 202, 57, 74, 89, 29, 96, 192, 147, 30, 236, 36]),
      "Mhash": new ArrayBuffer([22, 187, 159, 26, 112, 116, 187, 148, 127, 211, 158, 113, 40, 126, 194, 165])
     }
    Server msg1 hash OK
    Server is authentic
    Enter User ID and password
    In the left pane enter ID="<user ID>";
    In the left pane enter PW="<password>";
    In left pane enter login(); and press return.
    

    A Phat phinger mistake in the copy function.

    function copy(A,B){for(var i=0;i<16;i++)A[i]=B[1];}
    

    Changed it to:

    function copy(A,B){for(var i=0;i<16;i++)A[i]=B[i];}
    

    1 Attachment

About