Separation of proteins by electrophoresis is based on