A new image encryption algorithm based on Latin square matrix