|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
[code] One of IS at The Encryption shemes in ncsim Utilizing
RC5 to the encrypt at The keyblock. at The IS ENCRYPTED Part
Marked the with
// pragma Protect key_keyname = CDS_KEY
// pragma Protect key_method = RC5
style directives.
at The key_block sectionTop that the this scheme command RC5 encrypts
IS text snippet that in Term A the includes at The Encryption Method
of at The data_block, IT IS Normally the AES and the AES at The Key.
An Example of sectionTop at The key_block: --------- --------- the before the decrypt - // pragma Protect key_block CPuqmTjFp2LUUeeTQCmjXOtQIYdyxp0M4cUOb1KoZjg + IZHFIf / lII1Gcm36dPgT dOL8xO0E1LGVCab1wSMzG9r5keP4bLvlYgPV / xfFb + kJ3xprGZJwz2L9HjIX4NhC afDnbYui0WnFdgCie / wO3qZOwTPUnTzSsQ / mohys88s5 + 6CDx9iJ0w == // pragma Protect end_key_block ------------------- ---------------- --------- ----------- the After the decrypt @fbaWIKWEo [the NCP: ENG_VER = 1.100000] // pragma data_method = the AES Protect // pragma Protect data_decrypt_key xSzOPdVsfyMAAAAAAAAA == ----------------------------------- Here at The IS Keys / Method to the decrypt IT: ncsim the uses RC5_CBC This IS Similar to AES_CBS in. that IT the runs A the decrypt Round and A Final XOR a using A Runtime the Vector at The RC5_CBC the Parameters are:. RC5 Key: 96e8dfd8354fb228 RC5_CBC IV: 636164656e636500 RC5 Rounds: 0x14 the For at The the AES Key that IS Inside at The key_block sectionTop at The the Initialization the Vector Used by aes_cbc IS: the AES IV: 636164656e63652064657369676e2073 at The RC5 keyschedule IS Standard RC5 the In the OpenSSL Terminology:. RC5_32_set_key (& Key,. 8, D, 20); (Note that the OpenSSL does only Implement RC5 up to RC5_16_ROUNDS, you have have to Patch the OpenSSL to increse at The Supported RC5 Rounds and unroll By RC5_32_decrypt to Support IT. Note Also that you need to use Linux-x32 SO that "Long int" IS 32 'bit) at The the decrypt IS Again Standard RC5, Openssl Terminology in: RC5_32_decrypt (P, & Key); the WHERE 2 INTS are DECRYPTED ON the each Call. at The Complete RC5_CBC Algo Used by ncsim: unsigned int * P = ..; int len = ..; char Key [] = {0x96, 0xE8, 0xDF, 0xD8, 0x35, 0x4f, 0xb2, 0x28}; unsigned Long iv0 = 0x65646163; / * Cade * / unsigned Long IV1 = 0x65636e; / * NCE \ 0 * / RC5_32_set_key (& Key,. 8, D, 20); for (i = 0; i <len; i + = 2) { unsigned int O0, O1; O0 = P [i + 0]; O1 = P [i + 1]; RC5_32_decrypt (P + i, & Key); P [ 0 + i] ^ = iv0; P [i + 1] = ^ IV1; iv0 = O0; IV1 = O1; } [/ code] |
|