Lines Matching refs:d

539 //       are 2d arrays of the form state[4][Nb].
637 // Performs the substitution step of the cipher. State is the 2d array of
859 // column 0, row 0 to 3). This function returns a 2d array.
877 // by Rijndael into a single 1d array of bytes. It assumes the input "packed"
879 // This function returns a 1d array of bytes.
1529 function jcFF(a, b, c, d, x, s, ac) {
1530 a = a + jcF(b, c, d) + x + ac;
1536 function jcGG(a, b, c, d, x, s, ac) {
1537 a = a + jcG(b, c, d) + x + ac;
1543 function jcHH(a, b, c, d, x, s, ac) {
1544 a = a + jcH(b, c, d) + x + ac;
1550 function jcII(a, b, c, d, x, s, ac) {
1551 a = a + jcI(b, c, d) + x + ac;
1558 var a = 0, b = 0, c = 0, d = 0;
1564 d = state[3];
1574 a = jcFF( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
1575 d = jcFF( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
1576 c = jcFF( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
1577 b = jcFF( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
1578 a = jcFF( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
1579 d = jcFF( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
1580 c = jcFF( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
1581 b = jcFF( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
1582 a = jcFF( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
1583 d = jcFF( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
1584 c = jcFF( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
1585 b = jcFF( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
1586 a = jcFF( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
1587 d = jcFF( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
1588 c = jcFF( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
1589 b = jcFF( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
1592 a = jcGG( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
1593 d = jcGG( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
1594 c = jcGG( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
1595 b = jcGG( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
1596 a = jcGG( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
1597 d = jcGG( d, a, b, c, x[10], S22, 0x2441453); /* 22 */
1598 c = jcGG( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
1599 b = jcGG( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
1600 a = jcGG( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
1601 d = jcGG( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
1602 c = jcGG( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
1603 b = jcGG( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
1604 a = jcGG( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
1605 d = jcGG( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
1606 c = jcGG( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
1607 b = jcGG( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
1610 a = jcHH( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
1611 d = jcHH( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
1612 c = jcHH( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
1613 b = jcHH( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
1614 a = jcHH( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
1615 d = jcHH( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
1616 c = jcHH( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
1617 b = jcHH( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
1618 a = jcHH( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
1619 d = jcHH( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
1620 c = jcHH( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
1621 b = jcHH( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
1622 a = jcHH( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
1623 d = jcHH( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
1624 c = jcHH( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
1625 b = jcHH( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
1628 a = jcII( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
1629 d = jcII( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
1630 c = jcII( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
1631 b = jcII( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
1632 a = jcII( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
1633 d = jcII( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
1634 c = jcII( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
1635 b = jcII( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
1636 a = jcII( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
1637 d = jcII( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
1638 c = jcII( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
1639 b = jcII( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
1640 a = jcII( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
1641 d = jcII( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
1642 c = jcII( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
1643 b = jcII( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
1648 state[3] += d;
2014 var d = [];
2048 d[j++] = c;
2050 d[j++] = 0;
2064 //dump("d0", d[0]); dump("d1", d[1]); dump("d2", d[2]); dump("d3", d[3]);
2068 b[n++] = ((d[0] << 2) | (d[1] >> 4)) & 0xFF;
2070 b[n++] = ((d[1] << 4) | (d[2] >> 2)) & 0xFF;
2071 //dump("(d[1] << 4) | (d[2] >> 2)", (d[1] << 4) | (d[2] >> 2));
2073 b[n++] = ((d[2] << 6) | d[3]) & 0xFF;