If you agreed to a license or NDA prohibiting you from competing, that might be enforceable under contract law, but that is neither related to copyright nor patents.
Assuming a case where there's no contract involved, patents are typically what would cause trouble. The original implementor will typically have a patent on some silly thing their software does, and you have to do that thing to make a compatible implementation, so they sue you for violating their patents.