A characterization of binary invertible algebras linear over a group