libmtp 1.1.21
|
#include "config.h"
#include "libmtp.h"
#include "unicode.h"
#include "ptp.h"
#include "libusb-glue.h"
#include "device-flags.h"
#include "playlist-spl.h"
#include "util.h"
#include "mtpz.h"
#include <gcrypt.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <errno.h>
Data Structures | |
struct | mtpz_rsa_struct |
Typedefs | |
typedef struct mtpz_rsa_struct | mtpz_rsa_t |
Functions | |
int | mtpz_loaddata () |
mtpz_rsa_t * | mtpz_rsa_init (const unsigned char *modulus, const unsigned char *priv_key, const unsigned char *pub_exp) |
void | mtpz_rsa_free (mtpz_rsa_t *) |
int | mtpz_rsa_decrypt (int flen, unsigned char *from, int tlen, unsigned char *to, mtpz_rsa_t *rsa) |
int | mtpz_rsa_sign (int flen, unsigned char *from, int tlen, unsigned char *to, mtpz_rsa_t *rsa) |
void | mtpz_encryption_cipher (unsigned char *data, unsigned int len, char encrypt) |
void | mtpz_encryption_cipher_advanced (unsigned char *key, unsigned int key_len, unsigned char *data, unsigned int data_len, char encrypt) |
unsigned char * | mtpz_encryption_expand_key (unsigned char *constant, int key_len, int count, int *out_len) |
void | mtpz_encryption_expand_key_inner (unsigned char *constant, int key_len, unsigned char **out, int *out_len) |
void | mtpz_encryption_inv_mix_columns (unsigned char *expanded, int offset, int rounds) |
void | mtpz_encryption_decrypt_custom (unsigned char *data, unsigned char *seed, unsigned char *expanded) |
void | mtpz_encryption_encrypt_custom (unsigned char *data, unsigned char *seed, unsigned char *expanded) |
void | mtpz_encryption_encrypt_mac (unsigned char *hash, unsigned int hash_length, unsigned char *seed, unsigned int seed_len, unsigned char *out) |
uint16_t | ptp_mtpz_handshake (PTPParams *params) |
Variables | |
unsigned char | mtpz_aes_rcon [] |
unsigned char | mtpz_aes_sbox [] |
unsigned char | mtpz_aes_invsbox [] |
unsigned int | mtpz_aes_ft1 [] |
unsigned int | mtpz_aes_ft2 [] |
unsigned int | mtpz_aes_ft3 [] |
unsigned int | mtpz_aes_ft4 [] |
unsigned int | mtpz_aes_rt1 [] |
unsigned int | mtpz_aes_rt2 [] |
unsigned int | mtpz_aes_rt3 [] |
unsigned int | mtpz_aes_rt4 [] |
unsigned int | mtpz_aes_gb11 [] |
unsigned int | mtpz_aes_gb14 [] |
unsigned int | mtpz_aes_gb13 [] |
unsigned int | mtpz_aes_gb9 [] |
Copyright (C) 2011-2012 Sajid Anwar sajid.nosp@m.anwa.nosp@m.r94@g.nosp@m.mail.nosp@m..com
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
This file provides mtp zune cryptographic setup interfaces. It is also used with Windows Phone 7, but Microsoft/Nokiad seem to have discontinued MTPZ on Windows Phone 8.
DISCLAIMER:
The intention of this implementation is for users to be able to interoperate with their devices, i.e. copy music to them in operating systems other than Microsoft Windows, so it can be played back on the device. We do not provide encryption keys and constants in libmtp, we never will. You have to have these on file in your home directory in $HOME/.mtpz-data, and we suggest that you talk to Microsoft about providing the proper numbers if you want to use this facility.
unsigned char mtpz_aes_invsbox |
unsigned char mtpz_aes_rcon |
unsigned char mtpz_aes_sbox |