C# Class CSPspEmu.Core.Crypto.Crypto

Show file Open project: soywiz/cspspemu

Public Methods

Method Description
AES_CMAC ( AES_ctx ctx, byte input, int length, byte mac ) : void
AES_CMAC_forge ( AES_ctx ctx, byte input, int length, byte forge ) : void
AES_cbc_decrypt ( AES_ctx ctx, byte src, byte dst, int size ) : void
AES_cbc_encrypt ( AES_ctx ctx, byte src, byte dst, int size ) : void
AES_decrypt ( AES_ctx ctx, byte src, byte dst ) : void
AES_encrypt ( AES_ctx ctx, byte src, byte dst ) : void
AES_set_key ( AES_ctx ctx, byte key, int bits ) : int
generate_subkey ( AES_ctx ctx, byte K1, byte K2 ) : void
leftshift_onebit ( byte input, byte output ) : void
memcmp ( byte str1, byte str2, int count ) : int
memcpy ( byte dst, byte src, int count ) : void
memcpy ( void dst, void src, int count ) : void
padding ( byte lastb, byte pad, int length ) : void
rijndaelDecrypt ( uint rk, int Nr, byte ct, byte pt ) : void
rijndaelEncrypt ( uint rk, int Nr, byte pt, byte ct ) : void
rijndaelKeySetupDec ( uint rk, byte cipherKey, int keyBits ) : int

Expand the cipher key into the decryption key schedule.

rijndaelKeySetupEnc ( uint rk, byte cipherKey, int keyBits ) : int

Expand the cipher key into the encryption key schedule.

rijndael_decrypt ( rijndael_ctx ctx, byte src, byte dst ) : void
rijndael_encrypt ( rijndael_ctx ctx, byte src, byte dst ) : void
rijndael_set_key ( rijndael_ctx ctx, byte key, int bits ) : int
rijndael_set_key_enc_only ( rijndael_ctx ctx, byte key, int bits ) : int

Private Methods

Method Description
GETuint ( byte pt ) : uint
PUTuint ( byte ct, uint st ) : void
xor_128 ( byte a, byte b, byte Out ) : void

Method Details

AES_CMAC() public static method

public static AES_CMAC ( AES_ctx ctx, byte input, int length, byte mac ) : void
ctx AES_ctx
input byte
length int
mac byte
return void

AES_CMAC_forge() public static method

public static AES_CMAC_forge ( AES_ctx ctx, byte input, int length, byte forge ) : void
ctx AES_ctx
input byte
length int
forge byte
return void

AES_cbc_decrypt() public static method

public static AES_cbc_decrypt ( AES_ctx ctx, byte src, byte dst, int size ) : void
ctx AES_ctx
src byte
dst byte
size int
return void

AES_cbc_encrypt() public static method

public static AES_cbc_encrypt ( AES_ctx ctx, byte src, byte dst, int size ) : void
ctx AES_ctx
src byte
dst byte
size int
return void

AES_decrypt() public static method

public static AES_decrypt ( AES_ctx ctx, byte src, byte dst ) : void
ctx AES_ctx
src byte
dst byte
return void

AES_encrypt() public static method

public static AES_encrypt ( AES_ctx ctx, byte src, byte dst ) : void
ctx AES_ctx
src byte
dst byte
return void

AES_set_key() public static method

public static AES_set_key ( AES_ctx ctx, byte key, int bits ) : int
ctx AES_ctx
key byte
bits int
return int

generate_subkey() public static method

public static generate_subkey ( AES_ctx ctx, byte K1, byte K2 ) : void
ctx AES_ctx
K1 byte
K2 byte
return void

leftshift_onebit() public static method

public static leftshift_onebit ( byte input, byte output ) : void
input byte
output byte
return void

memcmp() public static method

public static memcmp ( byte str1, byte str2, int count ) : int
str1 byte
str2 byte
count int
return int

memcpy() public static method

public static memcpy ( byte dst, byte src, int count ) : void
dst byte
src byte
count int
return void

memcpy() public static method

public static memcpy ( void dst, void src, int count ) : void
dst void
src void
count int
return void

padding() public static method

public static padding ( byte lastb, byte pad, int length ) : void
lastb byte
pad byte
length int
return void

rijndaelDecrypt() public static method

public static rijndaelDecrypt ( uint rk, int Nr, byte ct, byte pt ) : void
rk uint
Nr int
ct byte
pt byte
return void

rijndaelEncrypt() public static method

public static rijndaelEncrypt ( uint rk, int Nr, byte pt, byte ct ) : void
rk uint
Nr int
pt byte
ct byte
return void

rijndaelKeySetupDec() public static method

Expand the cipher key into the decryption key schedule.
public static rijndaelKeySetupDec ( uint rk, byte cipherKey, int keyBits ) : int
rk uint
cipherKey byte
keyBits int
return int

rijndaelKeySetupEnc() public static method

Expand the cipher key into the encryption key schedule.
public static rijndaelKeySetupEnc ( uint rk, byte cipherKey, int keyBits ) : int
rk uint
cipherKey byte
keyBits int
return int

rijndael_decrypt() public static method

public static rijndael_decrypt ( rijndael_ctx ctx, byte src, byte dst ) : void
ctx rijndael_ctx
src byte
dst byte
return void

rijndael_encrypt() public static method

public static rijndael_encrypt ( rijndael_ctx ctx, byte src, byte dst ) : void
ctx rijndael_ctx
src byte
dst byte
return void

rijndael_set_key() public static method

public static rijndael_set_key ( rijndael_ctx ctx, byte key, int bits ) : int
ctx rijndael_ctx
key byte
bits int
return int

rijndael_set_key_enc_only() public static method

public static rijndael_set_key_enc_only ( rijndael_ctx ctx, byte key, int bits ) : int
ctx rijndael_ctx
key byte
bits int
return int