Exemplo n.º 1
0
def doaesattack1(path):
    utils.myinit(path)
    result = utils.getmeasurementscorebycache()
    for i in range(16):
        plt.subplot(4, 4, 1 + i)
        plt.bar(range(len(result[i])), result[i])
    pt = path + "/result"
    with open(pt, "w") as f:
        for i in range(16):
            for j in range(16):
                s = "%f" % result[i][j]
                f.write(s)
            f.write("\n")
    plt.show()
Exemplo n.º 2
0
def doaesattack1_nks(path):
    utils.myinit(path)
    result = utils.getfirstroundmeasurementscorebycache_nks()
    for i in range(16):
        mmin = min(result[i])
        plt.subplot(4, 4, 1 + i)
        plt.bar(range(len(result[i])), result[i] - mmin, bottom=mmin)
    pt = path + "/result_nks"
    with open(pt, "w") as f:
        for i in range(16):
            for j in range(16):
                s = "%f " % result[i][j]
                f.write(s)
            f.write("\n")
    plt.show()
Exemplo n.º 3
0
def attack(path):
    utils.myinit(path)
    doaesattack2(path, utils.getmeasurementscorebycache())
Exemplo n.º 4
0
def doaesattack2(path):
    utils.myinit(path)
    _doaesattack2(path, [])
Exemplo n.º 5
0
def attack(path):
    utils.myinit(path)
    frr = utils.getfirstroundmeasurementscorebycache()
    f4b = utils.getfirst4bits(frr)
    _doaesattack2(f4b)
Exemplo n.º 6
0
def doaesattack2_nks(path):
    utils.myinit(path)
    _doaesattack2_nks([])