I am trying to understand the encryption and decryption process of the APE: APE: Authenticated Permutation-Based Encryption for Lightweight Cryptography
what is exactly the Vc
and the Vr
here? Example instead of the permutation p
, what if I decide to replace it with a block cipher? Will the Vc be the key for the block cipher? What will the Vr
then be which is xor'ed
with the Plaintext?
A simple human-readble pseudo code will be helpful. I started trying to rewrite the pseudo code but there soo many unanswered questions.
[CipherText, Tag] function Encrypt(Key, A, Plaintext):
begin
u = len(A)
w = total number of blocks in the plaintext// eg. 1 block 64 bit block size
V = [0,....K]
if(A not zero) then
A = {A[1] .... A[u]}
for i = 1 to u do
V = p(A[i] xor Vr, Vc) // can replace this with block cipher eg bcp(plaintext,key)
end
endif
V = V xor [0,1] // What is (0,1)?
M = {Plaintext[1],.......Plaintext[w]} // devide into blocks eg. 64 bits each.
for i = 1 to w do
V = p(M[i] xor Vr, Vc) // what is the Vr and Vc here?
C[i] = Vr
end
CipherText = {C[1],.......C[w]}
Tag = Vc Xor Key // what is the Vc here from?
end