Variably Modified Permutation Composition: Difference between revisions

Content deleted Content added
Added navbox
m <source line>
Line 5:
The core of the cipher is the VMPC function, a transformation of n-element [[permutation]]s defined as:
 
'''for''' x '''from''' 0 '''do''' n-1:
g(x) = VMPC(f)(x) = f(f(f(x))+1)
 
The function was designed such that inverting it, i.e. obtaining f from g, would be a complex problem. According to computer simulations the average number of operations required to recover f from g for a 16-element permutation is about 2<sup>11</sup>, for 64-element permutation - about 2<sup>53</sup> and for a 256-element permutation - about 2<sup>260</sup>.{{Citation needed|date=September 2015}}
Line 12 ⟶ 13:
 
The VMPC function is used in an [[encryption]] algorithm - the VMPC [[stream cipher]]. The algorithm allows for efficient in software implementations; to encrypt L bytes of plaintext do:
<source lang="text" line>
 
1. n = 0
2. Repeat steps 3-6 L times:
3. s = P[ (s + P[n]) mod 256 ]
4. Output = P[ (P[P[s]]+1) mod 256 ]
5.Swap(P[n], P[s]) # Temp = P[n]; P[n] = P[s]; P[s] = Temp
n = (n + P[n]1) =mod P[s]256
</source>
P[s] = Temp
6. n = (n + 1) mod 256
 
Where 256-element permutation P and integer value s are obtained from the encryption password using the VMPC-KSA (Key Scheduling Algorithm).