0.2.2 • Published 6 years ago

drmgen v0.2.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

DRM Encryption Key Generator (drmgen)

license Codacy Badge Maintainability CircleCI Coverage Status Known Vulnerabilities

The "drmgen" tool can be used to generate a set of keys to encrypt media files. The keys will beprovided in multiple formats. Every key consists of a "key id" a "key value" and (this is needed for HLS encryption) a "initialization vector". It is possible that the Involved Systems work with different endianess. Therefore the output is provided in little and big endian order.

Quick Start

CLI

To run drmgen as a CLI-Tool install it globally. You may need extended rights (sudo/admin) to do so.

Install

npm i -g drmgen

Usage

drmgen // Outputs: fullSet

lib

To hook drmgen up to your awesome Javascipt/node.js project use the following

const drm = require('drmgen')
console.log(drm.generateFullSet())

swap/ flip - little and big endianess

It's possible that (license or DRM) systems that save keys to the host system, translate them to the network (host byte order to network byte order) or generate different versions of them internally. I cannot really understand why this still happens - because it should be covered by the CPU and OS completely - but in reality it happens

The problem for encrypting files is introduced if one system (let's say the license server) takes a key and swaps it internally, but another system (call it the content management system CMS) doesn't. If the CMS then allows a user to access the file with the un-swapped key the decryption of the file will not work because the key they have stored doesn't match. (Tasking about films you'll probably see a image stream full of strange artifacts) This effact can also happen to the initalisation vector or the key id.

Details about the CLI usage

Output

  • Key Id
  • Key
  • Initialisation Vector

  • in spapped/ unswapped order

  • in different encodings (hex, guid, base64)

Calling from CLI with parameter

drmgen -f multiline -s -e "uuid,base64" -i "id,key"
0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago