|
Post by trbixler on Feb 21, 2012 1:12:27 GMT
Nomatter .... interesting reading. Did the butler do it? Ratty do not mind me I was just a bit plussed not sure what sign.
|
|
|
Post by trbixler on Feb 21, 2012 15:44:34 GMT
|
|
|
Post by glennkoks on Feb 21, 2012 16:01:19 GMT
|
|
|
Post by trbixler on Feb 21, 2012 17:31:42 GMT
Just another look
; This function produces Nb(Nr+1) round keys. The round keys are used in each round to encrypt the states. ; The first round key is the key itself. ; for(i=0;i<Nk;i++) for 128bit 0 to 3 is the indx ; { ; RoundKey[i*4]=Key[i*4]; ; RoundKey[i*4+1]=Key[i*4+1]; ; RoundKey[i*4+2]=Key[i*4+2]; ; RoundKey[i*4+3]=Key[i*4+3]; ; } KEYEXPANSION: LEA.L IORB_AES_KEY(A1),A2 ;A2 = key address LEA.L IORB_AES_ROUNDKEY(A1),A3 ;A3 = roundkey LEA.L RCON(PC),A4 ;A4 = base of RCON (round conversion table} ;--This Preps the first 16 byte block in Roundkey MOVEQ.L #NK-1,D7 ;prep loop control BUILD_FIRST_ROUND_LOOP: MOVE.L (A2)+,(A3)+ DBF.W D7,BUILD_FIRST_ROUND_LOOP ; A3 points at next roundkey entry ; ; All other round keys are found from the previous round keys. ; NB(4) * (NR(10) +1) = 44d ('words'(.L)) = 176 bytes ; note i starts here at 4 ; while (i < (Nb * (Nr+1))) ;note <i < <NB(4) * (NR(10) +1) = 44d) ; { ; for(j=0;j<4;j++) ; { ; temp[j]=RoundKey[(i-1) * 4 + j]; ; ; we will proceed 4bytes per loop from this point on ; LEA.L IORB_AES_ROUNDKEY(A1),A3 ;A3 = roundkey base ;--we have already done the first 16 bytes from the initial key MOVEQ.L #$10,D6 ;prep the D6 = i * 4 (i is a .L indx) (D6.W is a byte indx) MOVEQ.L #39,D7 ;prep loop control (first pass already done) KEYEXPANSION_MAIN_LOOP: ; if (i % Nk == 0) // % is modulo ; { ; ; This function rotates the 4 bytes in a word to the left once. ; ; [a0,a1,a2,a3] becomes [a1,a2,a3,a0] ; ; Function RotWord() ; { ; k = temp[0]; ; temp[0] = temp[1]; ; temp[1] = temp[2]; ; temp[2] = temp[3]; ; temp[3] = k; ; } MOVE.L -$4(A3,D6.W),D1 ;this copies i of roundkey to j of temp MOVE.W D6,D0 ;D6.W holds the increasing value of i * 4 AND.W #$C,D0 ;is i * 4 modulo 4 * 4 value 0? BNE.S KEYEXPANSION_CONTINUE ;branch not
;--i modulo 4 value is 0 ROL.L #8,D1 ;rotate left 8 bits (rotword) ; ; ; SubWord() is a function that takes a four-byte input word and ; ; applies the S-box to each of the four bytes to produce an output word. ; ; ; Function Subword() ; { ; temp[0]=getSBoxValue(temp[0]); ; temp[1]=getSBoxValue(temp[1]); ; temp[2]=getSBoxValue(temp[2]); ; temp[3]=getSBoxValue(temp[3]); ; } MOVE.L D1,D0 ;D0.L = value in temp BSR.W SUBWORD ;convet value in D0.L one byte at a time (uses A5.L and D2.L) MOVE.L D0,D1 ;TEMP = converted value ; ; temp[0] = temp[0] ^ Rcon[i/Nk]; (where ^ is the XOR operator and NK = 4) ; } ROL.L #8,D1 ;D1.B = high order byte temp[0] ROR.W #4,D6 ;D6.W / NK*4(Bytes/.L) MOVE.B (A4,D6.W),D0 ;get rcon ROL.W #4,D6 ;D6.W .L indx EOR.B D0,D1 ROR.L #8,D1 ;D1.L = new working value ;-- fall thru to KEYEXPANSION_CONTINUE ; ;--the following code is not for AES128 ; else if (Nk > 6 && i % Nk == 4) ; { ; ; Function Subword() ; { ; temp[0]=getSBoxValue(temp[0]); ; temp[1]=getSBoxValue(temp[1]); ; temp[2]=getSBoxValue(temp[2]); ; temp[3]=getSBoxValue(temp[3]); ; }
; } ; RoundKey[i*4+0] = RoundKey[(i-Nk)*4+0] ^ temp[0]; ; RoundKey[i*4+1] = RoundKey[(i-Nk)*4+1] ^ temp[1]; ; RoundKey[i*4+2] = RoundKey[(i-Nk)*4+2] ^ temp[2]; ; RoundKey[i*4+3] = RoundKey[(i-Nk)*4+3] ^ temp[3]; ; i++; ; } ; } ;-----store results this pass into roundkey indexed by the pass then go to next pass ;-----store one .L key ; at this point D6.W = i * 4 ; KEYEXPANSION_CONTINUE: MOVE.L D6,D2 ;D2 = i * 4 SUB.L #$10,D2 ;D2 = (i * 4) - (NK(4) * 4 = $10) MOVE.L (A3,D2.W),D0 EOR.L D1,D0 MOVE.L D0,(A3,D6.W) ;save to roundkey ADDQ.W #4,D6 ;D6 = next value of i * 4 DBF.W D7,KEYEXPANSION_MAIN_LOOP RTS =========
Oops another miss post
|
|
|
Post by Ratty on Feb 22, 2012 1:39:55 GMT
So, the butler DID do it !!
|
|
|
Post by trbixler on Feb 22, 2012 2:05:24 GMT
Ratty I think you might understand how my errant hands misplace some of my code now and then when maybe the posting just before mine was a bit misplaced. Any particular language that you like I probably have written something of interest. Above was a snippit from AES128 in assembly. My fingers get cold thinking about AGW driven winter in the eastern Europe. But of course its always warmer somewhere else. Probably CO2 driven. Temps here have been about 5 degrees under normal. But tomorrow back to normal.
|
|
|
Post by sigurdur on Feb 22, 2012 2:12:54 GMT
Ratty: I am not convinced that it was the Butler. I am leaning more towards the cook myself.
|
|
|
Post by glennkoks on Feb 22, 2012 2:13:46 GMT
The Year Without A Winter continues! If you look hard enough you can see a couple of -3's in Colorado and South Florida. Attachments:
|
|
solarstormlover54
Level 2 Rank
Hot and dry trend Since January. Looks to continue at least through the first half of May.
Posts: 54
|
Post by solarstormlover54 on Feb 27, 2012 3:40:34 GMT
Winter snow-pack has arrived in central Alberta, Canada as of Feb 25th with the first significant snow of the season. This is the 2nd latest start to the winter snow pack that i know of. The #1 latest was Feb 28th 2006 during the 2005/06 season. I can see at least one more major snowfall in the next few weeks, so were making up for the lack of snow during these last 4 weeks of winter.
|
|
|
Post by trbixler on Feb 27, 2012 15:42:37 GMT
"Black Hawks rescue Montenegro from record snow" "Thank God and the American taxpayer for the United States Army, which has saved more people than all those Nobel Peace Prize winners combined. The latest Army heroism comes from Europe. Parts of Montenegro are covered with nearly 12 feet of “settled science” as record “global warming” has hit the Balkans" blogs.dailymail.com/donsurber/archives/52120
|
|
ray
New Member
Posts: 35
|
Post by ray on Mar 18, 2012 15:43:23 GMT
So what alternative theory do you have about a warmer world? Will there be more snow or less snow? And if you can't decide that means you accept there could be more OR less. Which puts you into the same "no matter what happens, it is consistent with" situation. There are competing theories for what impacts a warmer world will have. Often advanced by different scientists. A 'warmer world' is much more preferable to what is coming - and that is global cooling. We have to remember that global warming is a much better climate regime than global cooling - by far. Climate scientists and those who promote the impossibility of anthropogenic global warming on Earth simply do not know what they are talking about since the laws of thermodynamics and physics prove that the Earth can never become a greenhouse. All of the so-called 'climate scenarios' that have emerged out of those playing with giant computer models do not come close to forecasting next month's weather in any region of the world, much less the climate conditions of next year - or the next 30 years. But global cooling is coming nonetheless. It has been my long-range climate forecast for years that we officially begin a global cooling regime in 2017 with a peak of global cooling by the mid-2030s. Global cooling is much, much worse than global warming could ever be and humanity has nothing to do with either. All of it is forced by the Sun - both cooling and warming - and there is nothing we can do about it but to face it, prepare as best we can and live with the climate that we are given by the astronomical forces outside our control. theo, what will be driving the excessive temps for the next couple of yrs? is it the solar maxium of the 11yr cycle? i read the 24th cycle is weak in terms of the number of sunspots. also, the beginning of the global cooling that you are calling for, is that related to the 60yr solar cycle that peaked around 2004 and heads down(cools off for about 30yrs)? im not questioning your predictions but just trying to understand your methods....im still new to solar cycles. thanks.
|
|