static inline
void bmw_small_f1(uint32_t* q, const void* m, const void* h){
+ uint32_t even, odd;
EOF
footer = <<EOF
end
-def expand_2(j)
+def expand_2(j,start)
s = sprintf("/* expand_2(%2d) */\n", j)
s += sprintf("\tq[%2d] = \n", j+16)
s += sprintf("\t\t(( ROTL32(((uint32_t*)m)[%2d], %d) \n", j%16, (j%16)+1)
s += sprintf("\t\t - ROTL32(((uint32_t*)m)[%2d], %d) \n", (j+10)%16, ((j+10)%16)+1)
s += sprintf("\t\t + 0x%08xUL \n", 0x0555_5555*(16+j))
s += sprintf("\t\t )^ ((uint32_t*)h)[%2d] \n", (j+7)%16)
- s += sprintf("\t\t)");
- (0..13).each do |x|
- s += (x%4==0)?"\n\t\t":" "
- if x%2==0
- s += sprintf("+ q[%2d] ", x+j)
+ s += sprintf("\t\t)")
+ if(j-1<=start)
+ if(j%2==0)
+ # even
+ s += sprintf("\n\t\t + ( even = q[%2d] + q[%2d] + q[%2d]",j,j+2,j+4)
+ s += sprintf("\n\t\t + q[%2d] + q[%2d] + q[%2d] + q[%2d] )",j+6,j+8,j+10,j+12)
+ s += sprintf("\n\t\t + R32_1(q[%2d]) + R32_2(q[%2d]) + R32_3(q[%2d])",j+1,j+3,j+5)
+ s += sprintf("\n\t\t + R32_4(q[%2d]) + R32_5(q[%2d]) + R32_6(q[%2d])",j+7,j+9,j+11)
+ s += sprintf("\n\t\t + R32_7(q[%2d]) + S32_4(q[%2d]) + S32_5(q[%2d])",j+13,j+14,j+15)
else
- s += sprintf("+ R32_%d(q[%2d])", (x+1)/2, x+j)
- end
- end
- s += sprintf(" + S32_4(q[%2d]) + S32_5(q[%2d])", j+14, j+15)
+ # odd
+ s += sprintf("\n\t\t + ( odd = q[%2d] + q[%2d] + q[%2d]",j,j+2,j+4)
+ s += sprintf("\n\t\t + q[%2d] + q[%2d] + q[%2d] + q[%2d] )",j+6,j+8,j+10,j+12)
+ s += sprintf("\n\t\t + R32_1(q[%2d]) + R32_2(q[%2d]) + R32_3(q[%2d])",j+1,j+3,j+5)
+ s += sprintf("\n\t\t + R32_4(q[%2d]) + R32_5(q[%2d]) + R32_6(q[%2d])",j+7,j+9,j+11)
+ s += sprintf("\n\t\t + R32_7(q[%2d]) + S32_4(q[%2d]) + S32_5(q[%2d])",j+13,j+14,j+15)
+ end
+ else
+ s += sprintf("\n\t\t + ( %s += q[%2d] - q[%2d] )",(j%2==0)?"even":"odd ",j+12,j-2)
+ s += sprintf("\n\t\t + R32_1(q[%2d]) + R32_2(q[%2d]) + R32_3(q[%2d])",j+1,j+3,j+5)
+ s += sprintf("\n\t\t + R32_4(q[%2d]) + R32_5(q[%2d]) + R32_6(q[%2d])",j+7,j+9,j+11)
+ s += sprintf("\n\t\t + R32_7(q[%2d]) + S32_4(q[%2d]) + S32_5(q[%2d])",j+13,j+14,j+15)
+ end
s += ';'
return s
end
puts header
(0..1).each {|x| puts expand_1(x)}
-(2..15).each {|x| puts expand_2(x)}
+(2..15).each {|x| puts expand_2(x, 2)}
puts footer
\ No newline at end of file
static inline
void bmw_large_f1(uint64_t* q, const void* m, const void* h){
+ uint64_t even, odd;
EOF
footer = <<EOF
end
-def expand_2(j)
+def expand_2(j, start)
s = sprintf("/* expand_2(%2d) */\n", j)
s += sprintf("\tq[%2d] = \n", j+16)
s += sprintf("\t\t(( ROTL64(((uint64_t*)m)[%2d], %d) \n", j%16, (j%16)+1)
s += sprintf("\t\t + 0x%016xULL \n", 0x0555_5555_5555_5555*(16+j))
s += sprintf("\t\t )^ ((uint64_t*)h)[%2d] \n", (j+7)%16)
s += sprintf("\t\t)");
- (0..13).each do |x|
- s += (x%4==0)?"\n\t\t":" "
- if x%2==0
- s += sprintf("+ q[%2d] ", x+j)
+ if(j-1<=start)
+ if(j%2==0)
+ # even
+ s += sprintf("\n\t\t + ( even = q[%2d] + q[%2d] + q[%2d]",j,j+2,j+4)
+ s += sprintf("\n\t\t + q[%2d] + q[%2d] + q[%2d] + q[%2d] )",j+6,j+8,j+10,j+12)
+ s += sprintf("\n\t\t + R64_1(q[%2d]) + R64_2(q[%2d]) + R64_3(q[%2d])",j+1,j+3,j+5)
+ s += sprintf("\n\t\t + R64_4(q[%2d]) + R64_5(q[%2d]) + R64_6(q[%2d])",j+7,j+9,j+11)
+ s += sprintf("\n\t\t + R64_7(q[%2d]) + S64_4(q[%2d]) + S64_5(q[%2d])",j+13,j+14,j+15)
else
- s += sprintf("+ R64_%d(q[%2d])", (x+1)/2, x+j)
- end
- end
- s += sprintf(" + S64_4(q[%2d]) + S64_5(q[%2d])", j+14, j+15)
+ # odd
+ s += sprintf("\n\t\t + ( odd = q[%2d] + q[%2d] + q[%2d]",j,j+2,j+4)
+ s += sprintf("\n\t\t + q[%2d] + q[%2d] + q[%2d] + q[%2d] )",j+6,j+8,j+10,j+12)
+ s += sprintf("\n\t\t + R64_1(q[%2d]) + R64_2(q[%2d]) + R64_3(q[%2d])",j+1,j+3,j+5)
+ s += sprintf("\n\t\t + R64_4(q[%2d]) + R64_5(q[%2d]) + R64_6(q[%2d])",j+7,j+9,j+11)
+ s += sprintf("\n\t\t + R64_7(q[%2d]) + S64_4(q[%2d]) + S64_5(q[%2d])",j+13,j+14,j+15)
+ end
+ else
+ s += sprintf("\n\t\t + ( %s += q[%2d] - q[%2d] )",(j%2==0)?"even":"odd ",j+12,j-2)
+ s += sprintf("\n\t\t + R64_1(q[%2d]) + R64_2(q[%2d]) + R64_3(q[%2d])",j+1,j+3,j+5)
+ s += sprintf("\n\t\t + R64_4(q[%2d]) + R64_5(q[%2d]) + R64_6(q[%2d])",j+7,j+9,j+11)
+ s += sprintf("\n\t\t + R64_7(q[%2d]) + S64_4(q[%2d]) + S64_5(q[%2d])",j+13,j+14,j+15)
+ end
s += ';'
return s
end
puts header
(0..1).each {|x| puts expand_1(x)}
-(2..15).each {|x| puts expand_2(x)}
+(2..15).each {|x| puts expand_2(x, 2)}
puts footer
\ No newline at end of file
static inline
void bmw_small_f1(uint32_t* q, const void* m, const void* h){
+ uint32_t even, odd;
/* expand_1( 0) */
q[16] =
(( ROTL32(((uint32_t*)m)[ 0], 1)
+ 0x5ffffffaUL
)^ ((uint32_t*)h)[ 9]
)
- + q[ 2] + R32_1(q[ 3]) + q[ 4] + R32_2(q[ 5])
- + q[ 6] + R32_3(q[ 7]) + q[ 8] + R32_4(q[ 9])
- + q[10] + R32_5(q[11]) + q[12] + R32_6(q[13])
- + q[14] + R32_7(q[15]) + S32_4(q[16]) + S32_5(q[17]);
+ + ( even = q[ 2] + q[ 4] + q[ 6]
+ + q[ 8] + q[10] + q[12] + q[14] )
+ + R32_1(q[ 3]) + R32_2(q[ 5]) + R32_3(q[ 7])
+ + R32_4(q[ 9]) + R32_5(q[11]) + R32_6(q[13])
+ + R32_7(q[15]) + S32_4(q[16]) + S32_5(q[17]);
/* expand_2( 3) */
q[19] =
(( ROTL32(((uint32_t*)m)[ 3], 4)
+ 0x6555554fUL
)^ ((uint32_t*)h)[10]
)
- + q[ 3] + R32_1(q[ 4]) + q[ 5] + R32_2(q[ 6])
- + q[ 7] + R32_3(q[ 8]) + q[ 9] + R32_4(q[10])
- + q[11] + R32_5(q[12]) + q[13] + R32_6(q[14])
- + q[15] + R32_7(q[16]) + S32_4(q[17]) + S32_5(q[18]);
+ + ( odd = q[ 3] + q[ 5] + q[ 7]
+ + q[ 9] + q[11] + q[13] + q[15] )
+ + R32_1(q[ 4]) + R32_2(q[ 6]) + R32_3(q[ 8])
+ + R32_4(q[10]) + R32_5(q[12]) + R32_6(q[14])
+ + R32_7(q[16]) + S32_4(q[17]) + S32_5(q[18]);
/* expand_2( 4) */
q[20] =
(( ROTL32(((uint32_t*)m)[ 4], 5)
+ 0x6aaaaaa4UL
)^ ((uint32_t*)h)[11]
)
- + q[ 4] + R32_1(q[ 5]) + q[ 6] + R32_2(q[ 7])
- + q[ 8] + R32_3(q[ 9]) + q[10] + R32_4(q[11])
- + q[12] + R32_5(q[13]) + q[14] + R32_6(q[15])
- + q[16] + R32_7(q[17]) + S32_4(q[18]) + S32_5(q[19]);
+ + ( even += q[16] - q[ 2] )
+ + R32_1(q[ 5]) + R32_2(q[ 7]) + R32_3(q[ 9])
+ + R32_4(q[11]) + R32_5(q[13]) + R32_6(q[15])
+ + R32_7(q[17]) + S32_4(q[18]) + S32_5(q[19]);
/* expand_2( 5) */
q[21] =
(( ROTL32(((uint32_t*)m)[ 5], 6)
+ 0x6ffffff9UL
)^ ((uint32_t*)h)[12]
)
- + q[ 5] + R32_1(q[ 6]) + q[ 7] + R32_2(q[ 8])
- + q[ 9] + R32_3(q[10]) + q[11] + R32_4(q[12])
- + q[13] + R32_5(q[14]) + q[15] + R32_6(q[16])
- + q[17] + R32_7(q[18]) + S32_4(q[19]) + S32_5(q[20]);
+ + ( odd += q[17] - q[ 3] )
+ + R32_1(q[ 6]) + R32_2(q[ 8]) + R32_3(q[10])
+ + R32_4(q[12]) + R32_5(q[14]) + R32_6(q[16])
+ + R32_7(q[18]) + S32_4(q[19]) + S32_5(q[20]);
/* expand_2( 6) */
q[22] =
(( ROTL32(((uint32_t*)m)[ 6], 7)
+ 0x7555554eUL
)^ ((uint32_t*)h)[13]
)
- + q[ 6] + R32_1(q[ 7]) + q[ 8] + R32_2(q[ 9])
- + q[10] + R32_3(q[11]) + q[12] + R32_4(q[13])
- + q[14] + R32_5(q[15]) + q[16] + R32_6(q[17])
- + q[18] + R32_7(q[19]) + S32_4(q[20]) + S32_5(q[21]);
+ + ( even += q[18] - q[ 4] )
+ + R32_1(q[ 7]) + R32_2(q[ 9]) + R32_3(q[11])
+ + R32_4(q[13]) + R32_5(q[15]) + R32_6(q[17])
+ + R32_7(q[19]) + S32_4(q[20]) + S32_5(q[21]);
/* expand_2( 7) */
q[23] =
(( ROTL32(((uint32_t*)m)[ 7], 8)
+ 0x7aaaaaa3UL
)^ ((uint32_t*)h)[14]
)
- + q[ 7] + R32_1(q[ 8]) + q[ 9] + R32_2(q[10])
- + q[11] + R32_3(q[12]) + q[13] + R32_4(q[14])
- + q[15] + R32_5(q[16]) + q[17] + R32_6(q[18])
- + q[19] + R32_7(q[20]) + S32_4(q[21]) + S32_5(q[22]);
+ + ( odd += q[19] - q[ 5] )
+ + R32_1(q[ 8]) + R32_2(q[10]) + R32_3(q[12])
+ + R32_4(q[14]) + R32_5(q[16]) + R32_6(q[18])
+ + R32_7(q[20]) + S32_4(q[21]) + S32_5(q[22]);
/* expand_2( 8) */
q[24] =
(( ROTL32(((uint32_t*)m)[ 8], 9)
+ 0x7ffffff8UL
)^ ((uint32_t*)h)[15]
)
- + q[ 8] + R32_1(q[ 9]) + q[10] + R32_2(q[11])
- + q[12] + R32_3(q[13]) + q[14] + R32_4(q[15])
- + q[16] + R32_5(q[17]) + q[18] + R32_6(q[19])
- + q[20] + R32_7(q[21]) + S32_4(q[22]) + S32_5(q[23]);
+ + ( even += q[20] - q[ 6] )
+ + R32_1(q[ 9]) + R32_2(q[11]) + R32_3(q[13])
+ + R32_4(q[15]) + R32_5(q[17]) + R32_6(q[19])
+ + R32_7(q[21]) + S32_4(q[22]) + S32_5(q[23]);
/* expand_2( 9) */
q[25] =
(( ROTL32(((uint32_t*)m)[ 9], 10)
+ 0x8555554dUL
)^ ((uint32_t*)h)[ 0]
)
- + q[ 9] + R32_1(q[10]) + q[11] + R32_2(q[12])
- + q[13] + R32_3(q[14]) + q[15] + R32_4(q[16])
- + q[17] + R32_5(q[18]) + q[19] + R32_6(q[20])
- + q[21] + R32_7(q[22]) + S32_4(q[23]) + S32_5(q[24]);
+ + ( odd += q[21] - q[ 7] )
+ + R32_1(q[10]) + R32_2(q[12]) + R32_3(q[14])
+ + R32_4(q[16]) + R32_5(q[18]) + R32_6(q[20])
+ + R32_7(q[22]) + S32_4(q[23]) + S32_5(q[24]);
/* expand_2(10) */
q[26] =
(( ROTL32(((uint32_t*)m)[10], 11)
+ 0x8aaaaaa2UL
)^ ((uint32_t*)h)[ 1]
)
- + q[10] + R32_1(q[11]) + q[12] + R32_2(q[13])
- + q[14] + R32_3(q[15]) + q[16] + R32_4(q[17])
- + q[18] + R32_5(q[19]) + q[20] + R32_6(q[21])
- + q[22] + R32_7(q[23]) + S32_4(q[24]) + S32_5(q[25]);
+ + ( even += q[22] - q[ 8] )
+ + R32_1(q[11]) + R32_2(q[13]) + R32_3(q[15])
+ + R32_4(q[17]) + R32_5(q[19]) + R32_6(q[21])
+ + R32_7(q[23]) + S32_4(q[24]) + S32_5(q[25]);
/* expand_2(11) */
q[27] =
(( ROTL32(((uint32_t*)m)[11], 12)
+ 0x8ffffff7UL
)^ ((uint32_t*)h)[ 2]
)
- + q[11] + R32_1(q[12]) + q[13] + R32_2(q[14])
- + q[15] + R32_3(q[16]) + q[17] + R32_4(q[18])
- + q[19] + R32_5(q[20]) + q[21] + R32_6(q[22])
- + q[23] + R32_7(q[24]) + S32_4(q[25]) + S32_5(q[26]);
+ + ( odd += q[23] - q[ 9] )
+ + R32_1(q[12]) + R32_2(q[14]) + R32_3(q[16])
+ + R32_4(q[18]) + R32_5(q[20]) + R32_6(q[22])
+ + R32_7(q[24]) + S32_4(q[25]) + S32_5(q[26]);
/* expand_2(12) */
q[28] =
(( ROTL32(((uint32_t*)m)[12], 13)
+ 0x9555554cUL
)^ ((uint32_t*)h)[ 3]
)
- + q[12] + R32_1(q[13]) + q[14] + R32_2(q[15])
- + q[16] + R32_3(q[17]) + q[18] + R32_4(q[19])
- + q[20] + R32_5(q[21]) + q[22] + R32_6(q[23])
- + q[24] + R32_7(q[25]) + S32_4(q[26]) + S32_5(q[27]);
+ + ( even += q[24] - q[10] )
+ + R32_1(q[13]) + R32_2(q[15]) + R32_3(q[17])
+ + R32_4(q[19]) + R32_5(q[21]) + R32_6(q[23])
+ + R32_7(q[25]) + S32_4(q[26]) + S32_5(q[27]);
/* expand_2(13) */
q[29] =
(( ROTL32(((uint32_t*)m)[13], 14)
+ 0x9aaaaaa1UL
)^ ((uint32_t*)h)[ 4]
)
- + q[13] + R32_1(q[14]) + q[15] + R32_2(q[16])
- + q[17] + R32_3(q[18]) + q[19] + R32_4(q[20])
- + q[21] + R32_5(q[22]) + q[23] + R32_6(q[24])
- + q[25] + R32_7(q[26]) + S32_4(q[27]) + S32_5(q[28]);
+ + ( odd += q[25] - q[11] )
+ + R32_1(q[14]) + R32_2(q[16]) + R32_3(q[18])
+ + R32_4(q[20]) + R32_5(q[22]) + R32_6(q[24])
+ + R32_7(q[26]) + S32_4(q[27]) + S32_5(q[28]);
/* expand_2(14) */
q[30] =
(( ROTL32(((uint32_t*)m)[14], 15)
+ 0x9ffffff6UL
)^ ((uint32_t*)h)[ 5]
)
- + q[14] + R32_1(q[15]) + q[16] + R32_2(q[17])
- + q[18] + R32_3(q[19]) + q[20] + R32_4(q[21])
- + q[22] + R32_5(q[23]) + q[24] + R32_6(q[25])
- + q[26] + R32_7(q[27]) + S32_4(q[28]) + S32_5(q[29]);
+ + ( even += q[26] - q[12] )
+ + R32_1(q[15]) + R32_2(q[17]) + R32_3(q[19])
+ + R32_4(q[21]) + R32_5(q[23]) + R32_6(q[25])
+ + R32_7(q[27]) + S32_4(q[28]) + S32_5(q[29]);
/* expand_2(15) */
q[31] =
(( ROTL32(((uint32_t*)m)[15], 16)
+ 0xa555554bUL
)^ ((uint32_t*)h)[ 6]
)
- + q[15] + R32_1(q[16]) + q[17] + R32_2(q[18])
- + q[19] + R32_3(q[20]) + q[21] + R32_4(q[22])
- + q[23] + R32_5(q[24]) + q[25] + R32_6(q[26])
- + q[27] + R32_7(q[28]) + S32_4(q[29]) + S32_5(q[30]);
+ + ( odd += q[27] - q[13] )
+ + R32_1(q[16]) + R32_2(q[18]) + R32_3(q[20])
+ + R32_4(q[22]) + R32_5(q[24]) + R32_6(q[26])
+ + R32_7(q[28]) + S32_4(q[29]) + S32_5(q[30]);
}
/* END of automatic generated code */
static inline
void bmw_large_f1(uint64_t* q, const void* m, const void* h){
+ uint64_t even, odd;
/* expand_1( 0) */
q[16] =
(( ROTL64(((uint64_t*)m)[ 0], 1)
+ 0x5ffffffffffffffaULL
)^ ((uint64_t*)h)[ 9]
)
- + q[ 2] + R64_1(q[ 3]) + q[ 4] + R64_2(q[ 5])
- + q[ 6] + R64_3(q[ 7]) + q[ 8] + R64_4(q[ 9])
- + q[10] + R64_5(q[11]) + q[12] + R64_6(q[13])
- + q[14] + R64_7(q[15]) + S64_4(q[16]) + S64_5(q[17]);
+ + ( even = q[ 2] + q[ 4] + q[ 6]
+ + q[ 8] + q[10] + q[12] + q[14] )
+ + R64_1(q[ 3]) + R64_2(q[ 5]) + R64_3(q[ 7])
+ + R64_4(q[ 9]) + R64_5(q[11]) + R64_6(q[13])
+ + R64_7(q[15]) + S64_4(q[16]) + S64_5(q[17]);
/* expand_2( 3) */
q[19] =
(( ROTL64(((uint64_t*)m)[ 3], 4)
+ 0x655555555555554fULL
)^ ((uint64_t*)h)[10]
)
- + q[ 3] + R64_1(q[ 4]) + q[ 5] + R64_2(q[ 6])
- + q[ 7] + R64_3(q[ 8]) + q[ 9] + R64_4(q[10])
- + q[11] + R64_5(q[12]) + q[13] + R64_6(q[14])
- + q[15] + R64_7(q[16]) + S64_4(q[17]) + S64_5(q[18]);
+ + ( odd = q[ 3] + q[ 5] + q[ 7]
+ + q[ 9] + q[11] + q[13] + q[15] )
+ + R64_1(q[ 4]) + R64_2(q[ 6]) + R64_3(q[ 8])
+ + R64_4(q[10]) + R64_5(q[12]) + R64_6(q[14])
+ + R64_7(q[16]) + S64_4(q[17]) + S64_5(q[18]);
/* expand_2( 4) */
q[20] =
(( ROTL64(((uint64_t*)m)[ 4], 5)
+ 0x6aaaaaaaaaaaaaa4ULL
)^ ((uint64_t*)h)[11]
)
- + q[ 4] + R64_1(q[ 5]) + q[ 6] + R64_2(q[ 7])
- + q[ 8] + R64_3(q[ 9]) + q[10] + R64_4(q[11])
- + q[12] + R64_5(q[13]) + q[14] + R64_6(q[15])
- + q[16] + R64_7(q[17]) + S64_4(q[18]) + S64_5(q[19]);
+ + ( even += q[16] - q[ 2] )
+ + R64_1(q[ 5]) + R64_2(q[ 7]) + R64_3(q[ 9])
+ + R64_4(q[11]) + R64_5(q[13]) + R64_6(q[15])
+ + R64_7(q[17]) + S64_4(q[18]) + S64_5(q[19]);
/* expand_2( 5) */
q[21] =
(( ROTL64(((uint64_t*)m)[ 5], 6)
+ 0x6ffffffffffffff9ULL
)^ ((uint64_t*)h)[12]
)
- + q[ 5] + R64_1(q[ 6]) + q[ 7] + R64_2(q[ 8])
- + q[ 9] + R64_3(q[10]) + q[11] + R64_4(q[12])
- + q[13] + R64_5(q[14]) + q[15] + R64_6(q[16])
- + q[17] + R64_7(q[18]) + S64_4(q[19]) + S64_5(q[20]);
+ + ( odd += q[17] - q[ 3] )
+ + R64_1(q[ 6]) + R64_2(q[ 8]) + R64_3(q[10])
+ + R64_4(q[12]) + R64_5(q[14]) + R64_6(q[16])
+ + R64_7(q[18]) + S64_4(q[19]) + S64_5(q[20]);
/* expand_2( 6) */
q[22] =
(( ROTL64(((uint64_t*)m)[ 6], 7)
+ 0x755555555555554eULL
)^ ((uint64_t*)h)[13]
)
- + q[ 6] + R64_1(q[ 7]) + q[ 8] + R64_2(q[ 9])
- + q[10] + R64_3(q[11]) + q[12] + R64_4(q[13])
- + q[14] + R64_5(q[15]) + q[16] + R64_6(q[17])
- + q[18] + R64_7(q[19]) + S64_4(q[20]) + S64_5(q[21]);
+ + ( even += q[18] - q[ 4] )
+ + R64_1(q[ 7]) + R64_2(q[ 9]) + R64_3(q[11])
+ + R64_4(q[13]) + R64_5(q[15]) + R64_6(q[17])
+ + R64_7(q[19]) + S64_4(q[20]) + S64_5(q[21]);
/* expand_2( 7) */
q[23] =
(( ROTL64(((uint64_t*)m)[ 7], 8)
+ 0x7aaaaaaaaaaaaaa3ULL
)^ ((uint64_t*)h)[14]
)
- + q[ 7] + R64_1(q[ 8]) + q[ 9] + R64_2(q[10])
- + q[11] + R64_3(q[12]) + q[13] + R64_4(q[14])
- + q[15] + R64_5(q[16]) + q[17] + R64_6(q[18])
- + q[19] + R64_7(q[20]) + S64_4(q[21]) + S64_5(q[22]);
+ + ( odd += q[19] - q[ 5] )
+ + R64_1(q[ 8]) + R64_2(q[10]) + R64_3(q[12])
+ + R64_4(q[14]) + R64_5(q[16]) + R64_6(q[18])
+ + R64_7(q[20]) + S64_4(q[21]) + S64_5(q[22]);
/* expand_2( 8) */
q[24] =
(( ROTL64(((uint64_t*)m)[ 8], 9)
+ 0x7ffffffffffffff8ULL
)^ ((uint64_t*)h)[15]
)
- + q[ 8] + R64_1(q[ 9]) + q[10] + R64_2(q[11])
- + q[12] + R64_3(q[13]) + q[14] + R64_4(q[15])
- + q[16] + R64_5(q[17]) + q[18] + R64_6(q[19])
- + q[20] + R64_7(q[21]) + S64_4(q[22]) + S64_5(q[23]);
+ + ( even += q[20] - q[ 6] )
+ + R64_1(q[ 9]) + R64_2(q[11]) + R64_3(q[13])
+ + R64_4(q[15]) + R64_5(q[17]) + R64_6(q[19])
+ + R64_7(q[21]) + S64_4(q[22]) + S64_5(q[23]);
/* expand_2( 9) */
q[25] =
(( ROTL64(((uint64_t*)m)[ 9], 10)
+ 0x855555555555554dULL
)^ ((uint64_t*)h)[ 0]
)
- + q[ 9] + R64_1(q[10]) + q[11] + R64_2(q[12])
- + q[13] + R64_3(q[14]) + q[15] + R64_4(q[16])
- + q[17] + R64_5(q[18]) + q[19] + R64_6(q[20])
- + q[21] + R64_7(q[22]) + S64_4(q[23]) + S64_5(q[24]);
+ + ( odd += q[21] - q[ 7] )
+ + R64_1(q[10]) + R64_2(q[12]) + R64_3(q[14])
+ + R64_4(q[16]) + R64_5(q[18]) + R64_6(q[20])
+ + R64_7(q[22]) + S64_4(q[23]) + S64_5(q[24]);
/* expand_2(10) */
q[26] =
(( ROTL64(((uint64_t*)m)[10], 11)
+ 0x8aaaaaaaaaaaaaa2ULL
)^ ((uint64_t*)h)[ 1]
)
- + q[10] + R64_1(q[11]) + q[12] + R64_2(q[13])
- + q[14] + R64_3(q[15]) + q[16] + R64_4(q[17])
- + q[18] + R64_5(q[19]) + q[20] + R64_6(q[21])
- + q[22] + R64_7(q[23]) + S64_4(q[24]) + S64_5(q[25]);
+ + ( even += q[22] - q[ 8] )
+ + R64_1(q[11]) + R64_2(q[13]) + R64_3(q[15])
+ + R64_4(q[17]) + R64_5(q[19]) + R64_6(q[21])
+ + R64_7(q[23]) + S64_4(q[24]) + S64_5(q[25]);
/* expand_2(11) */
q[27] =
(( ROTL64(((uint64_t*)m)[11], 12)
+ 0x8ffffffffffffff7ULL
)^ ((uint64_t*)h)[ 2]
)
- + q[11] + R64_1(q[12]) + q[13] + R64_2(q[14])
- + q[15] + R64_3(q[16]) + q[17] + R64_4(q[18])
- + q[19] + R64_5(q[20]) + q[21] + R64_6(q[22])
- + q[23] + R64_7(q[24]) + S64_4(q[25]) + S64_5(q[26]);
+ + ( odd += q[23] - q[ 9] )
+ + R64_1(q[12]) + R64_2(q[14]) + R64_3(q[16])
+ + R64_4(q[18]) + R64_5(q[20]) + R64_6(q[22])
+ + R64_7(q[24]) + S64_4(q[25]) + S64_5(q[26]);
/* expand_2(12) */
q[28] =
(( ROTL64(((uint64_t*)m)[12], 13)
+ 0x955555555555554cULL
)^ ((uint64_t*)h)[ 3]
)
- + q[12] + R64_1(q[13]) + q[14] + R64_2(q[15])
- + q[16] + R64_3(q[17]) + q[18] + R64_4(q[19])
- + q[20] + R64_5(q[21]) + q[22] + R64_6(q[23])
- + q[24] + R64_7(q[25]) + S64_4(q[26]) + S64_5(q[27]);
+ + ( even += q[24] - q[10] )
+ + R64_1(q[13]) + R64_2(q[15]) + R64_3(q[17])
+ + R64_4(q[19]) + R64_5(q[21]) + R64_6(q[23])
+ + R64_7(q[25]) + S64_4(q[26]) + S64_5(q[27]);
/* expand_2(13) */
q[29] =
(( ROTL64(((uint64_t*)m)[13], 14)
+ 0x9aaaaaaaaaaaaaa1ULL
)^ ((uint64_t*)h)[ 4]
)
- + q[13] + R64_1(q[14]) + q[15] + R64_2(q[16])
- + q[17] + R64_3(q[18]) + q[19] + R64_4(q[20])
- + q[21] + R64_5(q[22]) + q[23] + R64_6(q[24])
- + q[25] + R64_7(q[26]) + S64_4(q[27]) + S64_5(q[28]);
+ + ( odd += q[25] - q[11] )
+ + R64_1(q[14]) + R64_2(q[16]) + R64_3(q[18])
+ + R64_4(q[20]) + R64_5(q[22]) + R64_6(q[24])
+ + R64_7(q[26]) + S64_4(q[27]) + S64_5(q[28]);
/* expand_2(14) */
q[30] =
(( ROTL64(((uint64_t*)m)[14], 15)
+ 0x9ffffffffffffff6ULL
)^ ((uint64_t*)h)[ 5]
)
- + q[14] + R64_1(q[15]) + q[16] + R64_2(q[17])
- + q[18] + R64_3(q[19]) + q[20] + R64_4(q[21])
- + q[22] + R64_5(q[23]) + q[24] + R64_6(q[25])
- + q[26] + R64_7(q[27]) + S64_4(q[28]) + S64_5(q[29]);
+ + ( even += q[26] - q[12] )
+ + R64_1(q[15]) + R64_2(q[17]) + R64_3(q[19])
+ + R64_4(q[21]) + R64_5(q[23]) + R64_6(q[25])
+ + R64_7(q[27]) + S64_4(q[28]) + S64_5(q[29]);
/* expand_2(15) */
q[31] =
(( ROTL64(((uint64_t*)m)[15], 16)
+ 0xa55555555555554bULL
)^ ((uint64_t*)h)[ 6]
)
- + q[15] + R64_1(q[16]) + q[17] + R64_2(q[18])
- + q[19] + R64_3(q[20]) + q[21] + R64_4(q[22])
- + q[23] + R64_5(q[24]) + q[25] + R64_6(q[26])
- + q[27] + R64_7(q[28]) + S64_4(q[29]) + S64_5(q[30]);
+ + ( odd += q[27] - q[13] )
+ + R64_1(q[16]) + R64_2(q[18]) + R64_3(q[20])
+ + R64_4(q[22]) + R64_5(q[24]) + R64_6(q[26])
+ + R64_7(q[28]) + S64_4(q[29]) + S64_5(q[30]);
}
/* END of automatic generated code */
source [find /usr/local/share/openocd/scripts/target/lm3s9b9x.cfg]
# GDB can also flash my flash!
gdb_memory_map enable
-gdb_flash_program enabe
+gdb_flash_program enable
jtag_khz 500
#source [find /usr/local/share/openocd/scripts/target/lm3s9b9x.cfg]