Acme-DRM

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

     # additional overhead for decryption at runtime
     my $protectedContent = doubleROT128($intellectualProperty);

EXPORT
    secureXOR
    doubleROT128

FUNCTIONS
  secureXOR
    XOR is an extremely convenient method for encrypting a digital media
    stream. Given any two of the a) original data, b) encryption key, and c)
    encrypted data, you get the third item. Unfortunately, hackers have
    compromised the effectiveness of this computationally convenient method.
    The weakness is the reuse of a single key. The answer is to use a
    variable key, however, key distribution becomes a difficult proposition.
    If the key is distributed in the clear, pirates can simply decrypt the
    digital media stream, and steal your Intellectual Property. Our solution
    is to use the media itself as the key. This function conveniently takes
    only the media as a single argument, and automatically XORs the
    datastream with a copy of itself, rendering the stream almost completely
    unrecoverable without the key: the media itself. This is virtually
    hacker-proof, except for one exception: the encrypted datastream is
    exactly the same length as the original data, but this is almost never
    probably a weakness. This algorithm does guarantee that your original
    data will not be recoverable from the encrypted stream without the
    proper key. Additionally, use of an incorrect key will not provide
    hackers with any sort of clue that they have guessed an incorrect key.

  doubleROT128
    This function exists to provide a method by which you can protect your
    Intellectual Property under the DMCA, without imposing the difficulty of
    implementing a separate, potentially insecure decryption algorithm in
    your secure media playback application. Simply pass your digital media
    to this function, and it will output an encrypted stream, conveniently

lib/Acme/DRM.pm  view on Meta::CPAN

=cut

push( @EXPORT_OK, '&doubleROT128' );

=back

=head1 FUNCTIONS

=head2 secureXOR

XOR is an extremely convenient method for encrypting a digital media stream.  Given any two of the a) original data, b) encryption key, and c) encrypted data, you get the third item.  Unfortunately, hackers have compromised the effectiveness of this ...
The answer is to use a variable key, however, key distribution becomes a difficult proposition.  If the key is distributed in the clear, pirates can simply decrypt the digital media stream, and steal your B<Intellectual Property>.  Our solution is to...

=cut

sub secureXOR {

  # Get the first argument
  my $data = shift;

  # Make sure we really got something
  unless ( defined($data) ) {



( run in 0.368 second using v1.01-cache-2.11-cpan-1c8d708658b )