Discovering the AS paths between two ASes are invaluable for a wide area of network research and application activities. The traditional techniques for path discovery require direct access to the source node. Recently with more accurate AS relationship inferring algorithm and publicly available AS topology data, it is possible to infer AS paths without accessing the source. This paper proposes an efficient algorithm for inferring all pair shortest AS paths in a relationship annotated AS graph. The running time of the algorithm is O (NM), where N is the number of nodes and M is the number of edges in AS graph. The algorithm bases on the bread-first-search (BFS) algorithm, and experimental results show that it reduces running time dramatically compared with the existing algorithm whose running time is O (N3 ).