title: TypeError: 'sage.rings.integer.Integer' object has no attribute '__getitem__'
body: <p>I am trying to implement differential cryptanalysis on an sbox for a DES algorithm, and I'm receiving this error.
  This is my code so far:</p>
  
  <pre><code>s1=[14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
  0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
  4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0,
  15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13]
  b=[]
  for i in range(0, 63):
      j=ZZ(i).binary().zfill(6)
      b += [s1[ZZ('0b'+j[0]+j[5])][ZZ('0b'+j[1]+j[2]+j[3]+j[4])]]
  s1=mq.SBox(b)
  ddt=s1.difference_distribution_matrix()
  for i in range(63):
      print i,ddt[i]
  </code></pre>
  
  <p>The error is on </p>
  
  <pre><code>b += [s1[ZZ('0b'+j[0]+j[5])][ZZ('0b'+j[1]+j[2]+j[3]+j[4])]]
  </code></pre>