Add secret encoder and decoder script

add secret encoder and decoder script
points of shares are now in hex form
fixed some bugs (hopefully)