예제 #1
0
파일: BenchMark.py 프로젝트: caixl/FYP
def testCPABE_subgraph(nodes, E, vertices):
    sg = SymbolDiGraphMat(nodes, rand_E=E)
    abe_graph = CPABESymbolDiGraph(sg)
    abe_graph.setup()
    encMat = abe_graph.encrypt()
    t0 = time.clock()
    abe_graph.subgraph(encMat, vertices)
    t1 = time.clock()
    return t1-t0
예제 #2
0
파일: BenchMark.py 프로젝트: caixl/FYP
def testCPABE_subgraph_size(nodes, E, vertices):
    sg = SymbolDiGraphMat(nodes, rand_E=E)
    abe_graph = CPABESymbolDiGraph(sg)
    abe_graph.setup()
    encMat = abe_graph.encrypt()
    
    return len(str(abe_graph.subgraph(encMat, vertices)))