Federals learned the key in use by Confederate Signal Corps (1864). Confederates are aware of this fact by 19 April 1864: (OR Series 1, Vol. 32, Part 3, Correspondence, etc., page 795:
19 April 1864.
B. R. Johnson, Brig. Gen., Cmdg. Dept., at Bristol, Tenn., to General Johnston at Dalton, Georgia.
"...the Federals have the key to the signal in use in the Confederate signal corps. The key was obtained from a deserter."
Link to Correspondence about Confederate Signal Key
Such a fact is referenced "somewhere" by the Federals, who admitted that the scout who learned the key had foolishly let it out among the ranks, thus losing an important advantage; however, I can't put my hands on that source right now. I can't remember if it was in O.R. or Hurlburt, or both.