|
|
|
|
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 TARSKI, XBOOLE_0, ZFMISC_1, SUBSET_1, RELAT_1, FUNCT_1, ORDINAL1,
RELSET_1, PARTFUN1, FUNCT_2, BINOP_1, CARD_1, NUMBERS, XCMPLX_0,
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,
INT_1, NAT_1, XXREAL_0, XBOOLE_0, FUNCT_1, XREAL_0, FINSEQ_4;
requirements BOOLE, SUBSET, NUMERALS, ARITHM, REAL;
equalities FINSEQ_1, FINSEQ_2;
theorems TARSKI, FUNCT_1, FUNCT_2, XXREAL_0, XREAL_1, FINSEQ_6, XREAL_0,
NAT_1, INT_1, FINSEQ_1, CARD_1, BINOP_1, NAT_D, FINSEQ_2, FINSEQ_4,
RFINSEQ, FINSEQ_5, XBOOLE_0, ORDINAL1, DESCIP_1, MARGREL1, NAT_2,
WSIERP_1, XCMPLX_1, FINSEQ_3;
schemes FUNCT_2, FINSEQ_1, NAT_1, BINOP_1, RECDEF_1;
begin :: Preliminaries
theorem XLMOD02:
for k,m be Nat st m <> 0 & (k+ 1) mod m <> 0
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: (k+ 1) mod m = ((k mod m)+ 1) mod m by NAT_D: 22;
k mod m < m- 1
proof
assume not k mod m < m- 1;
then (k+ 1) mod m = (m- 1+ 1) mod m by XXREAL_0: 1,P1,P2
.= 0 by INT_1: 50;
hence contradiction by C1;
end;
then (k mod m)+ 1 < m- 1+ 1 by XREAL_1: 8;
hence (k+ 1) mod m = (k mod m)+ 1 by NAT_D: 24,P2;
end;
theorem XLMOD01:
for k,m be Nat st m <> 0 & (k+ 1) mod m <> 0 holds (k+ 1) div m = k div m
proof
let k,m be Nat;
assume
C1: m <> 0 & (k+ 1) mod m <> 0;
k+ 1 = ((k+ 1) div m )*m+((k+ 1) mod m) by INT_1: 59,C1
.= ((k+ 1) div m )*m+((k mod m)+ 1) by XLMOD02,C1;
then
P1: ((k+ 1) div m)*m+(k mod m)-(k mod m) = (k div m )*m+(k mod m)-(k mod m)
by INT_1: 59,C1;
thus ((k+ 1) div m) = (k div m)*m / m by XCMPLX_1: 89,C1,P1
.= (k div m) by XCMPLX_1: 89,C1;
end;
theorem XLMOD02X:
for k,m be Nat st m <> 0 & (k+ 1) mod m = 0 holds m- 1 = (k mod m)
proof
let k,m be Nat;
assume
C1: m <> 0 & (k+ 1) mod m = 0;
then (k mod m)+ 1 <= m by NAT_D: 1,NAT_1: 13;
then
P1: (k mod m)+ 1- 1 <= m- 1 by XREAL_1: 9;
P2: (k+ 1) mod m = ((k mod m)+ 1) mod m by NAT_D: 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;
hence contradiction by P2,NAT_D: 24,C1;
end;
theorem XLMOD01X:
for k,m be Nat st m <> 0 & (k+ 1) mod m = 0
holds (k+ 1) div m = (k div m)+ 1
proof
let k,m be Nat;
assume
C1: m <> 0 & (k+ 1) mod m = 0;
then
P3: k mod m = m- 1 by XLMOD02X;
P4: k+ 1 = ((k+ 1) div m)*m+((k+ 1) mod m) by INT_1: 59,C1
.= ((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+ 1) div m) = ((k div m)+ 1)*m / m by XCMPLX_1: 89,C1,P4,P5
.= ((k div m)+ 1) by XCMPLX_1: 89,C1;
end;
theorem XLMOD03:
for k,m be Nat holds (k-m) mod m = k mod m
proof
let k,m be Nat;
thus (k-m) mod m = (k+m*(- 1)) mod m
.= k mod m by NAT_D: 61;
end;
theorem XLMOD04:
for k,m be Nat st m <> 0 holds (k-m) div m = (k div m)- 1
proof
let k,m be Nat;
assume
AS: m <> 0;
thus (k-m) div m = (k+m*(- 1)) div m
.= (k div m)+- 1 by AS,NAT_D: 61
.= (k div m)- 1;
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;
redefine func F.x -> Element of m-tuples_on(n-tuples_on D);
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;
let x be Element of X,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;
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 in Seg 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,F2 be Element of m-tuples_on (n-tuples_on D);
assume
AS: for i,j be Nat st i in Seg m & j in Seg n
holds (F1.i).j = (F2.i).j;
F1 in m-tuples_on (n-tuples_on D);
then
P1: ex s be Element of (n-tuples_on D)* st F1 = s & len s = m;
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;
then
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 = n;
then reconsider F1i = F1.i as Element of D*;
i in dom F2 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 reconsider F2i = F2.i 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;
end;
hence
F1.i = F2.i by P6,R6,FINSEQ_1: 14;
end;
hence F1 = F2 by P1,P2,FINSEQ_1: 14;
end;
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)
proof
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: len x1234 = 4 by FINSEQ_4: 76;
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 Element of D
holds <* x1,x2,x3,x4,x5 *> is Element of ( 5-tuples_on D)
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 x12345 = 5 by FINSEQ_4: 78;
x12345 in D* by FINSEQ_1:def 11;
then x12345 in 5-tuples_on D by P1;
hence thesis;
end;
theorem
for D be non empty set, x1,x2,x3,x4,x5,x6,x7,x8 be Element of D
holds <* x1,x2,x3,x4 *>^<* x5,x6,x7,x8 *> is Element of ( 8-tuples_on
proof
let D be non empty set,x1,x2,x3,x4,x5,x6,x7,x8 be Element of D;
reconsider x1234 = <* x1,x2,x3,x4 *> as Element of 4-tuples_on D
by LMGSEQ4;
reconsider x5678 = <* x5,x6,x7,x8 *> as Element of 4-tuples_on D
by LMGSEQ4;
D c= D;
hence thesis by FINSEQ_2: 109;
end;
theorem LMGSEQ10:
for D be non empty set, x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 be java.lang.StringIndexOutOfBoun dsException: Index 62 out of bounds for length 61
holds <* x1,x2,x3,x4,x5 *>^<* x6,x7,x8,x9java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 10
exsbeElement 4tuples_on (8-tuples_on BOOLEAN))* st text = s &
proof
let D be non empty set, x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 be Element of D;
reconsider x12345 = <* x1, =4;
by LMGSEQ5;
reconsider x67890 = <* x6,x7,x8,x9,x10 *> as Element of 5-tuples_on defpred [,set] means
by LMGSEQ5;
D c= D;
hence ex zk be 4tuples_on(-BOOLEAN)) $
end;
theorem LMGSEQ16:
for D be non empty set, x1,x2,x3,x4,x5,x6,x7,x8 be Element of (4-tuples_on D)
^x8 *> is
Element of 4-tuples_on (8-tuples_on D)
proof
let D be non empty set,
x1,x2,x3,x4,x5,x6,x7,x8 be Element of (4-tuples_on D);
D;
then
P1: x1^x5 is Element of 8-tuples_on D by FINSEQ_2:109;
P2: x2^x6 is Element of 8-tuples_on D by X1,FINSEQ_2:109;
ex being of 4- 8- BOOLEAN)) [kz]
x4^x8 is Element of 8-tuples_on D by X1,FINSEQ_2:109;
hence proof
end;
theorem
empty be Elementof4tuples_on(4-tuples_on D),
k be Element of NAT st k in Seg 4 holds
ex x1,x2,x3,x4 be Element of D st x1 = (x.k).1 & x2 = (x.k).2 &
x3 = (x.k).3 & x4 = (x.k).4
proof
let D be non empty set, x be Element of 4-tuples_on(4-tuples_on D),
k be Element of NAT;
assume
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
Q13: ex s be Element of D* st x.k = s & len s = 4;
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 in dom xk by Q13,FINSEQ_1:def 3;
then xk.2 in rng xk by FUNCT_1:3;
then reconsider x2 = xk.2 as Element of D;
3 in Seg 4;
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 Seg 4;
then 4 in dom xk by Q13,FINSEQ_1:def 3;
then xk.4 in rng xk by FUNCT_1:3;
then reconsider x4 = xk.4 as Element of D;
take x1,x2,x3,x4;
thus thesis;
end;
theorem INV00:
for X,Y be non empty set, f be Function of X,Y, g be Function of Y,X
st (for x be Element of X holds g.(f.x) = x) &
(for y be Element of Y holds f.(g.y) = y)
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 Element of Y holds f.(g.y) = y;
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 be Element of Y;
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:23;
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" by FUNCT_2:30,P2,FUNCT_2:23;
rng g = X by P6,FUNCT_2:def 3;
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.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
1+(i-'1)*8+(j-'1)*32+7);
existence
proof
defpred P0[Element of 128-tuples_on BOOLEAN,set] means
ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
st $2 = z & for i,j be Nat st i in Seg 4 & j in Seg 4
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 Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
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]
proof
let j be Nat;
assume j in Seg 4;
then
Q130: 1 <= j & j <= 4 by 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-1 by Q130,XREAL_1:9;
then
Q133: (j-'1)*32 <= 3*32 by XREAL_1:64;
(k-'1)*8+(j-'1)*32 <= 24+96 by Q133,Q112,XREAL_1:7;
then
Q134: 1+((k-'1)*8+(j-'1)*32) <= 1+120 by XREAL_1:7;
Q136: (1+(k-'1)*8+(j-'1)*32)+7 <= 121+7 by Q134,XREAL_1:7;
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 FinSequence of (8-tuples_on BOOLEAN) such that
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 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))*
by FINSEQ_1:def 11;
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));
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 Seg 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+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7) by Q2;
thus (z.i).j = mid (x,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)
by P11,P12;
end;
hence ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
st P0[x,z];
end;
consider I be Function of 128-tuples_on BOOLEAN,
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) such that
A2: for x being Element of 128-tuples_on BOOLEAN
holds P0[x,I.x] from FUNCT_2:sch 3(A1);
now let input 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 Nat st i in Seg 4 & j in Seg 4
holds (z.i).j = mid (input,1+(i-'1)*8+(j-'1)*32,1+(i-'1)*8+(j-'1)*32+7)
by A2;
hence for i,j be Nat st i in Seg 4 & j in Seg 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
proof
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,
1+(i-'1)*8+(j-'1)*32+7);
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 ((H2.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
1+(i-'1)*8+(j-'1)*32+7);
now let input be Element of 128-tuples_on BOOLEAN;
(H1.input) in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
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;
assume 1 <=i & i <= len (H1.input);
then
P6: i in Seg 4 by P3;
then i in dom(H1.input) by FINSEQ_1:def 3,P3;
(ex T3 be T3 (4-tuples_on (8-tuples_on BOOLEAN)) st T3 = Rcon.(i/m) &
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 it = Op-WXOR(SubWord(SBT,RotWord(),) if (( m) = 0)
reconsider H1i = (H1.input).i as
Element of (8-tuples_on (it =SubWord(SBT,w) ( =8 & (mod) 4)java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 68
i in dom(H2.input) by FINSEQ_1:def 3,P4,P6;
then (H2.input).i in rng (H2 thus( modm)= 0impliesex A
then (H2.input).i in 4-tuples_on (8-tuples_on BOOLEAN);
beingElement of(-tuples_on (-tuples_on BOOLEAN))
P11: ex s be Element of (8-tuples_on BOOLEAN)*
st (H2.nput).
= (H2input)ias
Element of (8-tuples_on BOOLEAN)* by P11;
now let j be Nat;
assume 1 <=j & j <= len H1i;
hen
P14: j in Seg 4 by P8;
then ((H1.input).i).j = mid (input,1+(i-'1)*8+(j-'1)*32,
1+(i-'1)*8+(j-'1)*32+7) by A1,P6;
hence H1i.j = H2i.j by A2,P6,P14;
end;
hence (H1.input).i = (H2.input).i by P8, end;
end;
hence H1.input = H2 case m =6
end;
hence H1 = H2 by FUNCT_2:63;
end;
end;
theorem LMStat0:
for ;
1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7
proof
let k be Nat;
assume
A1: 1 <= k & k <= 128;
A3: k = 32*(k div 32)+(k mod 32) by NAT_D:2;
thenex v be Element of 4tuples_on (-tuples_on BOOLEAN)) *
reconsider n = k mod 32 as Nat;
k div <= (32*4) div32by ,NAT_2:24;
then
M1: m <= 4;
per cases;
suppose
A4: n = 0; Rcon Seg10:def3;
A5: 1 <= m
proof
ssume not 1 <= m;
then m = 0 by 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- then reconsider T3 = Rcon.j as
A13: k = 32*(k div 32)+(k mod 32) by NAT_D:2
.= 32*(j-'1)+8*((i-1)+1) by A4,A11
. *j')8(i-'1)+) by XREAL_1:233
.= 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 java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 44
hence , i 4& inSeg 4
1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7 by A8,A10,A13;
end;
suppose
A14: n <> java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
then
XX0: 1 <= n java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
XX1: n <= 32 by NAT_D:1;
m <> 4
proof
assume
U1: m = 4;
U2: k = 32*4+n by NAT_D:2,U1
.= 128+n;
128+1 <= 128+n by XX0,XREAL_1:7;
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 NAT_1:11;
set j = m+1;
A18: j in Seg 4 by A15,A16;
A19: j-'1 = j-1 by XREAL_1:233,NAT_1:11
.=m;
A20: k = 32*(j-'1 by INSEQ_1def11;
A22: n = 8*(n div 8)+(n mod 8) by NAT_D:2;
reconsider = n div as ;
reconsider t = n mod 8 as Nat;
n div 8 <= (8*4) div 8 by XX1,NAT_2:24;
then
M2: n div 8 <= 4;
now ;
suppose
A23: =0java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
4 1 =s
proof
assume not 1 <= s;
=8+ byNAT_114A22,23
hence contradiction by A14;
end;
set i = s;
A28:(.i. =(SBT".t
A29: i-'1 = i-1 by XREAL_1:233,A24;
A30: n = 8*s+A30: n = 8*s+0-(4-tuples_on i,j
.= 8*(i-' assume
1+(i-'1 (*(+m))tuples_on 4-tuples_on 8- )) means
hence ex i,j be Nat st i in Seg 4 & j in Seg 4 &
1i')8j')* <=&<+i')*8')*327
by A28,A18,A20,A30;
endstz Nat
suppose
t <> 0;
then
XX0: 1 <= t by NAT_1:14;
XXX1 t<= 8 by NAT_D:1;
s<> java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
proof
assume
U1: s=4java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
y NAT_D:U1
.= 32+t;
32+1 hence textij be Element of 8-tuples_on BOOLEAN
contradiction by U2,XXREAL_0:2,XX1
end;
then s <4 by XXREAL_0:,;
then
B15: s+1 <= 4 by NAT_1:13;
end;
set i = s+1;
byB15,;
B19: i-'1 = i-1 by XREAL_1:233,NAT_1:11
existence
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) IeFunctionof4tuples_on(-uples_on 8tuples_on )
*j'1)8 Element 4*7+)-(-tuples_on (8-tuples_on BOOLEAN))] means
then k <= 1+8*(i-'1)+32*(j-'1)+7 by A20,B20;
henceexi Nat in 4 &in Seg 4 &
1+(i-'1)*8+(j-'1)*32 <= k & k <= 1+(i-'1)*8+(j-'1)*32+7
by B220,A20,B20,B18,A18;
end;
d
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 zElement*(+)-java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 78
j0 in Seg 4 & not (i = i0 & j = java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 7
holds { where k is 1+i'1)*+j xbeofm-(4tuples_on(-tuples_on BOOLEAN);
k <= 8+(i-'1)*8+(j-'1)*32} /\ {k where k is Nat :
1(i0'1)*8+(0')*32 <= k & k <=8 , Element tuples_on4tuples_on (-tuples_on )
proof
,jj
assume
AS: i in Seg 4 & j in Seg 4 & i0 in Seg 4 &
inSeg ¬ i =i0 &j=j0)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
set A = {k st P0 = r&=.&t1 holds ,jbe Nat st i in Seg 4 &jin Seg holds
< +(-')*8 forbe st1 =i mholds
set B = {k where k is Nat : 1+(i0-'1)*8+ (F1 of- (-tuples_on ),
k <= 8+(i0-'1)*8+(j0-'1)*32};
A1: 1 <= j & j <=A2 fortext be Element ofples_on (-BOOLEAN)
A2: 1 <= i & i <= 4 by AS,FINSEQ_1:1;
k1 ;
:(j-'1) =() (SubBytes().)i SBTijava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
i'1) = i- XREAL_12,;
by233;
P4thuscontradiction by A,
i-1 <= 4 hence(Se;
then
R2: i-'1 < of java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
< -1 by B2B2,theorem :
then
java.lang.StringIndexOutOfBoundsException: Range [17, 2) out of bounds for length 33
per cases;
suppose
A2: j <> j0;
now per cases by A2,XXREAL_0:1;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
j < j0;
then (j-'1) < (j0 domlementt A/B=}
then (j-'1)+1 <= (j0- java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 21
then
A12: A3 i in Seg 4& j in Seg 4;
(i-'1)*8 <= 3*8 (i-'1)*8 <= 3*8 by R2,XREAL_1:64;
then 8+( then reconsider P0=s.as
A4 outputij =((InvSubBytes(SBT)).input).i).j &
then
= (j0-'*32byA12,XXREAL_0:2;
0+(j0-'1)*32 ((SubBytes(SBT)( thenconsider beobject
then (j0-'1)*32+0 < (i0-'1)*8+(j0-'1)*32+1 by XREAL_1:8;
java.lang.StringIndexOutOfBoundsException: Range [35, 10) out of bounds for length 10
j'321+i0')then sas
thus A /\ B = {}
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
ssume A /\ B > {}java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
A150:xinA/ B java.lang.StringIndexOutOfBoundsException: Range [24, 8) out of bounds for length 73
A15: x in A & x in B by XBOOLE_0:def 4,A150;
consider k1 be Nat suchthat
A16: x = k1 & 1+(i-'1)*8+(j-' consider
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
A2 len y. A0 orm=) & for i be
reconsider x as Nat by A16;
thus SubBytes(SBT) is one-to-oneSubBytes(SBT)is onto &
end;
end;
suppose
j0 < j;
j0-'1) < (j-'1) by XREAL_1:14,P1,P3;
then (j0-'1)+1 <= (j-'1) by NAT_1:13;
then
A12: ((j0-'1)+1)*32 <= (j-'1)*32 by XREAL_1:64;
(i0-'1)*8 <= 3*8 by R4,XREAL_1:64;
then 8+(i0-'1)*8 <= 8+24 by XREAL_1:6;
then 8+(i0-'1)*8+(j0-'1)*32 <= 32+(j0-'1)*32 by XREAL_1:6;
then
A13: 8+(i0-'1)*8+(j0-'1)*32 <= (j-'1)*32 by A12,XXREAL_0:2;
0+(j-'1)*32 <= (i-'1)*8+(j-'1)*32 by XREAL_1:6;
then (j-'1)*32+0 < InvSubBytes(SBT)= SubBytes(SBT)) & SubBytes(SBT) = (InvSubBytes(SBT))"
then
A14: 8+(i0-'1)*8+(j0-'1)*32 < 1+(i-'1)*8+(j-'1)*32 by A13,XXREAL_0:2;
thus A /\ B = {}
proof
assume A /\ B <> {};
then consider be objectsuch
150: x inA/ B by XBOOLE_0:def 1;
A15: x in A & x in B by XBOOLE_0:def 4 i <mholds[i,y.,y.(i+1) from RECDEF_1:sch 4(XX1OOLEAN)
consider k1 thus f is one-to-one&f is & oneone&g java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
A16 then y in m- (-tuples_on java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
by A15;
consider hence by Ajava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
A17: x = k2 end;
A15;
reconsider x as Nat by A16;
consid4-tuples_on()means
end;
end;
end;
hence A /\ B = { for be of 4-4-(8tuples_on)
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
suppose
A2:j = j0;
now per cases by A2,AS,XXREAL_0:1;
suppose i < i0;
then 2holds PPk,zkz.k1]from sch (Y1;
existenc
then ((i-'1)+1)*8 <= (i0-'1)*8 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
A13: (i-'1)*8+8+( of4-uples_on(4-ziElement mtuples_on(k k< +i'*(1*java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
(i0-'1) consider k2 st ((1mod >0implies =($ div m)+1 & j ribe1+(i0-)8j0')32<k2 k2<8(i0-1)8(0')
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
A14: 8+(iYY2 for end;
thus A /\ B = {}
Element of (-tuples_on (8 \B= {;
assume A /\ B <> {};
then consider x be object java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 11
A150: x in A /\ fork,,j,0j0 java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 14
A15: x in i0 beElementof-tuples_on((- (8java.lang.StringIndexOutOfBoundsException: Range [53, 14) out of bounds for length 14
considerk1beNatx 44tuples_on 8QQ1 = =(+)A,java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 47
:x= & 1+(-1*+j')32< &k1< +i-1*+j'java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 10
k2 that
A17: x = k2 & 1+ let ki,,be defpred P[Nat,setdefpred es;
by A15 ex assume
reconsider x as Nat by A16;
huscontradiction by A16,A17,A14,XXREAL_0:2;
end;
end;
uppose
< +0)+0')32< & =1(018+(j0'*32 being Element (4-tuples_on (8-tuples_on BOOLEAN) st [k,zk]
(-1 i-1)byXREAL_1:,,assume not(i=& java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 55
then i01+=i-)byjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 43
then ((i0-'1)+1)*8 <= (i-'1)*8 by XREAL_1:64;
then
A13: (i0-'1)*8+8+(j0-'1)*32 <= (i-'1)*8+(j-'1)*32 by A2 hen i dom java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 12
(i-'1)*8+(j-'1)*32+0 < (i-'1)*8+(j-'1)*32+1 by XREAL_1:8;
then
'1)8+')32 <1( Element of-(tuples_on (-java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 68
n <= 8'*+0')*} { ,;
proof
me thenvjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 70
then consider x be object then
n B ef;
A15: x in A & x in B { isNat +')8
consider 1be 3java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 43
1 =j then xk= x. Elementof8tuples_on )*;
byA;
consider thenj java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A17 AESStatearray is hen. rng =OpShift(k,5k
by A15;
Nat byA16;
thus contradiction by A16,A14,XXREAL_0:2,A17;
end;
len zk =4by Dd 3;
end;
hence A /\ B = {};
endjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
end;
java.lang.StringIndexOutOfBoundsException: Range [15, 7) out of bounds for length 16
be thesis;
i0 in Seg 4 & j0 in Seg 4 & 1+(i-'1)*8+(j-'1)*32 <= k &
k <= +i'*+(j'1*32+7 &
k <= 1+(i0-'1)C2: kmodm ;
proof
j= m
assume
ASreconsideri=k: 4 ist inSeg 4
1+(i-'1)*8+(j-'1)*32 <= k & k <=AES-Statearray)x1 AES-java.lang.StringIndexOutOfBoundsException: Range [45, 41) out of bounds for length 46
')32<*+)m)by,7java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
assumenot (i = i0 & j = j0);
then
A2: {n where n is Nat : 1+(i-'1)*8+(j-'1)*32 <= n & n then i dom now let k Nat;
n wherenis Nat --java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 64
n = +i-'1) henzi =z.
in {n where n isNat +i-1*8(j-')32< of -4tuples_on 8tuples_on
32} S;
kin nwhere4&jSeg 4 &()8-)32<= &
n <=8+i0-'1)*8+j0'1* tuples_on4tuples_on (8-tuples_on BOOLEAN)) such that
by A3,XBOOLE_0:def 4,A2
end;
theorem
AES-Statearray is one-to-one of (java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 11
proof st zi =v &len =m;
for x1,x2 be end;
in -tuples_on BOOLEAN java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
rray) roof
proof
,x2be java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
assume
- then reconsider n-)-1*32 java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 78
y.x1 =f-tuples_on-tuples_on thenreconsider=zi. java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
then reconsider xx1 = x1, h for best: +(java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 46
:ex be Element ( (8tuples_on BOOLEAN st xi = input.i (k mod >0implies kdiv m+java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 37
P2:xs ofBOOLEAN*xx2 s = 128by;
now let k be Nat;
w =ijbyC2
P5: 1 <= -1=i1by XREAL_0: tuples_on (8- BOOLEAN) xi=input. &
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 35
A4: i in Seg endQ112: -1*3864
kQ130:1 =j = by A4, A4,FINSEQ_1:;
mid (xx1,1+( then11<j
NP3:exbeElement of (-tuples_on(8-uples_on ) st =sjava.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
gof4(java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 73
FinSequence of (BOOLEAN) by DefStatearray,A4;
mid (xx2, H2. in 4tuples_on(4-tuples_on (8-tuples_on -tuples_on BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
then reconsider A2ij = (((AES-Statearray).xx2).i).j as
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 10
+(i-1*(-1*32()+j'))< -(')8(')32
by A4,XREAL_1:9;
then reconsider n = k-((i-'1)*8+(j-'1)*32) as Element of NAT by INT_1:3;
F41: k-(i-'1)*8+(j'1)*32 <=1+(i-1)8+(-'1)*2-((i'1)*8(j-'1)*)
by A4,XREAL_1:9;
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;
then
then 1-1 <= i-1 by XREAL_1 i in Seg by ;
then i-'1 = i-1 by XREAL_0:def 2;
then + 6java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
then
Q112: (i-'1)*8 <= 3*8 by XREAL_1:64;
Q130: 1 <= j & j <= 4 by A4,FINSEQ_1 xi = input. &i=-x,5-) by A1;
then 1-1 <= j-1 by XREAL_1:9;
then j-'1 =j-1 by XREAL_0:def 2;
then j-'1 <= 4-1 by Q130,XREAL_1:9;
then
:(-1* =332byXREAL_164java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(i-'1)*8+(j-'1)*32 <= 24+96 by Q133,Q112,XREAL_1:7;
then 1+((i-'1)*8+(j-'1)*32) <= 1+120 by XREAL_1:7;
then
Q135: 1+(i'1*+j-')*32 < 121 by XREAL_1:;
F5: n <= (1+(i-'1)*8+(j-'1)*32+7)-(1+(i-'1)*8+(j-'1)*32)+1 by F41;
A6: k = n-1+(1+(-')*8(-'1*32)H1. =H2.inputby,FINSEQ_1:;
thus xx1.k = (mid (xx1,1+(i-'1)*8+(j-'1)*32,1+ java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
F1Q135F,A6,122
.= A2ij.n by DefStatearray,A4,A1
.= (u in ((4-tuples_on8java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 4
by then u in (4*(7+m-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
,135F:;
end;
hence thesis by P1 thenreconsiderus
endjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
hence thesis by FUNCT_2:19;
end;
theoremLMStat3:
AES-Statearray is onto
proof
for y be object st y in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
ex x holds (for i be Nat st i in Seg
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
(itinput)i=Op ,P2: beElement st m holds ui1)= +java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
assume y in 4-hence thesis by P1,P2,FINSEQ_1:def 18;
then
B10:ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))*
st y = s & len s = 4;
then reconsider z = y as Element of (4-tuples_on (8-tuples_on BOOLEAN))*
PKNatset means
ex i,j,n be Nat, zij be Element of (8-tuples_on BOOLEAN)
t i -java.lang.StringIndexOutOfBoundsException: Range [19, 16) out of bounds for length 24
$1 <= 1+(i-'1java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
zijn;
Q12 for k be Natst k in Seg128 exb in 128- BOOLEAN&=1k k1< *+) byLjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 62
proof object
let be Nattuples_on(4t (-java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 44
-(ii)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
then 1 <A1 uch
then consider st =s&len s =4java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
A4: i in Seg 4 & j in Seg 4 & 1+(i-'1)*8+(j-'1)*32 <= k &
')*327 by LMStat0;
i inst iinSeg & in Seg Seg& 1+ java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 70
then z.i $1 <= 1+(i-'1 cases
then z.i in 4-tuples_on (8-tuples_on BOOLEAN);
then
B10: ex s be Element of (8-tuples_on BOOLEAN)* st z.i = s & len s = 4;
then =C1 (k+)mod m)<0;
j in dom zi by B10,FINSEQ_1:def 3,A4;
then (zi proof
then reconsider zij = (z.i).j as Element of 8-tuples_on
+ 1 k =128by FINSEQ_1:;
by A4 then,jNatsuch that
thenreconsider n k-(-*8+j-'1)32 as Element then (k+1) = mbyXXREAL_0:1,LX31;
k- k <= 1+(i'1)*8+(j-'1)*32+7 by ence by NAT_D:25C1;
by ,XREAL_1:9;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
Seg8 by ;
reconsider z = zij.n as Element of BOOLEAN;
takez;
thus thesis by A4,G4;
end;
consider x be FinSequence of BOOLEAN
such that
Q13: dom x = Seg 128 & for i be Nat let x be ElementofA+java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
PK[,xi fromFINSEQ_1:sch 5( then
Q14: len x = 128 by Q13, then k+1 < m by LX31:1;
nsiderx as Element of (NAT_D:24C2;
x in 128-tuples_on BOOLEAN by G4 n in G4: n in Seg
reconsiderx .k+)=x(1 LX34C2,NT_1:49A2
P2: for i,j be Nat st i inN,]means
olds (zi. =x,+i')8('1)*21(i-'1 end;
proof
let i,j be Nat;
assume
P21: i in Seg 4 & j in Seg 4;
then let k Element of NAT;
then z.i in rng z by FUNCT_1:3;
then z.i in 4-tuples_on (8-tuples_on BOOLEAN);
then
P8: ex s be Element of (8-tuples_on BOOLEAN)* st z.i = s & len s = then <k k<4(mjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
reconsider = .iasElement of (8-uples_on BOOLEAN)* by P8
j in dom zi by P8,FINSEQ_1 then k Seg (*(7m))java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
then zi. then consider, Element of NAT,
java.lang.StringIndexOutOfBoundsException: Range [39, 10) out of bounds for length 41
then
P11: ex s be by Q11;
reconsider zij = zi.j as Element of (BOOLEAN)* by P11 that
=i &i (km)<0implies i=k m1&j m java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
1<= i-1by (kmodm i ( java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 66
then i-'1 = i-1 by XREAL_0:def ukzk b DESCIP_1:ef 3;
then i-'1 <= 4-1 by Q110,XREAL_1:9;
hen
Q112: (i-'1)*8 <= 3*8 by XREAL_1:64;
Q130: 1 <=j &j <=4 by P21 (java.lang.StringIndexOutOfBoundsException: Range [48, 46) out of bounds for length 55
then 1-1 <= j-1 by XREAL_1:9;
then j-'1 = j-1 by XREAL_0:def 2;
then j-'1 <= 4-1 by Q130,XREAL_1:9;
then
Q133: (j-'1)*32 <= 3*32 by XREAL_1:64;
(i-'1)*8+(j-'1)*32 <= 24+96 by Q133,Q112,java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 46
then
Q134: 1(i-1)*8+j'1)*32) =1+ XREAL_1;
then
)*8+j')32 =xby java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 56
G0: 1 <= 1+ endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
-)32)byjava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 48
G3: 1+such
Q135: 1+(i-'1)*8+( Op-(xk1,k beNatjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
F3: 1(i')8(- j1 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
'1*+km0 Element NAT XREAL_148,java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
+i java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 49
by G1,G2Q:dom z= Seg4&for beNatst i 4
+-)+'+)('8(1*) ,:java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
.= 8;
nowthen 11
assume
n& =len java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
*(1)1java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
+-1 -(48java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 72
F5: n <=:fori, Nat in4&jin4
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 53
A6: k = n-1+(1+(i-'1)*8+ consider be ;
n <= n in4 inSeg 4java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
<= k .i2&u.m1= zi2j2by
reconsider take I;
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 kthen proof
then i0,0n Natjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
beDD1: ((4*(7+m)) divm ((+))m+ :;
AA1: i0 in Seg 4 & j0 in Seg 4 & n0 in Seg 8 & 1+(i0-'1)*8+(j0-'1)*then
0-'1)*8:orjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 74
zi0j0 = (z.i0).j0 & x.k = zi0j0.n0 by Q13;
+j-'1)*32) <= n+( (or i be at st i in 4holds
-exxi of-(tuples_on)java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
then i = i0 & j = j0 by LMStat2,AA1,P21,H1,H2;
hence zij. = (mid (,+i1*(j-jiny :r i0&=.1 java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
AA1,1F2 by AA1,F1,F2,F3BOOLEAN)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
end;
hence thesis by FINSEQ_1: P0 hjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
end;
(AES-Statearrayt of -tuples_on (8-tuples_on BOOLEAN) st xi = input.i &
then
P3: ex s be Element Q110 H2. -xi-1)java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
rray.x) = s& - i:java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 39
now ibe
assume 1 <= i & i <= len (AES-Statearray.x);
P6: i in Seg 4 by P3;
then .(n1 = P3: exs 4tuples_on8tuples_on ) = java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
then (AES-Q112: (i-'1)*8 <= 3*8 by XREAL_1:64;
AStatearray 1<j&j< by FINSEQ_1:java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
then 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
f (8-then
i in dom zQ133:(')32<= 3*32 .s 1=i=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 44
thenXX2: i in 4by P3;
then z.i in 4- then
then
P11: ex be Element then
reconsider H2i = z.i as Element of (8-tuples_on java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 46
let Nat
=j H2nput.OpShift(i1 A2C21: u.(k+1) = t.(j+1) by NLX34,NC16,NC1,AS,LX34,C16;
then
P14: j C22X:m1 =k)m;
then ((AES-Statearray.x).i).j = mid (x,1+(i-'1)*8+(j-'1)*32,
1+(i-3 +i-1 H.input P414java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 53
H1i. H1=H2 FUNCT_2:java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
end;
hence (AES-Statearray.x).i = z. byG1,2G3LC13:j2 =LLX34,C22XXLMOD03NLX34;
end;
hence thesis by P3,B10,FINSEQ_1:def 18;
end;
then theorem :
rng AES-Statearray .8
hence thesis by FUNCT_2:def 3;
;
cluster AES-Statearray -> bijective;
correctnessby java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
theorem LMINV1:
lement of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
reconsiderk -(tuples_on 8- ))java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
proof
letcipher be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
set f = AES-Statearray;
L0 rng AES-Statearray = 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
by FUNCT_2:def 3;
then reconsider g = suppose
4-tuples_on(4-tuples_on then
by FUNCT_2:25;
"*= 128 *f
kn Seg128byH1;
then g is one-to-one & rng g = 128-tuples_on BOOLEAN by FUNCT_2:18;
f " FUNCT_230,2;
hence by FUNCT_2:26;
;
begin :: SubBytes
reserve SBT for Permutation of (8-tuples_on BOOLEAN);
definition
let SBT;
funcSubBytesS)-
hence java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
thesis by INSEQ_1:def 18,P11,P13;
:endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
for input be Element of 4-tuples_on(
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
holds ex inputij be st(AES-Statearray.x) = & 4; beElement 4uples_on(- (4*(7+m)) div m)+0 < ((4*(7+m)) div m)+1 by XREAL_java.lang.StringIndexOutOfBoundsException: Range [31, 24) out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 62
proof-(-tuples_on (8-tuples_on BOOLEAN) st AES , be
[Element of4 of(4-tuples_on (8
such 4-(8-tuples_on BOOLEAN))*
for i,j be Nat st i i in dom z by FINSEQi in dom InvShiftRowsoutput)= s &lens=4java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
holds ex inputij be Element of 8-tuples_onthen
st (ex P0exP0Q0beElement -uples_on(-BOOLEAN
A1: for text being Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
exz be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN stoutput = s s =4;
now ibe Nat;
proof
letextbe -4tuples_on (8-tuples_on BOOLEAN);
in 4tuples_on(4 P then
then
be Element ofst zi=s s=4java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
st text = s & len s = 4;
defpred P.i &
ex zk be Element of (4-tuples_on (8-tuples_on BOOLEAN))
st & j st 4
java.lang.StringIndexOutOfBoundsException: Range [32, 6) out of bounds for length 55
st textij = (text.$1).j & zk.j = SBT.( t.(n+1) = Op-WXOR(P,KeyExTemp(SBT,m,i*mQ)) by A2;
Q1: for k be Nat (AES-Statearray.)i)j=mid NC1XYY1 exs Element8-tuples_on BOOLEAN) st java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 69
Element (-(-tuples_on BOOLEAN)) st P[k,zk]
let k java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 10
assume k Seg4;
then k in dom text by Q01,FINSEQ_1:def 3;
then text.k in rng text by FUNCT_1:3;
then text.k in 4-tuples_on (8LC12:i2=(k+
then
Q13 -java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 35
thenreconsider =text.k as Element of (8-java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 6
ex textij be Element of 8-
$2 =
Q18:java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
Pi[xijava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
proof
Nat
jSeg;
then j in dom(holds AES-Statearray.QElemento- ,,NV05
then (textk).j in rng (textk st begin:AddRoundKey
then1 O-(PeyExTemp((SBT,kQ
SBT(textkj) = SBT: AESjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 71
hence thesis;
end;
consider be4java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
Q22: [() tuples_onBOOLEAN)&*f java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
holdsPij,zkj]from java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8
lenzk 4 Q22,java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
reconsider zk as Element of (8-tuples_on BOOLEAN)* by FINSEQ_1:def 11;
zkin -(-
then zk as Element of4reserve BTforPermutation of (8-tuples_on BOOLEAN such java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
for st j 4 holds
ex textij be Element of 8-tuples_on BOOLEAN st textij holds P0[x,I.x] from FUNCT_2:sch 3(A1);
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 (it.text,key)).i).j = Op-tkeyij;
holds P[i,z.i] from FINSEQ_1:sch 5(Q1);
Q3: lenjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 37
reconsider z as Element of (4 take I;
by FINSEQ_1thus thesis A2
z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by Q3;
hen reconsider zas Element of
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
take z;
i4-java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 54
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
(.j= SBT.(textijjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
proof
, Natjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [21, 14) out of bounds for length 14
Q4: beof -tuples_on(-(8t )
then ex zi be Element of (4-tuples_on (8-tuples_on BOOLEAN))
tz.iNat 4holds
ex textijjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
zi.j = SBT.(textij) by Q2;
hence ex textij be Element of 8-tuples_on BOOLEAN
textij (text.i).j & (zi).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- st P = H1.)( st inputij =ii)j& (inputi).=SBT.(inputij);
A2:for being Element of 4-uples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds P0[x,I.x] from FUNCT_2:sch 3(A1);
take I;
thus by A2;
end;
uniqueness
proof
let F1,F2 be Function of tuples_on 8- )java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
assume
:for 4-tuples_on(4-tuples_on (8-BOOLEANjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
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 &
(F1.text).i). =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) then
A5: ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
(F2text.)j=.textij) byA3A2
thus (for i, Nat st (H1.input) = s= =*+;
end;
holdsex inputij be Element of 8-
end;
hence F1 = F2 Elementof4-4tuples_on 8tuples_on (H2.input) in (4*(7+m))-tuples_on (4-tuples_on (8-tuples_on BOOLEAN)*+)(- 8tuples_onBOOLEAN);
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 6
end;
let st (.input)-tuples_on(- BOOLEAN);
func InvSubBytes(SBT) ->
es_on(-tuples_on (-tuples_on BOOLEAN)),
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) means
:DefInvSubBytes:
for input 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 inputij be Element of 8-tuples_on BOOLEAN st (m = $ 1Q01exbe of (uples_on(8-tuples_on )
((t.input).)j= SBT".(nputij);
existence
proof
defpred P0PN0:PN[];
Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))] means
for i,j be Nat st i in Seg 4 & j in Seg java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 30
ex inputij be Element of 8-tuples_on BOOLEAN st inputij = ($1.i).j &
($2.i).j = (SBT").(inputij);
A1: for A1: PN[i]java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
ex z be Element of 4-tuples_on assume
st P0[text,z]
proof
let text be Element of 4-tuples_on(4-tuples_on (8-java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 18
-java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 61
Q01: ex s be Element of (4-tuples_on (8-tuples_on BOOLEAN))* st text assume
len s = 4;
defpred [Nat,set] means
ex zk be Element of (4-tuples_on (8-tuples_on BOOLEAN)) st $2 = zk &
for j be Nat st j in Seg 4 holds
ex textij be Element of 8-tuples_on BOOLEAN
zk.(SBT".extij;
Q1: for k be Nat st k in Seg 4
ples_on (-BOOLEAN) P,kjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
proof
let k be Nat;
$2 = forj beNatstjin Seg 42=java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 26
then k in dom text by Q01,FINSEQ_1:def 3;
then text.k in rng text by FUNCT_1:3;
then k -(tuples_on BOOLEAN);
then
Q13: ex s be dome)Q13java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
then reconsider textkthen (textk)jinrng ( F3 lementof(-java.lang.StringIndexOutOfBoundsException: Range [23, 4) out of bounds for length 35
roof
ex textij be Element of 8-tuples_on BOOLEAN let k Nat;
$2 = (SBT").(textij);
NatNat stinSeg exxibeing Element of (-tuples_on java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
,
proof
letj be Nat .java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 51
jin roof
then j in Q23 len zk 4 by Q22,FINSEQ_1 et
then().in ()by FUNCT_1:3;
reconsider 4uples_ontjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 55
(SBT" then reconsidertextk=text.k Element of 1 k 1
zk.j ()by;
end;
consider zk -tuples_on(-BOOLEAN)suchthat
k=Seg4& be stjin4
holds [,.]from FINSEQ_1:ch Q;
23 zk=4by FINSEQ_1def3;
reconsider zk as Element of (8-tuples_on BOOLEAN)* by FINSEQ_1:def 11;
zk in 4-tuples_on (8-tuples_on BOOLEAN) byreconsider as of (-(-BOOLEAN))*
then reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
for j be Nat st j in Seg 4 holds
ex textij be Element of 8-tuples_on BOOLEAN st textij = (textk).j &
zk.j = ()( ;
thesis
end;
consider be of -(-java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 78
Q2: dom z = Seg 4 & for i be Nat st i in Seg 4
6: beElement 8 *
Q3: len z = 4 by Q2,FINSEQ_1:def 3;
reconsider z as Element of (4-tuples_on (8-tuples_on BOOLEAN))*
by FINSEQ_1:def 11;
in4tuples_on(- 8tuples_onBOOLEAN)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-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 28
(z.i).j = (SBT").(textij)
proof
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 23
assumeb ;
;
then ex zi be Element of (4-tuples_on (8-tuples_on BOOLEAN i=zi& jbe in
stzij =SBT.textij)byQ2;
ex textij be Element of 8-tuples_on BOOLEAN st (extk. rng()FUNCT_13;
. SBT".textij extkj=(. as 8tuples_on ;
textij Element keyk Fdef
i. zi. (java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 8
hence thesis;
end;
be4java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 77
4-tuples_on(4-holds P0[x,I.x] from FUNCT_2:sch 3(A1);
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 73
holds P0[ (H1.. java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 12
take I;
thesisby ;
assume
proof
t, 4tuples_on4 8tuples_on )java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
4-java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 51
k 11forj 4( java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
A1: for text be Element of 4-tuples_on(A3 iinSeg j: *7m Xjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 60
h , textij=.&keyij k) Optextij
textijbe ence
((F1.java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
assume
be Elementof-4tuples_on(-)
ijbejava.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 10
ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
((F2.text).i).j = (SBT").(textij);
now be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
now let i,17: PP1 =(1.)(k1m+) ;
assume
A3: i in Seg 4 & j in Seg 4java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
:exb of -st =(texti)j&
(text.)j=(".textij) ;
A5: ex textij be Element of 8-tuples_on BOOLEAN st textij = (text.i).j &
(.ext.)=(BT)( A32
thus ((F1.text) be java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 72
hence F1.text = F2.text by LM01;
;
hence F1 = F2 by FUNCT_2:63;
end;
end;
INV07A:
for input be Element of 8-tuples_on BOOLEAN
holds (SBT").(SBT.(input)) = input
proof
let input be Element of 8-tuples_on BOOLEAN;
SBT)( java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 69
.= (id (8-tuples_on BOOLEAN)).input by FUNCT_2:61
.= input;
end;
INV08A:
input of8-BOOLEAN
holds SBT.((SBT").(input)) = input
proof
letof -java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 46
SBT()i) SBT(") :5
.= (id (8-tuples_on BOOLEAN)).input by FUNCT_2:61
.= input;
nd;
theorem leti, ;
for input be Elementof -tuples_on(-(-BOOLEAN)
holds (InvSubBytes(SBT)).((SubBytes(SBT)).input) = input
proof
let input be Element defpred P0[Element of Elementof ((-BOOLEAN)
now let i,j be Nat;
assume
A3: holdsex ,keyij Element f-tuples_on
then consider outputij be Element($. st java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 52
A4 ())i. j ( Q2
(((InvSubBytes(SBT)).((SubBytes(SBT)).input)).i).j = (SBT").(outputij)
DefInvSubBytes;
consider inputij be Element of 8-tuples_on BOOLEAN such textij st
:= (i). (.ij=XOR,keyijbyQ4;
by DefSubBytes,A3;
((SBT))i. = java.lang.StringIndexOutOfBoundsException: Range [62, 54) out of bounds for length 54
by A4
end;
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 67
theorem:for beNat st in Seg 4
for output be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds (SubBytes(SBT)).((InvSubBytes(SBT)).output) = output
roof
let bejava.lang.StringIndexOutOfBoundsException: Range [22, 15) out of bounds for length 73
now let i,j be Nat;
e;
A3: i in Seg 4 & j in Seg 4;
then java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 12
A4: outputij = (((InvSubBytes(SBT)).input).i).j &
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
;
PiNat, hence (H1.input).i = (H2.by A;
5inputij=inputi)&
(((InvSubBytes(SBT)).input).i).j = (SBT").(inputij) by DefInvSubBytes,A3;
thus (((SubBytes(SBT)).((InvSubBytes( for text,eybe of-(- (-tuples_onBOOLEAN))
by A4,A5,INV08Al
;
(SBT)input nputby then reconsider i = i0-1 as Element of NAT by XREAL_1:48,IN
theorem
(isjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
h ij 4&injava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
InvSubBytes(SBT) = (SubBytes < XREAL_14 =text [j. sch()java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
(F2(ext,).).j =OpX(,;
set f = SubBytes(SBT);
P1: for x be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds g.(f.x) = x by INV07;
P2: for y be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds f.(g.y) = y by INV08;
is- is
g = f" & f = g" by INV00,P1,P2;
end;
begin :: ShiftRows
definition
Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
-java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 54
::
for input be thus ((F1.(text) consider z en H1iby P13;
beNat holds P[i,z.i] from FIN [,. from .(,)by
ex xi be Element of 4-tuples_on (8-tuples_on BOOLEAN) st xi reconsider z java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 8
(it.input).i = Op-Shift end;
existence
proof
defpred P0[Element of 4-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Element of 4-tuples_on(4-tuples_on ( -java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 74
for i Nat Seg4
ex xi be Elementjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
2. -java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 14
A1: ex func(java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 75
ex z be Element of 4-tuples_on(4-tuples_on (8-tuples_on st z. =zi & java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 54
st P0[x,z]
proof
bejava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 73
x in-tuples_on( of
then
(4-(8-BOOLEAN) stx =s java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
len s = 4;
defpredP[,et means
ex st P[k,]
Q1: forlet bejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
ex Elementof(8tuples_on ex zk being Element of (4-tuples_on (8-tuples_on BOOLEAN
in 4 8tuples_on)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
let k be Nat;
assume k in Seg java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 22
then k in uniqueness
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
Q11: x.k in rng x by FUNCT_1:3;
then x.k in 4-tuples_on (8-tuples_on BOOLEAN);
then
Q13: ex s be Element of (8-tuples_on BOOLEAN end;
then reconsider xk = x.k as Element of (8-tuples_on textij Element of 8-tuples_on BOOLEAN hence java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 65
reconsider xk1 = xk as Element of 4-tuples_on (8- end
by Q11;
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 43
FinSequenceas 8BOOLEAN)* by FINSEQ_1def11java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
Q15: len zk = 4 by Q13,DESCIP_1:def 3;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 4
zk in 4-tuples_on (8java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 75
exbe48java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
zk = Op-Shift(xk1,5-k);
hence thesis;
end;
consider z be FinSequence of 4-tuples_on (8-java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 28
Q2: dom z = Seg 4 & for i be Nat st i in Seg 4
holds P[i,z.i ;
Q3: len
reconsider z
let , of(-java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 62
z in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)) by Q3;
wbeof(*7m)48)
end;
ion 4-java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 77
4java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 60
: x being Element 4--java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 73
holds P0[x,I.x] from FUNCT_2:sch 3(A1);
take I;
thus thesis by A2;
end;
uniqueness
proof
let H1, proof
4-tuples_on(4-tuples_on (8-tuples_on defpred P0[Element of m-tuples_on(4-tuples_on= s &len ;
H2 in4tuples_on 8tuples_on BOOLEAN)
A1: for input be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
holds (for i be Nat st i in Seg 4 holds
-java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 75
(H1. then
assume
A2: for input be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN))
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 43
ex xi java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 34
(.. hen
now let input be then reconsider j = i=ias;
H1.((F2.texti)=SBT.(
: s:Segjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 14
en ;
H2.input intuples_on(tuples_on 8tuples_on BOOLEAN)
then
P4java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
len s = 4;
now ibe ;
ssume XX1 -java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 61
reconsider =
4() ;
XX3: ex xi be Element of 4-tuples_on (8- reconsider m7 = 7+m as Element of NAT by ORDIN;
st xi = input.i & (H1.input).i = Op-Shift(xi,5-);
XX4: ex xi [,
st xi = input.i & (H2 x be 11&
thus (H1.input) $=*w.*1,.4n2),.4*+3,.4n+*;
end;
hence H1.input = H2.input by P3,P4,FINSEQ_1:14;
end;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
end;
end;
func InvShiftRows ->
Function of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN)),
4tuples_on(4- (-BOOLEAN))means
:DefInvShiftRows:
for input be Element of 4-tuples_onendZZ1java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
(ori of n-tuples_onBOOLEAN)stsi=s$ input Element -tuples_on4tuples_on(8java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
ex java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 65
(it.input).i = Op-Shift(xi,i-1));
proof
defpred P0[Element of4tuples_on(-tuples_on (-uples_onBOOLEAN),
Element of 4-tuples_on(4-tuples_on (8-then reconsider tk = t.k as Element of n-tuples_on
for i be -sk Elementof - ;
4 8 =$. java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
$2.i = Op-Shift(xi,i-1);
A1: for p tuples_onjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 65
DefSubBytes;
st P0[x,z]
proof
-4tuples_on8- by P3F: ;
x-java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 58
pin- nbythenrjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 41
Q01 s then reco ( 8 )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
len s = 4;
defpred[set
ex InvSubBytes(SBT) java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 34
$2 = Op- w.(4*n+3) in si, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 27
:for k in Seg 4
ex zk being Element of (4-tuples_on (8-tuples_on BOOLEAN)) st P[k,zk]
let k be Nat;
assume inin Seg4
m by Q01,d 3
then
3java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
xk - =w(*+11,(*+)w(*3,w.4n)*;
then of4-4 8)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
Q13: ex s be Element of (8-tuples_on BOOLEAN)* st x.k = s & len s = 4;
then reconsider xk = x.k as Element of (8-tuples_on BOOLEAN)*;
reconsider xk1 = xk as Element of 4-tuples_on (8-tuples_on BOOLEAN)
FINSEQ_1:h5(;
of8java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 45
Q15: len zk = 4 by Q13,java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 41
P0xz
zkin 4-tuples_on (8-tuples_on BOOLEAN letbe of4tuples_on48tuples_onBOOLEAN);
pin
ex xk be Element of 4-tuples_on (8-tuples_on BOOLEAN) st xk = x.k &
zk = Op-Shift(xk1,k-1);
hence (+m-tuples_on(-(-uples_on 8tuples_on ));
end;
consider java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
Q2:
P[i,z.i] from proof
Q3: len z = 4 by Q2,FINSEQ_1:def 3;
reconsider z as Element of (4-tuples_on (8-tuples_on BOOLEAN))*
1java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
in 4tuples_on(- 8tuples_on java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
hence thesis by Q2;
;
then ex n be Element of =i1-java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
4 java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45
x -4)
holds P0[x,IP1 8-.(*)>
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11
thus thesis by A2;
end;
s
proof
let H1, -4tuples_on(tuples_onBOOLEAN),
then reconsider zk as Element of 4-tuples_on (8-tuples_on BOOLEAN);
be of 4- (- BOOLEAN)st xk j =is of ;
A1: for input be Element of 4-tuples_on(4-java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 31
holdsf ibe in java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 10
ex xi be Element of 4-tuples_on (8-tuples_on BOOLEAN) st xi = input.i &
(H1.input).i = ] from H1=
assume
holds (for i be Nat st i in Seg ;
ex xi be Element of 4-tuples_on (8-java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 10
(H2.input).i = Op-Shift(xi,i-1));
nowbe 4java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 79
H1.input in 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
then
P3: ex s be Element of (4-(7+m)-tuples_on(4-tuples_on(4-tuples_ontuples_on
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 A1: for input be Element of 4-tuples_on(4-tuples_on java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 74
len s = 4;
now let i be Nat;
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 44
then
Seg3;
then
X3 xi Elementof 4-tuples_on(8-tuples_on BOOLEAN) st
Key beElement -tuples_on4tuples_on (tuples_on BOOLEAN)holds(i beNat sti in 4holds
XX4: ex ex w be Element (*7+))tuples_on 4tuples_on(8-tuples_onBOOLEAN)
A2
thusH1input. H2.input).ibyXX3 .=* H2.Key.+1=<.4+).*+).*)(*4>java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
end;
hence H1.input = H2.inputP3: ex *,00><,,00><0000><0,,00>* &
end;
H1 4*7m)tuples_on(-8)
P1 *,0*^,0*<,00^*0,0*&
end;
:
it.=< *,*<000*<0,>*0,*java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
holds InvShiftRows.(ShiftRows.input) = input
proof
let input be Element of 4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
InvShiftRows.(ShiftRows.input) in
--java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 49
then
P3: ex s be Element of (4-tuples_on(8-tuples_on BOOLEAN))*
st InvShiftRows.(ShiftRows.input) = s & len s = 4;
in 8<*,0^,*<,0^*0
then*0java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 12
P4: ex s be Element of (4-tuples_on(8-tuples_on BOOLEAN))*
st input <P3 ex be (-java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 75
Nat
*,, java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
then
Function -(-uples_on7m-4-java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 71
X0 njava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 10
::exbejava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 72
N);
YY1P1 <*,,0> 4(tjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 73
be now let be ;P2 *,* -java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 69
ShiftRows.P3: <*0,0,1,0*> is Element00,0 iso 4 X,;
(InvShiftRows.(ShiftRows.input)).i = Op-Shift(yi,i-1)
;
thus (InvShiftRows.(ShiftRows.input)).i = Op-Shift(xi,5-i+(i-1))
by XX3,XX4,DESCIP_1:10,YY1
. input.i DESCIP_1:,,X3;
end;
hence (InvShiftRows.(ShiftRows.input)) = input by then
end;
theorem INV05:
output be of -tuples_on4tuples_on 8 ))
holds ..
proof
n BOOLEAN)
ShiftRows.(InvShiftRows.output) in
4-tuples_on(4-tuples_on (8-tuples_on BOOLEAN));
then
P3: ex s be Element ofend;
st ShiftRows.(InvShiftRows.output) = s & len s = 4;
in-java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 59
then
P4: ex s be Element of (4-tuples_on(8-tuples_on BOOLEAN))*
= = 4
now let i;
));
then
<java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 4
then consider xi be Element of 4-java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
such that
XX3: xi = t.i &
(InvShiftRows.output).i = Op-Shift(xi,i-1) by DefInvShiftRows;
xi in 4-tuples_on (8-tuples_on reconsider PP6 = <* <*0,0,0,0*>^<*0,0,1><,000> [z]
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8 | | |