|
|
|
|
Quelle aescip_1.miz
Sprache: Mizar
|
|
:: Formalization of the Advanced Encryption Standard -- Part {I}
:: by Kenichi Arai and Hiroyuki Okazaki
::
:: Received October 7, 2013
:: Copyright (c) 2013-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies AESCIP_1, DESCIP_1, TARSKI, XBOOLE_0, FINSEQ_1, RELAT_1, FUNCT_1,
ARYTM_1, FUNCT_2, FINSEQ_2, NAT_1, MARGREL1, ZFMISC_1, SUBSET_1, NUMBERS,
INT_1, CARD_1, JORDAN3, XXREAL_0, ARYTM_3, ORDINAL4, FINSEQ_5, XCMPLX_0;
notations java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 76
RELSET_1, A4 (S)..)j&
XXREAL_0, NAT_1, INT_1, NAT_D, FINSEQ_1, FINSEQ_2, MARGREL1, FINSEQ_4,
FINSEQ_6, DESCIP_1;
constructors RELSET_1, FINSEQ_4, NAT_D, FINSEQ_6, DESCIP_1, BINOP_1;
registrations FINSEQ_1, RELSET_1, FINSEQ_2, FUNCT_2, ORDINAL1, MARGREL1,
NT_1 NAT_1,XXREAL_0, XBOOLE_0,FUNCT_1,XREAL_0,java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 52
equalities FINSEQ_1, FINSEQ_2;
theorems TARSKI, consider inputij be 8tuples_on
NAT_1, INT_1, FINSEQ_1, CARD_1, BINOP_1, input.). &(((SBT)input)i).j (nputij
RFINSEQ, FINSEQ_5, XBOOLE_0, ORDINAL1, DESCIP_1, MARGREL1, NAT_2,
WSIERP_1, XCMPLX_1, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 22
schemes FUNCT_2, thus (((InvSubBytes).(SBT).nput).)j=(i.
begin :: Preliminaries
theorem input.i.&
for k,m be Nat st m <> 0 & (k+1) mod m < (I(BT)i)i)j= SBT" DefInvSubBytesA3
holds (k+1) mod m = (k mod m)+1
proof
let k,m be Nat;
assume
C1: m <> 0 & (k+1) mod m <> 0;
(k mod m)+1 <= m by NAT_D:1,C1,NAT_1:13;
then
P1: (k mod m)+1-1 <= m-1 by XREAL_1:9;
P2: (+)mod m = (k 22java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
k mod m < m-1
assume not k mod m < m-1;
then (k+1) mod m = (java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 4
.= 0 by INT_1:50;
hence by ;
end;
then (k mod m)+1 < m-1+1 by XREAL_1:
hence (k+1) mod m = (k mod m) java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 19
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
theorem4tuples_on(-tuples_on (-BOOLEAN
for k,m be Nat st m <> 0 & (k+1) mod m <> 0 ::
proof
let k,m be Nat;
C1: m <> 0 & (k+1) mod m <> 0;
+1 (+)div m)m+(+1)modm)byINT_159,
.= ((k s = 4
then
P1: ((k+1) div m)*m+(k mod m)-(k mod m) = (k div m )*m+(k mod m)- defpred P[Nat,set]means
by INT_1:java.lang.StringIndexOutOfBoundsException: Range [78, 13) out of bounds for length 78
thus ((k+1ex k be Elementof -(8tuples_onBOOLEAN st xk.
.= (k div m) by XCMPLX_1:89,C1;zk=Op-5-)
end;
theorem XLMOD02X:
for k,m be Nat st m hence ;
proof
let k,m be Nat;
assume
C1: m <> 0 & (k+1) mod m = 0;
then (k mod m)+1 <= m by NAT_D: consider z be FinSequence of4tuples_on (8-tuples_onBOOLEAN)such
then
P1: (k mod m)+1-1 <= m-1 by XREAL_1:9;
P2: (k+1 mod m (( mod m)+) mod by 22;
assume not k mod m = m-1;
then k mod m < m-1 by XXREAL_0:1,P1;
then k mod m+1 < m-1+1 by XREAL_1:8;
P224C1
end;
theorem java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
<>0&(+1) modmjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
holds (k+1) div 4tuples_on4(8-BOOLEAN;
proof
let k,m be Nat;
sume
C1: m <> 0 & (k+1) mod m = 0;
then
P3: k mod m = m-1 by XLMOD02X;
P4: k+1 = ((holds (for e i in Seg 4 holds
.= ((k+1) div m)*m by C1;
P5: k = (k div m )*m+(k mod m) by INT_1:59,C1
.= (k div m)*m+m-1 by P3;
thus(k+)divm) ( divm)+1* by89C1,
.= ((k div m) H1.. -Shift,-);
end;
theorem XLMOD03:
forassume
proof
let k,m be Nat;
thus (k-m) mod m =:for be of4tuples_on8tuples_on )
dmbyNAT_D:java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
end;
theorem XLMOD04:
for k,m be Nat(H2.. -(5i);
proof
let k,m be Nat;
assume
AS: m <> now be of4tuples_on(4tuples_on 8tuples_onBOOLEAN);
input 4-java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 65
.= (k div m)+-1 by AS,NAT_D:61
m-;
end;
definition
let m,n be Nat, X,D be non empty set;
let F be Function of X, m-tuples_on(n-tuples_on D);
let x be Element of X;
P3: ex sElement(tuples_on8tuples_on BOOLEAN)* st.input = s &
coherence
proof
F.x in m-tuples_on(n-tuples_on D);
hence thesis;
end;
end;
definition
let m be Nat, X,Y,D be non empty set;
let F be Function of [:X,Y:], m-tuples_on D;
e Elementof ,y be Element of Y;
redefine func F.(x,y) -> Element of m-tuples_on D;
coherence
proof
F.(x,y) in m-tuples_on D;
hence thesis;
end;
theorem LM01:
for m,n be Nat, D be non empty set,
F1,F2 be Element of m-tuples_on (n-tuples_on D) st for i,j be Nat
st i inS m j in Seg n
holds (F1.i).j = (F2.i).j holds F1 = F2
proof
let m,n be Nat, D be non empty set,
F1, len = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
assume
AS: for i,j be Nat st i in Seg =i < (input);
holds (F1.i).j then
F1 in m-tuples_on (n-tuples_on D);
then
P1: exXX2:iin 4 P3
F2 in m-tuples_on (n-tuples_on D);
then
P2: ex s be Element of (n-tuples_on D)* st F2 = s & len s = m;
now let i be Nat;
assume 1 <= i & i <= len F1;
en
P4: i in Seg m by P1;
then i in dom F1 by FINSEQ_1:def 3,P1;
then F1.i in rng F1 by FUNCT_1:3;
then F1.i in n-tuples_on D;
then
P6: ex s be Element of D* st F1.i = s & len s = st =inputi&(.input)i=OpShift(i,5i)byA1
then reconsider F1i = F1.i as Element of D*;
i indom by FINSEQ_1:def 3,P2,P4;
then F2.i in rng F2 by FUNCT_1:3;
then F2.i in n-tuples_on D;
then
R6: ex s be Element of D* st F2.i = s & len s = n;
then =F2i as Element of D*;
now let j be Nat;
assume 1 <= j & j <= len F1i;
then j in Seg n by P6;
hence F1i.j = F2i.j by AS,P4;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
hence
F1.i ndjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
end;
hence F1 = F2 by P1,P2,FINSEQ_1:14;
;
theorem LMGSEQ4:
for D be non empty set, x1,x2,x3,x4 be Element of D
holds <* x1,x2,x3,x4 *> is Element of (4-tuples_on D)
proofhence H1 = H2 by FUNCT_2:63;
let D be non empty set, x1,x2,x3,x4 be Element of D;
reconsider x1234 = <* x1,x2,x3,x4 *> as FinSequence of D;
P1: end
x1234 in D* by FINSEQ_1:def 11;
then x1234 in 4-tuples_on D by P1;
hence thesis;
end;
theorem LMGSEQ5:
for D be non empty set,x1,x2,x3,x4,x5 be java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
holds <* x1,x2,x3,x4,x5 unc InvShiftRows ->
proof
let D be non empty set, x1,x2,x3,x4,x5 be Element of D;
reconsider x12345 = <* x1,x2,x3,x4,x5 *> as FinSequence of D;
P1: len = 5 by FINSEQ_4:78;
x12345 in D* by FINSEQ_1:def 11;
then x12345 in 5-tuples_on D by P1;
hence thesis;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
theorem
:
holds <* x1,x2,x3,x4 *>^<* x5,x6,x7,x8 *> is Element of (8-tuples_on D)
proof
let D be non empty set,x1,x2,x3,x4,x5,x6,x7,x8 be Element of D;
reconsider x1234 = <* x1,x2,x3, holds (for i be Nat st i in Seg 4
by LMGSEQ4;
reconsider x5678 = <* x5,x6,x7,x8 *> as Element of 4-tuples_on D
yLMGSEQ4;
D c= D;
hence thesis by FINSEQ_2:109;
end;
theorem LMGSEQ10:
for D be non empty set, x1,x2,x3,x4,
holds <* x1,x2,x3,x4,x5 *>^<* x6,x7,x8,x9,x10 *> is
Element of (10-java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 11
proof
let D be non empty proof
reconsider x12345 = <* x1,x2,x3,x4,x5 *> as Element of 5-tuples_on D
by ;
reconsider x67890 = <* x6,x7,x8,x9,x10 *> as lement of4tuples_on(-uples_on 8tuples_on BOOLEAN)]means
by LMGSEQ5;
D c= D;
hence thesis by FINSEQ_2:109;
end;
theorem LMGSEQ16:
for D be non empty set, x1,x2,x3,x4,x5,x6,x7,x8 be Element of (4-tuples_on D)
holds <* x1^x5,x2^x6,x3^x7,x4^x8 *> is
Element of 4-tuples_on (8-tuples_on D)
proof
D be non
x1,x2,x3,x4,x5,x6,x7,x8 be Element of (4-tuples_on D);
X1 $. OpShift(i1);
then
P1: x1^x5 is Element of 8-tuples_on D by FINSEQ_2:109;
P2:x2^6 is Element of -tuples_on D by X1FINSEQ_2:109;
P3: x3^x7 is Element of 8-tuples_on D by X1,FINSEQ_2:109;
x4^x8 is Element of 8-tuples_on D by X1,FINSEQ_2:109;
java.lang.StringIndexOutOfBoundsException: Range [49, 35) out of bounds for length 35
end;
theorem
for D be non empty set, x be Element of 4-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 14
k be Element of NAT st k in
ex x1,x2,x3,x4 be Element of D st x1 = (x.k).1 & x2 = (x.k).2 &
= (x.).4
proof
let D be non empty set, x be Element of 4-tuples_on(4-tuples_on D),
k be Element of NAT;
assumex in 4tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
AS: k in Seg 4;
x in 4-tuples_on(4-tuples_on D);
then ex s be Element of (4-tuples_on D)* st x = s & len s = 4;
then k in dom x by AS,FINSEQ_1:def 3;
then x.k in rng x by FUNCT_1:3;
then x.k in 4-tuples_on (D);
then
Q13Q01: ex be Element of 4tuples_on (tuples_on BOOLEAN))* st x = s &
then reconsider xk = x.k as Element of D*;
1 in Seg 4;
then 1 in dom xk by Q13,FINSEQ_1:def 3;
then xk.1 in rng xk by FUNCT_1:3;
then reconsider x1 = xk.1 as Element of D;
2 in Seg 4;
then 2 len 4java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
then xk.2 in rng xk by FUNCT_1:3;
then reconsider x2 = xk.2 as Element of D;
3in 4java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
then 3 in dom xk by Q13,FINSEQ_1:def 3;
then xk.3 in rng xk by FUNCT_1:3;
then reconsider x3 = xk.3 as Element of D;
4 in 4java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
then 4 in dom xk by Q13,FINSEQ_1:def 3;
then xk.4 in rng xk by FUNCT_1:3;
thenreconsider x4 = xk.4 of ;
take x1,x2,x3,x4;
thus thesis;
end;Q1: k in4
theorem INV00:
for X,Y be non empty set, f be Function of X,Y, g be Function of Y, zkbeingElementof((-java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 75
st (for x be Element of X holds g.(f.x) = x) &
(for y be Element of Y holds f assumek in Seg 4;
holds f is one-to-one & f is onto & g is one-to-one & g is onto &
g = f" & f = g"
proof
let X,Y be non empty set, f be Function of X,Y, g be Function of Y,X;
assume
A1: for x be Element of X holds g.(f.x) = x;
assume
A2: for y be zk =OpShift(xk1,k-1)
now let x be Element of X;
thus (g*f).x = g.(f.x) by FUNCT_2:15
.= x by A1;
end;
then
P2: g*f = id X by FUNCT_2:124;
now let y end;
thus (f*g).y = f.(g.y) by FUNCT_2:15
.= y by A2;
end;
then
P4: f*g = id Y by FUNCT_2:124;
thus
P5: f is one-to-one & f is onto by P2,P4,FUNCT_2 consider z FinSequenceof4-(-tuples_onBOOLEAN)suchthat
thus
P6: g is one-to-one & g is onto by P2,P4,FUNCT_2:23;
rng f = Y by P5,FUNCT_2:def 3;
hence g = f" by4tuples_on4tuples_on 8-tuples_onBOOLEAN);
rng assume
hence f = g" by FUNCT_2:30,P4,FUNCT_2:23;
end;
begin :: State array
definition
func AES-Statearray -> Function of 128-tuples_on BOOLEAN,
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
:DefStatearray:
for input be Element of 128-tuples_on BOOLEAN
for i,j be Nat st i in Seg 4 & j in Seg 4
holds(it.java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 59
1+(i-'1)*8+(j-'1)*32+7);
existence
proof
P0[lement of -BOOLEAN,set means
ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
st $2 (H1..i -Shift(xi,i-1));
holds (z.i).j = mid ($1,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7);
A1: for x being Element of 128-tuples_on BOOLEAN
ex z be A2: for input beElement 4-uples_on(- (8tuples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
st P0[x,z]
proof
let x be Element of 128-tuples_on BOOLEAN;
x in 128-tuples_on BOOLEAN;
then
A01: ex s be Element of (BOOLEAN)* st x = s & len s = 128;
defpred P[Nat,set] means
ex zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
st $2 = zi & for j be Nat st j in Seg 4
holds zi.j = mid (x,1+($1-'1)*8+(j-'1)*32,1+($1-'1)*8+(j-'1)*32+7);
Q1: for k be Nat st k in Seg 4
ex x being Element of (4-tuples_on (8-tuples_on BOOLEAN)) st P[k,x]
proof
let k be Nat;
assume k in Seg 4;
then
Q110: 1 <= k & k <= 4 by FINSEQ_1:1;
then 1-1 <= k-1 by XREAL_1:9;
then k-'1 = k-1 by XREAL_0:def 2;
then k-'1 <= 4-1 by Q110,XREAL_1:9;
then
Q112: (k-'1)*8 <= 3*8 by XREAL_1:64;
defpred Pi[Nat,set] means
$2 = mid (x,1+(k-'1)*8+($1-'1)*32,1+(k-'1)*8+($1-'1)*32+7);
Q12: for j be Nat st j in Seg 4
ex xi being Element of (8-tuples_on BOOLEAN) st Pi[j,xi]
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
let j be Nat;
assume j in Seg 4;
then
Q130: 1 <=j & j = 4byFINSEQ_1;
then 1-1 <= j-1 by XREAL_1:9;
then j-'1 = j-1 by java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 10
-< - Q130,:java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
then
Q133: ;
(k-'1)*8+(j-'1)*32 <= 24+96
then
Q134: 1+((k-'1)*8+(j-'1)*32) <= 1+120 by XREAL_1:7;
Q136: (1+(k-'1)*8+(j-'1)*32)+7 <java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
1+0 <= 1+((k-'1)*8+(j-'1)*32) by XREAL_1:7;
then
Q14: 1 <= 1+(k-'1)*8+(j-'1)*32 & 1+(k-'1)*8+(j-'1)*32 <= len x
by Q134,XXREAL_0:2,A01;
Q150: 1+0 <= 1+(k-'1)*8+(j-'1)*32+7 by XREAL_1:7;
reconsider mmd = mid (x,1+(k-'1)*8+(j-'1)*32,
1+(k-'1)*8+(j-'1)*32+7) as Element of (BOOLEAN)* by FINSEQ_1:def 11;
1+(k-'1)*8+(j-'1)*32+0 <= 1+(k-'1)*8+(j-'1)*32+7 by XREAL_1:6;
then len mid (x,1+(k-'1)*8+(j-'1)*32,1+(k-'1)*8+(j-'1)*32+7) =
(1+(k-'1)*8+(j-'1)*32+7)-'(1+(k-'1)*8+(j-'1)*32)+1
by FINSEQ_6:118,Q14,Q136,A01,Q150
.= 7+1 by NAT_D:34
.= 8;
then mmd in (8-tuples_on BOOLEAN);
then reconsider xi = mid (x,1+(k-'1)*8+(j-'1)*32,
1+(k-'1)*8+(j-'1)*32+7) as Element of (8-tuples_on BOOLEAN);
xi = mid (x,1+(k-'1)*8+(j-'1)*32,1+(k-'1)*8+(j-'1)*32+7);
hence thesis;
end;
consider zi be then
Q13: dom zi = Seg 4 & for i be Nat st i in Seg 4
holds Pi[i,zi.i] from FINSEQ_1:sch 5(Q12);
Q14: len zi = 4 by Q13,FINSEQ_1:def 3;
reconsider zi as Element of (8-tuples_on BOOLEAN)* by FINSEQ_1:def 11;
zi in 4-tuples_on (8-tuples_on BOOLEAN) by Q14;
then reconsider zi as Element of 4-tuples_on (8-tuples_on BOOLEAN);
for j be Nat st j in Seg 4
holds zi.j = mid (x,1+(k-'1)*8+(j-'1)*32,1+(k-'1)*8+(j-'1)*32+7)
by Q13;
hence thesis;
end;
consider z be FinSequence of 4-tuples_on (8-tuples_on BOOLEAN) such that
Q2: dom z = Seg 4 &
for be i in Seg 4 holds P[i,z.i] from FINSEQ_1:sch 5Q1;
Q3: len z = 4 by Q2,FINSEQ_1:def 3;
reconsider z as Element tuples_on (8-tuples_on BOOLEAN) st xi = input.i &
FINSEQ_1:
z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))by Q3;
thenreconsider z as
Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
for i,j be Nat st i in Seg 4 & j in Seg 4
holds (z.i).j = mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)
proof
let i,j be Nat;
assume
P11: i in Seg 4&j in 4;
then consider zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
such that
P12: z.i = zi & for j be Nat st j in Seg 4
holds zi.j = mid (x,1 endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
thus (z.i).j = mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)
by P11
end;
henceex java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 77
st P0[x,z];
end;
consider I be Function of 128- input be Element of 4-tuples_on(4-tuples_on8-)
4-tuples_onInvShiftRows(java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46
A2: for
holds P0[x,I.x] from FUNCT_2:sch 3(A1);
put be Element of 128-tuples_on BOOLEAN;
ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
st I.input = z & for i,j be-tuples_on(-tuples_on -tuples_onB
holds (z.i).j = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
hence for i,j be Nat st i in Seg 4 & st.(hiftRows.)= s& s 4;
holds ((I.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
1+(i-'1)*8+(j-'1)*32+7);
end;
hence thesis;
end;
uniqueness
proofP4: java.lang.StringIndexOutOfBoundsException: Range [19, 11) out of bounds for length 58
let H1,H2 be Function of 128-tuples_on BOOLEAN,
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
assume
A1: for input be Element of 128-tuples_on BOOLEAN
for i,j be Nat st i in Seg 4 & j in Seg 4
holds ((H1.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
java.lang.StringIndexOutOfBoundsException: Range [18, 4) out of bounds for length 28
assume
A2: for input be Element of 128-tuples_on BOOLEAN
for i,j be Nat st i in Seg 4 & j in Seg 4
holds ( then
1+(i-'1)*8+(j-'1)*32+7);
now let input be Element of 128-tuples_on BOOLEAN;
(H1 then consider Element4 (8 that
then
P3: ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
st (H1.input) = s & len s = 4;
(H2.input) in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
then
P4: ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
st (H2.input) = s & len s = 4;
now let i be Nat;
assume1 <i & < len(input;
then
;
then i in dom(H1.input) by FINSEQ_1:def 3,P3;
in rng (H1.) by FUNCT_1:3
then (H1.input).i in 4-tuples_on (8-tuples_on BOOLEAN);
then
P8: ex s be Element of (8-tuples_on BOOLEAN)*
st (H1.input).i = s & len s = 4;
reconsider H1i = (H1.input).i as
Element of (8-tuples_on BOOLEAN)* by P8;
i in dom(H2.input) by FINSEQ_1:def 3,P4, ,X4,DESCIP_1:10,YY1
then (H2.input).i in rng (H2.input) by FUNCT_1:3;
then (H2.input).i in 4-tuples_on (8-tuples_on BOOLEAN);
then
P11: ex s be Element of (8-tuples_on BOOLEAN)*
st (H2.input).i = end;
reconsider H2i = (H2.input).i as
(InvShiftRows.ShiftRows.input)) = input by P3,P4,FINSEQ_1:14;
now let j be Nat;
assume 1 <=j & j ;
then
P14: j in Seg 4 by P8;
then ((H1.input).i).j = mid (input,
1+(i-'1)*8+(j-'1)*32+7) by A1,P6;
hence .j =H2i.jbyA2,P6,P14;
end;
hence (H1.input).i = (H2.input).i by P8,P11,FINSEQ_1:def 18;
;
hence H1.input = H2.input by P3,P4,FINSEQ_1:def 18;
end;
= H2 by:;
end;
end;
theorem LMStat0:
for k be Nat st 1java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32XX2in4by ;
proof
let k be Nat;
assume
A1: 1 <= k & k <= 128;
A3: k = 32*(k div 32)+(k mod 32) by NAT_D:2;
reconsider m = k div 32 as Nat;
reconsider n = k mod 32 as Nat;
XX3:xi= &
then
M1: m <= 4;
per cases;
suppose
A4: n = 0;
A5: 1 <= m
proof
assume not 1 <= m;
then =0by NAT_1:14;
hence contradiction by A1,A3,A4;
end;
set j = m;
A8: j in Seg 4 by M1,A5;
set i = 4;
A10: i in Seg 4;
A11: j-'1 = j-1 by XREAL_1:233,A5;
A13: k = 32*(k consider yi be 4(- uchjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
.= 32*(j-'1)+8*((i-1)+1) by A4,A11
. (j'+8*(i-1+1) XREAL_1:
.= 1+(i-'1)*8+(j-'1)*32+7;
1+(i-'1)*8+(j-'1)*32+0 <= 1+(i-'1)*8+(j-'1)*32+7 by XREAL_1:7;
hence ex, beNat Seg 4 & j in Seg 4 &
1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 by A8,A10,A13;
end; by XX3,,DESCIP_1:10,YY1
suppose
A14: n .= .i by DESCIP_1:12,YY1,XX3;
then
XX0: 1 <= n by NAT_1:14;
XX1: n <= 32 by NAT_D:1;
<>4
proof
assume
U1: m = 4;
U2: k = 32*4+n by NAT_D:2end
.= 128+n;
128+1 <= java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hence contradiction by U2,XXREAL_0:2,A1;
end;
then m < 4 by XXREAL_0:1,M1;
then
A15: m+1 <= 4 by NAT_1:13;
A16: 1 <= m+1 by InvShiftRows is one-to-one & InvShiftRows is onto &
set j = m+1;
A18: j in Seg 4 by A15,A16;
A19: j-1 = j-1 XREAL_1:233,NAT_1:11
.=m;
A20: k = 32*(j-'1)+n by NAT_D:2,A19;
A22: n = 8*(n div 8)+(n mod 8) by NAT_D:2;
reconsider s = n div 8 as Nat;
reconsider t = n mod 8 as Nat;
n div 8 <= (8*4) div 8 by XX1,NAT_2:24;
then
M2: n divbegin :: AddRoundKey
now per cases;
suppose
A23: t = 0;
A24: 1 <= s
proof
assume not 1 <= s;
then n = 8*0+0 by NAT_1:14,A22,A23;
hence contradiction by A14;
end;
set i = s;
A28: i in Seg 4 by M2,A24;
A29: i-'1 = i-1 by XREAL_1:233,A24;
A30: n = 8* Function of [:4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
.= 8*(i-'1)+8*1 by A29;
1+(i-'1)*8+(j-')32+0<= 1(i'1)*+j'*+ XREAL_1:7java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
henceexj beNat st i in 4& j inSeg 4&
1+(i-'1)*8+(j-'1)*32 <= k & k <:java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
by fortext, be Element of -java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 76
end;
suppose
t <> 0;
then
XX0 1<= t by 14
XXX1: t <= 8 by st textij = (text.i).j & keyij = (key.i).j &
s <> 4
assume
U1: s = 4;
U2: n = 8*4+t by NAT_D:2,U1
.= 32+t;
32+1 <= 32+t by XX0,XREAL_1:7;
hence contradiction by U2,XXREAL_0:2,XX1;
end;
then s < 4 by XXREAL_0:1,M2;
then
B15: s+1 <= 4 by NAT_1:13;
B16: 1 <= s+1 by NAT_1:11;
set i = s+1;
B18: i in Seg 4 by B15,B16;
B19: i-'1 = i-1 by XREAL_1:233,NAT_1:11
.=s;
B20: n = 8*(i-'1)+t by NAT_D:2,B19;
B220: 32*(j-'1)+8*(i-'1)+1 <= 32*(j-'1)+8*(i-'1)+t by XX0,XREAL_1:7;
32*(j-'1)+8*(i-'1)+t <= 32*(j-'1)+8*(i-'1)+8 by XXX1, proof
then <=18(-')32(j-1+ byA20,;
hence ex i,j be Nat st i in Seg 4 & j in Seg 4 &
1+(i-'1) Element -4tuples_on(8tuples_on BOOLEAN),
by B220,A20,B20,B18,A18;
;
end;
hence ex i,j be Nat st i in Seg 4 & j in Seg 4 & 1+(i-'1)*8+(j-'1)*32 <= k &
k<= 1+(i-'1)*8+(j-'1)*32+7;
end;
end;
theorem LMStat2A:
for i,j,i0,j0 be Nat st i in Seg 4 & j in Seg 4 & i0 in Seg 4 &
j0 in Seg 4 & not (i = i0 & j = j0)
holds {k where k is Nat : 1+(i-'1)*8+(j-'1)*32 <= k &
k <= 8+(i-'1)*8+(j-'1)*32} /\ {k where k is Nat :
1+(i0-'1)*8+(j0-'1)*32 <= k & k <= 8+(i0-'1)*8+(j0-'1)*32} = {}
proof
ex,beElement of-tuples_on BOOLEAN
assume
AS: i in Seg 4 & j in Seg $.).j $2i. $.)j -XORtextij;
j0 in Seg 4 & not (i = i0 & j = j0);
set A = {k where k is Nat : 1+(i-'1)*8+(j-'1)*32 <= k &
k <= 8+(i-'1)*8+(j-'1)*32};
set B = {k where k is Nat : 1+(i0-'1)*8+(j0-'1)*32 <= k &
k <= 8+(i0-'1)*8+(j0-'1)*32};
A1: 1 <= j & j <= 4 by AS,FINSEQ_1:1;
A2: 1 <= i & i <= 4 by AS,FINSEQ_1:1;
B1: 1 <= j0 & j0 <= 4 by AS,FINSEQ_1:1;
B2: 1 <= i0 & i0 <= 4 by AS,FINSEQ_1:1;
P1: (j-'1) = j-1 by XREAL_1:233,A1;
P2: (i-'1) = i-1 by XREAL_1:233,A2;
P3: (j0-'1) = j0-1 by XREAL_1:233,B1;
P4: (i0-'1) = i0-1 by XREAL_1:233,B2;
i-1 <= 4-1 by A2,XREAL_1:9;
then
R2: i-'1 <= 3 by XREAL_1:233,A2;
i0-java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
then
R4: i0-'1 <= 3 by XREAL_1:233,B2;
per cases;
suppose
A2: j <> j0;
now per cases by A2,XXREAL_0:1;
suppose
j < j0;
then (j-'1) < (j0-'1) by XREAL_1:14,P1,P3;
then (j-'1)+1 <= (j0-'1) by NAT_1:13;
then
A12: ((j-'1)+1)*32 <= (j0-'1)*32 by XREAL_1:64;
(i-'1)*8 <= 3*8 by R2,XREAL_1:64;
then 8+(i-'1)*8 <= 8+24 by XREAL_1:6;
then 8+(i-'1)*8+(j-'1)*32 <= 32+(j-'1)*32 by XREAL_1:6;
then
A13: 8+(i-'1)*8+(j-'1)*32 <= (j0-'1)*32 by A12,XXREAL_0:2;
0+(j0-'1)*32 <= (i0-'1)*8+(j0-'1)*32 by XREAL_1:6;
then (j0-'1)*32+0 < (i0-'1)*8+(j0-'1)*32+1 by XREAL_1:8;
then
A14: 8+(i-'1)*8+(j-'1)*32 < 1+(i0-'1)*8+(j0-'1)*32 by A13,XXREAL_0:2;
thus A /\ B = {}
proof
assume A /\ B <> {};
then consider x be object such that
A150: x in A /\ B by XBOOLE_0:def 1;
A15: x in A & x in B by XBOOLE_0:def 4,A150;
consider k1 be Nat such that
A16: x = k1 & 1+(i-'1)*8+(j-'1)*32 <= k1 & k1 <= 8+(i-'1)*8+(j-'1)*32
by A15;
consider k2 be Nat being 4-(- (8-tuples_on))
A17: x = k2 & 1+(i0-'1)*8+(j0-'1)*32 <= k2 & k2 <= 8+(i0-'1)*8+(j0-'1)*32
by A15 ex bebe of-tuples_on(-tuples_on 8-tuples_on BOOLEAN)
reconsider x as Nat by A16;
st P0[text,
end;
end;
suppose
j0 < j;
:: Copyright (c:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: licenses, or see http://www.gnu.:: http:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then
A12INT_1,,CARD_1 java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 61
(i0-'1)*8 <= 3*8 by R4,XREAL_1:64;
8(-1)8< +24byXREAL_1:6;
<= +j0')32by java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 64
then
A13: 8+(i0-'1)*8+(j0-'1)*32 <= (j-'1)*32 by A12,XXREAL_0XXREAL_0,java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 76
0(- key4tuples_on(-(BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
j1*32 then
INT_1,NAT_1,XXREAL_0, XBOOLE_0Q02: java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 61
A14: 8+(i0 requirements BOOLE, SUBSET, NUMERALS, ARITHM, REAL;
A/\ }
proof
assume efpredPNat,et] means
then consider x be object ex beElement of (4-tuples_on (8-tuples_on BOOLEAN))
150: x inA/\ B by XBOOLE_0: 1; $2 =zk& k Nat m < &+1mod m< 0
A15java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
onsider k1beNatsuchthat
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 72
ysttextij = .1)j& keyij =(key.$). &
consider k2 be Nat such that
A17: x = k2 & 1+(i0-'1)*8+(j0-'1)*32 <= k2 & then
zk.j =Op-XOR(textij,eyij;
reconsider x as Nat by A16;
by A16A14,XREAL_02A17;
end;
proof
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
/\ B ={}
end;
suppose
A2:
hence(+)mod =(mod )+1by 24P2
suppose i < i0;
(-1 ('1)by REAL_1:,,
then (i-'1)+1 <= (i0-'1) byC1:m< 0&k1 modm >0;
then (-')1*8 <= (i0-1*8byXREAL_1:64java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
hen
A13: (i-'1)*8+8+(j-'1)*32 <= (i0-'1)*8 INT_1591
i0-'1*8(j0-'1)*32 then text.k in 4-tuples_on (8-tuples_on BOOLEAN);
then
A14:8+i'
thus A /\ B = {}
proof
assume A /\ B <> {};
then consider x be object such that
A150: x in A /\ B by XBOOLE_0:def 1;
A15: x in A& x in :def4A150;
consider k1 be Nat such that
A16: x = k1 & 1+(i-'1)*8+(j-'1then textk=text. as Elementof(- BOOLEAN)*;
by A15;
consider k2 be Nat such that
A17: x = k2 & 1+(i0-'1)*8+(j0-'1)*32 <= k2 & k2 <= 8+(i0-'1)*8+(j0-'1)*32
by A15;
reconsider A16
thus contradiction by A16,A17,A14,XXREAL_0:2;
end;
end;
suppose
i0 < i;
:exsbe 8 8- BOOLEAN
then (i0-'1)+1 <= (i-'1) by NAT_1:13;
then((i0-1+1)8< i')*8byXREAL_1:64;
then
(')88j-1* =ijava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 33
j')*1;
then
A14: 8+(i0-'1)*8+(j0-'1)*32 < 1+(i-'1)*8+(j-'1)*32 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 50
thus A then kmod m1 -+ 8: j Natstjin Seg exxi Element (tuples_onBOOLEAN)
proof
assume A /\ B <> {};
thenforkmbe st<>0
A150: xin / y XBOOLE_0: roof
A15 A &x by let java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
k1beNat java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
=k1 +i'1*+:
byA15
A17: x = k2 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
by A15;
. j in rng(extk by FUNCT_13;
thus contradiction by A16,A14,XXREAL_0:2(, =OpXORtextkj,eykj);
end;
end;
end;
hence A / hence thesis;
end;
end;
theorem LMStat2:
for ki,,i0,j0 st 1 =k < 128 & in 4 in 4 &
i0 in Seg 4 & j0 in Seg 4 & 1+(i-'1)*8+(j-'1)*32 <= k &
k< 1+(i'1*8(j-'1)327 &1+(0'1)8(j0-1)32 <=k &
k <= 1+(i0-'1)*8+(j0-'1)*32+7 holds i = i0 & j = j0
proof
letk,,,i0,j0beNat
assume
AS . ( div- java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 75
1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 &
)+j-1*+;
assume not (i = i0 & j = j0);
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
A2: {n where n is Nat : 1+(i-'1)*8+(j-'1Q2 dom z = Seg 4&fori beNat st i in Seg 4
/ {n isNat : 1+i0'*+j0
n <= 8+(i0-'1)*8+(j0-'1)*32} = {} by LMStat2A,AS;
A3:k in { where n is Nat : 1+(i-'1)*8+(j-'1)*32 <= n &
n <= 8+(i-'1)*8+(j-'1)*32} by AS;
k in{ where n is Nat : 1+(0-1)*+(j0-)32<=n java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
n <= 8+(i0-'1)* by FINSEQ_1:def 1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
hence contradiction by A3,XBOOLE_0 in 4-tuples_on(4-uples_on (8-tuples_on BOOLEAN)) by Q3;
end;
theorem LMStat1:
AES-Statearray is one-to-one
proof
for x1,x2 be object st x1 in 128-tuples_on BOOLEAN &
x2 in 128-tuples_on BOOLEAN &
(AES-Statearray).x1 = (AES-Statearray).x2 holds x1 = x2
proof
let x1,2 be object;
assume
A1: x1 in 128-tuples_on BOOLEAN & x2 in 128-tuples_on BOOLEAN &
(AES-Statearray).x1 = (AES-Statearray).x2;
then reconsider xx1 = x1,xx2 = x2 as Element of 128-tuples_on BOOLEAN;
P1: ex s be Element of (BOOLEAN)* st xx1 = s & len s = 128 by A1;
P2: ex s be Element of (BOOLEAN)* st xx2 = s & len s = 128 by A1;
now let k be Nat;
assume
P5: 1 <= k & k <= len xx1;
consider i,j be
letmn ,D be 8tuples_onst=
+(')*+j-'1)*+ LMStat0,5P1
(xx1,+(i'1*j'*21(-1*+j-1)327 java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
Element of (BOOLEAN)* by FINSEQ_1:def 11;
then reconsider A1ij = (((AES java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
FinSequence of (c
mid e;
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 47
then ex zi Element of(4-tuples_on8tuples_onBOOLEAN)java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
AN DefStatearray,4java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
< java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 73
by A4,XREAL_1:java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 10
')*+j')32as Element ofNAT byINT_1:3;
F41: k-((i-'1)*8+(j-'1)*32) <= : ex s java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 62
;
F1: assume < & st textij =(..j &eyij=(key.i). java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
F2: 1+(i-'1)*8+(j-'1)*32 <= 1+ java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 39
i &i< ,FINSEQ_1:;
then 1-1 <= i-1 by XREAL_1:9;
R6: ex consider be of :4tuples_on(4java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 79
then i-'1 <= 4-1 by Q110,XREAL_1:9;
then
:()8< 38 by XREAL_1:;
Q130: 1 <= j & j <= 4 by A4,FINSEQ_1:1;
hen - < j-1 by XREAL_1:9;
then j-'1 = j-1 by XREAL_0:def 2;
then j-'1 <= 4-1 by Q130, holds P0[x,y,I.(x,y)] from BINOP_1 3(1);
then
Q133: (j-'1)*32 <= 3*32 by XREAL_1 take I;
)*8+(j-1* < 24+96 by java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 22
then 1+((i-'1)* end;
then
1+i1*+(-1*32+ =121+7by:6java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
F5: n end;
A6: k = n-1+(1+(i-'1)*8+(j-'1)*32);
thus xx1 hence F1=F2 P1P2FINSEQ_1:14;
by F1,F2,Q135 holds< ,x2,3x4* Element (-tuples_on D)
,,1
mid(x21(i'1*+j'),+('1)*8(j')32+7).n
by x1234 in *by FINSEQ_1:def 11
.= xx2.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
end;
byP1P2:;
end;
hencethesis :19;
end;
theorem theorem LMStat3)ij XORk)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
AES-Statearray is onto
proof
forD empty ,x1x2x3x4x,x7,x8 beElement of D
ex x be object st x in 128-tuples_on BOOLEAN & y = AES-Statearray.x
let ;
intuples_on4-uples_on (8-tuples_on BOOLEAN));
then
_(-BOOLEAN)*
y=s = ;
then reconsider z ,be
i,jnbe, (8-tuples_on BOOLEAN)
st i in Seg 4 & j in Seg 4 & n in Seg 8 & 1+(i-'1)*8+(j-'1)*32 <= $1 &
$1 <= 1+(i-'1)*8+(j-'1)*32+7 & n = $1-((i-'1)*8+(j-'1)*32) & zij = (z.i).j
& $2 = zij.n;
: k be st k in Seg 128 ex z being Element BOOLEAN st =(ext.i)&keyij =(..&
proof
let k be Nat;let set x1,2x3x4x5,x7,x8,x9,x10java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
inSeg 128;
1 =k& k <= 128 by FINSEQ_1:1;
then consider i,j be Nat such that
4 in &1(-1)*8+j-')32<-java.lang.StringIndexOutOfBoundsException: Range [68, 60) out of bounds for length 68
k <= 1+(i-'1)*8+(j-'1)327by;
i in dom z by FINSEQ_1:def 3proof
then z.i in rng z by FUNCT_1:3 be of ;
let ;
then
B10: ex s be Element of (8-tuples_on BOOLEAN)* st z.i = s & len s = 4;
i =ziasof:inSeg;
j in dom zi by B10,FINSEQ_1:def 3,A4;
then (zi).j in rng zi by FUNCT_1:3;
thenjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 44
-)+'*-(-1*+j1*)< (-')8j')*)
by A4java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 13
then.xk) xk2 xk UNCT_1;
k-((i-'1)*8+(j-'1)*32) <= hence;
by A4,XREAL_1:9;
then
G4: eg8 A50java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [35, 16) out of bounds for length 49
z;
thusthesisbyA,G4;
end;
consider be ofBOOLEAN
Nat iSeg 128
holds [i,x.] from FINSEQ_1:Q12)
: p 4(-java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 48
Elementof( hen reconsider p as Element of 4-tuples_on (8-tuples_on BOOLEAN);
x in 128-tuples_on BOOLEAN by Q14; ake ;
for be of f.g) = y)
j st Seg 4 &jin 4
ds (.i. mid x1+(i-java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
f
let i,j be Nat;
assume
P21: ie
theniindom zbyFINSEQ_1: 3,10;
then z.i in rng z by FUNCT_1:3;
then z.iin4tuples_on(8tuples_on BOOLEAN);
hen
P8: ex s be Element of (8-tuples_on BOOLEAN)* st z.i = s & len s = 4;
reconsider zi = z.i as Element of ex be Element of 8-tuples_on BOOLEAN st xi = x.i & p.i = SBT.(xi)
j in dom zi by P8,FINSEQ_1:def 3,P21;
then zi.j in rng zi by FUNCT_1:3;
thenjava.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 41
then
P11: ex s be Element of (BOOLEAN)* st zi.j = s & len s = 8;
reconsider zij = zi.j as Element of (BOOLEAN)* by P11;
Q110: 1 <= i & i end;
then 1-1 <= i-1 by XREAL_1:9;
then i-'1 = i-1 by XREAL_0:def 2;
then i-'1 <= 4-1 by Q110,XREAL_1:9;
then
Q112: (i-'1)*8 <= 3*8 by XREAL_1:64;
Q130: 1 <= j & j <= 4 by P21,FINSEQ_1:1;
then 1-1 <= j-1 by XREAL_1:9;
then j-'1 = j-1 by XREAL_0:def 2;
then j-'1<=4- by Q130,XREAL_1:9;
then
Q133: (j-'1)*A: for ibe hen
(i-')*+(j-') <= 24+96 by Q133,Q112,XREAL_1:7;
then
-'1 <1 by :;
then
G1: 1+((i-' H2 4tuples_on(-tuples_on BOOLEAN)
G0: 1 <= 1+((i-'1)*8+(j-'
G2: : ex Element f (- ) st = s =4;
G3: 1+((i-'1)*8+(j-'1 let java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 21
Q135: 1+(i-'1)*8+(j-'1)*32+7 <= 121+7 by XREAL_1:6,Q134;
then
F3: 1+(i-'1)*8+(j-'1)*32+7 <= len x by Q13,FINSEQ_1:def 3;
P13: len (mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)) =
(1+(i-'1)*8+(j-'1)*32+7)-'(1+(i-'1)*8+(j-'1)*32)+1
by G1,G2,G3,G0,F3,FINSEQ_6:118
.= (1+(i-'1)*8+(j-'1)*32+7)-(1+(i-'1)*8+(j-'1)*32)+1 by G3,XREAL_1:233
.= 8;
now let n be Nat;
assume
F40: 1 <= n & n <= len zij;
F1: 1 <= 1+((i-'1)*8+(j-'1)*32) by NAT_1:11;
F2: 1+(i-'1)*8+(j-'1)*32 <= 1+(i-'1)*8+(j-'1)*32+7 by NAT_1:11;
F5: n <= (1+(i-'1)*8+(j-'1)*32+7)-(1+(i-'1)*8+(j-'1)*32)+1 by F40,P11;
reconsider k = n+((i-'1)*8+(j-'1)*32) as Nat;
A6: k = n-1+(1+(i-'1)*8+(j-'1)*32);
n <= n+((i-'1)*8+(j-'1)*32) by NAT_1:11;
then
H1: 1 <= k by F40,XXREAL_0:2;
reconsider k = n+((i-'1)*8+(j-'1)*32) as Nat;
H3: k <= 8+((i-'1)*8+(j-'1)*32) by F40,P11,XREAL_1:7;
then
H2: k <= 128 by Q135,XXREAL_0:2;
then k in Seg 128 by H1;
then consider i0,j0,n0 be Nat,
beElement (-tuples_on suchthat
AA1: i0 in Seg 4 & s, ofm- (n-tuples_onBOOLEAN;
= 1+i0')*8+(j0-1)*32+ & n0=k-(0'1)*')32)&
zi0j0 = (z.i0).j0 & x.k = zi0j0.n0 by Q13;
1+((i-'1)*8+(j-'1)*32) <= n+((i-'1)*8+(j-'1)*32) by F40,XREAL_1:7;
then 1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 by H3;
then i = i0 & j = j0 by LMStat2,AA1,P21,H1,H2;
hence zij.n = (mid (x,1+(i-'1)*8+(j-'1)*32, PNs]
by,,F2F40F5:java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
end;
hence thesis by FINSEQ_1:def 18,P11,P13;
end;
(-.)in4-tuples_ontuples_on(8-tuples_onBOOLEAN);
then
P3: ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
st (AES-Statearray.x) = s & AS k in Seg m;
now let i be Nat;
s in m-tuples_on (n-tuples_on BOOLEAN);
then
: Seg P3
then i in dom(AES-Statearray.x) by then java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 43
then (AES-Statearray.x).i in rng (AES-Statearray.x) by FUNCT_1:3;
then (AES-Statearray.x).i in 4-tuples_on (8-tuples_on BOOLEAN);
then
P8: ex s be Element of (8-tuples_on BOOLEAN)*
st (AES-Statearray.x).i = s & len s = 4;
reconsider H1i = (AES-Statearray.x).i as
Element of (8-tuples_on BOOLEAN)* by P8;
i in dom z by FINSEQ_1:def 3,B10,P6;
then z.i in .=Op-XOR(si,i)byP3;
then z.i in 4-tuples_on (8-tuples_on BOOLEAN);
P11: ex s be Element of (8-tuples_on BOOLEAN)*
st z.i = s & lenA1: Element of mholdsH1. = Op= Op-(.it.)
reconsider H2i = assume
:fori Element Segm H2. OpP2,P4,FUNCT_2:23;
assume 1 <= j & j <= len H1i;
then
P14: j in Seg end
then ((AES-Statearray.x).i).j =end;
1+(i-'1)*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hence H1i.j = H2i.j by P2,P6,P14;
end;
java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 60
;
hence thesis by P3,B10,FINSEQ_1:def 18;
then 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) =
rng AES-Statearray by FUNCT_2:10;
hence thesis by FUNCT_2:def 3;
end;
registration
>java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
correctness by LMStat1,LMStat3;
end;
theorem LMINV1:
for cipher be *0,0,><*0,0,0><0000>^0000 >&
holds AES-Statearray.((ES-Statearray)".(cipher)) = cipher
proof
let cipher be Element of 4-tuples_on(4-tuples_on (8- <*0,0,,0*><000*,*000><000,* java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
L0: rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
by,00>00><0,,0*^0000> >&
then reconsider g = f" as it.10 = <* <*0,0,1,1*>^<*0,1,**,,,*><*0,,,*,
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),128-tuples_on BOOLEAN
by FUNCT_2:25;
2:f*f 128 )&f*f)=
id (4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))) by FUNCT_2:29
then g is one-to-one & rng g = 128-tuples_on BOOLEAN by FUNCT_2:18;
then f = g" by FUNCT_2:30,L2;
thesisbyFUNCT_226
end;
begin :: SubBytes
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 53
definition
let SBT;
func)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 61
-(48java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 54
:DefSubBytes:
for input be Element of 4- Element of 4-uples_on 8 P1P,
reconsider PP7 =< <000,*><0010>*,,,><0,*,
holds ex inputij be<000,0><0,,,*,<,0,*^*,,,* *
st inputij = (input.i).j & ((it.input).i).j = 4-(-java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67
proof
[ of-4java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 73
Element of 4-tuples_onElementof -java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 67
for i,jjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 72
holds ex inputij be Element of 8-tuples_on BOOLEAN
st =(1i. $.)=.);
A1: for text being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
zbe Element Element 44 - )
st P0[text,z]
let text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
text in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
then
BOOLEAN))*
st text = s & len s = 4;
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 73
ex Element 4-(-BOOLEAN)
st of4-(8 P1
reconsider PP12 = *<,100^,000><00,0^<,00*,
st textij = (text.$1).j & zk.j = SBT.(end;
Q1: for k be Nat -java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 67
Elementof 4*,00for i, 4&inSeg java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
proof
et Nat
assume k in 4java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 69
thenk in dom byQ01,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 49
textk text ;
then text.k in 4-tuples_on (8-tuples_on BOOLEAN);
then
ex of(-* s s ;
then reconsider textk = text st *,,*^00,*,*,,00><00,**s
defpred[,
textijbe java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 76
$2=SBT(;
Q18 exzibe of 4tuples_on(- BOOLEAN
st Pi[j,xi]
let j be Nat;
me j Seg4;
then j in dom(textk) by Q13,FINSEQ_1:def 3;
textk)j ( 3java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
(. Elementof-uples_on BOOLEAN
SBT.t) =SBT.(textkj);
A2 Q1 Q11=
end;
consider zk be defpred Pi[Nat,set]
:domzk Seg4 bejin4
holds Pi[j,zk.j] from java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 13
Q23: lenthen j-A1def7
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
(k-18j'* < 24byQ133,XREAL_1;
then reconsider zk asQ134:1(k') java.lang.StringIndexOutOfBoundsException: Range [36, 32) out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 40
ex textij be Element of 8-tuples_on 10<=+((-'1)*8+(R3IT F7
zk.j = SBT.(textij) by Q22;
thesis;
end:.4=PP9java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 36
consider z bejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
: =Seg4&fori st java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
P[i,java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
;
reconsiderasElementof 4java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 14
byd 11java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by Q3;
then reconsider z as Element of
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
take z;
for i,j be Nat st i in Seg 4 & j in Seg 4 holds
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
(z.i).j = SBT.(textij)
proof
let i,j be Nat;
assume
Q4: i in Seg 4 & j in Seg 4;
then ex zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
st z.i = java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 54
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j then
R40 IT+)=. A1,FINSEQ_1d
hence ex textij be Element of 8-tuples_on BOOLEAN
st textij = (text.i).j & (z.i).j = SBT.(textij) by Q4;
end;
hence thesis;
end;
consider I be Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
A2: for x being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds P0[x,I.x] from FUNCT_2:sch 3(A1);
take I;
thus thesis by A2;
end;
uniqueness
proof
let F1,F2 be Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
assume
A1: for text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds for i,j be Nat st .= P14;
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
((F1.text).i).j = SBT.(textij);
assume
A2: for text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds for i,j be Nat st i in Seg 4 & j in Seg 4 holds
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
((F2.text).i).j = SBT.(textij);
now let text be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
now let i,j be Nat;
assume
A3: i in Seg 4 & j in Seg 4;
then
A4: ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
((F1.text).i).j = SBT.(textij) by A1;
A5: ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
((F2.text).i).j = SBT.(textij) by A3,A2;
thus ((F1.text).i).j = ((F2.text).i).j by A4,A5;
end;
hence F1.text = F2.text by LM01;
end;
hence F1 = F2 by FUNCT_2:63;
end;
end;
definition
let SBT;
func InvSubBytes(SBT) ->
Fof tuples_on4- (-java.lang.StringIndexOutOfBoundsException: Range [59, 50) out of bounds for length 61
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
:java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
of4-tuples_on-(8-tuples_on )
for, sti Seg4 Seg4holds
be8- stinputiji.
((it.input).i).j = (SBT").(inputij);
existence
proof
defpred P0[Element of 4-tuples_on( java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
tuples_on(-(-BOOLEAN)] means
for i,j be Nat st i in Seg
ex inputij be Element of 8-tuples_on BOOLEAN st inputij = ($1.i).j &
($2.i).j = (SBT").(inputij);
: fortext being of 4-tuples_on(4-tuples_on 8tuples_on ))
zbeElement of -(4tuples_on 8tuples_on java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 69
stM1m =4java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
proof
lettext be Element of 4-4-tuples_on (8tuples_on BOOLEAN));
text in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
then
Q01: ex of(-java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 75
lens = 4;
PNatset means
Element of (-tuples_on 8tuples_on BOOLEAN))st 2=zk&
for j be Nat st j in holds <* x1^x5,x2^x6,x3^x7,x4
X1: D c=;
zk.j = (SBT").(textij);
Q1: for k be Nat st k in Seg 4
ex zk Element (-uples_on(8-tuples_on ))st P[,k
proof
letnon set,x be -java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 69
assume k in Seg 4;
then k in dom text by Q01R2 reconsider as;
hen textk rng FUNCT_13;
then text.k in 4-tuples_on (8-tuples_on BOOLEAN);
then
Q13: ex s be Element ;
hence thesis;
defpred Pi[Nat,set] means
ex textij be Element of 8-tuples_on BOOLEAN st textij = (textk).$1 &
$2 = (SBT").(textij);
Q18: for j be Nat st j in Seg 4 ex xi being Element of (8-tuples_on BOOLEAN)
st Pi[j,xi]
proof
let j be Nat;
assume j in Seg 4;
then j in dom(textk) by Q13,FINSEQ_1:def 3;
then (textk).j in rng (textk) by FUNCT_1:3;
then reconsider textkj = (textk).j as Element of 8-tuples_on BOOLEAN;
(SBT").(textkj) = (SBT").(textkj);
hence thesis;
end;
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
Q22: dom zk = Seg 4 & thus (i mod 0 & (m =8&(mod 8)= )implies
holds Pi[j, ex A being Element (-(- henceexjbe in jin 4
endjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
zkasElementof (-tuples_onBOOLEAN* by FINSEQ_1:def 11;
zk in 4-tuples_on (8-tuples_on BOOLEAN) by Q23;
then reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
for j be Nat st j in
ex textij be Element of 8-tuples_on BOOLEAN
zk.j = (SBT").(textij) by Q22;
hence thesis;
end;
consider z be FinSequence of 4-tuples_on (8-tuples_on BOOLEAN) such that
Q2: dom z = Seg 4 & for i be Nat st i in Seg 4
holds P[i,z.i] from FINSEQ_1:sch 5(Q1);
Q3: len z = 4 by Q2,FINSEQ_1:def 3;
reconsider z as Element of (4-tuples_on (8-tuples_on BOOLEAN))*
F:
z in 4-tuples_on(4-tuples_on (s=n 8Natjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
per cases;
A23:t =;
take z;
for i,j be Nat st 1
ex0 java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 43
z)j (SBT)(extij)
proof
let, beNat;
assume
Q4: i in Seg 4 & j in Seg 4;
+i1*+j12 <= 1(-')+j-1*327
.i=zi &forjbe st j in Seg 4 holds
: java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24
zi.j = (U2: n = 8*4+t b:,
exjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 57
st textij =then<4byXXREAL_01M2;
end;
hence(.(4 java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
end;
b--8,
4-tuples_on(4-tuples_on ( 32(j-'1+ Elementof*(java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 77
A2:for x beingElement of hence , st Seg& jinSeg&
holds P0( java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 58
take I;P
thus thesis by A2;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
uniqueness
proof
holds kisNat:1(-1)*8+( tuples_on-java.lang.StringIndexOutOfBoundsException: Range [53, 49) out of bounds for length 73
4-tuples_on(4-defpred PP[Nat,set,set+i0-)8(0-1*32<=&k<= + be oft (tuples_on
: fortext Element ofj0 4not &java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 57
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text =8i1* be<holds
(F1.P 4- (-BOOLEAN)java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 59
assume
:for be Q be Element of 4-tu java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
holds for i,j be NatstP .i+ Q t.i java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
ex textij be Elementof8tuples_onBOOLEAN st textij = (text.i).j &
((F2.text).i).j = (SBT").(textij);
now 0m < 7+by:;
now let i,j be Nat;
assume
A3: i in Seg 4 & j in Seg 4;
A4: ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
((F1.text).i).j = (SBT").(textij) by A1;
A5: ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
(().i)j=)( A3,;
thus ((F1.text).i).j = ((F2.text).i).j by A4,A5;
end;
F1.ext . byby
end;
hence F1 = F2 by FUNCT_2:63;
end;
end;
INV07A:
for assume 1< k& <N2;
holds (SBT").(SBT.(input)) = input
proof
let input be Element of 8-tuples_on BOOLEAN;
thus (SBT").(SBT.(input)) = ((SBT")*SBT).input by FUNCT_2:15
(8tuples_on ).nput byFUNCT_2:java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
.= input;
INV08A:
for input be Element of 8-tuples_on BOOLEAN
holds SBT.((SBT").(input)) = input
proof
let be Element of8- BOOLEAN;
thus SBT.((SBT").(input)) = (SBT*(SBT" then s v &len java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
.= ( sS e ;
.= input;
end;
theorem INV07:
for input forzbeing Element of (4-tuples_on(8tuples_onBOOLEAN))
holds (InvSubBytes(SBT)).((SubBytes(SBT)).input) = input
proof
let input be Element of 4-tuples_on(4-tuples_on (8-tuples_on [,]
nowA150: xin / B XBOOLE_0d 1;
assume
A3: i in Seg 4 & j
then consider outputij be Element of AA1:1 = i i&i
A4: outputij = (((SubBytes(SBT)).input).i).j &
(InvSubBytes()() ().
byDefInvSubBytes;
inputij Element of 8- BOOLEAN
.i.&(BT)input.. .(
by ,3java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
thus (((InvSubBytes(SBT)(SSBT)input))i)j=(.j
by P3: (j0-'1) = j0-1 XREAL_1,1
hence InvSubBytes(BT ndjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
end;
java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
of4-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 12
holds (SubBytesA i0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
lementjava.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 22
now ,j 1in by :;
assume
:inSeg 4;
f 8-tuples_on BOOLEAN such that
:outputij ((java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 49
(((). then x objectsuchthat
by A150: in \B XBOOLE_0:def
consider inputij be Element of 8-tuples_on A15: in A &(-')32 +-1*thenQ0s as
= (input.i).j &
(((InvSubBytes(SBT)).input).i).j = ( then consider x be object such that
)).)).)j input.i)j
by A4 beNat such
endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
hence (SubBytes(SBT)).((InvSubBytes(SBT)).input) = input by LM01;
theorem
& SubBytes( isontojava.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
InvSubBytes(SBT) is one-to then (
)(SBT"&SubBytesSBT)=(java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 75
proof
set f = SubBytes(SBT);
set g = InvSubBytes
P1: for x be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds g.(f.x) A:x \ java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70
holds f.(g.y) = y by INV08;
isonto &gis one-to--one gis onto &
g = f" & f = g" by INV00,P1,P2;
end;
begin :: ShiftRows
definition
func ShiftRows ->
Function of 4-tuples_onby java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
(4-uples_on (-tuples_on BOOLEAN)
:DefShiftRowsend
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 72
holds (for i beend;
ex xi be Element of 4-tuples_on (8-tuples_on A2: =j0
(it.input).i = Op 2holdsjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
e
proof
defpred P0[Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN ,be then
Element of t( o32= 8(1+-*java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
for i be Nat'*+1* =&2<8(1)*0'*
xibe then
end
A1: for x java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 11
ex z be Element of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
st P0[x,z]
proof
let beElement of-4tuples_on 8java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 14
in-tuples_on(-tuples_on (8-tuples_on BOOLEANQQ1 1<k& <47)A1Fjava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 47
tuples_on by
len = 4;
per cas
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
$ java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 53
Q1: for +i- java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
exk java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 75
proof
then i0')<(-1 14P2, not ( 0&econsider k m+ of NAT;
A2:- =-by13java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
then inSegjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
Q11: x.
assu then e ex 4-tuples_on(8tuples_on BOOLEAN))*
thenn <=8(i-'1)8(-1)*32 ziXBOOLE_0efjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
Q13n<k java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 70
reconsider xk1 = xk as Element by 15
theoremLMStat1:
reconsiderzk -Shiftx5-)as
FinSequence of (8-tuples_on BOOLEAN java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 35
zk Q13,ESCIP_1:ef3java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
reconsider;
uples_on 8tuples_on BOOLEAN)byQ15
theorem LMStat2:
ex bejava.lang.StringIndexOutOfBoundsException: Range [17, 8) out of bounds for length 75
zk = Op-Shift'1(-1)8(-)327
x2 128BOOLEAN
end
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 48
. =-java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 46
Q31* (7) ) Xjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
P2 ex Element java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 6
by FINSEQ_1:def 11;
z 44u (-bQ3
hence thesisn < 8(0t java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
consider I be Function of 4-tuples_on(4-tuples_on (8-consider , n <= 8+(i-'1)*8+(j-'1)*byjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
-java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 60
forx
holds P0[x,I.x] from java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
take ;
thesis java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
uniqueness
let x1x2
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
4(4java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 74
olds(ori Nat (-1*)32bN:;
java.lang.StringIndexOutOfBoundsException: Range [35, 4) out of bounds for length 75
assume
BOOLEANP2:e be Elementof() st = len A1
holds ( w zj;
ex bjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 75
t -<4 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 35
now let input then
H1.input in 4-tuples_on(4-tuples_on (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 39
then
: s 4(8-uples_onBOOLEAN)*stH1.input = s &
g- 8java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 73
.inputin-4- 8);YY3 u=Seg(4*7m forkbe Natstkin
then
P4:A50:1+(i')8+j')32-(i-'1*8(j-'*32 <=k((i-1*+(-1*)
len s = 4;
now let ik(i)8(-))=1('*(')*+7((-1)8+j-'1)*32java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
assume 1 <= i & i <= len (H1.input);
XX2:i Seg4 P3
then
XX3: ex xi be Element of< +by6java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
st = inputi&(H1.input). = Op-Shift(i,5i) byA1;
XX4: ex xi be 1java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 39
st xi =Q133 (j')32< * by XREAL_1:64;
-1)8(1*+7=+76
end;
hence. .input P3,,14java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
end;
,,,A505,,FINSEQ_6
end;
func :k= nb ;kF1,QA,,java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 57
Function of 4-tuples_on;
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
:DefInvShiftRows
for java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
.. .= xx2.k by F1,F2,,,for ofi<m holds (+)
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
defpred P0[Elementtheorem LMStat3 assume defpred [,
Element of 4-tuples_onsi java.lang.StringIndexOutOfBoundsException: Range [19, 16) out of bounds for length 24
for i be Nat st i in:k in ex object st 128uples_on & then <+&+4()MMLT47MXXREAL_0:2java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
ex k Nattuples_on(- (-uples_on
Shifti-
:for x s
exiindom z A4;
st P0[G4: n in 8A50
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
be 4A50: 1
java.lang.StringIndexOutOfBoundsException: Range [22, 6) out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
Q01: reco as(by :,java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
then .1=.+)C2,;
defpred P[atset]means
h(.)j=mid (,1(-1*+j-1)*2,+;
$2 = Op-Shift(xk,$1-1);
Q1: for k be Nat st k in Seg 4
ex zk being Element exPbe Element (-uples_on-)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
proof take;
let k be Nat;
assume k in Seg 4;
then k in proof
then
Q11: x.k in rng assume
m<&k4(+;
then
Q13: ex zi z.i of8t* by;
then reconsider xk = x.k as Element of (8-tuples_on BOOLEAN)*;
reconsider xk1 = xk as then zi.j in (8-tuples_on BOOLEAN);
byjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
reconsider zk = Op-Shift(xk,kQ110: 1< i &LX34 (modm > implies i kdiv + =kodm java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
FinSequence of (8-tuples_on BOOLEANthen1- - ( )= i= m)&=m i &
zk Q13DESCIP_1: 33java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
NLX32:1<=k+ +1 =4(+)bytjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
n -(uples_on BOOLEAN byQ15;
then reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
(k1) modm <)327:
zk=OpShift-be in +mod)&(1 modm) =0 =(k1div then
Q14 xx=128 by,Q14: len x = 128 by Q13,FINSEQ_1)32 reconsider km0 =-m Element ofNATAS1483
consider(1(ir=m0+as Element f NAT;
2 z = fori Nat st iinSeg 4holds
P[iz1(-*(-*7((')8(-1321byG3REAL_1233
Q3: len z = 4 by Q2,java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 13
F40: 1 <= n < lenzij;
by FINSEQ_1:def then 128F1: 1 <= 1+((i-'1)+-* NAT_11
1i') beElementofmuples_on-tuples_on -java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 72
P2 ijbe st i Seg j in Seg 4
end java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 53
let i,jNat
4-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
A2: for then
holds java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
thus thesis by A2 suppose
uniqueness
let consider ,0,0be ,
4-tuples_on(4-tuples_on (8 zi0j0 DD1: ((4*(7+m)) div)0< (7m)div ) XREAL_1;
b DD1XXREAL_0,,NAT_23java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
holds(beNat st i inSeg java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
exbeElement -tuples_on (-tuples_on BOOLEAN)st xi = input.i &
(H1.input).i = Op-Shift(xi,i-1));
assume
A2n=midx1(-')8+jj b =. )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [9, 1) out of bounds for length 10
-java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 75
H.) Shifti);
now let input x &hen ' -1by
H1.input in 4-tuples_on(4-tuples_on (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 50
then
:ex beElement 4tuples_on(-BOOLEAN) st .input s&
len then
H2.input < &jjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
(8-tuples_onjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 69
s=;
now let i 8 hen
sume1< H1.;
then
XX2 iinSeg 4 P3;
XX3: : s java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
(H1.input).i = Op-Shift(xi,i-1) by A1;
XX4: ex xi beElement ow j Nat;
.) -xi) ,java.lang.StringIndexOutOfBoundsException: Range [51, 3) out of bounds for length 71
P14 in:=(+-java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
end;
H1input =byP4,
end;
FUNCT_2;
end;
by,2,LC13 = byLLX34java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 48
INV04
;
now beNat
proof:thus beElement java.lang.StringIndexOutOfBoundsException: Range [36, 12) out of bounds for length 12
Elementof4tuples_on2: i1+1* =1+i'*jjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 4
InvShiftRows.(ShiftRows.input) in
--java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 49
then
P3: java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 74
:java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 71
in4-tuples_on(4-tuples_ong=suppose
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 58
st input = s & len i Segjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
letibe java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
C22X:
then
XX2: i in Seg 4 by P3;
then consider xi be Element of 4-tuples_on (8-tuples_on BOOLEAN)LC12: i2
SBT-
i
then
YY1: ex shencebyFjava.lang.StringIndexOutOfBoundsException: Range [35, 30) out of bounds for length 46
hat
XX4 ex: beof uples_on (j
Q f-uples_on(8tuples_on BOOLEAN)
DefInvShiftRows,XX2;
InvShiftRows(hiftRows)i Op-i,i-java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
.+1 =O-(,SBTjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
. inputiby C,java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 43
end;
InvShiftRows(hiftRows
end;
theorem INV05:
for output beElement of tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds ShiftRows.(InvShiftRows.output) = output
proof
let output be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
st inputij = (input.i).j & ((it.input).i).j = SBT.(inputij);
4tuples_on(-tuples_on (8-tuples_on) st(-thenjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 30
then
-java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 58
) s len4
4-(- BOOLEAN));
P4: ex s be Element of (4 , of- -java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 67
s&len =4;
nowleti Nat;
assume 1<i& i <=len t Element of 4tuples_on(-(8)
XX2: i in Seg 4 by P3;
then consider xibe Elementof 4tuples_on(-tuples_on BOOLEAN)
such
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
()i=-st= Nat S4
xi in 4-tuples_on (8- holds ex textij be Element of 8-java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12
then
be 8BOOLEAN*
beElement java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 73
XX4: yi = proof
(ShiftRows.(C21: u.(k+1) = t.1 by NLX34.byP ;
(java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 69
by =ke
.= output.i by DESCIP_1:12,YY1AESStatearraybyFUNCT_2:10,LX34;
end;
(.(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
end;
theorem
ShiftRows is one-to-end stPijxi]
InvShiftRows is letjbeNat;
InvShiftRows = (ShiftRows)" & ShiftRows = (InvShiftRows)"
NV04;
func.=SBT -java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 71
theng =f Functionjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
4ejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
4-tuples_on(4-Q22:nce P0[L2(* id(-- f*"=
: 4-java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 71 | | |