def testKPABE_subgraph(nodes, E, vertices): sg = SymbolDiGraphMat(nodes, rand_E=E) abe_graph = KPABESymbolDiGraph(sg) abe_graph.setup() encMat = abe_graph.encrypt() t0 = time.clock() abe_graph.subgraph(encMat, vertices) t1 = time.clock() return t1-t0
def testKPABE_subgraph_size(nodes, E, vertices): sg = SymbolDiGraphMat(nodes, rand_E=E) abe_graph = KPABESymbolDiGraph(sg) abe_graph.setup() encMat = abe_graph.encrypt() return len(str(abe_graph.subgraph(encMat, vertices)))