i'm implementing DES in python and i've stumbled upon a problem i can't really find the problem, after debugging it i narrowed it down to this function, can anyone tell me if i'm implementing the DES function correctly or not?
def roundFunction(s1,j,k,l):
left = s1[0:32]
right = s1[32:]
for i in range(j,k,l):
eRight = expandBlock(right)
subKey = compressBlock(listxor(eRight, key[i]))
left = listxor(left, subKey)
left,right = swap(left,right)
left,right = swap(left,right)
result = []
for i in left:
result.append(i)
for i in right:
result.append(i)
return result
i have uploaded the whole code to this link for anyone who wants to check it out: http://codeviewer.org/view/code:49db