Пример #1
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <dir>' % argv[0])
        sys.exit(1)
    dir = argv[1]
    size = utils.obfsize('%s/obf-size.log' % dir)
    print('Size: %.2f MB' % round(size / 2 ** 20, 2))
Пример #2
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <dir>' % argv[0])
        sys.exit(1)
    dir = argv[1]
    size = utils.obfsize('%s/obf-size.log' % dir)
    print('Size: %.2f MB' % round(size / 2**20, 2))
Пример #3
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <path>' % argv[0])
        sys.exit(1)

    path = argv[1]

    _, size = utils.obfsize(path)
    print('Size (MB): %f' % round(size / 2**20, 5))
Пример #4
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <path>' % argv[0])
        sys.exit(1)

    path = argv[1]

    _, size = utils.obfsize(path)
    print('Size (MB): %f' % round(size / 2 ** 20, 5))
Пример #5
0
def main(argv):
    if len(argv) != 2:
        print('Usage: %s <dir>' % argv[0])
        sys.exit(1)
    dir = argv[1]
    utils.obftime('%s/obf-time.log' % dir)
    size = utils.obfsize('%s/obf-size.log' % dir)
    print('Obf Size:  %.2f MB' % round(size / 2**20, 2))
    time, ram = utils.evaltime('%s/eval-time.log' % dir)
    print('Eval Time: %.2f s' % round(time, 2))
    print('Eval RAM:  %.2f MB' % round(ram / 1024, 2))
Пример #6
0
def obfsize(ax1):
    xs = (8, 12, 16)

    path8 = os.path.join('results', 'point.52', 'point-8.circ-52-obf-size.log')
    path12 = os.path.join('results', 'point.52', 'point-12.circ-52-obf-size.log')
    path16 = os.path.join('results', 'point.52', 'point-16.circ-52-obf-size.log')

    _, bar8 = utils.obfsize(path8)
    _, bar12 = utils.obfsize(path12)
    _, bar16 = utils.obfsize(path16)

    all = [bar8, bar12, bar16]
    all = [x / 2 ** 30 for x in all]

    print('obf size: %s' % all)

    ind = np.arange(len(all))
    width = 0.4

    total = ax1.bar(ind + width, all, width, color='gray')
    ax1.set_ylabel(r'Obfuscation size (GB)')
    ax1.set_xlabel(r'Input size of point function')
    ax1.set_xticks(ind + 0.6)
    ax1.set_xticklabels(xs)
Пример #7
0
def extract_obf_size(path):
    _, size = utils.obfsize(path)
    return size
Пример #8
0
def extract_obf_size(path):
    _, size = utils.obfsize(path)
    return size