Skip to content

Instantly share code, notes, and snippets.

@back-seat-driver
Last active July 28, 2017 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save back-seat-driver/6bd98d89ec609274b36a5f35515f1a0a to your computer and use it in GitHub Desktop.
Save back-seat-driver/6bd98d89ec609274b36a5f35515f1a0a to your computer and use it in GitHub Desktop.
SHA-3 Zero Point
def keccak_(ip):
for i in range(24):
ip=iota(chi(pi(rho(theta(ip)))),i)
return(ip)
zero=['1100110001001101000111100111110100011100011110010010000000111110',
'0110101100110010001101101000110101010000010100110101111110010011',
'1001011100010011110100011100111000001010100011111011001010001101',
'0000010001110000101100000100101001111011011000011110000101001101',
'0010000101010101001000010111000011000101001011001110110111001110',
'0101101111100100111111001100100101000001010000101101010101011110',
'1101100110111001101001001000101000010010101000011110101011110101',
'0001111110001010010010001000101011111001110010111101110110100110',
'0011011001010011100100110110000000101101100001110010001011110110',
'0000000110101111001001001010001110010001000110111101100110001000',
'0011101101010101010100111010010011100100101101110100000010110110',
'0011101011111011010101111101101110001110000110101111000000001110',
'1001110011010001011010100000011001100001101110001000101111101011',
'0110010101100001010111000011000111001101000111101101111110111100',
'1111011010101111110100110100001001011011001000111101000001001011',
'0011110100011001001111011100010110000011000001011011001001010010',
'1011000011101011001111111011000000001100111001101111010110001010',
'1111100011010001110011000001010010111000100111100011001000110010',
'0000110010011011010010001000110011011000110101101110100111111001',
'0100111001111011111011100010100110100010100010101011111111101010',
'0110101101000110101010101000001101110011101000000010010101010111',
'0100001001001000111100110100001001100010110001011100011000110001',
'1100011101111110010010011110011000100011101101110011000110010010',
'1001100110011101010011111001100010000100010010011111101011100110',
'0111100110001011101010111111011010000111000010101101000110000000']
>>>keccak_(zero)
['0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000',
'0000000000000000000000000000000000000000000000000000000000000000']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment