Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2014 New Zealand PHP Conference

2014 New Zealand PHP Conference

Summary of general legal concepts around specific implementations of PHP IP protection in Wellington, NZ.

DISCLAIMER: The concepts conveyed in slides are not complete on their own. The author is not a solicitor and this presentation is not professional advice of any kind. The author does not accept any liability for any detrimental reliance on the information presented herein.

Copyright © 2014 Max Milaney. All rights reserved.

Avatar for Max Milaney

Max Milaney

August 29, 2014

Other Decks in Programming

Transcript

  1. Protecting your brainpower Max Milaney Milaney Maher Sciences (Canada) University

    of Tasmania School of Medicine University of London School of Law
  2. The production of too many useful things results in too

    many useless people. — Karl Marx
  3. There once was a time when all people believed in

    God and the church ruled. This time was called the dark ages. — Richard Lederer
  4. The next pi/4 hours of your life —Legal framework in

    different jurisdictions —Practical methods of enforcement —Practical considerations with FOSS licenses —Implementation in PHP —Examples
  5. Copyright —Computer programs as literary works (Apple v Franklin) —Easy

    to get ∴ hard to enforce —Usually lasts for life + ≥50 years —Programmer ≈ coder ≈ creator ≈ author —Territorial (Berne Convention)
  6. Requirements for © —Permanent form (source code) —Originality —Need not

    be complete (Hyperion) —Adaptations —Registration not required —Specific notice not required
  7. What © protects —Exclusive bundle of rights: —Production, sale, and

    license of copies —Reproduction and distribution (included import/export) —Creation of derivative works —Performance or display publicly —Transmission by electronic means
  8. What © protects —Assignment or forfeiture of economic rights —Circumvention

    of protecting technology —Except for interoperability —(and sometimes abandonware when it affects commercial interests)
  9. What © protects —Non-literal elements (a program's structure, sequence and

    organization) —"to the extent that they incorporate authorship in programmer's expression of original ideas, as distinguished from the ideas themselves."
  10. European Union definition Technological measures shall be deemed 'effective' where

    the use of a protected work or other subject matter is controlled by the rights holders through application of an access control or protection process, such as encryption, scrambling or other transformation of the work or other subject-matter or a copy control mechanism, which achieves the protection objective.
  11. What © doesn't protect —Your idea (idea/expression dichotomy) —Sales past

    the first transaction (first- sale doctrine) —Fair dealing (AmE: Fair use) —Private use (sometimes) —Educational use —Research —Legal advice —News reporting
  12. © potential fails —Acquiescence (permission given by silence) —Implied licence

    (necessary for performance of existing agreement) —Countries that are not parties to Berne Convention
  13. Compilations —"Sweat of the brow" —Feist v Rural —Denied copyright

    protection to an alphabetical phone book —Held that copyright protection requires creativity —No amount of hard work can transform a non-creative list into copyrightable subject matter
  14. Authorship —Written works usually have a single author —Employees in

    the course of employment —Commission —Unconditional compensation (Gabrin v Universal Music)
  15. Joint and collective authorship —Software rarely has a single author

    —Must be unable to distinguish contributions for joint —Music and lyrics analogy —What are the implications of being able to git blame? —Separate copyrights usually arise
  16. Sale —Exhausts first-sale rights —Owner of copy has some rights

    —Can redistribute/resell —Does not prohibit one from acts such as modifying, defacing, or destroying (except when moral rights apply)
  17. Licensing —Avoids first-sale doctrine —Step-Saver v Wyse, MAI Systems v

    Peak Computer —EULAs are the most obvious example —Right to terminate license inalienable
  18. Moral rights —Paternity (attribution) —Integrity (no distortion or alteration that

    would damage the author's reputation) —Usually inalienable where they exist —Must be asserted in the UK, can be completely waived in Canada
  19. Patents —First-to-file and difficult to do so —Protects inventions (or

    process with an inventive step) —Expensive —Often difficult to convey programming concepts —Territorial —Patent Cooperation Treaty and TRIPs
  20. Global considerations —Authorship in Indian law —Moral rights in EU

    —Database rights in EU —Civil (continental) law systems are 2×108 different
  21. Now what? —Source code protected, but not process —Source code

    reveals process —Process can be protected, but not easily —Open court (even arbitration) is expensive
  22. Confidential information —Not useless, vague, or immoral —Coco v Clark

    —Must be of a confidential nature —Communicated in circumstances importing an obligation of confidence —Breach or unauthorised use or disclosure of that information —Best created expressly in contract —Implied confidence (Stephens v Avery)
  23. Trade secrets —Any information not generally known or reasonably ascertainable,

    by which a business can obtain an economic advantage —Equitable right of "property" over confidential information —Breach must be in "bad faith" (Saltman v Campbell)
  24. Why more than one method? —Too many jurisdictions —Commercial realities

    prevail —Copyright is most effective when "protected" with access or copy control measures —Protect your expression and your idea
  25. Obfuscation —Deterrent —Mechanism of "protection" that cannot be circumvented —Useful

    when you seek practical protection —Security through obscurity
  26. "Compilation" —Useful when you are targeting desktops —Need not have

    PHP installed if output is [semi-]native —Intrinsic speed improvement —Not quite there yet…
  27. Obfuscating trade secrets —Reverse engineering is a legitimate way of

    learning information, and confidential information is that which is not already known —When used with copyright, reverse engineering is protected under anti- circumvention
  28. Circumvention …to circumvent a technological measure means to descramble a

    scrambled work, to decrypt an encrypted work, or otherwise to avoid, bypass, remove, deactivate, or impair a technological measure, without the authority of the copyright owner
  29. FOSS licenses —Most are silent on the issue —You're (apparently)

    unethical if you obfuscate —GPL requires redistribution of the source code that is "preferred" for editing
  30. GUIs —Gray area —Design or copyright? —Expression of code or

    concept in and of itself? —Apple v Microsoft —Trademarks
  31. PHP —The best language in the world! —ionCube / Zend

    Guard —Phalanger —HHVM —Project Zero (IBM WebSphere sMash)
  32. ionCube & Zend Guard ioncube_encoder --encrypt "*.tpl" /project --into /

    encoded-projects —Commercial products —Compiles to bytecode with obfuscation —Very common —Broad platform support —Shared hosting support
  33. HHVM —New(ish) —No Windows and limited Mac OS X support

    —Limited desktop applications, but good performance server-side —Hack language
  34. Phalanger —Project started at Charles University in Prague —Supported by

    Microsoft, Google, Jadu, and now DEVSENSE —Limited implementation of PHP extensions, but can created "managed wrappers" of existing extension DLLs
  35. Phalanger phpc /pure /target:winexe Program.php Form1.php —Compiles to CIL/MSIL for

    JIT compilation —.NET/Mono integration/target —Two modes —Can be decompiled to another .NET language (incidentally copying) —Windows and limited Linux support
  36. Standard mode —Mostly compatible with canonical PHP —WordPress >70% page

    load improvement (ostensibly) —Main application is using existing packages compiled as CGI binaries
  37. Pure mode —No global code or inclusions —.NET and system

    UI interoperability —Libraries that integrate with lower system functions —PHP extensions written in PHP
  38. use System; use System\Windows\Forms; use WinForms; class Form1 extends \System\Windows\Forms\Form

    { private $components; public function __construct() { parent::__construct(); $this->InitializeComponent(); } public function InitializeComponent() { $this->components = new \System\ComponentModel\Container(); $this->SuspendLayout(); // ... $this->ResumeLayout(false); } } class Program { static function Main() { Application::EnableVisualStyles(); Application::Run(new Form1()); } }
  39. Take home messages 1. Get it in writing. 2. Don't

    sell things, sell services and license their products. 3. Don't assign moral rights if you are allowed to and if you can help it 4. Be first to market. 5. Do everything in secret. 6. Always use more than one form of protection (ideas and code).