summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/upgtools/fwp.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2020-06-13 16:21:16 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2020-10-11 13:08:03 +0200
commit53d2742a482eba04fab02a5f1b8a5b2fa48206e2 (patch)
tree10f04b099fad6bd3bb42b597f536c0a247fc10ab /utils/nwztools/upgtools/fwp.h
parentcda16f9439359c79c4d8f54f63b0cdb10dc79bfb (diff)
downloadrockbox-53d2742a48.tar.gz
rockbox-53d2742a48.tar.bz2
rockbox-53d2742a48.zip
nwztools: add support for new UPG format on post-WM1/A30 devices
The new code supports reading and writing UPG files. I kept the old keysig search code but it only supports the old format (the new format has too long keys anyway). Since we now have to support two types of encryption(DES and AES), I reorganized the crypto routines and clean-up some code. Change-Id: Ie9be220ec2431ec6d0bd11699fa0493b62e1cec2
Diffstat (limited to 'utils/nwztools/upgtools/fwp.h')
-rw-r--r--utils/nwztools/upgtools/fwp.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/utils/nwztools/upgtools/fwp.h b/utils/nwztools/upgtools/fwp.h
deleted file mode 100644
index 32fe260090..0000000000
--- a/utils/nwztools/upgtools/fwp.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2012 Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef __fwp_h__
-#define __fwp_h__
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NWZ_KAS_SIZE 32
-#define NWZ_KEYSIG_SIZE 16
-#define NWZ_KEY_SIZE 8
-#define NWZ_SIG_SIZE 8
-#define NWZ_EXPKEY_SIZE (NWZ_KEY_SIZE * NWZ_KEY_SIZE)
-#define NWZ_DES_BLOCK 8
-#define NWZ_MD5_SIZE 16
-
-/* size must be a multiple of 8 */
-void fwp_read(void *in, int size, void *out, uint8_t *key);
-void fwp_write(void *in, int size, void *out, uint8_t *key);
-void fwp_setkey(char key[8]);
-void fwp_crypt(void *buf, int size, int mode);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __fwp_h__ */