def shift_rows(state):
	"""
		Section 5.1.2: ShiftRows() Transformation
		
		!!! FUN FACT ALERT !!!
		Rotating a row by one position to the left is equivalent to polynomial
		multiplication by {01}x^3 + {00}x^2 + {00}x^1 + {00}x^0, modulo x^4 + 1
		
		>>> shift_rows(b"ABCDefghIJKLmnop")
		bytearray(b'AfKpeJoDInChmBgL')
		
	"""

	s2 = bytearray(4 * 4)
	for i in range(4):
		row = state[i : 4 * 4 : 4]
		s2[i : 4 * 4 : 4] = row[i:] + row[:i]
	return s2