Low-complexity soft-decision decoding of BCH and RS codes based on belief propagation