Magnesium and its alloys are attractive and promising materials for the aerospace, automotive, and medical industries due to their low density, excellent formability, non-toxicity, and damping properties . However, unlike aluminum and titanium, Mg alloys are characterized by a low corrosion resistance due to their high reactivity and the absence of a stable passive oxide layer . At present, the main ways of tailoring mechanical and corrosion properties of magnesium alloys are alloying, surface modification, as well as the use of corrosion inhibitors .