Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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)))