1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-10-30 07:21:46 +00:00
nxdumptool/source/signature.h

61 lines
1.8 KiB
C
Raw Normal View History

2020-04-16 01:06:41 +01:00
/*
* Copyright (c) 2020 DarkMatterCore
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2020-04-11 06:28:26 +01:00
#pragma once
#ifndef __SIGNATURE_H__
#define __SIGNATURE_H__
typedef enum {
SignatureType_Rsa4096Sha1 = 0x10000,
SignatureType_Rsa2048Sha1 = 0x10001,
SignatureType_Ecc480Sha1 = 0x10002,
SignatureType_Rsa4096Sha256 = 0x10003,
SignatureType_Rsa2048Sha256 = 0x10004,
SignatureType_Ecc480Sha256 = 0x10005,
SignatureType_Hmac160Sha1 = 0x10006
2020-04-11 06:28:26 +01:00
} SignatureType;
typedef struct {
u32 sig_type; ///< SignatureType_Rsa4096Sha1, SignatureType_Rsa4096Sha256.
u8 signature[0x200];
u8 padding[0x3C];
2020-05-01 16:06:24 +01:00
char issuer[0x40];
2020-04-11 06:28:26 +01:00
} SignatureBlockRsa4096;
typedef struct {
u32 sig_type; ///< SignatureType_Rsa2048Sha1, SignatureType_Rsa2048Sha256.
u8 signature[0x100];
u8 padding[0x3C];
2020-05-01 16:06:24 +01:00
char issuer[0x40];
2020-04-11 06:28:26 +01:00
} SignatureBlockRsa2048;
typedef struct {
u32 sig_type; ///< SignatureType_Ecc480Sha1, SignatureType_Ecc480Sha256.
2020-04-11 06:28:26 +01:00
u8 signature[0x3C];
u8 padding[0x40];
2020-05-01 16:06:24 +01:00
char issuer[0x40];
} SignatureBlockEcc480;
typedef struct {
u32 sig_type; ///< SignatureType_Hmac160Sha1.
u8 signature[0x14];
u8 padding[0x28];
2020-05-01 16:06:24 +01:00
char issuer[0x40];
} SignatureBlockHmac160;
2020-04-11 06:28:26 +01:00
#endif /* __SIGNATURE_H__ */