Created
          June 17, 2019 12:44 
        
      - 
      
 - 
        
Save lionaneesh/faf3fff52dcc3a1efabc51213b1b2c85 to your computer and use it in GitHub Desktop.  
    Key Set Filtering LED Cipher
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | keyspace = 0 | |
| for a in fault_values['a']: | |
| for b in fault_values['b']: | |
| for c in fault_values['c']: | |
| for d in fault_values['d']: | |
| k0_4_8_12 = sxis[('a', 0)][a].intersection(sxis[('d', 1)][d]).intersection(sxis[('c', 2)][c]).intersection(sxis[('b', 3)][b]) | |
| k1_5_9_13 = sxis[('a', 3)][a].intersection(sxis[('d', 0)][d]).intersection(sxis[('c', 1)][c]).intersection(sxis[('b', 2)][b]) | |
| k2_6_10_14 = sxis[('a', 2)][a].intersection(sxis[('d', 3)][d]).intersection(sxis[('c', 0)][c]).intersection(sxis[('b', 1)][b]) | |
| k3_7_11_15 = sxis[('a', 1)][a].intersection(sxis[('d', 2)][d]).intersection(sxis[('c', 3)][c]).intersection(sxis[('b', 0)][b]) | |
| keyspace += len(k0_4_8_12) * len(k1_5_9_13) * len(k2_6_10_14) * len(k3_7_11_15) | |
| print '(k0, k4, k8, k12): ', k0_4_8_12 | |
| print '(k1, k5, k9, k13): ', k1_5_9_13 | |
| print '(k2, k6, k10,k14): ', k2_6_10_14 | |
| print '(k3, k7, k11,k15): ', k3_7_11_15 | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment