Exemplo n.º 1
0
def tuak_testset_72():
    K = b'\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0\xef\xee\xed\xec\xeb\xea\xe9\xe8\xe7\xe6\xe5\xe4\xe3\xe2\xe1\xe0'
    RAND = b'\x01#Eg\x89\xab\xcd\xef\x01#Eg\x89\xab\xcd\xef'
    TOP = b'\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f'

    tuak = TUAK(TOP)
    tuak.LEN_CK = 128
    tuak.LEN_IK = 128
    tuak.LEN_RES = 64
    TOPc = make_TOPc(K, TOP)
    tuak.set_topc(TOPc)

    return tuak.f2345(K, RAND) == (b'\xe9\xd7I\xdcN\xea\x005', b"\xa4\xcboe)\xab\x17\xf83\x7f'\xba\xa8#MG",
        b'"t\x15\\\xcfA\x99\xd5\xe2\xab\xcb\xf6!\x90\x7f\x90', b'H\n\x93E\xcc\x1e') and \
        tuak.f5star(K, RAND) == b'\xf8N\xb38\x84\x8c'
Exemplo n.º 2
0
def tuak_testset_71():
    K = b'\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab\xab'
    RAND = b'BBBBBBBBBBBBBBBB'
    TOP = b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'

    tuak = TUAK(TOP)
    tuak.LEN_CK = 128
    tuak.LEN_IK = 128
    tuak.LEN_RES = 32
    TOPc = make_TOPc(K, TOP)
    tuak.set_topc(TOPc)

    return tuak.f2345(K, RAND) == (b'ez\xcdd', b'\xd7\x1a\x1e\\l\xaf\xfe\x98j&\xf7\x83\xe5\xc7\x8b\xe1',
        b'\xbe\x84\x9f\xa2VO\x86\x9a\xec\xeeob\xd43~r', b'q\x9f\x1e\x9b\x90T') and \
        tuak.f5star(K, RAND) == b'\xe7\xafk=\x0e8'
Exemplo n.º 3
0
def tuak_testset_74():
    K    = b'\xb8\xda\x83zPe-j\xc7\xc9}\xa1Oj\xcca'
    RAND = b'h\x87\xe5T%\xa9f\xbd\x86\xc9f\x1a_\xa7+\xe8'
    TOP  = b'\tR\xbe\x13Ul2\xeb\xc5\x81\x95\xd9\xdd\x93\x04\x93\xe1*\x90\x03f\x99\x88\xff\xde_\xa1\xf0\xfe5\xcc\x01'
    
    tuak = TUAK(TOP)
    tuak.LEN_CK  = 128
    tuak.LEN_IK  = 128
    tuak.LEN_RES = 128
    TOPc = make_TOPc(K, TOP)
    tuak.set_topc(TOPc)
    
    return tuak.f2345(K, RAND) == (b'@A\xceC\x8e>8\xe8\xaa\x96V.\xed\x83\xacC',
        b">;\xc0\x1b\xea\x0c\xd9\x14\xc4\xc2\xc8<\xe2\xd9'W", b'fj\x8eoW{\x1a\xa7{\x7f\xd5<\xeb\xb8\xa3\xd6',
        b'\x1f\x88\r\x00Q\x19') and tuak.f5star(K, RAND) == b'E\xe6\x17\xd7\x7f\xe5'
Exemplo n.º 4
0
def tuak_testset_73():
    K    = b'\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0\xef\xee\xed\xec\xeb\xea\xe9\xe8\xe7\xe6\xe5\xe4\xe3\xe2\xe1\xe0'
    RAND = b'\x01#Eg\x89\xab\xcd\xef\x01#Eg\x89\xab\xcd\xef'
    TOP  = b'\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f'
    
    tuak = TUAK(TOP)
    tuak.LEN_CK  = 128
    tuak.LEN_IK  = 256
    tuak.LEN_RES = 64
    TOPc = make_TOPc(K, TOP)
    tuak.set_topc(TOPc)
    
    return tuak.f2345(K, RAND) == (b'\x07\x02\x1cs\xe7c\\}', b'MY\xacyh4\xeb\x85\xd1\x1f\xa1H\xa5\x05\x8c<',
        b'\x12mGP\x016\xfd\xc5\xdd\xfd\x14\xf1\x9e\xbf\x16t\x9c\xe4\xb6CS#\xfb\xb5qZ:yj`\x82\xbd',
        b'\x1df"\xc4\xe5\x9a') and tuak.f5star(K, RAND) == b'\xf8N\xb38\x84\x8c'
Exemplo n.º 5
0
def tuak_testset_75():
    K = b'\x15t\xcaV\x88\x1d\x05\xc1\x89\xc8(\x80\xf7\x89\xc9\xcdBD\x95_D&\xaa+i\xc2\x9f\x15w\x0eZ\xa5'
    RAND = b'\xc5p\xaa\xc6\x8c\xdee\x1f\xb1\xe3\x08\x83"I\x8b\xef'
    TOP = b'\xe5\x9fn\xb1\x0e\xa4\x06\x81?I\x91\xb0\xb9\xe0/\x18\x1e\xdfL~\x17\xb4\x80\xf6m4\xda5\xee\x88\xc9^'

    tuak = TUAK(TOP)
    tuak.LEN_CK = 256
    tuak.LEN_IK = 128
    tuak.LEN_RES = 256
    TOPc = make_TOPc(K, TOP)
    tuak.set_topc(TOPc)

    return tuak.f2345(K, RAND) == (b'\x84\xd8\x9bA\xdb\x18g\xff\xd4\xc7\xba\x1d\x82\x16?MRj \xfb\xaeT\x18\xfb\xb5&\x94\x0b\x1e\xeb\x90\\',
        b"\xd4\x19gj\xfeZ\xb5\x8c\x1d\x8b\xee\rCR:M/R\xef\x0b1\xa4gj\x0c3D'\xa9\x88\xfee",
        b' U3\xe5\x05f\x1ba\xd0\\\xc0\xea\xc8x\x18\xf4', b'\xd7\xb3\xd2\xd4\x98\n') and \
        tuak.f5star(K, RAND) == b'\xca\x96U&I\x86'
Exemplo n.º 6
0
def tuak_testset_76():
    TUAK.KeccakIterations = 2
    K    = b'\x15t\xcaV\x88\x1d\x05\xc1\x89\xc8(\x80\xf7\x89\xc9\xcdBD\x95_D&\xaa+i\xc2\x9f\x15w\x0eZ\xa5'
    RAND = b'\xc5p\xaa\xc6\x8c\xdee\x1f\xb1\xe3\x08\x83"I\x8b\xef'
    TOP  = b'\xe5\x9fn\xb1\x0e\xa4\x06\x81?I\x91\xb0\xb9\xe0/\x18\x1e\xdfL~\x17\xb4\x80\xf6m4\xda5\xee\x88\xc9^'
    
    tuak = TUAK(TOP)
    tuak.LEN_CK  = 256
    tuak.LEN_IK  = 256
    tuak.LEN_RES = 256
    TOPc = make_TOPc(K, TOP)
    tuak.set_topc(TOPc)
    
    ret = tuak.f2345(K, RAND) == (b'\xd6~ndY\r"\xee\xcb\xa72J\xfaJ\xf4F\x0c\x93\xf0\x1b$Pmn\x12\x04}x\x9a\x94\xc8g',
        b'\xed\xe5~\xdf\xc5|\xdf\xfe\x1a\xaeu\x06j\x1bty\xbb\xc3\x83t8\xe8\x8d7\xa8\x01\xcc\xcc\x9f\x97+\x89',
        b'H\xed\x92\x99\x12nPW@/\xe0\x1f\x92\x01\xcf%$\x9f\x9c\\\x0e\xd2\xaf\xcf\x08GU\xda\xff\x1d9\x99',
        b'j\xae\x8d\x18\xc4H') and tuak.f5star(K, RAND) == b'\x8c_3\xb6\x1fN'
    
    TUAK.KeccakIterations = 1
    return ret