Assume that we have this 256bit key: 15FC0D48 D7F8199C BE399183 4D96F327 10000000 00000000 00000000
On first 0-7 keys we can't apply formula wi=(wi-8 xor wi-5 xor wi-3 xor wi-1 xor phi xor i)<<<1 since on 0 we have negative non exist value 0-8=-8. So currently {k0,k1,k2,k3}=S3{w0,w1,w2,w3} {k4,k5,k6,k7}=S2{w4,w5,w6,w7}
Counting {k0,k1,k2,k3}:
Our original 256 bit key 15FC0D48 D7F8199C BE399183 4D96F327 10000000 00000000 00000000 where k0=15FC0D48, k1=D7F8199C, k2=BE399183, k3=4D96F327
15FC0D48
converting to binary 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 00/01/01/01/11/11/11/00/00/00/11/01/01/00/10/00
putting through sbox3 00000100010011010001011111001100
getting result, and so on for other values res:44D17CC
D7F8199C
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11/01/01/11/11/11/10/00/00/01/10/01/10/01/11/00
11000100100110110101011110001111 res:C49B578F
BE399183
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10/11/11/10/00/11/10/01/10/01/00/01/10/00/00/11
10110110100110100011110000011100 res:B69A3C1C
4D96F327
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 01/00/11/01/10/01/01/10/11/11/00/11/00/10/01/11
01111111001101011000111000100101 res:7F358E25
So now we have: 00000100010011010001011111001100 11000100100110110101011110001111 10110110100110100011110000011100 01111111001101011000111000100101
it's not yet a round key, as it's compulsory to make this operation ki={k4i,k4i+1,k4i+2,k4i+3}
ki=IP(Ki) putting through Initial permutation matrix
so, k0={k0,k1,k2,k3}
after appliance of IP, results are: 01100101001100110001111100110001 65331F31 01101000000101111110100101101101 6817E96D 00010100001011100011111111011100 142E3FDC 11001000000100101110111101000101 C812EF45 K0=65331F31 6817E96D 142E3FDC C812EF45
But the answer is 4BBC42E4 F336C5B7 9FA81351 88C5A2B83
Am I done something wrong? Could anyone say where I can find some test vectors particullary for testing Key Schedule for Serpent? Thanks!
$w_i=(w_{i-8}\oplus w_{i-5}\oplus w_{i-3}\oplus w_{i-1}\oplus\phi\oplus i)\lll 11$
. $\endgroup$