Skip to content

Instantly share code, notes, and snippets.

back-seat-driver

Block or report user

Report or block back-seat-driver

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View S-Box Testing
#forward_build
set_0=['00000','00101','01011','01010',
'10110','10111','10001','10100',
'01101','01000','01110','01111',
'00011','00010','01100','01001',
'11010','11101','10011','10000',
'11100','11111','11001','11110',
'00110','00001','00111','00100',
'11000','11011','10101','10010']
View Keccak_Invert
def to_print(object):
for i in range(len(object)):
print(object[i])
def bin_n_bit(dec,n):
return(str(format(dec,'0'+n+'b')))
def bin_8bit(dec):
return(str(format(dec,'08b')))
View A less hacky version of SHA-3
def bin_n_bit(dec,n):
return(str(format(dec,'0'+n+'b')))
def hex_n_bit(dec,n):
return(str(format(dec,'0'+n+'x')))
def xo_set(ip_0,ip_1):
to_return=[]
for i in range(len(ip_0)):
to_return.append(ip_0[i] ^ ip_1[i])
View Invert Theta
def bin_theta(ip):
c_xz=[]
for i in range(5):
c_xz.append(ip[i] ^ ip[i+5] ^ ip[i+10] ^ ip[i+15] ^ ip[i+20])
d_xz=[]
for i in range(5):
d_xz.append(c_xz[(i-1)%5] ^ rot(c_xz[(i+1)%5],1,64))
for i in range(5):
ip[i] = ip[i] ^ d_xz[i]
ip[i+5] = ip[i+5] ^ d_xz[i]
View KEY
def conversion(str_list):
for i in range(len(str_list)):
str_list[i]=int(str_list[i])
return(str_list)
def trim_end(a_string):
return(a_string[0:len(a_string)-1])
def dec_shift(a_string):
to_build_0=''
View PDM
from Tkinter import *
import csv
import win32clipboard
import os
def bat_exe():
'''
Note that both methods will execute a batch file from your home directory.
'''
#os.system("F:/Anaconda3/pdm_open.bat")
View Depreciated Home Brewed XOR
#https://gist.github.com/back-seat-driver/b2f81929741cd94b1ff17086fdaad0bd
def bin_n_bit(dec,n):
return(str(format(dec,'0'+n+'b')))
def hex_n_bit(dec,n):
return(str(format(dec,'0'+n+'x')))
def xo_set(ip_0,ip_1):
to_return=[]
View Theta Transfer
def to_print(object):
for i in range(len(object)):
print(object[i])
def l_s(bit_list):
bit_string=''
for i in range(len(bit_list)):
bit_string+=bit_list[i]
return(bit_string)
View CALC_GUI
from Tkinter import *
class MyFirstGUI:
def __init__(self, master):
self.master = master
master.title("Calculator")
global TEXT_VALUE
global TEXT_BOX
global GENERAL_PRECISION
global SPECIFIC_PRECISION
View 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',
You can’t perform that action at this time.