I work in a field where people (competitors?) reverse engineer things, and for this reason, there are many implementations around, all of which are open source. Sometimes in order to save time, I look up if someone figured something out already, and I read their code. Then I see "aha, this format stores image data as JPEG xored with 0xFF" (this is just an example).

Once gained, this knowledge cannot be lost. So I proceed to code this in my program in my own way, in my own language. Then I credit the authors in my LICENSE file, even if the repository didn't use any license (= the code was copyrighted).

I think it's fair use, but is it legally okay?

Note I'm not talking about legal aspects of reverse engineering, since that's another subject altogether.

  • 4
    You don't need to credit them in the license file, and it's not appropriate to do so. A "thanks" file would be more appropriate, although you don't have to mention them at all since copyright does not apply to "ideas" or "functionality". – Abhi Beckert Aug 28 '15 at 1:14

If you have not copied the code directly, this sort of thing is usually OK, and exempt from copyright laws. Specifically, mathematical formulae, ideas, inventions, recipes and facts cannot be protected by copyright. So just the knowledge that a format is handled in a particular way is not a copyright issue. Clever shortcuts and time-saving algorithms are not protected either. You don't even need to give credit, but if you learnt a lot from a particular source, it seems polite to. Don't use the license file to give credit though, as it is not a licensing issue - make a separate credits or acknowledgements file instead.

The same might apply if you learn an idea from a published scientific paper, or someone's coding blog or tutorial. Sometimes the code in these resources has no clear license, so you should not use it directly, but re-using the concepts is fine.

However, there are ways that such things can be protected, and you could be liable for if you publish working code that includes patented material or trademarks for example. Some software development fields seem to have more problems with patents than others. Compression algorithms and compressed storage formats come to mind as one problem area. Patent-protected algorithms or formats are often not well signposted in source code, and the case law for software patents is hard to get to grips with. Patents can apply to whole algorithms, to formats or to specific optimisations of either. Having said this, the same problems can occur even if you re-invent an idea yourself from scratch, or reverse-engineer a format without the help of someone else's code as a reference.


This is a jagged seam between the concepts that underpin copyright law, versus the reality of information.

Copyright law cares very much about the provenance of the work: what prior works does this work derive from? The concept only makes sense in the context of a clear traceable lineage from one work to another.

As you hint, though, that concept does not match the reality of how we create works. Nothing in the bit stream necessarily implies what prior works this bit stream derives from; and the similarity of one work to another does not necessarily imply how, or whether, one was derived from another.

So what ends up happening is that disputes arise over to what extent one work derives from another, and how we can know whether that happened; and the similarity of the works can't decide such disputes with much reliability.

Often, supporting evidence from outside the work itself needs to be found to support any particular assertion about the derivation of one work from another.

You may claim that your work Lorem does not derive from prior work Ipsum in a way that invokes a claim from Ipsum's copyright holder. What do you do if that copyright holder disagrees?

To guard against claims that your implementation of Lorem is derived from work Ipsum, you can employ the clean room design tactic:

  • Have Alice decide they want to implement Lorem.

  • Have Bob maintain no communication with Alice.

  • Have Bob read the implementation of Ipsum, learning its algorithms and data structures and so on.

  • Have Bob publish a prose description of the implementation, without including any part of Ipsum's implementation in that description.

  • Have Alice read that published description, and use it to implement Lorem without ever seeing Ipsum's implementation and without ever communicating directly with Bob.

Since copyright is held in fixed expressions of ideas, not the ideas themselves, this can be an effective way to insulate Alice from claims that Lorem is a derived work from Ipsum. But only if the actors clearly document the steps they took to maintain a clean separation between them as they worked, to the extent that it would hold up in a court of law against hostile copyright lawyers.

Your Answer

