TwlIPL/build/libraries_sysmenu/hotsw/ARM7/include/blowfish.h
(no author) 6025e2391d (更新:Akabane Jumpei)
・カードの状態を監視するスレッドを生成。割り込みで変化したカード状態と比較して、状態がずれていたらメッセージを送る。
・TWLカード対応。拡張常駐モジュールのハッシュチェックは通っているが、アプリを起動すると止まる。
・カード読みシーケンスの判定にボンディングオプションの条件も追加
・IFフラグをポーリングして活栓挿抜を実装できる関数を用意(デバッグ用)
・ローカルにKeyTable2を用意
・ソースの整理

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/branches/20080312_hotsw@930 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-03-24 10:38:09 +00:00

50 lines
1.6 KiB
C

/*---------------------------------------------------------------------------*
Project: TwlIPL - HOTSW - include
File: blowfish.h
Copyright 2007-2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
*---------------------------------------------------------------------------*/
#ifndef HOTSW_GCD_BLOWFISH_H
#define HOTSW_GCD_BLOWFISH_H
#include <twl/types.h>
#include <hotswTypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************/
extern BLOWFISH_CTX HotSwBlowfishInitTableBufDS;
extern BLOWFISH_CTX HotSwBlowfishInitTableTWL;
// Function Prototype ------------------------------------------------------------------------
// Blowfish 初期化
void InitBlowfish(BLOWFISH_CTX *ctx, const unsigned char *key, int keyLen);
// Blowfish KeyとTableの初期化
void InitBlowfishKeyAndTableDS(BLOWFISH_CTX *ctx, u32 *keyBufp, s32 keyLen);
// Blowfish 復号化
void EncryptByBlowfish(const BLOWFISH_CTX *ctx, u32 *xl, u32 *xr);
// Blowfish 暗号化
void DecryptByBlowfish(const BLOWFISH_CTX *ctx, u32 *xl, u32 *xr);
// Key Table の生成
void GCDm_MakeBlowfishTableDS(CardBootData *cbd, s32 keyLen);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // HOTSW_GCD_BLOWFISH_H