(self)
Create the 16 subkeys K[1] to K[16] from the given key
Create the 16 subkeys K[1] to K[16] from the given key
Create the 16 subkeys K [ 1 ] to K [ 16 ] from the given key
def __create_sub_keys(self):
        """Create the 16 subkeys K[1] to K[16] from the given key"""
        key = self.__permutate(des.__pc1, self.__String_to_BitList(self.getKey()))
        i = 0
        # Split into Left and Right sections
        self.L = key[:28]
        self.R = key[28:]
        while i < 16:
            j = 0
            # Perform circular left shifts
            while j < des.__left_rotations[i]:
                self.L.append(self.L[0])
                del self.L[0]

                self.R.append(self.R[0])
                del self.R[0]

                j += 1

            # Create one of the 16 subkeys through pc2 permutation
            self.Kn[i] = self.__permutate(des.__pc2, self.L + self.R)

            i += 1
def __create_sub_keys ( self ) : key = self . __permutate ( des . __pc1 , self . __String_to_BitList ( self . getKey ( ) ) ) i = 0 # Split into Left and Right sections self . L = key [ : 28 ] self . R = key [ 28 : ] while i < 16 : j = 0 # Perform circular left shifts while j < des . __left_rotations [ i ] : self . L . append ( self . L [ 0 ] ) del self . L [ 0 ] self . R . append ( self . R [ 0 ] ) del self . R [ 0 ] j += 1 # Create one of the 16 subkeys through pc2 permutation self . Kn [ i ] = self . __permutate ( des . __pc2 , self . L + self . R ) i += 1