[vlc-devel] dcp module: read encrypted DCPs

Rafaël Carré funman at videolan.org
Wed Apr 9 15:24:58 CEST 2014


On 04/09/14 14:59, Simona-Marinela P. wrote:
> Hello all!
> As you've seen in my previous attempt, I am trying to make the dcp module
> read encrypted DCPs.
> The AES key with which the MXF files are encrypted is carried in a KDM
> file, but it is itself encrypted with RSA. So I have to use a private key
> to decrypt it. My problem now is at reading this private key from its PEM
> file.
> In OpenSSL this was quite easy to do, by using just the function '
> PEM_read_bio_RSAPrivateKey'. But with other libs (I looked over libgcrypt
> and Nettle) this is not possible (or I haven't search long enough). So,
> before trying to parse the PEM file ("manually") myself, I must ask: does
> anybody know a GPLv2 compatible lib that supports reading of RSA private
> keys (and preferably also supports RSA decryption)?

gcrypt has a function for this in tests/fipsdev.c :

/* Read the file FNAME assuming it is a PEM encoded private key file
   and return an S-expression.  With SHOW set, the key parameters are
   printed.  */
static gcry_sexp_t
read_private_key_file (const char *fname, int show)

Is it what you're looking for?

More information about the vlc-devel mailing list