#include "libavutil/common.h"#include "libavutil/intreadwrite.h"#include "libavutil/bswap.h"#include "libavutil/des.h"#include "libavutil/rc4.h"#include "asfcrypt.h"Go to the source code of this file.
Functions | |
| static uint32_t | inverse (uint32_t v) |
| find multiplicative inverse modulo 2 ^ 32 | |
| static void | multiswap_init (const uint8_t keybuf[48], uint32_t keys[12]) |
| read keys from keybuf into keys | |
| static void | multiswap_invert_keys (uint32_t keys[12]) |
| invert the keys so that encryption become decryption keys and the other way round. | |
| static uint32_t | multiswap_step (const uint32_t keys[12], uint32_t v) |
| static uint32_t | multiswap_inv_step (const uint32_t keys[12], uint32_t v) |
| static uint64_t | multiswap_enc (const uint32_t keys[12], uint64_t key, uint64_t data) |
| "MultiSwap" encryption | |
| static uint64_t | multiswap_dec (const uint32_t keys[12], uint64_t key, uint64_t data) |
| "MultiSwap" decryption | |
| void | ff_asfcrypt_dec (const uint8_t key[20], uint8_t *data, int len) |
| static uint32_t inverse | ( | uint32_t | v | ) | [static] |
find multiplicative inverse modulo 2 ^ 32
| v | number to invert, must be odd! |
Definition at line 35 of file asfcrypt.c.
Referenced by multiswap_invert_keys().
"MultiSwap" decryption
| keys | 32 bit numbers in machine endianness, 0-4 and 6-10 must be inverted from encryption | |
| key | another key, this one must be the same as for the encryption | |
| data | data to decrypt |
Definition at line 124 of file asfcrypt.c.
Referenced by ff_asfcrypt_dec().
"MultiSwap" encryption
| keys | 32 bit numbers in machine endianness, 0-4 and 6-10 must be inverted from decryption | |
| key | another key, this one must be the same for the decryption | |
| data | data to encrypt |
Definition at line 102 of file asfcrypt.c.
Referenced by ff_asfcrypt_dec().
| static void multiswap_init | ( | const uint8_t | keybuf[48], | |
| uint32_t | keys[12] | |||
| ) | [static] |
read keys from keybuf into keys
| keybuf | buffer containing the keys | |
| keys | output key array containing the keys for encryption in native endianness |
Definition at line 53 of file asfcrypt.c.
Referenced by ff_asfcrypt_dec().
| static uint32_t multiswap_inv_step | ( | const uint32_t | keys[12], | |
| uint32_t | v | |||
| ) | [static] |
| static void multiswap_invert_keys | ( | uint32_t | keys[12] | ) | [static] |
invert the keys so that encryption become decryption keys and the other way round.
| keys | key array of ints to invert |
Definition at line 64 of file asfcrypt.c.
Referenced by ff_asfcrypt_dec().
| static uint32_t multiswap_step | ( | const uint32_t | keys[12], | |
| uint32_t | v | |||
| ) | [static] |
1.5.8