derekfilyau / rainbowsandpwnies

Automatically exported from code.google.com/p/rainbowsandpwnies
0 stars 0 forks source link

Use FireMasterLinux with CUDA/OpenCL #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Self explainatory.  For speed enhancement.

Files of note:

des.cpp and sha_fast.cpp have the most potential to be modified, and they
do nearly all of the decryption work.

Original issue reported on code.google.com by christo....@gmail.com on 27 May 2010 at 6:58

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The code for this issue gets very confusing, as it jumps between many files, so 
I put
together some brief notes on function calls that may be able to be optimized for
CUDA/OpenCL Implementation:

bool CheckMasterPassword() in firemaster_main.cpp calls nsspkcs5_CipherData in 
lowpbe.cpp

int nsspkcs5_CipherData(): lowpbe.cpp
    computeKey:
        SHA1_Begin, Update, End
        Inputs the padding
        Initializes 3 SHA1Context's, Begin, Update, End (Saving Each one along the way)
        Returns ret_bits-> data
    DES_CreateContext:
        Initializes a DESContext
        DES_MakeSchedule x3 (DECRYPT, ENCRYPT, DECRYPT, for triple DES)
        Returns the context
    calls and returns DES_EDE3CBCDe with DESContext and encryption string

int DES_EDE3CBCDe(): des.cpp
    DES_Do1Block() x 3:
        16 Fiestel Rounds (lookups and shifts using data in S Boxes defined at top of des.cpp)
        Circular Shift to undo the shifting done above
    returns 1 or 0, depending on whether the decrypted plaintext matches the
KEYDB_PW_CHECK_STR (which is "password") 

Original comment by christo....@gmail.com on 30 May 2010 at 1:18