Cylinder lock comprising - an inner housing part with rotatable mounted therein an inner core, - an outer housing part with rotatable mounted therein an outer core, - a connecting element, joining the housing parts and, the connecting element is mounted in longitudinal bores and, respectively formed in the housing parts and, - a composite cam, mounted between both cores and, covering the inner end of the inner core through a ring channel formed therein, - a switch including a first and second switching elements and to provide selectively connection of the inner core or outer core with the cam, - the cam consists of two identical parts interlocked, in the area of the cam ring, around a first transmitting plate with a profile hole, to engage with the first switching element, and with at least two locking teeth, engaged in radial holes in the cam parts which are connected each other in the area of the cam tooth, by pin, - a compression spring, mounted in the inner core, behind the first switching element, wherein the cam is mounted in a channel formed in the inner housing part, in the outer side of which there is mounted a stepped sleeve, the inner end of which is covered through a ring channel formed therein by the cam, which includes also a second transmitting plate with a profile hole, to engage with the second switching element, and with at least two locking teeth engaged together with the locking teeth of the first transmitting plate in the radial holes of the cam parts, moreover between both transmitting plates and of the cam there is a connecting plate with a central hole, through which there is mounted a central pin passed through their profile holes and, moreover, additionally in a radial profile core hole formed in the inner core, there is mounted under spring and pin pressure, a retaining element provided to take a security position on an extender, axially disposed in the inner core behind the compression spring, so that upon removal of the outer core the first switching element together with the central pin can be pushed out by the compression spring in a forward position in the profile hole of the first transmitting plate allowing the retaining element to get into the security position on the extender, behind the first switching element, thus blocking all degrees of free movement of the first switching element, and respectively of the cam, towards the inner core, while in the same time the second switching element is permanently connected to the outer core by means of a spring ring covering it through a channel formed therein. - an inner housing part with rotatable mounted therein an inner core, - an outer housing part with rotatable mounted therein an outer core, - a connecting element, joining the housing parts and, the connecting element is mounted in longitudinal bores and, respectively formed in the housing parts and, - a composite cam, mounted between both cores and, covering the inner end of the inner core through a ring channel formed therein, - a switch including a first and second switching elements and to provide selectively connection of the inner core or outer core with the cam, - the cam consists of two identical parts interlocked, in the area of the cam ring, around a first transmitting plate with a profile hole, to engage with the first switching element, and with at least two locking teeth, engaged in radial holes in the cam parts which are connected each other in the area of the cam tooth, by pin, - a compression spring, mounted in the inner core, behind the first switching element,