For the gyrator transform-based image encryption, besides the random operations, the rotation angles used in the gyrator transforms are also taken as the secret keys, which makes such cryptosystems to be more secure. To analyze the security of such cryptosystems, one may start from analyzing the security of a single gyrator transform. In this paper, the security of the gyrator transform-based image encryption by chosen-plaintext attack was discussed in theory. By using the impulse functions as the chosen-plaintext, it was concluded that: (1) For a single gyrator transform, by choosing a plaintext, the rotation angle can be obtained very easily and efficiently; (2) For image encryption with a single random phase encoding and a single gyrator transform, it is hard to find the rotation angle directly with a chosen-plaintext attack. However, assuming the value of one of the elements in the random phase mask is known, the rotation angle can be obtained very easily with a chosen-plaintext attack, and the random phase mask can also be recovered. Furthermore, by exhaustively searching the value of one of the elements in the random phase mask, the rotation angle as well as the random phase mask may be recovered. By obtaining the relationship between the rotation angle and the random phase mask for image encryption with a single random phase encoding and a single gyrator transform, it may be useful for further study on the security of the iterative random operations in the gyrator transform domains.