A federal judge ruled that the Ripple Labs Inc. token is a security when sold to institutional investors but not the general public, granting a partial win to the SEC in a long-awaited decision that could help determine the future of crypto regulation.