  It was recently demonstrated that the evolution of helical magnetic field in
the primordial plasma at temperatures $T\gtrsim10$ MeV is affected by the
phenomenon of chiral quantum anomaly in the electroweak model, leading to a
possibility of self-sustained existence of magnetic field and chiral asymmetry
in the electronic distribution. This may serve as a mechanism for generating
primordial magnetic field in the early universe. Violent magnetic-field
generation may lead to production of gravitational waves which, regardless of
the fate of magnetic field itself, survive until today. We estimate the
threshold value of the initial chiral asymmetry above which the generated
gravitational waves would affect the big-bang nucleosynthesis and would show up
in the current and future experiments on gravitational-wave detection.
