"padding" in encryption?

sunarto.gouw

Member
Joined
May 22, 2013
Messages
12
Programming Experience
Beginner
hello guys, I need some help

i working on a project in encryption.

i have a little problem in making the key schedule.

1. how can i do "padding"?

for information, PADDING is "short keys with less than 256 bits are mapped to full-length keys of 256bits by appending one "1" bit to the MSB end, followed by as many "0" bits
as required to make up 256 bits"

i am using textbox to input the key

can i display it to see if i'm right or wrong?


2. i have a pseudo code:

index := 0
repeat
currentsbox := index modulo 32;
for i:=0 to 15 do
j := sbox[(currentsbox+1) modulo 32][serpent];
swapentries (sbox[currentsbox],sbox[currentsbox][j]);
if sbox[currentsbox][.] has the desired properties, save it;
index := index + 1;
until 8 S-boxes have been generated

can someone help me?
 
Back
Top