Two reporters facing up to 18 months in jail for refusing to testify about their sources gained some unlikely allies yesterday. The attorneys general of 34 states and the District of Columbia filed a brief in the United States Supreme Court supporting the reporters, Judith Miller of The New York Times and Matthew Cooper of Time magazine. The brief urged the court to hear the reporters' case and argued that the absence of federal protection for journalists and their sources undermined the laws of the 49 states that do offer protection.